feat(doctrine): main on Fable writes no code past the /hotfix scope

The Sub-agents rule gains the ceiling and hands the rest to /feat or /bugfix; README and the challenge citers now say the main loop reaches Fable through best-tier rows from an opus session. /deploy's floor follows its verify row and its stale changed entry goes.
This commit is contained in:
bchanot committed 2026-10-21 22:18:16 +02:00
1 parent b961ce6b98
commit ef13713f09
6 files changed
+28 -31

No files matched your search

+10 -10
View File
@@ -46,16 +46,16 @@ Apply unless repo-specific instructions override.
approaches, breaking change, destructive action); ask on the visible,
public-name and open-scope choices below; otherwise proceed. Minimal
changes unless a broader refactor is requested. State trade-offs.
- Sub-agents: one task each, main context stays clean. Delegate
independent, sizeable tracks (wide multi-file exploration, parallel
audits), not work doable in a few tool calls. Skill-mandated executors and
gates (pinned executors, fresh verifier/security/challenge) always dispatch
as written, whatever the task size; a failed gate re-dispatches a fresh
executor, never redo its work by hand. 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.
- Sub-agents: one task each. Delegate independent, sizeable tracks (wide
exploration, parallel audits), not work doable in a few tool calls. Ceiling:
main on Fable writes no code past the `/hotfix` scope, it hands it to /feat
or /bugfix. Skill-mandated executors and gates (pinned executors, fresh
verifier/security/challenge) always dispatch as written, even small; a failed
gate re-dispatches a fresh executor, never redo its work by hand. 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.
- Ask rather than guess. A choice visible in the result (placement,
wording, order, behavior), a name that becomes public (command, flag,
endpoint, file), or a scope the request leaves open → ask, even mid-task;
+13 -10
View File
@@ -14,7 +14,7 @@ Not a collection of prompts — an operating layer on top of Claude Code:
full feature pipeline with validation gates.
- **Agents** are the execution units skills dispatch to — each pinned to
the cheapest model that can do the job (haiku collects, sonnet executes,
opus judges, the session model only reflects).
opus judges and runs the session, Fable plans and runs the merge gates).
- **Hooks and permissions** are deterministic guardrails: gitflow enforced
by a pre-commit hook in every repo (`make link` points git's global
`core.hooksPath` at `~/.claude/githooks`), every commit pushed by
@@ -69,14 +69,17 @@ commands, settings, secrets, maintenance.
## Agent model routing (model-tiering v2)
Doctrine: the session model (Fable) does main-loop reflection ONLY —
brainstorm, plan, contract, audit judgment, gates, loop decisions — enforced
by a blocking gate (`lib/model-gate.md`) at the entry
of the 17 reflection skills (the orchestrators, `/analyze`, `/guardrails` and
`/a11y`): the skill calls the model-router `route` tool and its answer, which
names the model id the main loop runs on, is the witness. A non-Fable/Opus id or
the mod off stops the skill (`/route on` resumes the mod). Nothing dispatched
inherits silently: typed agents run on their model-router row, their
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 (the orchestrators, `/analyze`,
`/guardrails` and `/a11y`): the skill calls the model-router `route` tool and
its answer, which names the model id the main loop runs on, is the witness. A
non-Fable/Opus id or the mod off stops the skill (`/route on` resumes the
mod). Nothing dispatched inherits silently: typed agents run on their
model-router row, their
`model:` frontmatter being the off-state floor; built-ins get an explicit
`model=` at every call site.
@@ -92,7 +95,7 @@ inherits silently: typed agents run on their model-router row, their
| seo-analyzer, geo-analyzer | opus pin (judge mode); collect/template spans dispatched `model="sonnet"` | 3-mode audit pipelines — judgment fail-closed on opus, mechanical collect + templating on sonnet |
| doc-syncer | sonnet pin; audit mode dispatched `model="opus"` | two-mode: audit (drift judgment, opus) / patch (mechanical apply, sonnet) |
| handover-doc-writer | sonnet pin; synthesize mode dispatched `model="opus"` | two-mode: synthesize (opus) / render (sonnet) — client deliverable |
| interviewer, client-handover-writer | unpinned (inline-load = session model) | they ARE the main loop — a frontmatter pin would be inert |
| interviewer, client-handover-writer | unpinned (inline-load = the main loop's model) | they ARE the main loop — a frontmatter pin would be inert |
| Explore, Plan (built-in) | model-router mod: Explore → sonnet/medium, Plan → opus/xhigh, set at spawn; an explicit `model=` on the call wins; mod off: inherit session | built-ins routed per phase by the mod |
The pure-execution skills `/doc`, `/status`, `/commit-change`,
+2 -1
View File
@@ -108,7 +108,8 @@ the MAIN loop, never here):
- MODEL (BDR-076, supersedes the BDR-066 inherit): plan critique is AUDIT
JUDGMENT, not a procedural gate — the challenger is routed to the `judge`
row (opus) by the model-router, the `model: opus` frontmatter being the
off-state floor (big tier; the session model stays on the inline loop).
off-state floor (big tier; the main loop, on Fable through its best-tier
row, stays inline).
Never `model: "sonnet"` — a silent judgment downgrade. (Contrast the
executors on their `implement` row, sonnet, oracle-anchored to a contract;
the verifier and security-auditor sit on the `audit` row, Fable with an
+1 -1
View File
@@ -45,7 +45,7 @@ Agent(subagent_type="plan-challenger", description="challenge:<lens>", prompt=""
**MODEL (BDR-076, supersedes the BDR-066 inherit):** plan critique is AUDIT
JUDGMENT — the challengers are routed to the `judge` row (opus) by the model-router,
the `model: opus` frontmatter being the off-state floor: a big tier, off
the session model. The session model (Fable)
the main loop. The main loop (Fable through its best-tier row)
keeps only this loop — synthesis, RE-THINK, gate. Never sonnet: that would
silently downgrade the judgment. (The executors stay sonnet; the two merge
gates sit on the `audit` row, Fable with an opus floor.)
+1 -8
View File
@@ -184,13 +184,6 @@
"deploy": "verify"
}
},
"changed": {
"skills": {
"deploy": {
"from": "apply",
"to": "verify"
}
}
},
"changed": {},
"ask": true
}
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: deploy
effort: low
effort: xhigh
description: |
Use when deploying a project via its per-project runbook — instantiates the delta
since last deploy, hands off for out-of-band execution, resumes cold, learns from errors.