docs(doctrine): main loop calls the Fable advisor; Fable prose moves to opus

Global line and effort-shift Advisor section: the main loop calls the advisor when a stronger model is needed, sub-agents do not, advice waives no gate. Skill-runner, Limits, ask-tier and audit-row prose match BDR-150.
This commit is contained in:
bchanot committed 2026-11-17 00:37:53 +01:00
1 parent 1c2e5e8b7a
commit c3507ea447
5 files changed
+29 -12

No files matched your search

+5
View File
@@ -78,6 +78,11 @@ code" wins. Repo-specific instructions override both.
command is reported with its rule (a guard redirect naming a skill is
followed instead), never rerun through a wrapper, alias, env
file or other shell. Hermetic tests run through `make test [suite=…]` only.
- Stronger model needed (an approach to settle before building, a stuck
problem, a long task before calling it done) → the main loop calls
the advisor tool when it is listed (Fable, set by /advisor); sub-agents do
not. Fable is never routed or pinned: the router tops out at opus
(BDR-150).
- 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;
+2 -3
View File
@@ -108,12 +108,11 @@ 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 main loop, on Fable through its best-tier
off-state floor (big tier; the main loop, on opus 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
opus floor.)
the verifier and security-auditor sit on the `audit` row, opus.)
- FAIL-SAFE — never fail open: a malformed/empty verdict, a missing `PROOF`, or
a dead challenger → retry ONCE fresh; a 2nd failure → escalate to the human and
NAME the lens. Never report "plan challenged" on a silently dropped lens (same
+2 -2
View File
@@ -45,10 +45,10 @@ 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 main loop. The main loop (Fable through its best-tier row)
the main loop. The main loop (opus 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.)
gates sit on the `audit` row, opus.)
**Lens framing by `KIND`** (the agent's three lenses, read against the artifact):
- `build-plan` — will it WORK / will it BREAK / is it needlessly COMPLEX.
+19 -6
View File
@@ -28,8 +28,8 @@ load; a skill without one changes nothing, the last ROWED skill wins.
ship-feature STEP 4b. Not automatic: the challenge fail-safe and "gone
WRONG → STOP"; their STOP text names the levers below.
5. Built-in judgment dispatch (`general-purpose` `model="opus"`, `model:
"fable"` skill-runners) → explicit `effort=` on the Agent call (`xhigh`
for opus reviewers, `high` for fable runners). A main route never
"opus"` skill-runners) → explicit `effort=` on the Agent call (`xhigh`
for opus reviewers, `high` for skill-runners). A main route never
reaches a child. Typed agents run on their row, never on a shift.
6. After a prose gate that ends the turn, the resumed reflection phase
starts with its own route call.
@@ -82,20 +82,33 @@ back; the window guard needs a `windows` entry (none shipped). A typed
- Keyword prompt rules (`plan|design|architecture…`,
`why|review|audit…`), `ultrathink` and a background agent
dispatch (derived `orchestrate`) set the turn's effort only, never
a model above the session model: Fable on main comes only from a
skill row, the `route` tool, a typed `/route` or a hand pick (`/model`,
picker).
a model above the session model: Fable on main comes only from a hand
pick (`/model`, picker), a typed `/route model=fable`, a phase naming
`model: fable` or a machine override that puts fable in a tier (no
shipped tier or phase holds it, BDR-150).
- Mod off: typed agents fall back to their `model:`/`effort:` frontmatter.
- First use of a row asks once, with context (Later, Keep or Change: model,
then effort, then Everywhere or this project only); the answer is kept in
`mods/model-router/routing.json`. `/route pending` lists what is still
unconfirmed, `/route ask off|on` toggles the dialog, `/route ask-tier
off|on` the ask before a route lifts main or a rowed agent onto Fable,
off|on` the ask before a route lifts main or a rowed agent onto Fable
(inert unless a machine override heads `best` with fable),
`/route forget <name|all|projects>` takes a decision back.
Measure the split any time: `python3 ~/.claude/lib/effort-audit.py`
(thinking/output/cache tokens per scope, model and effort).
## Advisor
Fable runs as the advisor (settings `advisorModel`), never a route or pin
target (BDR-150). Call it before committing to an approach on non-trivial
work, when stuck (the `escalate` moment, before raising effort to max) and
before declaring a long task done. It is a server tool: the router cannot
see or refuse it. The main loop calls it; sub-agents do not, even when the
tool is listed. Advisor absent or erroring (Fable out of credits, for
example) → proceed as written. Advice is input, never consent: it waives no
gate, cap or guard; at a loop cap it feeds the STOP diagnosis.
## Never
- A route inside a dispatched agent: its row rules there.
+1 -1
View File
@@ -80,7 +80,7 @@ Model discipline (the user-fixed invariant behind this mode):
carries this skill's reflection (fix decisions, convergence calls); it
must never be pinned down to an executor tier.
- Inside a runner, every dispatched agent keeps the tier this skill
already defines: security-auditor (`audit` row: Fable, opus floor), the
already defines: security-auditor (`audit` row: opus), the
Phase B audit (analyzer opus pin or `model="opus"`), doc-syncer (audit on
`model="opus"`, patch on its sonnet frontmatter — BDR-077).