| 1 | GROUND | Terrain before plan | /stadio-zero: mem+scar query, hot-files verified ON DISK, PII scope, falsifiable acceptance. Quote the applicable scar ANTIDOTE lines into your working notes — a scar you only counted doesn't restrict you. Plus reuse-first (search existing code/world before building). | Every LOAD-BEARING file:line — one you are about to build on — re-executed THIS turn (current evidence for critical claims, not blanket re-reads of every citation). A path from memory/report/spec is a PHANTOM until re-grepped. A NotebookLM verdict on a number/threshold is a LEAD, not a fact, until its SOURCE DATE is compared against the date of the last official re-grounding of that layer (W90: NB-3 confirmed pre-resolution PMA caps with clean citations, indistinguishable in tone/format from a fresh verdict — the only defense is source-date vs resolution-date, never apparent answer quality). Before acting on an NLM numeric/threshold verdict, verify the NB source predates or postdates the relevant dataset provenance flag (e.g. pma_cap_verified/pma_cap_note). | #6 phantom |
| 2 | DESIGN | Decide, adversarially | sota-architecture-loop steps 0-4: frame → ground → reason → council-gate → decision. Output = a durable spec artifact on disk (scratchpad or specs/ — BUILD consumes the file, not the chat memory). Operator GO for L2/L3 risk classes (AUTONOMOUS_OPS preflight). NLM is the ground-truth VERIFIER of facts here, not a reasoning seat. | A falsifiable metric on the decision. Council verdicts are LEADS — re-verify what they attack AND what they bless (W65: even the refuter hallucinates). | #3, groupthink |
| 3 | BUILD | Execute, isolated | Worktree via scripts/agent_start.py (main checkout read-only; hotfix-preemption gets its OWN lane — worktrees make stashing unnecessary). TDD where testable (code); for non-code deliverables the falsifiable acceptance criteria from GROUND play the test's role. karpathy-discipline (no silent assumptions, no collateral edits). Implementer routing → Arsenal. Leave-dirty toward siblings' files. | Tests written first fail→pass. Diff scoped to the mandate — every changed line traceable to it. | #5 sibling |
| 4 | VERIFY | Prove each increment | CONTINUOUS, not close-loaded (context-anxiety makes CLOSE the worst first-verify point). Generator≠grader: infra/workflows/verify-template.js, codex-second-opinion, devils-advocate. Adversarial fixtures (edges, not happy path). Risk-proportional depth. Pattern-fix = class-audit (W89/W70): when the change cures one instance of a repeated pattern (auth call, hardcoded path, secret handling, env sourcing), grep ALL sibling call-sites THIS turn — fix the in-perimeter ones, write one PENDING-ARMS line per sibling left out; a cure applied to 1-of-N paths is a time bomb (#1825 cured base_worker, left stream_tools unauthed → 3 days blind); the sweep MUST include tests that ASSERT on the removed/migrated symbol (backend/tests or equivalent), not just prod call-sites — a symbol-removal that class-audits app code but skips test-source-asserts still dies in CI on a file the local subtree run never touches (AMENDMENTS 2026-07-05). | The WORK by CONTENT (W88 blob-compare; never SHA-ancestor / timestamp / substring / exit-code). Fable does the last grep — never delegable, never cascadable: the final gate is an EMPIRICAL disk/live check, not a quality opinion (quality already had its independent grader; empiricism needs execution, not heterogeneity). | #2, #6, #9, W89 |
| 5 | SHIP+ARM | Land it end-to-end | Atomic commits (conventional msg + co-author). PR — opened only AFTER VERIFY passed, so arming gh pr merge --auto --squash immediately (standing rule 2026-06-25) never merges unreviewed work, by construction (exceptions → operator merges: guardrails, config-critical, migrations, force-push). Derived contracts travel IN the commit you arm on (W86): if the diff moves a DOCSYNC-counted surface (backend tests/routers/services), run python scripts/docs_sync.py and fold the regen into the SAME commit BEFORE arming --auto — with --auto there is no 'later': merge fires at first green and any post-arm commit is orphaned. Bump already missing on a pushed PR → open a 1-line repair PR (like #1672), never re-push racing the merge. CI watch async — fire-and-sleep, never busy-wait; merge-train awareness on strict CI. Deploy follows MERGE — main is the only deployable ref (Vercel auto-deploys main; fly deploy runs from post-merge main via nuzantara-deploy; never deploy an unmerged branch). Capture a pre-deploy baseline (public health, key endpoints, log tail) so the post-deploy delta is attributable; migrations get a post-deploy DB-state probe BEFORE public exposure (upgrade applied? schema as expected?). Then the ARMED reconciliation: merged? deployed? installed? loaded? env propagated? cron armed? — anything built-but-not-armed = SUSPENDED: write a line in .claude/skills/modus/PENDING-ARMS.md (the W81 ledger — read back at every TRIAGE). | Each arming step probed by its own state (PR state=MERGED; fly status; launchctl print exit AND log content), not by "I ran the command". | W81, W86, #7 |
| 6 | PROVE-LIVE | Done = live in prod | curl/smoke on the PUBLIC domain against the pre-deploy baseline; runtime state; READ THE OUTPUT/log, not the exit code. Post-deploy browser QA when frontend. Probe FAILS → STOP-THE-LINE: no CLEAN, no CAPTURE-as-done — rollback (fly releases / revert PR / flag off / migration backout), keep the branch alive, escalate to the operator if prod isn't restored; a broken prod outranks every downstream stage. What cannot be proven this turn (cron liveness, async jobs, propagation) → a DURABLE RECEPTOR + reconciliation at the next boundary — never a fake this-turn check. | The feature observed working in production, by content. Green ≠ working. ✔ Connected = TCP handshake, not auth — run SELECT 1. A producer's own log/counter is STILL a proxy (W89: '56 harvested' printed every cycle while the stream stayed frozen 69.5h) — prove by the DOWNSTREAM state-delta: stream length / row count / artifact content, before vs after. | #2, 503-RAG, W87, W89 |
| 7 | ALIGN-FLEET | 3 machines = 1 organism | M5/Pro/Mini — MAIN checkouts only (per-task worktrees are exempt; never disturb a sibling's live session: dirty main or active session on a node → skip + PENDING-ALIGN:<machine>, never stash/checkout someone else's state): git pull --ff-only on siblings (Pro first); restart consumers of changed code; skill/symlink liveness; HOME-fork lint (cmp -s repo-vs-live for anything executed from $HOME); plist/TCC liveness where launchd touched (W84: exit-code green can mask TCC death — read the log). Machine-aware paths (balizero on M5, nuzantara on Pro/Mini). Partial fleet: if a sibling is unreachable, write PENDING-ALIGN:<machine> to PENDING-ARMS.md and PROCEED — never block the loop on a dead node. | git rev-parse HEAD identical on all reachable MAIN checkouts; restarted consumers show a fresh heartbeat/log line, not just a PID. | #1, #10, W84 |
| 8 | CLEAN | Deep hygiene | Worktree reap only at 3-AND (no live process ∧ no active lease ∧ content-on-main). Branch delete only after BOTH: PROVE-LIVE passed AND content-on-main verified by BLOB-per-file (W88 — the three-dot diff lies post-squash; a failed prod verification needs the branch alive for rollback). Scratchpad purged. Leases released. Background tasks stopped. git status clean OR leave-dirty declared with owner+reason. | git worktree list back to baseline; no zombie branch of this task; no orphaned process. | #5, W62/W80, W88 |
| 9 | CAPTURE | Learn, then close | mem save (decision 8-10, discovery 7-8 — don't ask, save). scar + superscar family if a trauma occurred. Research capture if ≥400 words + ≥3 sources. AMENDMENTS entry if the LOOP ITSELF misfired (wrong gear, wasted council, skipped probe that bit — see Self-refinement). Close line: result: / needs input: / failed: — self-contained. | The memory/scar exists on disk after writing (re-ls it — Write can succeed and the file still vanish). | memory-loss, W78 |