diff --git a/.claude/memory/blockers.md b/.claude/memory/blockers.md index 0137b63..065a03c 100644 --- a/.claude/memory/blockers.md +++ b/.claude/memory/blockers.md @@ -51,7 +51,7 @@ rules: | BLK-029 | 2026-10-08 | Claude Code mods (2.1.294): alias → id resolution for a model set by a hook lags the Agent tool's (`sonnet` → `claude-sonnet-5`, 404); Agent tool schema refuses full ids | upstream | | BLK-030 | 2026-10-15 | model-router kept routing best-tier phases to Fable out of usage credits: each new session + each hold lapse lost a turn to 429 `model_requires_usage_credits`; breaker reactive only | resolved | | BLK-031 | 2026-10-16 | model-router: session starting on Fable w/o credits lost 1st turn + each hold lapse; probe skipped kept cur | resolved | -| BLK-032 | 2026-10-19 | Main loop pinned on Fable in long sessions: session model Fable 1M + downgrade cap 120k + prompt rule `plan` → inline code on Fable xhigh; user routing policy recorded for next /feat | open | +| BLK-032 | 2026-10-19 | Main loop pinned on Fable in long sessions: session model Fable 1M + downgrade cap 120k + prompt rule `plan` → inline code on Fable xhigh; feat A+B shipped (BDR-123), closes after feat C | open | | BLK-033 | 2026-10-21 | Guardrails residuals: probe trusted plan `supabase.url`, redirects free of budget, unread bodies read CLOSED, `str(URLError)` hid budget signal; rules 5 FP / 7 misses | resolved | --- diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md index ff1284d..e284fa5 100644 --- a/.claude/memory/decisions.md +++ b/.claude/memory/decisions.md @@ -140,6 +140,7 @@ rules: | BDR-120 | 2026-10-18 | Secure-by-default guardrails: always-on rule file + /guardrails stdlib scanner, passwords in api domain | accepted | | BDR-121 | 2026-10-18 | Guardrails fix loop reuses bugfix circuit; scanner = contract oracle, baseline re-pass | accepted | | BDR-122 | 2026-10-19 | Guardrails split: /a11y standalone on shared scan engine, injection + exposure domains, exposure proven live by read-only probe | accepted | +| BDR-123 | 2026-10-21 | Routing policy: opus session model, Fable via best-tier rows for orchestrator reflection + merge gates, sonnet writes, doctrine ceiling on Fable main; supersedes parts of BDR-066 / BDR-115 | accepted | --- @@ -1469,3 +1470,11 @@ Branch feature/user-writing-web-rules, UNMERGED (human gate). - **Why**: user ask 2026-10-18 (keyboard/alt/labels as own skill; SQL/DB injection; browser-visible info). One engine = one CLI contract, two catalogues, no drift. Lazy a11y rule keeps CLAUDE.global.md at 320. - **Alternatives rejected**: a11y as a `--domain` flag only (user wanted own report + walk); engine copied into skills/a11y (two CLIs drift); exposure probe against dev server (dev artefacts = false OPEN); semgrep-only (blind to live responses, policies). - **Refs**: branch feature/a11y-split-inj-exp, contract `.claude/tasks/contracts/2026-10-18-guardrails-a11y-split-inj-exp-2210.md`; spec + plan purged at finish (`git show 988038c:docs/superpowers/...`). Supersedes the domain list of [[BDR-120]]; links [[BDR-121]]. + +## BDR-123 — Routing policy: opus session, Fable via rows for orchestrator reflection + merge gates, sonnet writes, ceiling on Fable main [accepted] (2026-10-21) +- **Decision**: user policy 2026-10-19. `settings.json` session model `opus`; model-router best-tier rows lift main to Fable for reflection ONLY (brainstorm, plan, contract, audit judgment, loop decisions). Fresh gates (verifier, security-auditor) = `audit` phase best/xhigh, frontmatter floor `opus` (LRN-224). Other judges (plan-challenger, analyzer, code review) opus. Executors sonnet; "what to write" (plan, diagnosis, contract) opus. Doctrine ceiling (CLAUDE.global.md Sub-agents rule): main on Fable writes no code past `/hotfix` scope, hands it to `/feat` or `/bugfix`. Supersedes BDR-066 "reflection inline on session model (Fable)" + "verifier + security-auditor stay sonnet"; amends BDR-115 "pin = never ceiling" (agent pins unchanged, ceiling lives in doctrine on main writing code). +- **Why**: BLK-032: session on Fable 1M + downgrade cap 120k + keyword `plan` rule → long sessions wrote code inline on Fable xhigh. Fable reserved for big reflection + important audits, rest opus/sonnet. +- **Alternatives rejected**: fable frontmatter on gates (dead model in credit outage, LRN-224); general-purpose dispatch for small writes (inherits Fable); CLAUDE.global.md budget raise over 320 (bullet compacted instead). +- **[deferred]** inline-writing best-tier skills = declared exception, visible in this repo only: design Build stack (frontend-design, 21st-ui-build, emil-design-eng, design-motion-principles Create, site-motion, build-threejs-scroll-worlds, scroll-*, 21st-ai), writing-skills, deprecation-and-migration, /tour single-project, /audit-delta STEP 3d, /harden STEP 3. Remap = own task (TODO). +- **Known gaps**: default keyword prompt rules (plan|design|architecture, why|review|audit|analyze, ultrathink) lift main to Fable unwitnessed → feat C caps them at session model; Fable held down → opus stand-in, ceiling does not bind; stale "session model" citers `skills/feat/SKILL.md:6`, `skills/code-clean/SKILL.md:36`. +- **Refs**: feat A feature/routing-audit-phase d3635b6 a7d747c dae142b; feat B feature/routing-ceiling-rule ef13713 887cf89, contract `.claude/tasks/contracts/2026-10-21-routing-ceiling-rule-1753.md`, plan `.claude/tasks/plans/2026-10-21-routing-ceiling-rule-1753.md`. Links [[BDR-066]] [[BDR-115]] [[BLK-032]] [[LRN-224]]. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 5ae154c..47d3efe 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -634,3 +634,4 @@ rules: - /prune-memory: learnings.md index backfilled LRN-191..218 (28 rows), c7ebc3d on chore/prune-learnings-index. Index 221 rows = 221 entries. - /bugfix guardrails residuals (bugfix/guardrails-residuals): plan r3 after 2 challenge rounds (4 BLOCKERs r1: WARN severity, budget must raise, three-way SKIPPED, vacuous timing; r2: `str(URLError)` wrap), contract 22 oracles, 3 part executors, GATE 0/1/2 green, 5a98c2c + 633faa2 (checks.md IN() wording caught by doc-syncer, not the gates). BLK-033, LRN-222/223. Two LOW parked. Both branches await merge signal. Next: /feat routing policy (BLK-032). - /feat routing policy A (feature/routing-audit-phase, BLK-032): `audit` phase (best/xhigh) for verifier + security-auditor, opus frontmatter = outage floor (LRN-224), census tier_floor, citers. 2 challenge rounds (r1 2 BLOCKERs: dead-Fable floor, test fixture), GATE 0 15/15, verifier CONFORME, auditor PASS. d3635b6 dialog writes + session model opus, a7d747c, dae142b docs. Feat B next: ceiling rule, BDR, README doctrine. +- /feat routing policy B (feature/routing-ceiling-rule): ceiling bullet compacted into CLAUDE.global.md (320 budget), README doctrine + challenge citers on `opus` session model, deploy `effort: xhigh`, `changed` cleared. 3 challengers r1→r3, GATE 0 12/12, verifier CONFORME, auditor PASS. ef13713 + docs 887cf89, BDR-123 ([deferred] inline-writing skills, keyword-lift gap → feat C). Merge on user go; then bugfix mods.test.sh, feat C. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 4241950..4f061b1 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -6,7 +6,10 @@ - [ ] 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 - [~] routing policy /feat (user 2026-10-19, BLK-032): settings model → Opus 5.5; `judge` split (security-auditor + verifier → Fable, plan-challenger/analyzer/code review → opus); executors stay sonnet, "what to write" on opus; ceiling rule: main on Fable never writes code beyond a hotfix edit → dispatched executor; BDR superseding part of BDR-066 / BDR-115. - [x] feat A audit phase: d3635b6 (dialog writes, session model opus), a7d747c (audit row, opus floor, census, citers), dae142b (docs); gates 0/1/2 green, LRN-224 - - [ ] feat B: ceiling rule CLAUDE.global.md, BDR-123 superseding parts of BDR-066/115, README l.17 + l.72-73 doctrine (P2/P3 deferred), `skills/deploy/SKILL.md` effort low→xhigh (WARN floor drift) + - [x] feat B (feature/routing-ceiling-rule): ceiling rule CLAUDE.global.md, README doctrine, challenge citers, deploy `effort: xhigh`, routing.json `changed` cleared; ef13713 + 887cf89, gates 0/1/2 green, BDR-123; merge = user go + - [ ] feat C: cap the default keyword prompt rules (plan|design|architecture, why|review|audit|analyze, ultrathink) at the session model, effort only like the classifier; close BLK-032 after + - [ ] bugfix lib/tests/mods.test.sh:57: CLI 2.1.306 `claude plugin validate` advisory "plugin directory warning" (ICON_MISSING) read as failure; exclude that section, keep other warnings blocking + - [ ] 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 - [ ] residuals (accepted): spawn path unprobed, 1st gate of an outage window dies once (tour/onboard/audit-delta no retry); onAutoSwitch with main on opus marks nothing if engine auto-falls a gate off Fable ## 2026-10-18 — secure-by-default guardrails: 5 domains + /guardrails skill (feature/secure-by-default) diff --git a/.claude/tasks/contracts/2026-10-21-routing-ceiling-rule-1753.md b/.claude/tasks/contracts/2026-10-21-routing-ceiling-rule-1753.md new file mode 100644 index 0000000..6fcb1d2 --- /dev/null +++ b/.claude/tasks/contracts/2026-10-21-routing-ceiling-rule-1753.md @@ -0,0 +1,73 @@ +# CONTRACT — routing-ceiling-rule (feat B of the routing policy, BLK-032) + +## REQUEST (verbatim, feat B scope) +ceiling rule in CLAUDE.global.md: main loop on Fable never writes code beyond a hotfix-sized edit, it dispatches an executor; new BDR superseding the affected parts of BDR-066 and BDR-115; README doctrine sentences (deferred P2/P3 of feat A); `skills/deploy/SKILL.md` effort aligned with its `verify` row. + +## CLARIFICATIONS +- [gated 2026-10-21] Short wording (user pick): the rule names the ceiling only; the model split lives in the BDR and routing.json. +- [gated 2026-10-21] Budget (user pick): compact the Sub-agents bullet so CLAUDE.global.md stays at 320 lines. +- [gated 2026-10-21, fitted wording acked by user] Fitted text cites the `/hotfix` scope (defined at CLAUDE.global.md:80 as "≤2 files, obvious fix"); "multi-file" dropped from "wide multi-file exploration"; "whatever the task size" → "even small". Safety sentences of the bullet unchanged word for word. +- [gated 2026-10-21, after the challenge] Dispatch target (user pick): "it hands it to /feat or /bugfix". To keep 320 lines, "main context stays clean" (rationale of "one task each") is dropped. +- [gated 2026-10-21, after the challenge] Best-tier skills that write code inline (design Build stack, writing-skills, deprecation-and-migration, /tour single-project, /harden STEP 3) are a declared temporary exception recorded in BDR-123 [deferred] (user pick); no skill file changes here. +- [gated 2026-10-21, after round 2] The keyword prompt-rule lift to Fable (unwitnessed) is a known gap closed by a feat C right after (keyword rules capped at the session model); BLK-032 stays open until then (user pick). +- [gated 2026-10-21, executor NEED-DECISION] Criterion 8 = no regression vs develop: CLI 2.1.306 adds advisory plugin-directory warnings (ICON_MISSING) that mods.test.sh:57 counts as failure; develop's copy fails identically. Fixed by a separate /bugfix on the suite (user pick). +- Internal: deploy's `changed` entry is dropped (the floor now follows the row; a stale `from: apply` would make `/route forget` turn the census red). Session-model citers: lib/challenge-plan.md:47-48, agents/plan-challenger.md:111, README.md:95. README's enforcement clause is anchored to the model floor ("The Fable/Opus model floor is enforced"), since model-gate.md checks the model id, not the ceiling. +- Internal: BDR-123 is written at CAPITALIZE (memory), not by the executor. + +## ACCEPTANCE CRITERIA +1. The Sub-agents bullet of CLAUDE.global.md equals the fitted text in `.claude/tasks/plans/2026-10-21-routing-ceiling-rule-1753.bullet.txt` byte for byte. + CHECK: python3 -I -c "s=open('CLAUDE.global.md').read();b=open('.claude/tasks/plans/2026-10-21-routing-ceiling-rule-1753.bullet.txt').read();print('BULLET ok' if s.count(b)==1 else 'BULLET missing')" + EXPECT: BULLET ok + EVIDENCE: MET exit=0 marker-found :: BULLET ok +2. CLAUDE.global.md stays at 320 lines and no line exceeds 80 columns in the edited range. + CHECK: echo "n=$(wc -l < CLAUDE.global.md)/$(sed -n 49,58p CLAUDE.global.md | awk 'length($0)>80' | wc -l)" + EXPECT: n=320/0 + EVIDENCE: MET exit=0 marker-found :: n=320/0 +3. The rest of CLAUDE.global.md is unchanged: the diff touches only lines 49-58. + CHECK: git diff -U0 develop -- CLAUDE.global.md | grep -E '^@@' | sed 's/ @@.*//' | tr '\n' '|' | sed 's/^/[/; s/$/]/' + EXPECT: [@@ -49,10 +49,10|] + EVIDENCE: MET exit=0 marker-found :: [@@ -49,10 +49,10|] +4. The safety sentences of the bullet survive word for word (whitespace-normalised). + CHECK: tr '\n' ' ' < CLAUDE.global.md | tr -s ' ' | grep -c 'A brief never authorizes a sub-agent to run a destructive tool (Security → Destructive tools & data loss) or to route around a guardrail: a refused command is reported with its rule, never rerun through a wrapper, alias, env file or other shell. Hermetic tests run through `make test \[suite=…\]` only.' + EXPECT: 1 + EVIDENCE: MET exit=0 marker-found :: 1 +5. README.md "What it is" (l.15-17) reads "(haiku collects, sonnet executes, opus judges and runs the session, Fable plans and runs the merge gates)" and no longer says "the session model only reflects". + CHECK: f=README.md; a=$(tr '\n' ' ' < $f | tr -s ' ' | grep -c '(haiku collects, sonnet executes, opus judges and runs the session, Fable plans and runs the merge gates)'); b=$(tr '\n' ' ' < $f | tr -s ' ' | grep -c 'the session model only reflects'); echo "$a/$b" + EXPECT: 1/0 + EVIDENCE: MET exit=0 marker-found :: 1/0 +6. README.md "Agent model routing" doctrine sentence no longer claims "the session model (Fable)" nor puts gates in the main loop, names the ceiling, keeps the model-gate clause anchored to the model floor, and the edited lines stay ≤80 columns. + CHECK: f=README.md; t=$(tr '\n' ' ' < $f | tr -s ' '); a=$(printf '%s' "$t" | grep -c 'the session model (Fable)'); b=$(printf '%s' "$t" | grep -c 'Doctrine: the main loop runs on the `opus` session model; the model-router rows lift it to Fable for main-loop reflection ONLY: brainstorm, plan, contract, audit judgment, loop decisions. On Fable it writes no code past the `/hotfix` scope; the fresh gates run as dispatched agents on the `audit` row. The Fable/Opus model floor is enforced by a blocking gate (`lib/model-gate.md`) at the entry of the 17 reflection skills'); c=$(awk '/^## Agent model routing/{p=1} /^\| Agent/{p=0} NR>=14&&NR<=19{print;next} p' $f | awk 'length($0)>80' | wc -l); echo "$a/$b/$c" + EXPECT: 0/1/0 + EVIDENCE: MET exit=0 marker-found :: 0/1/0 +7. `skills/deploy/SKILL.md` frontmatter `effort: xhigh` (its `verify` row), and the census no longer warns floor drift on deploy. + CHECK: a=$(awk 'NR==1&&/^---$/{p=1;next} p&&/^---$/{exit} p' skills/deploy/SKILL.md | grep -c '^effort: xhigh$'); b=$(make test suite=lib/tests/effort-routing.test.sh 2>&1 | grep -c 'floor drift: skills/deploy'); echo "$a/$b" + EXPECT: 1/0 + EVIDENCE: MET exit=0 marker-found :: 1/0 +8. Full suite green, except the pre-existing `lib/tests/mods.test.sh` failure "validate printed a warning" (CLI 2.1.306 directory-check ICON_MISSING, reproduced on develop's copy of the mod 2026-10-21; separate /bugfix): exactly that one suite red, and the only FAIL lines are that check and the suite's own summary line. + CHECK: o=$(make test 2>&1); echo "[$(printf '%s\n' "$o" | grep -c 'suite(s) red: lib/tests/mods.test.sh$')$(printf '%s\n' "$o" | grep -cE '^ *FAIL ' | sed 's/^2$/ok/')$(printf '%s\n' "$o" | grep -c 'FAIL model-router: validate printed a warning')]" + EXPECT: [1ok1] + EVIDENCE: MET exit=0 marker-found :: [1ok1] +9. No new lint or test suppression in the diff (floor-guard clean). + CHECK: git diff -U0 develop -- . ':!.claude' | grep -E '^\+' | grep -cE 'shellcheck disable|noqa|eslint-disable|@ts-ignore|@ts-expect-error' | sed 's/^/n=/' + EXPECT: n=0 + EVIDENCE: MET exit=0 marker-found :: n=0 +10. The diff touches only the FILE SCOPE. + CHECK: git diff --name-only develop -- . ':!.claude' | grep -vcE '^(CLAUDE.global.md|README.md|skills/deploy/SKILL.md|mods/model-router/routing.json|lib/challenge-plan.md|agents/plan-challenger.md)$' | sed 's/^/n=/' + EXPECT: n=0 + EVIDENCE: MET exit=0 marker-found :: n=0 +11. routing.json: `changed` holds no deploy entry, `skills.deploy` and `confirmed.skills.deploy` stay `verify`, nothing else in the file changes. + CHECK: python3 -I -c "import json,subprocess;d=json.load(open('mods/model-router/routing.json'));o=json.loads(subprocess.run(['git','show','develop:mods/model-router/routing.json'],capture_output=True,text=True).stdout);assert 'deploy' not in d['changed'].get('skills',{}) and d['skills']['deploy']=='verify' and d['confirmed']['skills']['deploy']=='verify';o['changed']['skills'].pop('deploy');o['changed']={k:v for k,v in o['changed'].items() if v};assert d==o;print('ROUTING ok')" + EXPECT: ROUTING ok + EVIDENCE: MET exit=0 marker-found :: ROUTING ok +12. The three session-model citers are patched: lib/challenge-plan.md ("off the main loop. The main loop (Fable through its best-tier row) keeps only this loop"), agents/plan-challenger.md ("the main loop, on Fable through its best-tier row, stays inline"), README.md:95 ("inline-load = the main loop's model"); the old phrases are gone (whitespace-normalised). + CHECK: n(){ tr '\n' ' ' < "$1" | tr -s ' ' | grep -c "$2"; }; echo "[$(n lib/challenge-plan.md 'The session model (Fable)')$(n lib/challenge-plan.md 'off the main loop. The main loop (Fable through its best-tier row) keeps only this loop')$(n agents/plan-challenger.md 'the session model stays on the inline loop')$(n agents/plan-challenger.md 'the main loop, on Fable through its best-tier row, stays inline')$(n README.md 'inline-load = session model')$(n README.md "inline-load = the main loop's model")]" + EXPECT: [010101] + EVIDENCE: MET exit=0 marker-found :: [010101] + +## FILE SCOPE +- CLAUDE.global.md +- README.md +- skills/deploy/SKILL.md +- mods/model-router/routing.json +- lib/challenge-plan.md +- agents/plan-challenger.md diff --git a/.claude/tasks/plans/2026-10-21-routing-ceiling-rule-1753.md b/.claude/tasks/plans/2026-10-21-routing-ceiling-rule-1753.md new file mode 100644 index 0000000..34845bb --- /dev/null +++ b/.claude/tasks/plans/2026-10-21-routing-ceiling-rule-1753.md @@ -0,0 +1,35 @@ +# PLAN r3 — routing-ceiling-rule (feat B, BLK-032 routing policy) + +r2 after the 2026-10-21 challenge (correctness CONCERNS, robustness FATAL, simplicity SOLID): dispatch target named (/feat or /bugfix, user pick), inline-writing best-tier skills deferred in BDR-123 (user pick), deploy `changed` entry dropped, challenge-plan.md:48 citer, README enforcement clause anchored, oracles 3/6/7 tightened, bullet-old artifact dropped. r3 after round 2: keyword-rule lift to Fable named as a known gap closed by feat C (user pick), exception list completed, mirror citers (plan-challenger.md:111, README.md:95) patched, challenge-plan.md phrase pair, oracle 6 fixed, router-internal line refs trimmed. + +Contract: `.claude/tasks/contracts/2026-10-21-routing-ceiling-rule-1753.md` + +## Why +Feat A (merged b961ce6) moved the session model to `opus` and the gates to the `audit` row. BLK-032's last open point: a doctrine ceiling so main on Fable (reached through best-tier rows: plan/reflect/orchestrate/escalate) never writes code inline beyond a hotfix edit. Today CLAUDE.global.md:49-51 lets main do "work doable in a few tool calls" inline, and BDR-115 says a pin is "never ceiling". README still describes the pre-feat-A doctrine (l.17, l.72-73). + +## Checklist (dispatch-ready) + [ ] CLAUDE.global.md:49-58 — replace the 10-line Sub-agents bullet (old text: `git show develop:CLAUDE.global.md | sed -n 49,58p`) with the 10-line text of `.claude/tasks/plans/2026-10-21-routing-ceiling-rule-1753.bullet.txt`, byte for byte (copy the file content, do not retype). Nothing else in the file. + [ ] README.md:15-17 — replace "(haiku collects, sonnet executes,\n opus judges, the session model only reflects)." with "(haiku collects, sonnet executes,\n opus judges and runs the session, Fable plans and runs the merge gates)." Reflow the bullet to ≤80 columns, 2-space continuation indent. + [ ] README.md:72-73 — replace "Doctrine: the session model (Fable) does main-loop reflection ONLY —\nbrainstorm, plan, contract, audit judgment, gates, loop decisions — enforced" with "Doctrine: the main loop runs on the `opus` session model; the model-router rows lift it to Fable for main-loop reflection ONLY: brainstorm, plan, contract, audit judgment, loop decisions. On Fable it writes no code past the `/hotfix` scope; the fresh gates run as dispatched agents on the `audit` row. The Fable/Opus model floor is enforced" and reflow the paragraph to the file's width (≤80) up to the next sentence boundary; the rest of the paragraph ("by a blocking gate (`lib/model-gate.md`) at the entry of the 17 reflection skills…") stays word for word. + [ ] skills/deploy/SKILL.md frontmatter — `effort: low` → `effort: xhigh` (row `verify` = work/xhigh since the d3635b6 dialog write; the census then drops its WARN floor drift). + [ ] mods/model-router/routing.json — delete the `changed.skills.deploy` entry (`{"from": "apply", "to": "verify"}`), leaving `"changed": {}`; keep `skills.deploy = "verify"` and `confirmed.skills.deploy = "verify"`. Why: once the floor follows the row, `verify` is the shipped state; a stale `from: apply` would make `/route forget deploy|all` restore `apply` (register.ts:2629-2631) against an `xhigh` floor with no `changed` entry → census hard FAIL. + [ ] lib/challenge-plan.md:47-48 — replace the phrase pair "off\nthe session model. The session model (Fable)\nkeeps only this loop" with "off\nthe main loop. The main loop (Fable through its best-tier row)\nkeeps only this loop"; reflow ≤80 columns, the rest of the paragraph word for word. + [ ] agents/plan-challenger.md:111 — "(big tier; the session model stays on the inline loop)" → "(big tier; the main loop, on Fable through its best-tier row, stays inline)". Reflow ≤80 columns. + [ ] README.md:95 — "| interviewer, client-handover-writer | unpinned (inline-load = session model) |" → "| interviewer, client-handover-writer | unpinned (inline-load = the main loop's model) |"; rest of the row unchanged. + [ ] run: full `make test` (single-suite runs only as a fail-fast before it); then the contract oracles. + +## Edge cases +- The ceiling binds main on Fable only. Main reaches Fable three ways: a best-tier skill row (incl. /hotfix, /feat, /bugfix on `reflect`), which holds for the run and the turns after it until `/route clear`, `/route off`, a user `/model` or a typed skill on another tier; a `route(phase=…)` call, whose answer names the model; a default keyword prompt rule (`plan|design|architecture…` → plan, `why|review|audit|analyze…` → reflect, `ultrathink` → escalate), which lifts one turn and tells main nothing (the status line is terminal UI only). [known gap, user pick 2026-10-21] The keyword path leaves the ceiling unwitnessed; feat C caps the keyword rules at the session model (effort only, like the classifier), after which every lift to Fable comes with a route answer. BLK-032 closes after feat C, not here. +- [deferred 2026-10-21, user pick] Best-tier skills that write code inline and dispatch no executor conflict with the ceiling: the design Build stack (frontend-design, 21st-ui-build, emil-design-eng, design-motion-principles Create mode, site-motion, build-threejs-scroll-worlds, scroll-*, 21st-ai, on `reflect`; CLAUDE.global.md "Design work" sends every Build UI past 2 files there), writing-skills, deprecation-and-migration (`reflect`), /tour single-project fixes and /audit-delta STEP 3d (`plan`), /harden STEP 3 bundle apply (`reflect`). BDR-123 names them as a declared temporary exception; a later run remaps them or makes them dispatch. The exception lives in this repo's registry only: sessions in other projects see the two always-on rules (Design work, Sub-agents) collide with no visible carve-out. TODO line at capitalize. +- Fable held down: opus stands in on best-tier phases with effort one notch up; the ceiling (keyed on Fable) does not bind then. Accepted residual, named in BDR-123. +- Dispatch target: /feat or /bugfix (pinned sonnet executors, contract, gates). A bare `general-purpose` spawn would inherit Fable (no row; the router pins it only when main sits below the session model). +- Live doctrine: `~/.claude/CLAUDE.md` is a symlink to the working-tree CLAUDE.global.md; the edit is live machine-wide from the executor's write, for every new session. Rollback before merge: `git checkout develop`. +- `/hotfix` scope reference: CLAUDE.global.md:80 defines it ("≤2 files, obvious fix"); the rule cites it instead of repeating it (budget). +- No skill/agent/lib file quotes the Sub-agents sentences (grep 2026-10-21: no citer of "few tool calls", "Skill-mandated", "whatever the task size"). The session-model claim has three live citers, all patched above: lib/challenge-plan.md:47-48, agents/plan-challenger.md:111, README.md:95. skills/feat/SKILL.md:6 and skills/code-clean/SKILL.md:36 ("session model" for inline reflection) are named in BDR-123 as stale, left for the feat C run that touches routing wording. +- "main context stays clean" dropped from the bullet to fit 320 lines: rationale of "one task each", no rule lost. + +## Disposition +- BDR-066 [in force, partial supersede by BDR-123 at capitalize]: "reflection inline on session model (Fable)" → session model is opus; Fable reached by rows; ceiling added. Executors sonnet unchanged. +- BDR-115 [in force, partial supersede]: "pin = default, never ceiling" stays for agent pins; the main loop on Fable gets a doctrine ceiling on WRITING code (a behavioural rule, not a router cap). +- BDR-085 / density budget 320 → honored (contract 2). +- LRN-224 → no gate wording changes here.