| 1 | # Controller brief: build Equipo plan 2b (direct launch) |
| 2 | |
| 3 | You are the controller for building plan 2b on branch `plan-2b` in |
| 4 | `/home/paulca/amadan.net/oficina/equipo-plan-2b`. Paul approved the plan and |
| 5 | the execution approach on 2026-11-03 ("yes"). You did not take part |
| 6 | in the design conversation; everything you need is in these files: |
| 7 | |
| 8 | - Spec: `docs/superpowers/specs/2026-11-01-equipo-design.md` |
| 9 | - Plan: `docs/superpowers/plans/2026-11-03-equipo-plan-2b-direct.md` |
| 10 | (READY AFTER FIXES at Opus round 1; fixes applied; see its dispositions) |
| 11 | - Its brief and fix brief: `CODEX-BRIEF-plan-2b.md`, |
| 12 | `CODEX-BRIEF-plan-2b-fixes-R1.md` beside it |
| 13 | - Evidence: `docs/superpowers/specs/2026-11-03-direct-cli-probe.md` and |
| 14 | `docs/superpowers/specs/2026-11-03-bwrap-nesting.md` |
| 15 | - Plan 2 as built (this branch's history) and its plan |
| 16 | `docs/superpowers/plans/2026-11-02-equipo-plan-2-runner.md` |
| 17 | - Plan 1 carries and rulings: `amadan discuss show oficina/equipo 2` |
| 18 | - Roadmap: `docs/superpowers/plans/2026-11-01-equipo-roadmap.md` |
| 19 | - Repo rules: this repo's `AGENTS.md`. |
| 20 | - How plan 1 was built (ledger pattern, Codex launch scripts, review |
| 21 | packages): plan 1's controller brief in git history, |
| 22 | `git show e5c58ab:docs/superpowers/plans/CONTROLLER-BRIEF-plan-1-build.md`. |
| 23 | |
| 24 | ## How to run it |
| 25 | |
| 26 | Use `superpowers:subagent-driven-development`, with these adaptations that |
| 27 | Paul approved: |
| 28 | |
| 29 | 1. **Implementers are Astra via Codex, not Claude subagents** (Anthropic |
| 30 | weekly usage is the scarce resource). One Codex run per task: |
| 31 | - Extract the task brief with the skill's `scripts/task-brief`. |
| 32 | - Write a launch script and run it **with the sandbox off**: |
| 33 | `setsid nohup <script> &`, where the script `cd`s into this worktree and |
| 34 | runs `codex exec -m gpt-6-astra -c model_reasoning_effort="high" |
| 35 | --dangerously-bypass-approvals-and-sandbox -o <final.md> "<prompt>" |
| 36 | </dev/null > <log> 2>&1; touch <done-marker>`. |
| 37 | - Within 20 seconds, check the log exists and is growing. Wait on the |
| 38 | `.done` marker with a background `until` loop, never `pgrep -f`. |
| 39 | - The Codex prompt names the brief file and the report file, and says: |
| 40 | commit with `--author "codex <codex~paul@keymail.dev>"`; do not spawn |
| 41 | Anthropic-model reviewers or any other agents; do not create |
| 42 | `.claude/HANDOFF.md`; scratch under `$TMPDIR`; leave Go caches at their |
| 43 | defaults; run targeted tests only (`go test ./pkg/... -run TestX`); bind |
| 44 | any server to `127.0.0.1`; stop what it starts. |
| 45 | - Fix rounds are a new Codex run given the brief, the report file and the |
| 46 | findings. |
| 47 | 2. **Per-task review by risk.** Tasks 2 (PID namespace containment), 3 |
| 48 | (egress), 4 (account binding and attestation), 7 (journal and |
| 49 | recovery), 8 (tool, permission and question relay) and 10 (readback and |
| 50 | publication) each get a task review by an **Opus** subagent (model |
| 51 | `opus`), using the skill's task-reviewer template and review package. |
| 52 | The other tasks get no per-task review; the final whole-branch review |
| 53 | covers them. Record this as a ruling in the ledger at the start. |
| 54 | 3. **Final whole-branch review by Opus**, one fix wave, one scoped |
| 55 | re-review, as the skill says. |
| 56 | 4. Run the repo's full `make ci` once before the final review, not in a loop. |
| 57 | |
| 58 | ## Never |
| 59 | |
| 60 | - Merge, deploy, or push to `main`. |
| 61 | - Enrol a machine, sign in to a provider, create credential homes, or run |
| 62 | Task 11b's live certification. Those need Paul's dedicated Equipo |
| 63 | credential homes. The one exception: Task 5's authorised recording run |
| 64 | (at most two tiny Claude runs on |
| 65 | `/home/paulca/.paseo/zerosub/homes/claude-2b21c7944303`, which has |
| 66 | allowance), inside the plan's bubblewrap where possible. Build and test |
| 67 | everything else offline (network allowed), prepare 11b's live steps as a |
| 68 | script and checklist, and stop there with a handoff saying exactly what |
| 69 | Paul must do. |
| 70 | - Touch another session's Paseo agents, workspaces or daemon configuration. |
| 71 | - `git worktree prune`, `git clean -fdx` outside `$TMPDIR`, `sudo`, or |
| 72 | changes to `GOCACHE`/`GOMODCACHE`. |
| 73 | - Chain setup commands with `;` (use `&&`). |
| 74 | |
| 75 | ## Keep the branch page true |
| 76 | |
| 77 | - Push after each completed task. |
| 78 | - Advance the branch's Amadan tasks as you go: |
| 79 | `amadan task list oficina/equipo -branch plan-2b`, then |
| 80 | `amadan task set oficina/equipo <id> -branch plan-2b -status Done`. |
| 81 | - Rulings that need Paul go in a discussion on the branch |
| 82 | (`amadan discuss new oficina/equipo -branch plan-2b ...`); keep going on |
| 83 | everything that does not depend on the answer. |
| 84 | - When you finish or stop, write the branch handoff |
| 85 | (`amadan branch handoff ... -state - -next ...`) and end your final |
| 86 | message with: what was built, test and review results, every ruling you |
| 87 | made (with what it costs if wrong), and the exact steps Paul runs for the live gate. Clean up scratch and any processes you started. |
| 88 | |
| 89 | ## UI rule from Paul |
| 90 | |
| 91 | No coloured left-border accents on cards, notes or list items; hairline border |
| 92 | and tint instead (`docs/mockups/README.md`). |
| 93 | |
| 94 | ## Briefs to Codex |
| 95 | |
| 96 | Say in every Codex prompt itself (not only the brief file): do not start a |
| 97 | copy-review server; list user-facing strings instead. Say "network |
| 98 | allowed"; never "offline", which made an earlier run set GOPROXY=off. |
| 99 | |