Skip to content

jee599/fable-mode-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


⚡ fable-mode

You're paying 2× for Claude Fable 5. Half of what you're buying is a system prompt.
This kit ports that half to Opus — v2.0 retuned for Opus 5. /plugin install fable-mode@jidonglab → next session, done.

Version Opus 5 Opus 4.8 License

ExamplesBenchmarkHow it worksReports한국어日本語中文


  Opus 4.8, asked "why is this buggy?"    →   silently EDITED your file, asserted untested results
  Opus 5 fixed that — and shipped new tells: report-skeleton answers to simple questions,
  over-verification, eager subagent spawning, quiet scope expansion, self-correction sagas.
  Opus 5 + fable-mode v2.0                →   Fable-shaped prose · verify once · scope held

  Opus 5 form fidelity  88% → 96%     norm leakage  0     cost over bare  +12%

⬇️ Two lines inside any Claude Code session. Zero config.

/plugin marketplace add jee599/fable-mode-kit
/plugin install fable-mode@jidonglab

From your next session on, every Opus session is auto-detected and runs under Fable 5 conduct norms.
Fable sessions are detected too and left untouched. Only requirement: jq.

Classic installer (no plugin system, or you want the claude-fablelike wrapper)
git clone https://github.com/jee599/fable-mode-kit && cd fable-mode-kit && ./install.sh

Requires: Claude Code CLI, jq, bash (macOS/Linux). Idempotent; merges (never overwrites) your ~/.claude/settings.json, backs it up first, and smoke-tests the hooks before finishing.

[!WARNING] Pick one route. Installing both registers the hooks twice and the norms get injected twice per turn (harmless but wasteful). uninstall.sh only removes the classic install; /plugin uninstall only removes the plugin.

🔁 v2.0 — Retuned for Opus 5

Opus 5 didn't just get smarter — it inverted two assumptions the v1.x norms were built on. v2.0 was rewritten against Anthropic's official Opus 5 migration guidance, then re-verified (25-case branch suite, adversarial review fleet, A/B judged bench):

Opus 4.8 reality (v1.x norm) Opus 5 reality v2.0 change
Under-delegated → "fan out to parallel subagents" Over-delegates — subagents multiply cost Delegation restraint: independent, sizeable tracks only; never for verification. Parallel tool calls stay encouraged
Needed verify prompts → work-audit self-check each major turn Self-verifies natively — verify prompts cause over-verification "Verify once" claim calibration; closing check is message-shape only, explicitly not a work re-audit
Expands task scope quietly Scope-discipline bullet: no silent narrowing/widening, completion only when fully done
Longer responses and longer files-on-disk Deliverable-length calibration bullet
Narrates self-corrections at length Quiet-corrections bullet: flag only errors that change the user's decisions
Identity line hardcoded claude-opus-4-8 New Opus IDs keep shipping Version-neutral identity line (survives future Opus releases)
Wrapper pinned claude-opus-4-8 claude-opus-5 is the Opus Wrapper defaults to claude-opus-5 (FABLELIKE_MODEL / FABLELIKE_EFFORT overrides)

Measured on Opus 5 (4 probes × blind judge, 12-pt Fable-form rubric each): bare Opus 5 scores 42/48 (88%) — it already avoids 4.8's headline failures — and + fable-mode v2.0 scores 46/48 (96%), winning 3 of 4 probes on prose shape, TLDR-first, and self-containment, at +12% cost over bare and zero norm leakage. Both arms stayed in scope, ran tests exactly once, and left diagnosis-only requests unmodified — on Opus 5 the kit's edge is communication form per turn, plus the long-session norms (delegation caps, quiet corrections) short probes can't exercise.

👀 See the Difference

The v1.x failures below are real, measured Opus 4.8 runs — kept for the record. On Opus 5 the same probes no longer fail at the task level; the difference moved into form (see the v2.0 section above).

🔍 Asked "why does this bug happen?" — 6/12 → 12/12

❌ bare Opus 4.8

Silently edits your file.
Asserts the fix works —
without running anything.

(You asked a question.
 It rewrote your code.)

✅ with fable-mode

Diagnoses only — no edits.
Runs the code to prove
the root cause.

Reports conclusion first,
evidence after.

🧹 Asked an ambiguous "clean up these log files" — 5/12 → 12/12

❌ bare Opus 4.8

Investigates thoroughly.
Then ends with:
"which way would you like?"

Zero action taken.

✅ with fable-mode

Executes a non-destructive
default, verifies it,
defers only the destructive
part to you.

📊 The Numbers (No Cherry-Picking)

Opus 5, v2.0 (2026-07-25) — 4 probes (diagnosis-only, scoped implementation, bug fix with tests, simple Q&A) × 2 arms, blind-judged on a 12-pt Fable-form rubric per probe:

condition form score fidelity cost (4 probes)
bare Opus 5 42/48 88% $1.02
Opus 5 + fable-mode v2.0 46/48 96% $1.14 (+12%)

Objective checks, both arms: diagnosis-only request → zero file edits · scoped change → zero unrequested refactors · bug fix → exactly one test run · kit outputs → zero norm-term leakage. The kit lost one probe (minor padding on a tiny change) — that stays in the table.

Opus 4.8, v1.x (2026-07-07, for the record) — same tasks, same effort, judged on a 6-dimension rubric (36 pts):

condition score fidelity
bare Opus 4.8 23/36 64%
Opus 4.8 + fable-mode 35/36 97%
real Fable 5 (baseline) 36/36 100%

Cost + deliverable equivalence — 4 task types × 3 conditions, tokens from transcript usage, official per-Mtok pricing (Opus $5/$25, Fable $10/$50):

task bare Opus + kit Fable 5 kit vs Fable equivalence
diagnosis $0.23 $0.28 $0.49 57% ~95%
implementation $0.34 $0.45 $0.49 💀 91% ~90%
ambiguous cleanup $0.86 $1.13 $1.52 74% ~80%
simple Q&A $0.12 $0.13 $0.27 🏆 49% ~85%
total $1.54 $1.99 $2.77 72% 80–95%

Cells show rounded per-run values; totals and × ratios are computed from unrounded raw values, so recomputing from the displayed cells can differ by ±1 in the last digit.

Note

The ugly numbers stay in the table. On the implementation task the kit's cost win over Fable was only 9%. On the ambiguous task the kit spent 31% more than bare Opus — that's the price of the self-correction turns that buy the conduct. Fable writes half the output tokens (9.8k vs 20.0k) and still loses on cost because its unit price is 2×. All three implementation outputs (bare / kit / Fable) produced identical results on shared test cases. These figures were measured on v1.4; v1.5 removes the Stop hook's extra generation pass on major turns, so its cost is the same or lower.

🆚 Why Not Just an Output Style?

An output style is one of the three layers — it's not enough alone:

CLAUDE.md rules output style fable-mode hooks
Survives long-context dilution 🟡 ✅ per-turn re-injection
Covers subagents (Explore/Plan/custom/workflows) ✅ SubagentStart
Pre-finish message-shape check on major turns ✅ injected in-context (no extra pass; v2.0 dropped the work re-audit — Opus 5 self-verifies)
Norm leakage kept out of output ✅ leak vector removed at the source
Auto-detects Opus sessions, stands down on Fable
Injection overhead telemetry ✅ v1.4

⚙️ How It Works

Three live hooks grab three moments of the session lifecycle; a fourth (Stop) is a retired no-op stub. No daemon, no proxy — state is empty marker files.

  ┌──────────────────────────────────────────────────────────────┐
  │  SessionStart      fable-detect.sh                           │
  │    "is this Opus?" — input .model → ancestor --model flag    │
  │    → settings.json (a guess → neutral announcement)          │
  │           ↓                                                  │
  │  UserPromptSubmit  fable-context.sh          (every turn)    │
  │    per-turn transcript detection (mid-session /model         │
  │    switches, Fable stand-down) + re-injects the conduct      │
  │    norms — adaptive: major = full block · minor = −87%       │
  │    reminder. Full block closes with a message-shape check    │
  │    (v2.0: work re-audit removed — Opus 5 self-verifies)      │
  │           ↓                                                  │
  │  SubagentStart     fable-subagent.sh         (every spawn)   │
  │    subagents never see UserPromptSubmit → inject at spawn    │
  │                                                              │
  │  Stop              fable-stop-verify.sh      (retired stub)  │
  │    no-op — kept registered so re-enabling is a one-file      │
  │    git revert; the self-check it used to force now lives     │
  │    in the block above                                        │
  └──────────────────────────────────────────────────────────────┘

The principle: Fable's edge splits into instructions (text → portable) and weights (reasoning depth → not portable). The hooks port the instructions and keep them anchored; the weights gap you route around — send entangled reasoning and long autonomous runs to real Fable, or compensate with fan-out + adversarial verification.

📈 Watch the Overhead

Every injection is logged. /fable-mode status reports what the kit actually costs you:

$ /fable-mode status
GLOBAL marker: off · this session: auto-detected (claude-opus-5)
injections: full 4 × 2,128 chars · lite 11 × 280 chars
overhead ≈ 7,200 tokens this session (all-full, no adaptive lite, ≈ 20,000)

🛡️ Controls & Safety

🔴 FABLE_MODE=0 kill-switch — beats every activation path (use in cron/one-shots)
🟢 FABLE_MODE=1 force on (what claude-fablelike exports)
🔍 real Fable session auto-detected from the transcript → hooks stand down, no double injection
🔁 /fable-mode on|off|status manual toggle + telemetry
✅ shape check pre-finish message-shape check rides the full block — in-context, invisible to the user, no extra generation pass, and explicitly not a work re-audit (Opus 5 self-verifies)
🏷️ identity asserts "you are Opus" only when the session model is confirmed (FABLE_MODE=1, or the transcript shows an Opus turn). An unconfirmed guess (settings.json at turn 1) gets a neutral identity line — never claims Opus on a session that might be Fable

Important

v1.5 retired the Stop hook, so there's no longer an extra generation pass per major turn — the per-turn injection is the only overhead. Still export FABLE_MODE=0 on timeout-budgeted headless runs to skip injection entirely.

📦 What gets installed (8 pieces)
piece file role
SessionStart hook hooks/fable-detect.sh auto-detects Opus sessions → arms fable-mode (settings.json fallback arms neutrally — it's a guess)
UserPromptSubmit hook hooks/fable-context.sh re-injects conduct norms every turn — adaptive: full ~2.1k-char block (with the message-shape closing check) on major turns / session start / every 5th turn, ~0.3k-char reminder on minor turns (−87%); logs every injection to state/fable-mode/stats/
SubagentStart hook hooks/fable-subagent.sh identity-neutral conduct block into every subagent at spawn
Stop hook hooks/fable-stop-verify.sh retired no-op stub (v1.5) — kept registered so a one-file git revert re-enables it; the self-check it forced now rides the per-turn block
output style output-styles/fable-like.md system-prompt-level port of the norms
skill skills/fable-mode/ /fable-mode on|off|status manual toggle
wrapper bin/claude-fablelike one-shot: Opus 5 + xhigh effort + output style + hooks (FABLELIKE_MODEL / FABLELIKE_EFFORT overrides; refuses to arm on a Fable-tier model)
optional docs/conduct-snippet.md fallback for CLIs without SubagentStart; marked agents are auto-skipped (no double injection)

🧪 Built by Diffing, Hardened by Self-Audit

  • The diff. Headless probes of both models + CLI binary strings showed Fable 5 and Opus 4.8 run the same harness — same tools, same effort dial, same workflows. The difference that matters is a conduct section only Fable's system prompt carries. Instructions are text. Text is portable. Hence this kit.
  • The audit. v1.5 shipped after an 11-agent fleet — running these very norms — audited the kit end to end: 29 findings, every major claim handed to an adversarial verifier told to refute it. Two "majors" died in verification, one got downgraded. The survivors were fixed and released the same day.
  • The best bug. A real Fable 5 session briefly got injected with "you are Opus." It self-healed one turn later — and v1.5 makes it structurally impossible: the identity line is only asserted when the session model is confirmed, never on a guess.
  • The v2.0 audit. The Opus 5 retune shipped the same way: a 21-agent review fleet (3 lenses × adversarial verifiers) filed 18 findings, refuted 13, and confirmed 5 — including one real hole (FABLE_MODE=1 could override the Fable stand-down guard) that was fixed and regression-tested (30-case branch suite) before release.

📉 Honest Limits

  • 96% / 97% are conduct/form scores, not intelligence benchmarks. Samples are small: 4 task types × 1 run per condition (v1.x on Opus 4.8, 2026-07-07; v2.0 on Opus 5, 2026-07-25, blind-judged).
  • On Opus 5 the headline gap is smaller — bare Opus 5 already scores 88% on form (vs 64% for bare Opus 4.8), because Anthropic tuned Opus 5 closer to Fable conduct. The kit's remaining edge is per-turn form consistency plus the long-session norms (delegation caps, verify-once, quiet corrections) that short probes can't measure.
  • The kit reaches the norms via correction turns (8 vs 4 turns on one task); Fable gets there on the first attempt. You pay turns, not quality.
  • Entangled first-pass reasoning and long autonomous runs keep a real gap (~5–11 pt third-party benchmark estimate). Route those to Fable, or compensate with fan-out + adversarial verification (1–2.5× a single Fable run, estimate).

📑 Reports

Full measurement deck and a principles explainer (Korean, 13 + 14 slides, open in any browser):

🧹 Uninstall

./uninstall.sh          # classic install — removes files, deregisters hooks, deletes state
/plugin uninstall       # plugin route

📜 License

MIT


⚡ 97% of the conduct at half the unit price — and it knows what it can't port.

Star

Star History Chart

About

⚡ Run Claude Opus 4.8 like Fable 5 — hooks that port Fable's conduct norms. Measured 64%→97% conduct fidelity at 0.72× the cost.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages