Merge bugfix/challenge-cutoff into develop

This commit is contained in:
bchanot committed 2026-11-21 13:41:09 +01:00
commit a40591a0a2
8 files changed
+151 -35

No files matched your search

+1
View File
@@ -794,3 +794,4 @@ rules:
## 2026-11-21
- /hotfix gates-abandon-id (5bba6ce, bugfix/gates-abandon-id UNMERGED): ABANDON regex anchored to numeric id, catch-all malformed ERROR, leading whitespace accepted (robustness challenger: game ledger indented handoff silently MET). 3 lenses + 1 confirmation, security PASS.
- /hotfix challenge-cutoff (343ccc2): confirmation BLOCKER/MAJOR on revised point not revised again, [deferred] for human; memory commit carries · TODO +n/-m. Rule applied to own run: r2 additions (stop-before-dispatch, hotfix escape) deferred to user. TODO triage: 28 dropped (no evidence/date/user ask), 51 → 24 open, list in .claude/tasks/plans/2026-11-21-todo-triage.md. MEASURE re-anchored 343ccc2.
+2 -29
View File
@@ -6,8 +6,9 @@ Done history before 2026-10-08 removed 2026-10-23 (git keeps it: `git log -p --
### Done, triage and loop levers (user 2026-11-20: "oui lance une session neuve avec les six leviers")
- [x] DONE 19dfe7e + 39cf9dd (docs e8c061e), merged 1c9289a (memory b58d885) /feat feature/done-triage-levers: /feat the six levers in .claude/tasks/plans/2026-11-20-done-and-triage-levers.md (done = oracles green, reopen only on reproducible evidence; MINOR fixed before dispatch or dropped; no challenge on a placed decision; loop on a frozen list; contract dry run + plan artifacts in scope; `TODO +n / -m` in summaries). 5 files: lib/verify-secure-loop.md, lib/challenge-plan.md, CLAUDE.global.md (1 line), lib/capitalize-commit.md, agents/verifier.md (contract .claude/tasks/contracts/2026-11-20-done-triage-levers-1413.md)
- [x] DONE 0db885e, merged cef1754 (user accepted the partial delivery 2026-11-21, criterion 4 deferred): follow-up /feat, 4 of 5 files: lib/contract-interview.md STEP 4 (dry run + `- run-base:` from every contract-writing flow: guardrails, a11y, ship-feature, init-project, bugfix fast path, hotfix); skills/ship-feature STEP 6 (:262/:344) and skills/init-project STEP 10 (:280/:382) "Fix all CRITICAL" bound by lever 1 (reopen only on reproducible evidence); lib/capitalize-commit.md:75 `git diff --end-of-options` + `^[0-9a-f]{7,40}$` check on `run_base` (GATE 2 LOW); agents/verifier.md STEP 4 `[gated]` lines in scope only on an untracked contract (GATE 2 design note) (contract .claude/tasks/contracts/2026-11-20-levers-followup-1725.md)
- [ ] USER DECISION (deferred from 343ccc2, confirmation challenger 2026-11-21, contract .claude/tasks/contracts/2026-11-21-challenge-cutoff-1213.md): must a `[deferred]` point stop the flow before its dispatch where the human gate is already past or comes after the dispatch (feat pass B before STEP 1b, bugfix approval before 3b, seo/geo AUTO items), and does /hotfix escalate to /bugfix on one? Today: the human accepts it at the gate.
- [ ] USER DECISION (deferred from 0db885e, confirmation challenger 2026-11-20): `[gated]` lines in scope only on an untracked contract. Only init-project bites (contract root-committed by gitflow init `git add -A`); every in-verifier version grew mechanism (GATED line, re-verify on removal, structural-failure rule, diff reference point) and its routing must live at the GATE 1 act sites (lib/verify-secure-loop.md GATE 1, skills/init-project STEP 9). Choose: fix at those act sites, or keep today's behaviour and record the limit
- [ ] MEASURE 2026-11-20 levers, after ~5 runs from 19dfe7e: dispatches/run, `TODO +n / -m` per run (measurement lines counted apart), `MINOR dropped:` lines per run plan, challenge skips taken → EVAL. Tripwires (reopen the levers): a BUGS-FOUND entry whose cause matches a `MINOR dropped:` line of a merged run; net open TODO growing run over run; a placed-decision skip on a run that settled an open choice
- [ ] MEASURE 2026-11-20 levers, after ~5 runs from 343ccc2 (memory commits carry `· TODO +n / -m`, read with `git log --oneline --grep '· TODO'`; /capitalize and /close commits carry none, memory-feedback ones do): dispatches/run, `TODO +n / -m` per run (measurement lines counted apart), `MINOR dropped:` lines per run plan, challenge skips taken → EVAL. Tripwires (reopen the levers): a BUGS-FOUND entry whose cause matches a `MINOR dropped:` line of a merged run; net open TODO growing run over run; a placed-decision skip on a run that settled an open choice
### Advisor call points (user 2026-11-17: "oui 1 et 2, et le 3 aussi"; amends BDR-150)
- [x] Run A DONE 6ef3069, merged fc2d84d (docs 09277f5, audits c1a0c32, memory 78a6942) /feat feature/advisor-call-points: CLAUDE.global § Workflow + lib/effort-shift.md § Advisor + plan-challenger/verifier/security-auditor one-call rule (contract .claude/tasks/contracts/2026-11-17-advisor-call-points-1130.md)
@@ -18,16 +19,9 @@ Done history before 2026-10-08 removed 2026-10-23 (git keeps it: `git log -p --
- [x] After B1 DONE (doc commit + BDR-150 status + LRN-296): README/USAGE/CHANGELOG say "before writing a skill's plan (/feat, /bugfix, /ship-feature)" and list 3 agents → doc-sync; BDR-150 status line
- [x] DONE 9814720, merged 4a8dffb (docs 4bb0a95, audits b120ba5, memory 9f8cf97) (/bugfix degraded-tool-line, with BUGS-FOUND:134). Was: loops-light lock on the feat/bugfix skip sentence ("each on its first attempt", "(not DEGRADED)"): B3 contract CHECKs are one-shot (robustness challenger, run B3)
- [x] DONE af846d6 + 87566e2, merged 82dee85 (audits 17a60fd, memory 1ec72d9) (/feat x2, feature/advisor-merge-reuse; user 2026-11-19 "all 6": feat/bugfix too). Was: a11y:201, guardrails:278, ship-feature:325, init-project:361 end lines: restate item 3's merge-reuse clause ("reuses the last run's answer, or its skip, and names any code commit made after it"); item 3 loads only via the lib (B3 final review, low)
- [ ] lib/effort-shift.md § Advisor item 3 reuse clause has no fallback: end-of-run answer absent (advisor absent/error) or out of view at the merge signal → candidate "answer absent or out of view → the merge proposal runs the call" (source, not the sites); the merge happens at the gitflow finish gate (skills/gitflow/SKILL.md:68-89, 0 advisor mentions) where the rule is not loaded (merge-reuse challengers, low)
- [ ] item 3 "names any code commit made after it" has no anchor: ADVISOR field records no HEAD SHA, commits made outside the session are invisible; candidate: record the short SHA with the answer (visible format change, user decision) (merge-reuse robustness challenger, low)
- [ ] end-of-run sites restate the call but not "one end-of-run call per skill run": a fix that goes back through the gates re-enters the end step and may call again (merge-reuse robustness challenger, low)
- [x] DONE c6f2dad + 63f5fa4, merged 6e45536 (docs 7d09837, audits 77aac4b, memory 3ffd81f) (/feat feature/advisor-usage; user 2026-11-19: FEEDBACK.md section, per agentType, all projects no repo, since last run, retention + drift lines). Was: Run C /feat: advisor usage section in /memory-feedback (main loop vs sub-agents, model served, input tokens; dedupe usage rows by message.id, model from the `advisor_message` iteration)
- [x] FIX SHIPPED 7979b9b 6be0669 b71db28, merged 8826699 (docs 4bd0af6, audits c62ee9c, memory 1dedf90) (/ship-feature feature/advisor-subagent-scope; behavioural proof pending, next line). Was: Advisor doctrine leak: general-purpose sub-agents called the advisor 30× (7.1M input tok, the largest line of the first advisor usage table; 16 on 2026-11-18/19, after 6ef3069 2026-11-17 12:59 limited sub-agents to plan-challenger/verifier/security-auditor/analyzer), doc-syncer 4× (2026-11-16/17). Likely SDD implementers/reviewers dispatched as general-purpose: find why the "executors and every other sub-agent do not" rule does not reach them (brief, agent prompt or tool listing) (Run C first table, medium)
- [ ] 2026-11-27 or later, after a fresh session: advisor leak behavioural check. Run /memory-feedback (advisor usage table) plus a per-dispatch transcript tally since 7979b9b. Tripwires: every typed non-allowed type 0 calls; sonnet stays 0; general-purpose at most 1 call per dispatch and only in code-review dispatches; allowed four keep about 1 per dispatch (a drop to 0 = the "one call allowed" line not read); standalone SDD workers served sonnet. Revert path: drop the SubagentStart entry from settings.json. Then mark BUGS-FOUND :107 FIXED or reopen (advisor-subagent-scope, medium)
- [ ] lib/memory-feedback/advisor.ts: split general-purpose callers per dispatch (calls per dispatch, code-review vs other from a fixed description marker), so the advisor usage table can read the general-purpose tripwire without a hand tally (advisor-subagent-scope robustness challenger, low)
- [ ] census test: every agents/*.md served on opus (frontmatter or a model="opus" dispatch) carries either the never-call line or an allowance; every model="opus" general-purpose brief in skills/agents names its advisor rule (STEP 6 review minor 3, low)
- [ ] hooks/subagent-advisor.sh shortcut: SubagentStart only, a sub-agent that compacts may lose the line; re-inject on SessionStart `compact` when agent_type is set (hook header shortcut, low)
- [ ] advisor-scope review minors: lib/model-gate.md Dispatch tiers names the advisor line for opus built-ins; feat/bugfix ADVISOR fields gain `not called (sub-agent)`; client-handover-writer quoted child templates carry the line literally, not only the routing paragraph (STEP 6 review minors 1, 6, 8, low)
- [x] DROPPED 2026-11-20 (lever 2, no failure on HEAD): mods.test.sh model-router plugin test 45 s alone at load 0.9 vs CLI_TIMEOUT=120; the 121 s was at load 26-31 (2026-11-19); full make test 2026-11-20 green on it. Was: lib/tests/mods.test.sh model-router plugin test runs ~121 s alone vs CLI_TIMEOUT=120 (load avg 26-31 on 2026-11-19): flaky red in make test, probable cause of run 1 feater's unexplained red; raise the bound or speed the test (Run C GATE 0, low)
- [x] Stale citers after A: README/USAGE/CHANGELOG patched, BUGS-FOUND residual superseded + LOW logged, BDR-150 status, LRN-295 (LRN-294 kept: its lesson holds)
@@ -106,16 +100,10 @@ Open children of the shipped phases (History 2026-11-12), text verbatim.
- [x] DONE c25a7ea, merged 2d8e457 (docs 15c6d09, memory 44dc0b3 482fd37 LRN-299) (bugfix/gates-label-timeout, user 2026-11-17 "reject"; also rejects a 2nd CHECK/EXPECT/EVIDENCE on one criterion: indented ` 2.`, `- `, `**2.**` gave the same false MET) gates.sh: warn or reject a criterion row labelled `^[0-9]+[a-z]\.` (LRN-284: `1b.` absorbed into criterion 1, its CHECK/EXPECT overwritten, false MET)
- [x] DONE c25a7ea (user 2026-11-17: default 600 s, env override kept) gates.sh default `GATES_TIMEOUT=120` < full `make test` (~135 s on 2026-11-16): a "Full make test green" criterion goes NOT-MET on timeout alone (A6 run, re-run with GATES_TIMEOUT=400). Raise the default or have contract-interview write the timeout for full-suite criteria.
- [x] DONE 5bba6ce, merged 30f9825, /hotfix 2026-11-20: numeric id required, indented ABANDON counts (game ledger 2026-09-30-verify-qual-deparse MET → ABANDONED(1)), malformed → ERROR, 5 tests. Was: gates.sh:93 ABANDON regex `([0-9]+)?` reads `ABANDON: 1b …` / `1.1` as id 1: after a renumber (LRN-284) criterion 1 is masked ABANDONED (rc 3) instead of "unknown criterion" ERROR. Anchor the id `([0-9]+)([[:space:]]|$)` + test (robustness challenger, gates hotfix 2026-11-17)
- [ ] gates.sh residual: a stray oracle (indented ` 2.`, `- `, `**2.**` label) after a MANUAL criterion still attaches to it, row MANUAL → MET/NOT-MET on an unrelated oracle (no red oracle overwritten; accepted 2026-11-17)
- [ ] lib/verify-secure-loop.md:46-47 ERROR(n) cause list is examples, incomplete: missing "no numbered criteria", "ABANDON names unknown criterion", malformed label, second attribute (c25a7ea)
- [ ] lib/design-tool-gate.sh:70 `perl -e 'alarm shift; exec @ARGV' 15 21st whoami` kills one process only (same limit as the old session-start runner, fixed 490ad83): reuse the group-kill runner when this file is next touched.
- [ ] parked (code-clean 2026-11-09): hooks/rtk-rewrite.sh:84 no-op `[ "$CMD" = "$REWRITTEN" ] && REWRITTEN="$CMD"`: remove with the next real rtk-hook edit, re-pin `hooks/.rtk-hook.sha256` + rtk-rewrite.test.sh T13 in the same step
- [ ] deferred (BDR-123): remap inline-writing best-tier skills (design Build stack, writing-skills, deprecation-and-migration, /tour single-project, /audit-delta 3d, /harden STEP 3); stale citers skills/feat/SKILL.md:6, skills/code-clean/SKILL.md:36; + impeccable row in routing.json (design Build stack has none; frontend-design has `reflect`; census test pins the table)
- [ ] parked (GATE 2 LOW, 5a98c2c): probe table names not checked with `IDENT.fullmatch` per table (a `/` walks a path on the approved Supabase host); `printable` lets Unicode bidi/format controls (U+202E, U+2066…) through to the tty
- [x] profile name charset check (done by phase 5: `NAME_RE='^[a-z0-9][a-z0-9-]*$'` lib/profile.sh:63 on every profile and session name; the old `read_profile()` is gone)
- [ ] P22 `make new-skill` scaffold: agent stub lacks `effort:` pin, skill stub lacks entry level, body loads `.claude/agents/$(name).md` instead of `$HOME/.claude/agents/<name>.md` → /hotfix; also: no routing.json row reminder
- [x] `lib/tests/design-tool-gate.test.sh` hermetic CLI_ABSENT case (done by the phase 5 rewrite: suite green 2026-11-02 with `~/.local/bin/21st` installed, `make test` all suites green on this machine)
- [ ] post-run-D residuals (gates, 2026-10-07): settings.json soft_deny names only `gitflow.autopush false` → add "or an unparseable value" (restriction only, settings run); capitalize STEP 6: manual mode with `ahead` = 0 (user pushed by hand between merge and read) matches no closing line, and the 5C `ahead` = 0 bullet still says "(auto-push mode did it)"; release-executor:86 line > 80 cols; push-guard header line 4 > 80 cols (pre-existing); unpushed-guard Stop silence now also covers a missing lib (SessionStart names it) — accepted
- [ ] gitflow LOW leftovers (run B, rest done in run D 472cccb): `--end-of-options`/`--` on refname args and `printf %q` in copy-paste hints; `gitflow_delete`: check `_gitflow_checkout_containing_base` rc (lib/gitflow.sh:270) before `--unset-upstream`
- [x] docker host-root mount spellings uncovered by deny (security gate 2026-10-23, pre-existing): `--volume /:/x`, `-v=/:/x`, `--mount type=bind,source=/,...`; proven with a harmless analogue, bench `.claude/tasks/plans/2026-11-14-docker-mount-bench/` (all gating rows and controls green), 28 deny rows (7 shapes x 4 prefixes) in settings.json, locked by push-guard T41
@@ -123,8 +111,6 @@ Open children of the shipped phases (History 2026-11-12), text verbatim.
- [x] 6 dead deny entries (done: test 79f1a3f, settings 12c3534, merged 29cb080) (`Bash(docker run * -v /:*)`, `Bash(git push * :*)`, 4 `Write(...)`) kept by the push-guard T41/T42 non-weakening lock; drop them with a justified-removal list in T42 at the next release (working forms added 2026-10-23)
- [ ] after 3.0.0: the next version bump must empty the push-guard `removed-ok` list (lib/tests/push-guard.test.sh:330 `removed_ok_until=3.0.0`), or T42e goes red.
- [ ] after 3.0.0: /bugfix the 2 D3 MEDIUM gate findings (plugin-gate accepts pack `extras`, 21st-ai credit-metered; REQUEST keywords alone trigger `embedded` → minimal), both in BUGS-FOUND (user 2026-11-12: after the cut)
- [ ] lib/tests/project-rules.test.sh:296 T11b hardcodes '4 rule(s) ok': a 5th .claude/rules/*.md turns it red (BDR-128 residual)
- [ ] MIGRATION.md: one sentence that hooks/instructions-loaded.sh needs a CLI emitting InstructionsLoaded (older CLI: no log, no path-rule load proof); check claude --version on the work machine (BDR-128 residual)
- [ ] raw registry text to the terminal (TODO:57 leftover, not phase-tied): lib/reconcile.sh:137 prints ${st:0:80} of an unreadable status line, lib/memory.sh:493 check prints the bad heading $0; control chars pass (upgrade's clean() maps them to ?, these two do not)
- [x] doctrine run (BDR-150) DONE c3507ea: lib/effort-shift.md:30-32 wiring point 5 still names `fable` skill-runners and "high for fable runners" (split across lines, the census regex misses it); stale Fable-routing prose in agents/plan-challenger.md:111,:115, lib/challenge-plan.md:48,:51, skills/tour/SKILL.md:83; advisor rule into CLAUDE.global.md + effort-shift.md
@@ -138,11 +124,6 @@ Scope (user 2026-11-11) [gated]: D1-D6 + the 6 dead deny entries + MIGRATION/CHA
- [x] CHANGELOG internal history headings renamed to `[internal X.Y.Z]` so the public [3.0.0] is unique (user 2026-11-12, chore/reconcile-pre-3.0.0)
### Docs backlog (doc-sync 2026-10-06)
- [ ] P17 README restructure to Standard-Readme (Install / Usage / Configuration / License); move inline reference parts to USAGE.md, CONFIGURE.md from settings.json + .env.example
- [ ] P18 README Requirements line (Linux apt/dnf/pacman + macOS brew): Linux run done, write the line
- [ ] P31 USAGE narrative: Exemple 9 "sans superpowers" (vendored, always on), "Edit tool" bypasses /hotfix, Pattern E + Exemple 9 route bugs to /ship-feature instead of /bugfix|/hotfix
- [ ] P32 USAGE missing sections: design work (21st CLI, design stack, /site-motion), media generation (Higgsfield toggles), gitflow auto-push + global hooks
- [ ] P33 USAGE per-pattern token figures have no source in code (USAGE.md:363,369,499,552,650,712,1019) — verify or drop; "Budget Pro ~11k" already dropped by the D3 add-ons (9b12b12)
- [x] P34 done by D3 (9b12b12): 0 "gstack ON/OFF" / "context7 ON" left in USAGE.md and agents/plugin-advisor.md; onboard/tour leftovers logged in BUGS-FOUND
- [x] P41 (2026-11-02): `ask` prompts under auto mode (bench + interactive check), so the template ask list is live, not inert; README and SETTINGS.md corrected (0bf4620)
@@ -159,8 +140,6 @@ Scope (user 2026-11-11) [gated]: D1-D6 + the 6 dead deny entries + MIGRATION/CHA
- [x] parentModel: not logged (subagent meta = `model` + `pickedEffortModel` only); 240 spawns this session all pinned, none unpinned in a demoted turn → not reproducible from logs, reopen when one runs (block I 2026-11-14).
- [x] W1-C part 2 (StopFailure order, PostModelSwitch `auto`): closed "not reproducible, reopen on incident" (block I 2026-11-14, no incident in this run).
- [x] W4-B AC9: user step, not Claude-runnable (the `route: classifier` line is UI-only, not persisted): `/route verbose on` + a few plain prompts; a misfiring `bookkeeping` → reopen (block I 2026-11-14).
- [ ] W3-A: a parallel same-agent dispatch answered after > 10 s; what an unanswered dialog resolves to on the terminal (must be Later or nothing written). T1 skill-row dialogs seen live (f8665b2, d3635b6)
- [ ] cold-read cap on the opus session: a coding prompt → spinner `sonnet-5-5/medium`; above 120k cold read the skip line once; `/route show` cap text
### Optional backlog (user call)
- [ ] router: `/route set`, `/route confirm`, `(unconfirmed)` in show, dialog edits of phases, frontmatter auto-alignment, session-start warning when routing.json is dirty, per-machine `projects`.; step heuristics, quota-aware downgrade, A/B
@@ -170,13 +149,7 @@ Scope (user 2026-11-11) [gated]: D1-D6 + the 6 dead deny entries + MIGRATION/CHA
- [ ] graphify pilot on robin_petier: graph + `.graphifyignore` + gitignore `graphify-out/` + `GRAPHIFY_FORCE=1 graphify update .` in the post-commit hook when a graph exists
### Parked
- [ ] Higgsfield parked (final review, rulings in BDR-109): remedy line ignores a pinned lock version (latent while `latest`); Step 8.6 spawns `higgsfield version` up to 3 times; rollback needs `npm uninstall -g @higgsfield/cli` + session removal + hand removal of `skills-external/higgsfield-*`
- [ ] Higgsfield parked (per-task minors, none blocking): "rename" comment vs rm-then-mv; no `--` before the clone URL; ssh URL can prompt; no sweep of a stale `.higgsfield-stage.*`; timeout path itself untested; "pack not installed" when only unlisted skills are synced; doctor version read unbounded
- Reticle pilot recipe: section "2026-09-27" below (trigger: first app-type project, BDR-103)
- [ ] deferred (BDR-125 4c, re-challenge 2026-10-25): Read path triggers, Bash command triggers, memory_search tool for skills (analyze-before-plan pass 1); reopen when a /memory-feedback gate shows misses the prompt and error channels cannot reach (no triggers= field: 4a shipped without Meta, BDR-125 Am.7)
- [ ] conditional (BDR-146 residual): a noisy entry on the tool channel survives the /prune-memory title + lesson rewrite (the 4-gram matcher reads body backtick spans, SKILL.md STEP 1.D limit); act when a tool-gate FEEDBACK.md lists one (gate 1 2026-11-12: 0 tool records)
- [ ] deferred (BDR-125 Am.7, phase 2): commit-msg hook for the 50-word cap; revisit when overruns grow (4/78 on 2026-10-25; 17/530 ≈ 3 % on 2026-11-16 recount, the gap audit's 21/526 not reproducible)
- [ ] shortcut (register.ts TIER_HEAD, BDR-150): the ask-before-Fable dialog (askTier, BDR-135) is inert while no tier is headed by fable; remove the feature (TIER_HEAD, INSTEAD_TIER, tier ask paths and their LEGACY tests) if Fable never returns to a tier
### Known limits (accepted, no action)
- model-router spawn path unprobed: 1st gate of an outage window dies once (seen live 2026-10-23, retry lands on the opus floor); tour/onboard/audit-delta no retry; onAutoSwitch with main on opus marks nothing if the engine auto-falls a gate off Fable
@@ -0,0 +1,30 @@
# CONTRACT — challenge-cutoff
- date: 2026-11-21 | flow: hotfix | branch: bugfix/challenge-cutoff
- status: active
- run-base: 1d21b759a0a59ea58c062eadad2157b2820d2911
## REQUEST (verbatim — IMMUTABLE)
Deux règles validées par l'utilisateur le 2026-11-21 ("fais les 4 points de ce qui manque et tourne encore en rond") : (1) lib/challenge-plan.md, re-challenge : si la confirmation trouve encore un problème majeur (BLOCKER ou MAJOR) sur un même point, ce point est reporté avec sa preuve au lieu d'être révisé une troisième fois ; (2) lib/capitalize-commit.md : le message du commit mémoire se termine par `· <todo>` (TODO +n / -m) pour que la mesure "après ~5 runs" se lise dans git log au lieu du chat.
## CLARIFICATIONS
none — request complete
[deferred 2026-11-21, confirmation challenger r2, rule applied to its own run] Whether a deferred point must stop the flow before its dispatch where the gate is past or after the dispatch (feat, bugfix, seo, geo), and whether /hotfix escalates on one: two r2 MAJORs landed on that text; it is not revised again, the core rule ships with the existing `[deferred]` meaning, the question goes to the user (TODO).
## ACCEPTANCE CRITERIA
1. lib/challenge-plan.md re-challenge bullet: a BLOCKER or MAJOR the confirmation pass still lands on a point the revision touched is not revised again; it is tagged `[deferred <date>]` with the finding quoted, for the human to accept at the gate (the existing `[deferred]` meaning). No ABANDON coupling, no new stop.
CHECK: s=$(awk '/^## SYNTHESIZE/{p=1;next} /^## /{p=0} p' lib/challenge-plan.md); grep -q '^ max 1 extra pass, then the gate. A BLOCKER or MAJOR that confirmation pass$' <<<"$s" && grep -q '^ still lands on a point the revision touched is not revised again: it is$' <<<"$s" && grep -q '^ tagged `\[deferred <date>\]` with the finding quoted, for the human to$' <<<"$s" && grep -q '^ accept at the gate.$' <<<"$s" && [ "$(grep -c 'ABANDON' <<<"$s")" -eq 0 ] && echo CUTOFF_OK
EXPECT: CUTOFF_OK
EVIDENCE: MET exit=0 marker-found :: CUTOFF_OK
2. lib/capitalize-commit.md DO step 1: the message template and the three examples end with ` · TODO +n / -m`, and after the counting snippet, before step 2, the composed memory-commit message ends with ` · <todo>`, readable with `git log --oneline --grep '· TODO'`.
CHECK: f=lib/capitalize-commit.md; a=$(grep -n '^ The message composed above ends with ` · <todo>`, as in the examples, so$' $f | cut -d: -f1); c=$(grep -n '^2. Commit surgically' $f | cut -d: -f1); s=$(grep -n 'else todo="TODO n/a"; fi$' $f | cut -d: -f1); [ -n "$a" ] && [ "$s" -lt "$a" ] && [ "$a" -lt "$c" ] && grep -q "each run's movement reads in \`git log --oneline --grep '· TODO'\`.\$" $f && [ "$(grep -c '^ - `chore(memory): .* · TODO +[0-9] / -[0-9]`' $f)" -eq 3 ] && grep -q '^ `chore(memory): <IDs> — <flow> <short> · <todo>`. Examples:$' $f && echo MSG_OK
EXPECT: MSG_OK
EVIDENCE: MET exit=0 marker-found :: MSG_OK
3. Locking suites stay green and only the two files change (5 removed lines: the re-challenge line, the template and the three examples).
CHECK: [ "$(git diff --name-only 1d21b759a0a59ea58c062eadad2157b2820d2911 -- lib | wc -l)" -eq 2 ] && [ "$(git diff --numstat 1d21b759a0a59ea58c062eadad2157b2820d2911 -- lib | awk '{d+=$2} END{print d+0}')" -eq 5 ] && make test suite="lib/tests/doctrine-citers.test.sh lib/tests/plan-challenger.test.sh lib/tests/subagent-advisor.test.sh" 2>&1 | tail -1
EXPECT: all suites green
EVIDENCE: MET exit=0 marker-found :: all suites green
## FILE SCOPE
- lib/challenge-plan.md
- lib/capitalize-commit.md
- this contract and .claude/tasks/plans/2026-11-21-challenge-cutoff-1213.md (run artifacts)
@@ -0,0 +1,73 @@
# FIX r3 — challenge-cutoff (/hotfix, 2026-11-21 12:13)
Contract: `.claude/tasks/contracts/2026-11-21-challenge-cutoff-1213.md`. Base develop 1d21b75.
## Why
- Cutoff: 2026-11-20 runs found MAJORs inside their own fixes at every confirmation pass (levers 9 then 2, follow-up 4 then 3); the `[gated]` point ended only because the main loop deferred it by judgement. The rule writes that judgement: the point is not revised again; it takes the existing `[deferred]` meaning (for the human to accept at the gate).
- Measure: the `TODO +n / -m` count lived only in chat; the memory-commit message now ends with it (examples included), readable with `git log --grep`.
## Edge cases
- "Touched" = a line one of the revision's named changes edited (challenge-plan already requires named changes); a finding elsewhere goes through normal synthesis, still capped at one extra pass.
- /hotfix has no human stop before its dispatch: a deferred point escalates to /bugfix (its existing BLOCKER path).
- /capitalize and /close write their own memory-commit messages (skills/capitalize STEP 5B) without the count: the MEASURE reads dev runs only; it starts at this commit (the MEASURE TODO line is re-anchored at capitalize).
## Challenge r1 (correctness CONCERNS(3), robustness CONCERNS(3), simplicity CONCERNS(1))
- ABANDON coupling + "the rest of the plan proceeds" (all three lenses, MAJOR): mechanism not asked for, contradicts ABANDON's "proven impossible", no path to GATE 2, missing in bugfix (contract after challenge) and hotfix (no gate) → both dropped; `[deferred]` keeps its existing meaning, the human decides before dispatch; hotfix escalates.
- "third time" off by one → "not revised again".
- MINORs taken: "touched" defined; message examples carry the suffix; /capitalize gap named.
- MINOR dropped: agents/plan-challenger.md protocol mirror (:136-137) restates the re-challenge without the cutoff (incomplete, not contradictory; hotfix 2-file cap).
## Challenge r2 (confirmation, correctness: CONCERNS(2)) — rule applied to its own run
- Both MAJORs landed on r2's additions (the "before any dispatch" stop, the /hotfix escape clause): four callers (feat, bugfix, seo, geo) have no human stop before dispatch; `[deferred]` got two meanings in one section. Not revised again: the additions are dropped back to the request's wording and the existing `[deferred]` meaning; the stop-before-dispatch question is deferred to the user (contract CLARIFICATIONS, TODO USER DECISION).
- MINOR taken: the message template carries ` · <todo>` too.
- MINOR dropped: "touched" over/under-capture (definition removed with the r2 text); reopen continuation (no reopen path in the shipped text); memory-feedback commits also carry the suffix through § DO (the MEASURE filters on dev flow subjects).
## EXACT DIFF (against develop 1d21b75)
```diff
diff --git a/lib/capitalize-commit.md b/lib/capitalize-commit.md
index 34a44f8..c6215a5 100644
--- a/lib/capitalize-commit.md
+++ b/lib/capitalize-commit.md
@@ -58,10 +58,10 @@ never a shell argument.
## DO
1. Compose the message from the IDs just written + the flow, matching repo style
- `chore(memory): <IDs> — <flow> <short>`. Examples:
- - `chore(memory): BDR-034 + LRN-051 — feat dark-mode toggle`
- - `chore(memory): BLK-010 resolved — bugfix profile path`
- - `chore(memory): journal — hotfix copy typo` (journal-only, nothing else)
+ `chore(memory): <IDs> — <flow> <short> · <todo>`. Examples:
+ - `chore(memory): BDR-034 + LRN-051 — feat dark-mode toggle · TODO +1 / -0`
+ - `chore(memory): BLK-010 resolved — bugfix profile path · TODO +0 / -1`
+ - `chore(memory): journal — hotfix copy typo · TODO +0 / -0` (journal-only)
Then, still before step 2, count the run's TODO movement as `<todo>`:
`TODO +n / -m`, the open TODO items the run added and removed (closed or
@@ -81,6 +81,9 @@ never a shell argument.
todo="TODO +$n / -$m"
else todo="TODO n/a"; fi
+ The message composed above ends with ` · <todo>`, as in the examples, so
+ each run's movement reads in `git log --oneline --grep '· TODO'`.
+
2. Commit surgically via the helper, capturing the memory-commit hash it prints:
mem_hash=$(bash "$HOME/.claude/lib/memory-commit.sh" commit "<message>")
diff --git a/lib/challenge-plan.md b/lib/challenge-plan.md
index 2941ff1..51197b9 100644
--- a/lib/challenge-plan.md
+++ b/lib/challenge-plan.md
@@ -119,7 +119,10 @@ Parse each `CHALLENGE — LENS: … — VERDICT:` line and merge the FINDINGS:
is tagged `[deferred <date>]` for the human to accept at the gate.
- **Re-challenge once if the plan materially changed** — a fix can open a new
flaw. Re-persist the revised `PLAN`, dispatch ONE fresh confirmation challenger,
- max 1 extra pass, then the gate.
+ max 1 extra pass, then the gate. A BLOCKER or MAJOR that confirmation pass
+ still lands on a point the revision touched is not revised again: it is
+ tagged `[deferred <date>]` with the finding quoted, for the human to
+ accept at the gate.
## OUTPUT — into the existing human gate
```
@@ -0,0 +1,32 @@
# TODO triage 2026-11-21 (user: "fais les 4 points", rule BDR-151 lever 2)
Kept: an item with reproducible evidence, a date, a pending user decision or step, a user ask, or a security finding (goes to the user). Dropped: everything else, one line each below; git keeps the full text (`git log -p -- .claude/tasks/TODO.md`).
MINOR dropped: lib/effort-shift.md § Advisor item 3 reuse clause has no fallback: end-of-run answer absent (advisor absent/error) or out of view at the merge signal → candidate "answer absent or out of view → the merge proposal runs the call" (source, not the sites); the merge happens at the gitflow finish gate (skills/gitflow/SKILL.md:68-89, 0 advisor mentions) where the rule is not loaded (merge-reuse challengers, low)
MINOR dropped: item 3 "names any code commit made after it" has no anchor: ADVISOR field records no HEAD SHA, commits made outside the session are invisible; candidate: record the short SHA with the answer (visible format change, user decision) (merge-reuse robustness challenger, low)
MINOR dropped: end-of-run sites restate the call but not "one end-of-run call per skill run": a fix that goes back through the gates re-enters the end step and may call again (merge-reuse robustness challenger, low)
MINOR dropped: lib/memory-feedback/advisor.ts: split general-purpose callers per dispatch (calls per dispatch, code-review vs other from a fixed description marker), so the advisor usage table can read the general-purpose tripwire without a hand tally (advisor-subagent-scope robustness challenger, low)
MINOR dropped: census test: every agents/*.md served on opus (frontmatter or a model="opus" dispatch) carries either the never-call line or an allowance; every model="opus" general-purpose brief in skills/agents names its advisor rule (STEP 6 review minor 3, low)
MINOR dropped: hooks/subagent-advisor.sh shortcut: SubagentStart only, a sub-agent that compacts may lose the line; re-inject on SessionStart `compact` when agent_type is set (hook header shortcut, low)
MINOR dropped: advisor-scope review minors: lib/model-gate.md Dispatch tiers names the advisor line for opus built-ins; feat/bugfix ADVISOR fields gain `not called (sub-agent)`; client-handover-writer quoted child templates carry the line literally, not only the routing paragraph (STEP 6 review minors 1, 6, 8, low)
MINOR dropped: gates.sh residual: a stray oracle (indented ` 2.`, `- `, `**2.**` label) after a MANUAL criterion still attaches to it, row MANUAL → MET/NOT-MET on an unrelated oracle (no red oracle overwritten; accepted 2026-11-17)
MINOR dropped: lib/verify-secure-loop.md:46-47 ERROR(n) cause list is examples, incomplete: missing "no numbered criteria", "ABANDON names unknown criterion", malformed label, second attribute (c25a7ea)
MINOR dropped: lib/design-tool-gate.sh:70 `perl -e 'alarm shift; exec @ARGV' 15 21st whoami` kills one process only (same limit as the old session-start runner, fixed 490ad83): reuse the group-kill runner when this file is next touched.
MINOR dropped: parked (code-clean 2026-11-09): hooks/rtk-rewrite.sh:84 no-op `[ "$CMD" = "$REWRITTEN" ] && REWRITTEN="$CMD"`: remove with the next real rtk-hook edit, re-pin `hooks/.rtk-hook.sha256` + rtk-rewrite.test.sh T13 in the same step
MINOR dropped: deferred (BDR-123): remap inline-writing best-tier skills (design Build stack, writing-skills, deprecation-and-migration, /tour single-project, /audit-delta 3d, /harden STEP 3); stale citers skills/feat/SKILL.md:6, skills/code-clean/SKILL.md:36; + impeccable row in routing.json (design Build stack has none; frontend-design has `reflect`; census test pins the table)
MINOR dropped: post-run-D residuals (gates, 2026-10-07): settings.json soft_deny names only `gitflow.autopush false` → add "or an unparseable value" (restriction only, settings run); capitalize STEP 6: manual mode with `ahead` = 0 (user pushed by hand between merge and read) matches no closing line, and the 5C `ahead` = 0 bullet still says "(auto-push mode did it)"; release-executor:86 line > 80 cols; push-guard header line 4 > 80 cols (pre-existing); unpushed-guard Stop silence now also covers a missing lib (SessionStart names it) — accepted
MINOR dropped: lib/tests/project-rules.test.sh:296 T11b hardcodes '4 rule(s) ok': a 5th .claude/rules/*.md turns it red (BDR-128 residual)
MINOR dropped: MIGRATION.md: one sentence that hooks/instructions-loaded.sh needs a CLI emitting InstructionsLoaded (older CLI: no log, no path-rule load proof); check claude --version on the work machine (BDR-128 residual)
MINOR dropped: P17 README restructure to Standard-Readme (Install / Usage / Configuration / License); move inline reference parts to USAGE.md, CONFIGURE.md from settings.json + .env.example
MINOR dropped: P18 README Requirements line (Linux apt/dnf/pacman + macOS brew): Linux run done, write the line
MINOR dropped: P31 USAGE narrative: Exemple 9 "sans superpowers" (vendored, always on), "Edit tool" bypasses /hotfix, Pattern E + Exemple 9 route bugs to /ship-feature instead of /bugfix|/hotfix
MINOR dropped: P32 USAGE missing sections: design work (21st CLI, design stack, /site-motion), media generation (Higgsfield toggles), gitflow auto-push + global hooks
MINOR dropped: P33 USAGE per-pattern token figures have no source in code (USAGE.md:363,369,499,552,650,712,1019) — verify or drop; "Budget Pro ~11k" already dropped by the D3 add-ons (9b12b12)
MINOR dropped: W3-A: a parallel same-agent dispatch answered after > 10 s; what an unanswered dialog resolves to on the terminal (must be Later or nothing written). T1 skill-row dialogs seen live (f8665b2, d3635b6)
MINOR dropped: cold-read cap on the opus session: a coding prompt → spinner `sonnet-5-5/medium`; above 120k cold read the skip line once; `/route show` cap text
MINOR dropped: Higgsfield parked (final review, rulings in BDR-109): remedy line ignores a pinned lock version (latent while `latest`); Step 8.6 spawns `higgsfield version` up to 3 times; rollback needs `npm uninstall -g @higgsfield/cli` + session removal + hand removal of `skills-external/higgsfield-*`
MINOR dropped: Higgsfield parked (per-task minors, none blocking): "rename" comment vs rm-then-mv; no `--` before the clone URL; ssh URL can prompt; no sweep of a stale `.higgsfield-stage.*`; timeout path itself untested; "pack not installed" when only unlisted skills are synced; doctor version read unbounded
MINOR dropped: deferred (BDR-125 4c, re-challenge 2026-10-25): Read path triggers, Bash command triggers, memory_search tool for skills (analyze-before-plan pass 1); reopen when a /memory-feedback gate shows misses the prompt and error channels cannot reach (no triggers= field: 4a shipped without Meta, BDR-125 Am.7)
MINOR dropped: conditional (BDR-146 residual): a noisy entry on the tool channel survives the /prune-memory title + lesson rewrite (the 4-gram matcher reads body backtick spans, SKILL.md STEP 1.D limit); act when a tool-gate FEEDBACK.md lists one (gate 1 2026-11-12: 0 tool records)
MINOR dropped: deferred (BDR-125 Am.7, phase 2): commit-msg hook for the 50-word cap; revisit when overruns grow (4/78 on 2026-10-25; 17/530 ≈ 3 % on 2026-11-16 recount, the gap audit's 21/526 not reproducible)
MINOR dropped: shortcut (register.ts TIER_HEAD, BDR-150): the ask-before-Fable dialog (askTier, BDR-135) is inert while no tier is headed by fable; remove the feature (TIER_HEAD, INSTEAD_TIER, tier ask paths and their LEGACY tests) if Fable never returns to a tier
+2 -1
View File
@@ -23,7 +23,7 @@ The BDR-125 context queue is delivered: phases 0, 0b, 4a, 1, 5, 2 and 4b-4d ship
- **model-router: Fable leaves auto-routing**: the `best` and `big` tiers default to opus then sonnet (were fable>opus>sonnet and opus>fable>sonnet), so Opus is the strongest model the router routes to and Fable is the advisor (`advisorModel` in settings.json). Fable stays in the model table and first in the fallback rank, so a hand pick of fable ranks above opus. The first-use Change dialog offers opus, sonnet and haiku; the bare `/model` dialog still offers fable, labelled `fable (custom)`. The ask before Fable only fires when a machine override puts fable at the head of `best`: otherwise `/route ask-tier on` answers `(inert: best is not headed by fable)` and `/route show` prints `ask-tier: inert`. An agent on a best or big row keeps its opus frontmatter when Opus is down. The `tiers.best does not lead the fallback chain` log is gone; `routing.json` is unchanged. Tests: `mods/model-router/hooks/register.test.ts`; `lib/tests/effort-routing.test.sh` floors every row on its tier's head. The `/client-handover` skill-runner children and the `lib/model-gate.md` dispatch doctrine pin `model: "opus"` instead of `"fable"` (BDR-150: Fable is the advisor, never a dispatch target), and the model gate lets a sub-agent pass when the route answer says its model is `fixed at spawn`. Tests: `lib/tests/model-routing.test.sh` refuses any fable dispatch pin under agents/, skills/ and lib/; `lib/tests/effort-routing.test.sh` checks the 7 opus/effort="high" client-handover dispatches.
- **Advisor doctrine (`CLAUDE.global.md` § Workflow, `lib/effort-shift.md` § Advisor, `lib/challenge-plan.md`, `lib/verify-secure-loop.md`, `agents/plan-challenger.md`, `agents/verifier.md`, `agents/security-auditor.md`, `agents/analyzer.md`, `skills/{feat,bugfix,hotfix,ship-feature,init-project,onboard,code-clean,harden,a11y,guardrails,audit-delta,tour,release-candidate}/SKILL.md`, `skills/pack-seo/skills/{seo,geo}/SKILL.md`, `skills/pack-web-validate/skills/web-validate/SKILL.md`)**: when a stronger model is needed (an approach to settle before building, a stuck problem, a long task before calling it done, a change to recommend to the doctrine, the architecture or a public interface), the main loop calls the advisor tool (Fable, settings `advisorModel`, set by `/advisor`), at least on the written plan before the plan challengers are dispatched (`lib/challenge-plan.md`, every skill that challenges a plan, once per skill run, not before a re-challenge: an answer that lands a real flaw revises the plan file as plain plan text with no advisor attribution, the advice never enters a challenger brief, and the CHALLENGE SUMMARY of every caller gains an `Advisor:` row (the plan change it drove, `called, no change` or `not called (absent | error | already called this run)`), each caller sending its route before the challenge with the first tool call of `lib/challenge-plan.md`; the ORCHESTRATOR PROTOCOL in `agents/plan-challenger.md` mirrors this advisor-first step and the row), once per verify-secure run at the first gate loop to fail twice (floor, conformity, security, or a second structural failure, counting main-loop calls since GATE 0 first ran; the advice stays in the main loop and never enters an executor brief; every cap or escalation STOP carries it and says whether it predates the last iteration), and before proposing a merge (`gitflow finish`) or calling a long task done: one end-of-run call per skill run, never skipped for an earlier plan or stuck call, except that audit-delta and tour skip it when the run applied no fix and feat and bugfix skip it when GATE 0 said MET, the verifier CONFORME and security PASS (not DEGRADED), each on its first attempt, their summary's `ADVISOR` field then reading `skipped (gates clean on first pass)`. It sits at the commit step of feat and bugfix and at the end step of ship-feature, init-project, a11y and guardrails: the main loop first prints the run's diff stat, the answer goes into the reply or finish proposal as an `Advisor:` line, or into the feat/bugfix summary's `ADVISOR` field, a fix it drives goes back through the gates, and a later merge proposal reuses the last run's answer, or its skip, and names any code commit made after it (doc and memory commits excepted). It also sits at the end of audit-delta and tour when the run applied a fix (tour: main loop only, never a runner), and at release-candidate STEP 4 before the go / hold ask. In those three the answer is reported only: a fix it calls for waits for a new run, and at the release gate it makes hold the recommended answer. The same six gate skills carry a `Stuck:` line that points at the verify-secure rule. Inside a skill run these points cover the triggers: no second call for the same recommendation. `plan-challenger`, `verifier`, `security-auditor` and `analyzer` may call it only when dispatched as a sub-agent, at most once per dispatch, late, before their verdict or report; the analyzer's output rests on the code it read, never on the advice alone, and advice proposing a design or a fix counts only where the brief asks for one. For the three gates advice only adds: the verifier may go back to a contract criterion and tags a resulting NOT-MET `(advisor-prompted)`, never clearing a gap on advice; the challenger never drops or lowers a finding on advice alone; the security-auditor tags an added finding `advisor:<STEP 3 class>` at that class's severity (REPORTED LOW when it matches no class), and tags a raised one `<rule>+advisor` only when the class's severity is higher than the finding's own; a raise that does not apply, or matches no class, changes nothing (no tag, no PROOF count). Its PROOF ends with `; advisor <n> added/raised`. Executors and every other sub-agent do not call it, even when the tool is listed. Advisor absent or erroring → proceed as written; advice waives no gate, cap or guard and, at a loop cap, feeds the STOP diagnosis. Fable on main comes only from a hand pick, a typed `/route model=fable`, a phase naming `model: fable` or a machine override that puts fable in a tier (BDR-150). Prose that still named Fable as the `audit` row head or a skill-runner pin (`agents/plan-challenger.md`, `lib/challenge-plan.md`, `lib/effort-shift.md`, `skills/tour/SKILL.md`) now says opus.
- **gates.sh timeout**: the default per-CHECK timeout (`GATES_TIMEOUT`) is 600 s, up from 120 s. A full `make test` (about 135 s) went NOT-MET on the timeout alone. A run lasts the sum of its CHECKs: a caller with a shorter limit (a foreground tool call stops at 600 s) runs it in the background, and a killed run writes nothing back, so the floor stays PENDING.
- **Done and triage levers (`lib/verify-secure-loop.md`, `lib/challenge-plan.md`, `lib/capitalize-commit.md`, `agents/verifier.md`, `CLAUDE.global.md`)**: a run is done when its oracles are green (GATE 0 MET, verifier CONFORME and security PASS on the same diff); a later review reopens it only with reproducible evidence, a command that fails on HEAD or real output shown wrong. A MINOR finding is folded into the plan before the dispatch or dropped as one `MINOR dropped: <finding>` line in the run report and plan file, never in TODO.md or a registry; a security finding is never dropped and goes to the user. A run that only places a decision the user already made skips the plan challenge and its advisor call and prints `Challenge: skipped (placed decision: …)`. Before the first dispatch the main loop records `- run-base: <sha>` in the contract and dry-runs its CHECKs with `gates.sh run` on a `mktemp -d` copy. A TODO loop notes its start SHA in TODO.md and runs that list plus user additions. The memory-commit report line ends with `· TODO +n / -m` (`TODO n/a` when the diff fails). The verifier counts run artifacts in scope: an added plan file, appended `MINOR dropped:` lines, the contract's `EVIDENCE:`, `- run-base:` and `[gated]` lines.
- **Done and triage levers (`lib/verify-secure-loop.md`, `lib/challenge-plan.md`, `lib/capitalize-commit.md`, `lib/contract-interview.md`, `skills/{ship-feature,init-project}/SKILL.md`, `agents/verifier.md`, `CLAUDE.global.md`)**: a run is done when its oracles are green (GATE 0 MET, verifier CONFORME and security PASS on the same diff); a later review reopens it only with reproducible evidence, a command that fails on HEAD or real output shown wrong. The post-gate code review (`/ship-feature` STEP 6, `/init-project` STEP 10) fixes a CRITICAL or Important finding only when it carries that evidence (it used to fix every CRITICAL): without it, one attempt at a failing command, else the finding is triaged as a MINOR; a security finding goes to the user. The review loop back to implementation applies to those items, capped at 2 cycles. A MINOR finding is folded into the plan before the dispatch or dropped as one `MINOR dropped: <finding>` line in the run report and plan file, never in TODO.md or a registry; a security finding is never dropped and goes to the user. A run that only places a decision the user already made skips the plan challenge and its advisor call and prints `Challenge: skipped (placed decision: …)`. A BLOCKER or MAJOR that the one confirmation challenger still lands on a point the revision touched is not revised a second time: it is tagged `[deferred <date>]` with the finding quoted, for the human to accept at the plan gate. Before the first dispatch, right after the flow's branch step, the main loop records `- run-base: <sha>` in the contract (a value written before the branch step is replaced by `git rev-parse HEAD` after it) and dry-runs its CHECKs with `gates.sh run` on a `mktemp -d` copy. Every flow that writes a contract with `CHECK:` lines does this, whether or not it challenges its plan, `/ship-feature` and `/init-project` included (`lib/contract-interview.md` STEP 4); a flow's own positive control on the unfixed tree stands for the `gates.sh` half, and `- run-base:` is still recorded. A TODO loop notes its start SHA in TODO.md and runs that list plus user additions. The memory commit's message and its report line end with `· TODO +n / -m`, so `git log --oneline --grep '· TODO'` lists each run's movement; `TODO n/a` when the diff fails or the run base is not a 7-40 hex SHA (the diff now passes `--end-of-options` before it). The verifier counts run artifacts in scope: an added plan file, appended `MINOR dropped:` lines, the contract's `EVIDENCE:`, `- run-base:` and `[gated]` lines.
### Removed
- `hooks/design-toolchain-reminder.sh`, its `UserPromptSubmit` entry in `settings.json` (`ctx7-reminder` stays the only one) and its suite `lib/tests/design-toolchain-reminder.test.sh`. Measured 2026-10-31: 59 fires, 0 Reads of `rules/web-building.md`. Design routing stays with the `rules/web-building.md` path rule and the `CLAUDE.global.md` pointer. The fire log `~/.claude/logs/design-toolchain-fires.log` is left in place.
@@ -45,6 +45,7 @@ The BDR-125 context queue is delivered: phases 0, 0b, 4a, 1, 5, 2 and 4b-4d ship
- model-router: a Skill call whose answer carries `isError` (refused or unknown skill) no longer opens the write guard for the rest of the session. Test: `mods/model-router/hooks/register.test.ts` (GUARD: an isError Skill answer leaves the latch closed).
- `settings.json`: the `autoMode.hard_deny` entry "Disarming the guardrails" now names turning a mod off as disarming: `"enabled": false` in `~/.claude/<mod>.json`, a mod's `enabledPlugins` entry set to false, or `profile.sh disable` of a mod. These switches turn off the model-router write guard and the memory mod; the user still sets them by hand.
- `lib/gates.sh` (GATE 0 floor): an unindented line under `## ACCEPTANCE CRITERIA` that starts with a digit but is not `N. text` (`1b.`, `1.1`, `2)`) is now a parse error, `malformed criterion label at line N`, and a second `CHECK:`, `EXPECT:` or `EVIDENCE:` on one criterion is one too, `second CHECK: at line N in criterion M`. Either gives `VERDICT: ERROR(n)` (rc 2) and no CHECK runs. An oracle under a label the parser missed used to overwrite the previous criterion's, so a failing criterion could read MET. A label that is not digit-led (indented, bullet) is caught only when the criterion before it already has that attribute; after a manual criterion its oracle is still absorbed. With no criterion parsed, the `no numbered criteria` error now ends with the first parse error. Test: `lib/tests/gates.test.sh`.
- `lib/gates.sh` (ABANDON): `ABANDON:` needs a numeric criterion id followed by whitespace or end of line. `ABANDON: 1b …` and `ABANDON: 1.1 …` used to abandon criterion 1 silently (the regex took the leading digits); they and an id-less `ABANDON: <reason>` are now a parse error, ``malformed ABANDON at line N (want `ABANDON: N reason`)``, verdict `ERROR(n)` (rc 2). An indented `ABANDON:` line, ignored before, now counts. Tests: `lib/tests/gates.test.sh` (5 cases).
- Security gate readers (`lib/verify-secure-loop.md`, `agents/security-auditor.md` ORCHESTRATOR PROTOCOL, `skills/hotfix/SKILL.md` STEP 4) no longer read `DEGRADED` as a value of the `SECURITY — VERDICT:` line. The auditor prints `VERDICT: PASS` on a scan without semgrep and reports DEGRADED on its `TOOL:` line, so the old `DEGRADED` branch never fired: a degraded scan read as a clean PASS, the checklist result and the `make plugin` hint were never surfaced, and hotfix's `SECURITY: DEGRADED (checklist only)` summary could not be reached. The `PASS` branch now reads the `TOOL:` line first, and a PASS with no `TOOL:` line is a structural failure (one fresh retry, then escalation). `lib/effort-shift.md` § Advisor names the `TOOL:` line in the feat/bugfix skip condition. The auditor's output format is unchanged. Test: `lib/tests/loops-light.test.sh` (DEGRADED on the TOOL line).
- **Advisor in sub-agents**: opus sub-agents, general-purpose ones included, called the `advisor` tool on their own: 30 calls, 7.1M input tokens. The tool is listed to every sub-agent, its own instructions ask for calls, and the rule in `CLAUDE.global.md` reached them only as an attachment. A new SubagentStart hook, `hooks/subagent-advisor.sh` (`settings.json`, timeout 5 s), tells every sub-agent at spawn not to call it unless its agent definition or its dispatcher's brief allows it, then at most once. The allowed set is plan-challenger, verifier, security-auditor, `analyzer` and an opus code review (`/ship-feature` STEP 6, `/init-project` STEP 10, a standalone subagent-driven-development final review), whose brief allows one call. plugin-advisor, seo-analyzer, geo-analyzer, doc-syncer, commit-changer and handover-doc-writer, and the opus briefs of `/onboard`, client-handover-writer and `/tour` Phase B, carry a never-call line. A standalone subagent-driven-development run dispatches every worker on sonnet, task reviews and fix rounds included. `Advisor:` rows gain `not called (sub-agent)`. Test: `lib/tests/subagent-advisor.test.sh`.
+7 -4
View File
@@ -58,10 +58,10 @@ never a shell argument.
## DO
1. Compose the message from the IDs just written + the flow, matching repo style
`chore(memory): <IDs> — <flow> <short>`. Examples:
- `chore(memory): BDR-034 + LRN-051 — feat dark-mode toggle`
- `chore(memory): BLK-010 resolved — bugfix profile path`
- `chore(memory): journal — hotfix copy typo` (journal-only, nothing else)
`chore(memory): <IDs> — <flow> <short> · <todo>`. Examples:
- `chore(memory): BDR-034 + LRN-051 — feat dark-mode toggle · TODO +1 / -0`
- `chore(memory): BLK-010 resolved — bugfix profile path · TODO +0 / -1`
- `chore(memory): journal — hotfix copy typo · TODO +0 / -0` (journal-only)
Then, still before step 2, count the run's TODO movement as `<todo>`:
`TODO +n / -m`, the open TODO items the run added and removed (closed or
@@ -81,6 +81,9 @@ never a shell argument.
todo="TODO +$n / -$m"
else todo="TODO n/a"; fi
The message composed above ends with ` · <todo>`, as in the examples, so
each run's movement reads in `git log --oneline --grep '· TODO'`.
2. Commit surgically via the helper, capturing the memory-commit hash it prints:
mem_hash=$(bash "$HOME/.claude/lib/memory-commit.sh" commit "<message>")
+4 -1
View File
@@ -119,7 +119,10 @@ Parse each `CHALLENGE — LENS: … — VERDICT:` line and merge the FINDINGS:
is tagged `[deferred <date>]` for the human to accept at the gate.
- **Re-challenge once if the plan materially changed** — a fix can open a new
flaw. Re-persist the revised `PLAN`, dispatch ONE fresh confirmation challenger,
max 1 extra pass, then the gate.
max 1 extra pass, then the gate. A BLOCKER or MAJOR that confirmation pass
still lands on a point the revision touched is not revised again: it is
tagged `[deferred <date>]` with the finding quoted, for the human to
accept at the gate.
## OUTPUT — into the existing human gate