Plan 1 round 1 findings (Opus) and fix brief
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+123
−0
docs/superpowers/plans/CODEX-BRIEF-plan-1-foundation-fixes-R1.md+58 −0docs/superpowers/plans/REVIEW-FINDINGS-plan-1-foundation-R1.md+65 −0
No CI script — run details
diff --git a/docs/superpowers/plans/CODEX-BRIEF-plan-1-foundation-fixes-R1.md b/docs/superpowers/plans/CODEX-BRIEF-plan-1-foundation-fixes-R1.md| new file mode 100644 |
| index 00000000..f23bdb16 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/CODEX-BRIEF-plan-1-foundation-fixes-R1.md |
| @@ -0,0 +1,58 @@ |
| +# Brief: revise Equipo plan 1 after review round 1 |
| + |
| +Edit `docs/superpowers/plans/2026-11-01-equipo-plan-1-foundation.md` in this |
| +worktree to resolve every finding in |
| +`docs/superpowers/plans/REVIEW-FINDINGS-plan-1-foundation-R1.md`, using the |
| +decisions below. Verify each change against Rastrillo `v0.28.0` |
| +(`git -C /home/paulca/amadan.net/rastrillo/rastrillo show v0.28.0:<path>`) |
| +and the prototype at |
| +`/home/paulca/amadan.net/carlos/platform-team-service/internal/team`. |
| + |
| +## Decisions (made by the controller; do not reopen) |
| + |
| +- **P1-1:** use `pow.New` with `Difficulty: pow.NoProof` (token form with |
| + `MinAge`, works without JavaScript; see `pow/browser_test.go` |
| + `TestBrowserNoProofWorksWithoutJavaScript` at the tag). Add `pow.Schema` to |
| + `BootSchema`, serve `pow.Assets()` if the form needs them, put the fields |
| + in the sign-in form, and add a test that `auth.New` succeeds with the |
| + production config. Not `ProofOff`. |
| +- **P2-1:** the reviewer's fix: a separate `time_reservations` table keyed |
| + by attempt, settled only in `Contain`, excluded from receipt and audited |
| + settlement, counted only in period checks. Name the existing tests that |
| + prove the call ledger is unchanged. |
| +- **P2-2:** add `Project.DefaultBranch` entered by an owner (no repository |
| + probing); Authority rejects a `DefaultRef` that differs and any `Ref` equal |
| + to it, with tests. |
| +- **P2-3:** test sign-in by email link through a capturing mailer. |
| +- **P2-4, P2-5:** as the findings say. |
| +- **P3s:** apply all of them: say configured mode drops account `CostMicros`; |
| + allow lowering a budget below usage (new work blocks); `Authorize` false on |
| + DB error; delete a removed member's sessions; document `EQUIPO_OWNERS` |
| + first-boot-only; use the framework's `SigninScreen`/`ui` sign-in partial |
| + if it exists at the tag and accepts the pow fields, otherwise the app's |
| + own `signin.html`, and say which; unique on repository plus app; say how |
| + the per-page speed test signs in; trim Task 5 Step 4 and the grounding |
| + table to decisions; replace self-review items 2 and 5 with checks that |
| + decide something. |
| + |
| +## Paul's answers since the plan was written (apply them) |
| + |
| +- Equipo deploys under the **`oficina` CARLOS account on the flagship |
| + console** (`https://console.carloku.com/a/oficina`). Resolve the "Questions |
| + for Paul" section with this and make Task 10 use it. |
| +- **Projects have a kind: app, website or repository.** One Projects list; |
| + each card shows its kind (spec section 3.3, commit 3bb1dae). Add the kind |
| + to Task 4's record and form and Task 8's overview. |
| +- The rail no longer includes the console's Apps and Billing. Equipo's rail |
| + is: team header; Conversation, Needs you, Journey, Projects; Specialists |
| + (the five); a Team group with Connections, People, Settings |
| + (`docs/mockups/nav.html`). Update Task 8 to match. |
| + |
| +## Rules |
| + |
| +- Edit only the plan file. Do not commit or push. Do not write product code. |
| +- Do not spawn Anthropic-model reviewers or other agents. |
| +- No `.claude/HANDOFF.md`. Scratch under `$TMPDIR`, removed at the end. |
| +- At the end of the plan, add a short "Round 1 dispositions" section: one |
| + line per finding saying how it was resolved. |
| +- Print a five-line summary when done. |
diff --git a/docs/superpowers/plans/REVIEW-FINDINGS-plan-1-foundation-R1.md b/docs/superpowers/plans/REVIEW-FINDINGS-plan-1-foundation-R1.md| new file mode 100644 |
| index 00000000..d77b1533 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/REVIEW-FINDINGS-plan-1-foundation-R1.md |
| @@ -0,0 +1,65 @@ |
| +# Review findings: plan 1 (Foundation), round 1 (Opus 5.5), at 9d63eed |
| + |
| +Verdict: **NOT READY** (one P1). Recorded as returned, lightly condensed for |
| +the file; evidence citations are the reviewer's. |
| + |
| +## P1 |
| + |
| +**P1-1 (Task 3, touches Tasks 1 and 9): the sign-in config omits the |
| +required `Proof`/`ProofOff` choice, so the app cannot start.** At `v0.28.0`, |
| +`auth/auth.go:380-382` makes `auth.New` return `ErrProofUnset` when |
| +`Config.Proof` is nil and `ProofOff` is false (message at `auth/auth.go:353`). |
| +The plan's `auth.Config{...}` (plan line 128) copied memoria, which pins |
| +rastrillo `v0.23.0` with no `Proof` field. A real guard needs `pow.Schema` in |
| +`BootSchema`, `pow.Assets()` served and challenge fields in `signin.html`; |
| +JavaScript is needed unless `Difficulty: pow.NoProof`. `ProofOff` lets anyone |
| +make Equipo email any address, bounded only by rate limiting. Fix: decide in |
| +the plan, wire schema/assets/template, and test `auth.New` succeeds with the |
| +production config. |
| + |
| +## P2 |
| + |
| +- **P2-1 (Task 5): time reservation is unspecified and the obvious route |
| + breaks the ledger.** No seconds column (`store.go:206-220`, `Usage` |
| + `model.go:808`); `reserve` refuses non-single-call reservations |
| + (`budget.go:104-106`); release goes through actions (`scheduler.go:359`, |
| + `jobs.go:479`), recovery joins reservations to actions (`recovery.go:120`), |
| + `SettleAudited` charges the reserved amount. Fix: a separate |
| + `time_reservations` table keyed by attempt, settled only in `Contain`, |
| + excluded from receipt and audited settlement, counted only in period |
| + checks; name the tests proving the call ledger is unchanged. |
| +- **P2-2 (Tasks 4, 6): the "never the default branch" check compares against |
| + a job-supplied value.** `TargetBinding.DefaultRef` comes from the job spec |
| + (`model.go:217-236`) and `actions.go:242` compares against it; `Project` |
| + stores no default branch. Fix: `Project.DefaultBranch` entered by an owner; |
| + Authority rejects a mismatched `DefaultRef` and any `Ref` equal to it. |
| +- **P2-3 (Task 3): the keymail callback test cannot be written from the |
| + app** (the fake needs unexported `a.guard.base`, |
| + `auth/keymailfake_test.go:118`, `keymail.go:145-151`). Fix: test sign-in by |
| + email link through a capturing mailer; leave keymail to the framework. |
| +- **P2-4 (Task 3): depends on later tasks.** Removal-while-assigned needs |
| + Task 4's owners; `TestSigninCSRF` targets Task 8 routes (a missing route |
| + still refuses, so it tests nothing). Fix: move the rule and test to Task 4; |
| + Task 3 tests the store. |
| +- **P2-5 (Task 1): assertion does not compile.** `migrate.Result.Applied` is |
| + `[]string` (`migrate/apply.go:46`); use `len(second.Applied) != 0`. |
| + |
| +## P3 |
| + |
| +- Task 5: configured mode drops the account-level `CostMicros` limit; say so. |
| + Allow lowering a budget below current usage (new work blocks) instead of |
| + refusing. |
| +- Task 3: `Authorize` answers false on DB error, say so; removing a member |
| + should delete their sessions; `EQUIPO_OWNERS` after first boot is ignored, |
| + document it; choose framework `SigninScreen`/`ui` partial or app |
| + `signin.html`. |
| +- Task 4: repository-unique projects block one repo hosting two apps; make |
| + repository plus app unique. |
| +- Tasks 1/8: the per-page speed test needs to say how it signs in. |
| +- Proportion: Task 5 Step 4 and the grounding table read partly as code; |
| + self-review items 2 and 5 decide nothing. |
| + |
| +Confirmed by the reviewer: generator flags, migration-check placement, all |
| +other named APIs and signatures, prototype imports (stdlib, sqlite, x/sys), |
| +5,243 counted lines, Go 1.25.0 floor, crash-helper compatibility. No build |
| +or tests were run (sandbox caches read-only). |