carlos / platform Public

Merge remote-tracking branch 'origin/main' into console-ux-nav

claude agent, operated by paul@keymail.dev 7232bc47f33e9346e0a0a34943022f523d6a033a parent 3f26e1eparent a64f5a4
2 files changed, +146 −8
  • AGENTS.md +71 −8
  • docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md +75 −0
diff --git a/AGENTS.md b/AGENTS.md
index a05cc3c01..2991abc7f 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -31,6 +31,70 @@ Always name the model explicitly when dispatching; an omitted model silently
inherits the session's (usually the most expensive). A precise brief beats a
capable model — exact values, file paths and interfaces go in the brief.
+## Stopping rules (Paul's rule, 2026-10-26)
+
+Work here spins when review rounds have no budget. In October three
+sessions ran 22 to 25 days each, one of them made 520 Astra runs, the
+region HA 1b-next plan reached review round 13, and `main` holds 508
+Astra brief and findings files. Each time Paul found out by asking
+"still going?". These rules bind every agent here, Claude and Codex,
+sessions and subagents, and the reviewers they brief.
+
+1. **A review stops at the first round with no P1.** This holds for
+ specs, plans, tasks and branches. Apply that round's P2 fixes without
+ reopening the review. P3s go on a follow-up list on the branch and
+ never start a round. A fourth round needs Paul's go: ask with what
+ rounds 1-3 found and what a fourth would buy. The count follows the
+ design or change, not the file: a revision, a rename, a split into
+ two documents, a new reviewer or a session handoff does not restart
+ it, so every brief and handoff carries the round history. Two checks
+ still apply to the diff the P2 fixes produce, inside the same budget:
+ the census, and review of any newly changed security, root,
+ termination or production-storage behaviour.
+2. **Two rounds in the same fault family: stop fixing.** A fault family
+ is the set of findings against one invariant or trust boundary,
+ whatever file or symptom they show up in; name that invariant beside
+ each finding. When fixes produce another finding in the same family
+ two rounds running, do not write a third fix. Offer Paul the choice:
+ - refuse the case up front, with a gate before the work starts and a
+ report for an operator (hostfiles, `RestorableWithinCap`);
+ - cut the feature that produces it (instance policy, live memory
+ growth);
+ - state the invariant, enforce it in one place, and check it with a
+ guard test or a randomized simulation (rootfs, the per-unit lock).
+3. **Size per-task review to risk.** A task gets its own Astra or Opus
+ review only when it touches a security gate, root or termination, a
+ cache, production storage, billing or a redirect. Everything else is
+ covered by one whole-branch review before merge.
+4. **Never review against unmerged work.** A plan that depends on a
+ design still changing on another branch waits until that design
+ merges. Region HA's plans were reviewed against the declared
+ interfaces of unmerged claim plans, so every claim revision reopened
+ them. One design in flight per area.
+5. **No dormant feature without a switch-on date.** Every later plan
+ touching its packages has to be reviewed against a feature merged
+ behind an off switch. Before building one, name what a user gets,
+ who is asking for it, and when it switches on. With no answer, keep
+ it on its branch. Claims, region HA and nearest-region placement all
+ sat dormant on `main`; claims was shelved on 2026-10-25 at spec
+ rev 6.34.
+6. **Something Paul can see lands first.** Order a plan so its first
+ merge changes something a user or Paul can observe. Measurement and
+ scaffolding ride with that slice, not ahead of it.
+7. **One session per plan, with a finish line.** A session owns one plan
+ or a stated slice, and ends when that merges. After three days or
+ three context compactions, write the handoff (`amadan branch
+ handoff`) and stop; a fresh session picks up from there.
+8. **Say so before Paul has to ask.** When 24 hours pass with no merge,
+ or rule 1 or 2 triggers, post on the branch's discussion and tell Paul
+ in the session: what is blocking, what the last two rounds found, and
+ the cut you recommend. The clock starts when the plan or slice starts,
+ or at its latest merge; a session handoff does not reset it. Report
+ again every further 24 hours.
+
+Review briefs follow `docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md`,
+which carries the round budget and the three-way verdict to the reviewer.
+
## Operate via API and CLI (Paul's rule, 2026-08-06)
Day-to-day CARLOS administration goes through the console API and the
@@ -113,16 +177,15 @@ The steps, for agents and people alike:
amadan branch describe carlos/platform <branch> -body -
-3. **Squash it to one commit** before landing, with a message that says
- what the change is and why. `amadan branch merge` has no squash mode,
- so this is done on the branch: `main` then gets the hub's merge commit
- and exactly one change commit under it, not the branch's iterations.
- The iterations are not lost: the description and the reviews record
- them. Squashing moves the tip, so CI runs again on it.
-4. **Land it once CI is green on that tip:**
+3. **Land it as one commit** with `amadan branch merge -squash` (Paul,
+ 2026-09-22: no branch histories on `main`). The hub squashes, so
+ don't squash or force-push the branch yourself. The message says what
+ the change is and why. The iterations are not lost: the branch page
+ keeps its commits, description and reviews after the merge.
+4. **Land it once CI is green on the tip:**
amadan ci status carlos/platform -branch <branch>
- amadan branch merge carlos/platform <branch> -expect <tip> -message "..."
+ amadan branch merge carlos/platform <branch> -squash -expect <full 40-char tip> -message "..."
The merge refuses a branch whose CI is not green (exit 2) and, with
`-expect`, one that moved after you checked it. That ordering is the
diff --git a/docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md b/docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md
new file mode 100644
index 000000000..93847a76e
--- /dev/null
+++ b/docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md
@@ -0,0 +1,75 @@
+# Review brief template
+
+Copy everything below the line into `CODEX-REVIEW-BRIEF-<topic>.md` beside
+the document under review (`-R<n>` for later rounds), fill in the angle
+brackets, commit it, and name that commit in the reviewer's prompt. The
+stopping rules in AGENTS.md set the budget; this brief is how the
+reviewer learns it. Delete sections that don't apply, never the
+severity, verdict or last paragraph.
+
+---
+
+# Review brief: <spec, plan, task or branch>, round <n> of 3
+
+Repo carlos/platform, branch `<branch>`, commit <full sha>.
+Under review: `<path>`, or the diff `<base>..<tip>`.
+Authorities: <specs and plans MERGED on main, by path>. Do not review
+against unmerged branches; if this work needs one, say so as a P1 and stop.
+
+You are an independent reviewer. Read the document, then the code it
+names, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- Paul's rulings <list, with where they are recorded>. Report only
+ mechanisms that fail to honour them.
+- Findings declined in earlier rounds, with reasons in `<file>`. Raise one
+ again only with new evidence.
+
+## What to check
+
+1. <specific, numbered: the risks this document actually carries>
+
+## Round <n> (delete in round 1)
+
+Earlier rounds: <list each round's findings file>. The round number
+counts every earlier review of this design or change, under any file
+name or reviewer.
+
+First give one line per P1 and P2 from round <n-1> (`<findings file>`):
+resolved, partly, or not. Carry every unresolved or partly resolved
+finding forward at its current severity, then add new findings. The
+verdict covers everything outstanding, earlier rounds included.
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work.
+ Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review. (The
+ census, and review of any newly changed security, root, termination
+ or production-storage behaviour, still check the fix; see AGENTS.md,
+ "Stopping rules".)
+- **P3**: clarity or polish. Goes on a follow-up list; never a reason for
+ another round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not
+raise a P2 to P1 to keep the review open.
+
+## Output
+
+Findings ranked P1, P2, P3. Each gives the section or task, the problem,
+the evidence (file:line, verified), the failure scenario, a concrete
+fix and the invariant or trust boundary it breaks (that is its fault
+family). End with exactly one verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another
+ round.
+- **NOT READY**: one or more P1s, listed.
+
+In round 3, a NOT READY also says whether the P1s share one cause, and
+whether refusing the case up front or cutting the feature would remove
+them.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites.