fable5-mode
cozytab · cozytab/fable5-mode
A Claude Code skill that enables any Claude model to exhibit Fable 5-grade work discipline through plan-gating, self-verification, and sub-agent routing mechanisms.
Make Opus 4.8 (or any Claude model) work like Claude Fable 5 — a Claude Code skill + guard hooks (plan gate, model ceiling, per-task enforcement) for Fable-5-grade discipline: plan, self-verify, and route sub-agents, without Fable 5.
Preview
What you can do with it
- Enforce a strict planning phase before an agent starts coding.
- Make an agent self-verify its work before declaring completion.
- Route tasks to specialized sub-agents with enforced discipline.
Safety check
No risky patterns found in the files we scanned.
Automated scan of the repo files. Always review code you run.
From the README
fable5-mode
English | 简体中文
Make Opus 4.8 — or any Claude model — work like Claude Fable 5. A Claude Code skill plus guard hooks that give a non-frontier model Fable-5-grade work discipline: plan-gate, self-verification, and sub-agent routing, enforced mechanically.
The skill is invoked as fable-mode; its premise:
output quality = model capability × work discipline
Quickstart
# 1. Install the skill (honors CLAUDE_CONFIG_DIR; falls back to ~/.claude)
git clone https://github.com/cozytab/fable5-mode \
"${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode"
# 2. (optional) register the enforcement hooks — merges into your settings.json,
# resolves its own path, idempotent:
bash "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/fable-mode/install.sh"
# 3. In Claude Code, just ask for it — in any language:
"use fable mode" · "用 fable 模式" · "do this rigorously, one-shot"
# 4. For a project you're taking seriously, turn on enforcement:
mkdir .fable
printf -- '- [ ] 1. first card (with a machine-checkable acceptance test)\n' > .fable/LEDGER.md
The skill works on its own; step 2 is optional (it turns the discipline into hard blocks). Claude replies in your language even though the skill is authored in English.
Design intent & what it changes
Why it exists. Weaker models mostly don't fail by being dumb in the moment; they fail by process: thinking while typing and changing their mind halfway, declaring "looks right" without running anything, fanning work out with no verification, and quietly stopping mid-task. Those are process failures, and process is fixable with structure. Since the "discipline half" of frontier output is model-independent, you can hand a cheaper model the working habits of a stronger one and recover a real chunk of the gap — paying in orchestration steps instead of a bigger model.
What you actually get.
- Thinking happens in the cheapest phase (a written plan gate), not mid-implementation.
- "Done" means an acceptance command passed — not "looks right."
- Critical output survives an adversarial refute pass before it ships.
- Context stays clean across long runs, via external SPEC/PROGRESS memory instead of a bloated transcript.
- The two rules models shirk most — write a plan before fanning out and don't stop with unfinished work — are enforced by hooks, not hope.
- It's honest about its ceiling: on a real capability wall (a long from-scratch derivation, holding a huge codebase at once, fine aesthetic judgment) it tells you to switch to a stronger model instead of faking it.
What it does not do. It won't turn Opus into Fable 5. It closes the discipline gap, not the capability gap. The cost is real — more orchestration steps and slower wall-clock on small tasks — which is exactly why you don't use it on small tasks. (Net token cost depends on the task; on rework-prone work the discipline can even come out lower.)
The six levers
| # | Lever | What it forces |
|---|---|---|
| 1 | Plan Gate | Write docs/SPEC.md (requirements + approach + task cards, each with a machine-checkable acceptance test) before writing code. Concentrate thinking in the cheapest phase. |
| 2 | Small-card execution | Each card runs in a fresh context; don't advance until its acceptance command passes; on 2 failures, escalate instead of flailing. |
| 3 | Adversarial self-check | Don't "generate and ship." Dispatch independent viewpoints to refute critical output; for wide-open problems, generate N approaches + judge + synthesize. |
| 4 | Real-product verification | All-green static checks ≠ it works. Run the real product end-to-end each milestone and leave evidence (screenshots, logs, test output). |
| 5 | Context hygiene | SPEC + PROGRESS are external memory. Restore state by re-reading them, not by dragging failed-attempt reasoning through a bloated context. |
| 6 | Checkpoint autonomy | Long background tasks get a watchdog and resumable checkpoints, so a hang or crash costs at most one card. |
The full protocol lives in SKILL.md — the text Claude actually reads.
The enforcement layer (the part that's more than a prompt)
Six levers written as prose still rely on the model's honor. Four hooks turn the most-shirked rules into hard blocks:
| Hook | Event | Effect |
|---|---|---|
| Profile Injector | SessionStart | Auto-injects the discipline, sized to the ledger state — full during an active round, a one-liner when idle or paused — plus the model-appropriate tier and open-item recovery. |
| Spawn Guard | PreToolUse (Agent/Task/Workflow) | Blocks a detailed spawn before a ledger exists (forces the plan gate), and blocks any spawn requesting a model stronger than the session's — the model ceiling is mechanical, not just prose. |
| Fail-Streak Reminder | PostToolUse (Bash) | Advisory, never blocks: at every 3rd consecutive failing command it injects the attribution ladder (suspect the harness → prove the new code is running → only then debug the product, and fix the class via an invariant) — cures grinding on the wrong layer. |
| Close Guard | Stop | Blocks ending the turn while the ledger still has unchecked items — cures early stopping / spinning. Also enforces evidence-on-close: a - [x] card without an -- evidence: note blocks the stop ("report evidence, not adjectives" as a hard rule). |
Plus hooks/fable_lint.py — not a hook but a one-shot CLI: checks the SPEC
carries [measured]/[inferred]/[not-shown] source tags, every open card names
its acceptance, every closed card carries evidence. Run it at wrap-up (or in CI):
python3 hooks/fable_lint.py .
Design properties that make this safe to register globally:
- Opt-in per project via a
.fable/directory (searched upward, bounded at the git root). No.fable/→ the hoo