surfaces/.planning/phases/05-mvp-deployment/05-04-PLAN.md

6.4 KiB

phase plan type wave depends_on files_modified autonomous requirements must_haves
05-mvp-deployment 04 execute 2
05-03
docker-compose.prod.yml
docker-compose.fullstack.yml
Dockerfile
.env.example
README.md
docs/deploy-architecture.md
true
PH05-05
truths artifacts key_links
Production handoff uses a bot-only compose artifact instead of the internal full-stack harness.
Internal E2E compose brings up the bot, platform-agent, and shared volume with explicit health-gated startup.
Deployment docs and env examples match the split compose artifacts and shared `/agents` contract.
path provides
docker-compose.prod.yml Bot-only deployment handoff artifact
path provides
docker-compose.fullstack.yml Internal E2E harness with shared volume and dependency gating
path provides
.env.example Documented runtime contract for Phase 05 deployment
from to via pattern
docker-compose.fullstack.yml docker-compose.prod.yml shared service definition or explicit duplication matrix-bot
from to via pattern
docs/deploy-architecture.md docker-compose.prod.yml operator handoff instructions prod
Split deployment artifacts by operational intent so operator handoff and internal E2E testing stop sharing the same compose contract.

Purpose: Phase 05 needs an explicit bot-only production artifact and a separate full-stack compose harness aligned with the shared-volume design. Output: docker-compose.prod.yml, docker-compose.fullstack.yml, and updated env/docs describing when to use each.

<execution_context> @/Users/a/.codex/get-shit-done/workflows/execute-plan.md @/Users/a/.codex/get-shit-done/templates/summary.md </execution_context>

@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/05-mvp-deployment/05-RESEARCH.md @.planning/phases/05-mvp-deployment/05-VALIDATION.md @.planning/phases/04-matrix-mvp-shared-agent-context-and-context-management-comma/04-03-SUMMARY.md @docs/deploy-architecture.md @docker-compose.yml @Dockerfile @.env.example Current root compose contract:
services:
  platform-agent:
    ...
  matrix-bot:
    build: .
    env_file: .env
    environment:
      AGENT_BASE_URL: http://platform-agent:8000
      SURFACES_WORKSPACE_DIR: /workspace
Task 1: Create split prod and fullstack compose artifacts docker-compose.prod.yml, docker-compose.fullstack.yml, Dockerfile, .env.example docker-compose.yml, Dockerfile, .env.example, docs/deploy-architecture.md, .planning/phases/05-mvp-deployment/05-RESEARCH.md, .planning/phases/05-mvp-deployment/05-VALIDATION.md - `docker-compose.prod.yml` defines only the bot-side runtime required for operator handoff. - `docker-compose.fullstack.yml` includes the internal platform-agent service, shared volume mounts, and health-gated startup rather than sleep-based sequencing. - `.env.example` documents the Phase 05 env contract without requiring the reader to inspect the old root compose file. Create two explicit compose artifacts per PH05-05: a bot-only `docker-compose.prod.yml` for deployment handoff and a `docker-compose.fullstack.yml` for internal E2E runs. Align mounts and env values with the Phase 05 shared `/agents` volume direction from research. Reuse the existing Dockerfile unless a small compatibility edit is required. Do not keep the old single-file compose setup as the only documented runtime. docker compose -f docker-compose.prod.yml config > /tmp/phase05-prod-compose.yml && docker compose -f docker-compose.fullstack.yml config > /tmp/phase05-fullstack-compose.yml && rg -n "^services:$|^ matrix-bot:$|^volumes:$|/agents" /tmp/phase05-prod-compose.yml && test -z "$(rg -n "^ platform-agent:$" /tmp/phase05-prod-compose.yml)" && rg -n "^ matrix-bot:$|^ platform-agent:$|condition: service_healthy|healthcheck:|/agents" /tmp/phase05-fullstack-compose.yml Both compose files render successfully and express distinct operational roles: prod handoff vs internal full-stack testing. Task 2: Update deployment docs and operator guidance for the split artifacts README.md, docs/deploy-architecture.md README.md, docs/deploy-architecture.md, docker-compose.prod.yml, docker-compose.fullstack.yml, .env.example - README or deploy doc tells the operator exactly which compose file to use for production vs internal E2E. - The docs describe the shared `/agents` volume behavior and reference the relevant env vars. - The old root `docker-compose.yml` is no longer the primary documented deployment path. Update the repo docs so the Phase 05 deployment story is executable without inference: production handoff stays bot-only, full-stack compose is for internal E2E, and shared-volume file behavior is described in the same terms as the runtime artifacts. Keep documentation narrowly scoped to the shipped compose split; do not widen into platform-master or future storage design. rg -n "docker-compose\\.prod|docker-compose\\.fullstack|/agents|prod handoff|full-stack" README.md docs/deploy-architecture.md .env.example && rg -n "production|deploy" README.md docs/deploy-architecture.md | rg "docker-compose\\.prod" && test -z "$(rg -n "docker compose up|docker-compose\\.yml" README.md docs/deploy-architecture.md | rg "production|deploy")" The docs and env guidance match the new compose artifacts and no longer imply a single shared deployment file. Render both compose files, then grep the docs for the new artifact names and `/agents` references so the operator contract is explicit and consistent.

<success_criteria> An operator can deploy the Matrix bot with the bot-only compose file, while developers can run the internal end-to-end harness separately without reinterpreting the deployment docs. </success_criteria>

After completion, create `.planning/phases/05-mvp-deployment/05-04-SUMMARY.md`