🪝 SessionStart Hook
The "always on, no thinking required" approach: the script inject-playbook.sh injects the playbook as
additionalContext each session. You point it to the event SessionStart of the settings.json.
E é fail-open: if the playbook file doesn't exist, the session continues normally — nothing breaks.
// ~/.claude/settings.json
{
"hooks": {
"SessionStart": [
{
"matcher": "startup",
"hooks": [
{ "type": "command",
"command": "bash ~/projetos/fablelite/hooks/inject-playbook.sh" }
]
}
]
}
}
✓ What the hook does
- ✓Reads the
.mdand return viaadditionalContext. - ✓Fires in the
startupof each session. - ✓Points to another file via
FABLE_PLAYBOOK=.
🔎 Fail-open in practice
If the playbook doesn’t exist, the script prints {"continue":true} and exits with code 0 — the session starts normally. Injection is a bonus, never a failure point.
🧩 Turn it into a skill
You don't always want the playbook in EVERY session. The skill fable-mindset loads the playbook
on demand and includes the scripts (debloat, extract, compare, make_playbook). This is the channel to use when you prefer
to invoke it explicitly instead of always injecting it.
On demand
The model consults the playbook for coding tasks—not in every conversation. You control when.
Included scripts
The skill includes the entire pipeline: you can remeasure and regenerate the playbook from the invocation itself.
💡 Practical tip
The skill fable-mindset lives in ~/.claude/skills/fable-mindset/. Use it when you want the playbook AND the tools at hand, without leaving it active all the time.
📄 CLAUDE.md — the simplest path
The minimum-effort option: paste the playbook contents (or a link to it) into the CLAUDE.md — global or project-level. It’s already
auto-injected in every session, versioned with the repo, with no hook configuration. Three channels, three trade-offs — choose based on what you need:
| Channel | When active | Choose whether… |
|---|---|---|
| 🪝 Hook | always active (every SessionStart) | wants no thinking in every session |
| 🧩 Skill | on demand + the scripts | wants to invoke explicitly |
| 📄 CLAUDE.md | auto-injected, versioned | wants minimal effort |
📊 Decision summary
- Always active, without thinking → hook
SessionStart. - On demand + the scripts together → skill.
- Minimum effort →
CLAUDE.md.
🤗 No Fable data? The open traces
What if you barely had time to talk with Fable and don't have any sessions to mine? People opened their own sessions on Hugging Face:
Glint-Research/Fable-5-traces. O import_hf_traces.py downloads the dataset and runs the
SAME behavioral exercise about third-party data — same reading of tools/turns, reasoning, and work order.
pip install datasets # Glint-Research/Fable-5-traces (default): python import_hf_traces.py # inspeciona o schema do dataset: python import_hf_traces.py --peek # escreve stats.json num corpus: python import_hf_traces.py --out corpus_fable_hf
💡 Practical tip
The importer is defensive: tries to map common formats (chat, embedded JSONL, raw transcript). If the count looks odd, open a record with --peek and adjust record_to_events(). Then, make_playbook.py --from-json becomes a playbook (side a = this data).
Fable-5-traces (HF)
pip install datasets
import_hf_traces.py
same exercise
🎚️ What transfers and what does NOT
The honest expectation: you imitate the PACE (think before, read before editing, close the loop), don’t clone the model. Fable’s power lies in the weights — and the playbook can’t transfer those. What it does is improve the execution of the target model; it doesn't become Fable.
✓ TRANSFERS (the rhythm)
- ✓Think before acting on non-trivial tasks.
- ✓Read before editing; use tools with purpose.
- ✓Close the loop with a test/build.
✗ Does NOT transfer
- ✗The model weights—where the power resides.
- ✗Become Fable: the identity doesn’t change.
- ✗The contents of the reasoning (encrypted in the logs).
🔎 The honest reading
The playbook is a process improvement, not a capability transplant. It gives the target model the good pace measured in Fable—a real gain, without the magical promise of "turning Opus into Fable".
⚖️ Ethics and generalization
To close the loop responsibly: run it on YOUR history; treat the corpus as sensitive — it has your code and your data. The method isn’t exclusive to the Fable/Opus pair: it applies to Opus, Codex, and open-source models. And keep the playbook up to date: iterate with new data as you accumulate sessions.
⚠️ The corpus is sensitive
Your logs contain code, paths, and possibly secrets. Treat them as personal data: redact them before sharing, and don’t expose them. The gold is the rhythm, not the data—and you can publish the rhythm, but not the data.
your history
treat as sensitive
Opus/Codex/open-source
iterating with new data
💉 Module Summary
SessionStart — inject as additionalContext, fail-open.fable-mindset — on demand, with the scripts together.CLAUDE.md — auto-injected, minimal effort.import_hf_traces.py — Glint-Research/Fable-5-traces in HF.End of the learning path:
From the log to the injected playbook—the method is yours. Run it on your history and iterate.