| 1 | # Controller brief: build Equipo plan 3 (coordinator and conversation) |
| 2 | |
| 3 | You are the controller for building plan 3 (3a, then 3b) on branch `plan-3` in |
| 4 | `/home/paulca/amadan.net/oficina/equipo-plan-3`. Paul approved building it on |
| 5 | 2026-11-03 ("Go ahead. Get it done."). 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-04-equipo-plan-3-coordinator.md` |
| 10 | (Opus R1 NOT READY, R2 READY AFTER FIXES, fixes applied at 4ebd057; its |
| 11 | briefs `CODEX-BRIEF-plan-3*.md` beside it; the two overnight rulings are |
| 12 | in it) |
| 13 | - Spec section 13 (revision 3) and the mockups in `docs/mockups/` |
| 14 | - **Plan 2b is still finishing** on branch `plan-2b` (its controller is |
| 15 | Paseo agent 7fc70b2c; do not message or disturb it). This branch started |
| 16 | from plan-2b at 9cd5910. Merge `origin/plan-2b` into `plan-3` before each |
| 17 | task, and once more when plan 2b's final review is done, resolving any |
| 18 | conflict in favour of plan 2b's fixes. |
| 19 | - Roadmap: `docs/superpowers/plans/2026-11-01-equipo-roadmap.md` |
| 20 | - Repo rules: this repo's `AGENTS.md`. |
| 21 | - How plan 1 was built (ledger pattern, Codex launch scripts, review |
| 22 | packages): plan 1's controller brief in git history, |
| 23 | `git show e5c58ab:docs/superpowers/plans/CONTROLLER-BRIEF-plan-1-build.md`. |
| 24 | |
| 25 | ## How to run it |
| 26 | |
| 27 | Use `superpowers:subagent-driven-development`, with these adaptations that |
| 28 | Paul approved: |
| 29 | |
| 30 | 1. **Implementers are Astra via Codex, not Claude subagents** (Anthropic |
| 31 | weekly usage is the scarce resource). One Codex run per task: |
| 32 | - Extract the task brief with the skill's `scripts/task-brief`. |
| 33 | - Write a launch script and run it **with the sandbox off**: |
| 34 | `setsid nohup <script> &`, where the script `cd`s into this worktree and |
| 35 | runs `codex exec -m gpt-6-astra -c model_reasoning_effort="high" |
| 36 | --dangerously-bypass-approvals-and-sandbox -o <final.md> "<prompt>" |
| 37 | </dev/null > <log> 2>&1; touch <done-marker>`. |
| 38 | - Within 20 seconds, check the log exists and is growing. Wait on the |
| 39 | `.done` marker with a background `until` loop, never `pgrep -f`. |
| 40 | - The Codex prompt names the brief file and the report file, and says: |
| 41 | commit with `--author "codex <codex~paul@keymail.dev>"`; do not spawn |
| 42 | Anthropic-model reviewers or any other agents; do not create |
| 43 | `.claude/HANDOFF.md`; scratch under `$TMPDIR`; leave Go caches at their |
| 44 | defaults; run targeted tests only (`go test ./pkg/... -run TestX`); bind |
| 45 | any server to `127.0.0.1`; stop what it starts. |
| 46 | - Fix rounds are a new Codex run given the brief, the report file and the |
| 47 | findings. |
| 48 | 2. **Per-task review by risk.** Tasks 5 (coordinator authority and |
| 49 | admission), 6 (coordinator tools), 7 (coordinator sessions and context), |
| 50 | 10 (person API and CSRF), 15 (invitations), 16 (runner install and |
| 51 | pairing), 17 (account setup) and 20 (the native API) each get a task review by an **Opus** subagent (model |
| 52 | `opus`), using the skill's task-reviewer template and review package. |
| 53 | The other tasks get no per-task review; the final whole-branch review |
| 54 | covers them. Record this as a ruling in the ledger at the start. |
| 55 | 3. **Final whole-branch review by Opus**, one fix wave, one scoped |
| 56 | re-review, as the skill says. |
| 57 | 4. Run the repo's full `make ci` once before the final review, not in a loop. |
| 58 | |
| 59 | ## Never |
| 60 | |
| 61 | - Merge, deploy, or push to `main`. |
| 62 | - Enrol a machine, sign in to a provider, create credential homes, or run |
| 63 | live provider sessions. Use the recorded fixtures plan 2b made. Build and |
| 64 | test everything offline (network allowed); prepare live steps as a |
| 65 | script and checklist and stop there with a handoff saying exactly what |
| 66 | Paul must do. |
| 67 | - Touch another session's Paseo agents, workspaces or daemon configuration. |
| 68 | - `git worktree prune`, `git clean -fdx` outside `$TMPDIR`, `sudo`, or |
| 69 | changes to `GOCACHE`/`GOMODCACHE`. |
| 70 | - Chain setup commands with `;` (use `&&`). |
| 71 | |
| 72 | ## Keep the branch page true |
| 73 | |
| 74 | - Push after each completed task. |
| 75 | - Advance the branch's Amadan tasks as you go: |
| 76 | `amadan task list oficina/equipo -branch plan-3`, then |
| 77 | `amadan task set oficina/equipo <id> -branch plan-3 -status Done`. |
| 78 | - Rulings that need Paul go in a discussion on the branch |
| 79 | (`amadan discuss new oficina/equipo -branch plan-3 ...`); keep going on |
| 80 | everything that does not depend on the answer. |
| 81 | - When you finish or stop, write the branch handoff |
| 82 | (`amadan branch handoff ... -state - -next ...`) and end your final |
| 83 | message with: what was built, test and review results, every ruling you |
| 84 | 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. |
| 85 | |
| 86 | ## UI rule from Paul |
| 87 | |
| 88 | No coloured left-border accents on cards, notes or list items; hairline border |
| 89 | and tint instead (`docs/mockups/README.md`). |
| 90 | |
| 91 | ## Briefs to Codex |
| 92 | |
| 93 | Say in every Codex prompt itself (not only the brief file): do not start a |
| 94 | copy-review server; list user-facing strings instead. Say "network |
| 95 | allowed"; never "offline", which made an earlier run set GOPROXY=off. |
| 96 | |
| 97 | ## Overnight |
| 98 | |
| 99 | Paul is away and said "get it done". Rule on what would otherwise wait for |
| 100 | him and ledger it; record decisions that genuinely need him in a discussion |
| 101 | on plan-3 and keep going. If a usage limit stops a dispatch, wait for the |
| 102 | reset and resume. Before going idle on any wait, use a background waiter |
| 103 | that touches a .done marker, and check it on wake. Copy: list strings for |
| 104 | Paul's copy review; do not start a review server. |
| 105 | |