| 1 | # Brief: revise plan 3 after Opus round 1 (NOT READY, one P1) |
| 2 | |
| 3 | Edit `docs/superpowers/plans/2026-11-04-equipo-plan-3-coordinator.md` only. |
| 4 | Apply every finding with these controller decisions (do not reopen). Verify |
| 5 | against the code on this branch as before. No provider runs. |
| 6 | |
| 7 | P1-1 (Task 7): drop provider-session resume for coordinators. Each |
| 8 | coordinator turn starts a fresh provider session seeded from the instance's |
| 9 | stored conversation context: a bounded recent window, the person's |
| 10 | confirmed decisions and preferences, and scoped retrieval, as spec section |
| 11 | 3/4 already describes. No reliance on lease-local session files or the |
| 12 | launcher's in-memory session table. `TestCoordinatorSessionContinuity` runs |
| 13 | through the real Claude and Codex launchers (with recorded fixtures) across a |
| 14 | lease close and a runner restart. |
| 15 | |
| 16 | P2 decisions |
| 17 | 1. Budgets: put plan 3's new code in named new packages (for example |
| 18 | `internal/equipo/conversation`, `internal/equipo/library`, |
| 19 | `internal/equipo/personapi`) rather than growing `team` and |
| 20 | `internal/equipo`; list each package's budget lines; move the browser |
| 21 | and acceptance tests to a new test package with its own time budget. |
| 22 | 2. CSRF: Task 10 replaces the global `csrf.Protect` with an explicit |
| 23 | dispatcher (cookie routes protected; runner and native bearer APIs |
| 24 | exempt), with an app-level test through the real handler that bearer |
| 25 | POSTs pass and cross-origin cookie POSTs fail. (The same defect was sent |
| 26 | to plan 2b's fix wave; depend on its fix if it lands first.) |
| 27 | 3. Task 4 lists and changes the provider files it needs |
| 28 | (`runtime_direct.go` step mapping, Claude `nativeTools` and the MCP tool |
| 29 | allowlist, Codex equivalents) and certifies the new policies. |
| 30 | 4. Rendered changes: the trusted executor renders the exact candidate; the |
| 31 | person's approval is bound to the candidate diff with the render as an |
| 32 | aid; `ApproveRenderedChange` requires the project's copy or design |
| 33 | decision owner. |
| 34 | 5. Add the test: an edit after review and checks requires fresh review, |
| 35 | checks and rendered approval. |
| 36 | 6. Pairing keeps the existing direction: the runner prints the code and the |
| 37 | person approves it in the browser (`BeginEnrolmentRequest`). Note that |
| 38 | the onboarding mockup will be updated to match. |
| 39 | 7. Install-time containment preflight (bwrap 0.11.0, unprivileged user |
| 40 | namespaces, the Ubuntu 24.04 AppArmor restriction) with an explicit |
| 41 | unavailable state that says what is missing; no sudo fixes. |
| 42 | 8. Fold the overnight rulings into Tasks 17 and 21: Claude's official |
| 43 | browser sign-in into the dedicated home, the code pasted at the runner's |
| 44 | terminal on a headless machine and never passing through the instance, |
| 45 | with a test; Mac runner shown as "coming later". |
| 46 | 9. Step selection prefers a connection other than the coordinator's when |
| 47 | one is eligible; otherwise the coordinator's turn shows a visible |
| 48 | waiting state; test both. |
| 49 | 10. API: add read-only `GET /people`, and owner roster and budget endpoints. |
| 50 | |
| 51 | P3: apply all (0021 table ownership; move the device-credential flow from |
| 52 | Task 10 to 3b with Task 20; drop Task 18's link import/export; make the |
| 53 | self-review bullets decide something; device approval shows label and time |
| 54 | and requires typing the code; notification subscription expiry; report |
| 55 | "runner stops at logout" when lingering is off). |
| 56 | |
| 57 | Append "Round 1 dispositions". No product code, commits or pushes; no |
| 58 | agents; no copy-review server; scratch under `$TMPDIR` removed; network |
| 59 | allowed. Print a three-line summary. |
| 60 | |