docs(prd-0018): one compose project per bottle instance #33

Merged
didericis merged 3 commits from compose-per-instance into main 2026-05-25 22:42:36 -04:00
Owner

Summary

Draft PRD for replacing the per-sidecar docker SDK chain in claude-bottle start with one docker compose project per bottle instance. Each state/<slug>/ dir becomes self-describing — a single cat away from understanding what an instance ran.

state/<slug>/ after this PRD:

  • metadata.json — adds a compose_project field
  • docker-compose.yml — the exact spec used to spin the instance up
  • compose.log — full dump of docker compose logs --no-color at session end
  • transcript/ + live-config/ — unchanged

Sidecar stage-file delivery moves from docker cp into containers to host bind-mounts under the state dir, which lets each Docker{Sidecar} class collapse its start/stop lifecycle into a single compose_service(plan) method that returns a service-stanza fragment. Apply flows (pipelock-block / egress-block / capability-block) keep working unchanged because the SIGHUP-reload protocol against the bind-mounted files doesn't change.

Sized into 5 implementation chunks. Drafted with seven open questions called out — the most load-bearing being the agent's foreground attachment under compose and the bind-mount semantics of compose down --volumes.

## Summary Draft PRD for replacing the per-sidecar `docker` SDK chain in `claude-bottle start` with one `docker compose` project per bottle instance. Each `state/<slug>/` dir becomes self-describing — a single `cat` away from understanding what an instance ran. `state/<slug>/` after this PRD: - `metadata.json` — adds a `compose_project` field - `docker-compose.yml` — the exact spec used to spin the instance up - `compose.log` — full dump of `docker compose logs --no-color` at session end - `transcript/` + `live-config/` — unchanged Sidecar stage-file delivery moves from `docker cp` into containers to host bind-mounts under the state dir, which lets each `Docker{Sidecar}` class collapse its `start`/`stop` lifecycle into a single `compose_service(plan)` method that returns a service-stanza fragment. Apply flows (`pipelock-block` / `egress-block` / `capability-block`) keep working unchanged because the SIGHUP-reload protocol against the bind-mounted files doesn't change. Sized into 5 implementation chunks. Drafted with seven open questions called out — the most load-bearing being the agent's foreground attachment under compose and the bind-mount semantics of `compose down --volumes`.
didericis added 1 commit 2026-05-25 22:15:48 -04:00
docs(prd-0018): one compose project per bottle instance
test / unit (pull_request) Successful in 16s
test / integration (pull_request) Successful in 1m3s
3251ee1394
Draft a PRD that replaces the chain of per-sidecar docker SDK calls
in `claude-bottle start` with a single `docker compose` project per
instance. Each `state/<slug>/` dir gets a self-describing set of
artifacts: metadata.json, docker-compose.yml, compose.log, and the
existing transcript/ + live-config/.
didericis added 1 commit 2026-05-25 22:29:21 -04:00
feat(compose): pure renderer for bottle plan -> compose dict
test / unit (pull_request) Successful in 17s
test / integration (pull_request) Successful in 1m5s
4760a09263
PRD 0018 chunk 1. New module `claude_bottle/backend/docker/compose.py`
exposing `bottle_plan_to_compose(plan) -> dict` — a pure function that
translates a fully-resolved DockerBottlePlan into a Compose v2 spec.

Not wired in yet. Tests cover the conditional-service matrix (git
on/off × egress on/off × supervise on/off) plus per-service shape
(images vs builds, network aliases, bind mounts, env vars, depends_on).
didericis added 1 commit 2026-05-25 22:34:29 -04:00
docs(prd-0018): resolve TTY open question — keep exec -it
test / unit (pull_request) Successful in 18s
test / integration (pull_request) Successful in 1m3s
3386cabe62
didericis merged commit c8c302e50e into main 2026-05-25 22:42:36 -04:00
Sign in to join this conversation.