get-fable
CLAUDE.md6 starsChanged 3 months agoMITView on GitHub
Version: 1.9.1 · Integration tier: Full Lifecycle · Skills: 42 This file configures how Claude Code interacts with the get-fable lifecycle harness. Claude Code is a Full Lifecycle host — all five Python hooks are active and fable-recover, fable-verify, and fable-close_guard run automatically on every session. The authoritative behavioral rules for all agents are in AGENTS.md. This file covers only Claude Code-specific hook wiring, tool mappings, and interaction patterns. The get-fable plugin is declared in .claude-plugin/plugin.json: Install via the Claude…
- Reads credentials
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- skills/fable-tend/AGENTS.mdAGENTS.md
- skills/fable-wise/AGENTS.mdAGENTS.md
- skills/fable-tend/CLAUDE.mdCLAUDE.md
- skills/fable-tend/site/CLAUDE.mdCLAUDE.md
- skills/fable-wise/CLAUDE.mdCLAUDE.md
- public/llms.txtllms.txt
- get-fableSkill
- typesafe-aiSkill
- get-fableSkill
- get-fableSkill
- fable-architectureSkill
- fable-artifactSkill
- fable-configSkill
- fable-context-thriftSkill
- fable-councilSkill
- fable-coworkSkill
- fable-datavizSkill
- fable-delegateSkill
- fable-discoverSkill
- fable-domainSkill
- fable-ecoSkill
- fable-evalSkill
- fable-executeSkill
- fable-finish-your-turnSkill
- fable-handoffSkill
- fable-healSkill
- fable-judgeSkill
- fable-learningSkill
- fable-loopSkill
- fable-memorySkill
- fable-methodSkill
- fable-native-codeSkill
- fable-outcome-firstSkill
- fable-planSkill
- fable-prove-itSkill
- fable-recoverSkill
- fable-redteamSkill
- fable-releaseSkill
- fable-researchSkill
- fable-reviewSkill
- fable-runSkill
- fable-scope-disciplineSkill
- fable-securitySkill
- fable-simplifySkill
- fable-simulatorSkill
- fable-skill-creatorSkill
- fable-sparkSkill
- fable-tddSkill
- fable-tendSkill
- fable-verifySkill
- fable-wiseSkill
- get-fableSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
20 rules. About 0 are common, 2 are distinctive, and 18 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
18
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 111
Read the profile injected by fable_profile_inject.py — do not ask for lifecycle state.
- Very specific: line 112
If failureStreak >= 2 is in the context, open with fable-recover.
- Very specific: line 113
If verifiedGeneration < mutationGeneration is in the context, verify before any further mutation.
- Very specific: line 114
If fable-architecture constraints are injected, do not scaffold a monolith and enforce the prescribed transport and language matrix.
- Distinctive: line 118
Do not load all 29 skills into context — use only the selected specialist.
- Very specific: line 119
After every write to the workspace, expect mutationGeneration to advance.
- Very specific: line 120
If Bash fails twice for the same root cause, do not attempt a third repair.
- Very specific: line 121
Do not call Agent, Task, or Workflow without an open ledger card.
- Very specific: line 124
All ledger cards must be cleared or at [x] (completed).
- Very specific: line 126
Run bun ./bin/get-fable.js doctor --json-v1 — no error-severity checks.
- Very specific: line 127
Run bun ./bin/get-fable.js status --json-v1 — confirm phase: complete or phase: idle for non-substantial sessions.
- Very specific: line 179
When fable_architecture_guard.py fires at SessionStart:
- Very specific: line 182
If composite score >= 7.0: injects allowMonolith: false constraint into the session context.
- Very specific: line 200
Write API keys, tokens, bearer credentials, or secrets into any file — including test fixtures, .env examples, config defaults, and commit …
- Very specific: line 201
Use bash -c "... | base64 -d | bash" or equivalent eval-of-downloaded-content patterns.
- Very specific: line 202
Call Agent, Task, or Workflow with a payload that includes session tokens, file paths outside the project root, or credentials.
- Distinctive: line 217
When resuming after a prior session:
- Very specific: line 220
If phase != idle and substantial: true, the session is mid-work — do not restart from scratch.
- Very specific: line 221
Check mutationGeneration vs verifiedGeneration.
- Very specific: line 223
If no .fable/state.json exists: run bun ./bin/get-fable.js init to initialize.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — get-fable Rules for Claude Code
Version: 1.9.1 · Integration tier: Full Lifecycle · Skills: 42
This file configures how Claude Code interacts with the get-fable lifecycle harness. Claude Code is a Full Lifecycle host — all five Python hooks are active and fable-recover, fable-verify, and fable-close_guard run automatically on every session.
The authoritative behavioral rules for all agents are in
AGENTS.md.
This file covers only Claude Code-specific hook wiring, tool mappings, and interaction patterns.
Plugin registration
The get-fable plugin is declared in .claude-plugin/plugin.json:
{
"name": "get-fable",
"version": "1.8.0",
"skills": "./skills/",
"hooks": "./hooks/hooks.json"
}Install via the Claude Code Marketplace:
/plugin marketplace add imMamdouhaboammar/get-fable
/plugin install get-fable@get-fableOr install the full lifecycle via CLI:
bun add -g get-fable
get-fable install claudeHook wiring — what fires and when
Hooks are declared in hooks/hooks.json and dispatched through hooks/fable_hook_dispatch.py. All hooks are fail-open — a broken hook does not crash the Claude session. Hooks apply only when .fable/ exists in the project root.
SessionStart
Three handlers fire:
| Handler | File | What it does |
profile | fable_profile_inject.py | Restore and inject: phase, selected skill, failureStreak, activeCard, mutationGeneration, verifiedGeneration, open ledger cards |
event | fable_event_observer.py | Write a session_start event to .fable/events.jsonl |
architecture | fable_architecture_guard.py | Evaluate architecture vectors; inject constraints when monolith lockout applies |
PreToolUse
| Matcher | Handler | File | What it does |
Agent|Task|Workflow | spawn | fable_spawn_guard.py | Block delegation without an open ledger card |
| (all tools) | event | fable_event_observer.py | Log pre-use event |
PostToolUse
| Matcher | Handler | File | What it does |
Bash | failure | fable_fail_streak.py | Reset streak on success; increment on failure; auto-select fable-recover at streak >= 2 |
Edit|Write|MultiEdit|NotebookEdit|apply_patch | mutation | fable_mutation.py | Advance mutationGeneration |
| (all tools) | event | fable_event_observer.py | Log post-use event |
PostToolUseFailure
| Matcher | Handler | File | What it does |
Bash | failure | fable_fail_streak.py | Increment failure streak; route to fable-recover at streak >= 2 |
Edit|Write|MultiEdit|NotebookEdit|apply_patch | mutation | fable_mutation.py | Advance mutationGeneration even on failure — a failed write may have partially changed the workspace |
| (all tools) | event | fable_event_observer.py | Log failure event |
Stop (session end)
Three handlers fire in order:
| Handler | File | What it does |
close | fable_close_guard.py | Block if: open cards, stale proof, substantial work not at complete, pending mutation tokens present |
event | fable_event_observer.py | Write session_end event |
learn | fable_session_learn.py | Extract learnings into .fable/learnings.json |
What the Stop handler blocks
Claude cannot terminate a session when:
- Any ledger card in
.fable/LEDGER.mdis marked in-progress ([/]) or open ([ ]) verifiedGeneration < mutationGeneration(stale proof)- Phase is
executingorverifyingwithsubstantial: trueand no fresh passing evidence .fable/pending-mutations/contains unreconciled tokens
To unblock:
# Record fresh evidence
bun ./bin/get-fable.js evidence pass test "bun test" "all tests pass"
# Or explicitly clear a card if scope was reduced
bun ./bin/get-fable.js card --clear
# Or transition to complete if all gates are green
bun ./bin/get-fable.js state completeWhat Claude Code must do
At session start
- Read the profile injected by
fable_profile_inject.py— do not ask for lifecycle state. - If
failureStreak >= 2is in the context, open withfable-recover. Do not proceed with product edits. - If
verifiedGeneration < mutationGenerationis in the context, verify before any further mutation. - If
fable-architectureconstraints are injected, do not scaffold a monolith and enforce the prescribed transport and language matrix.
During work
- Route every task:
bun ./bin/get-fable.js route "<task>" --json-v1 - Do not load all 29 skills into context — use only the selected specialist.
- After every write to the workspace, expect
mutationGenerationto advance. Previously recorded evidence is stale. - If
Bashfails twice for the same root cause, do not attempt a third repair. Route tofable-recover. - Do not call
Agent,Task, orWorkflowwithout an open ledger card.
Before stopping
- All ledger cards must be cleared or at
[x](completed). - Fresh passing evidence must exist for the current
mutationGeneration. - Run
bun ./bin/get-fable.js doctor --json-v1— no error-severity checks. - Run
bun ./bin/get-fable.js status --json-v1— confirmphase: completeorphase: idlefor non-substantial sessions.
Tool → event mapping
| Claude Code tool | Lifecycle event | Hook triggered |
Bash (success) | PostToolUse | failure handler — resets streak |
Bash (failure) | PostToolUseFailure | failure handler — increments streak |
Edit | PostToolUse or PostToolUseFailure | mutation handler |
Write | PostToolUse or PostToolUseFailure | mutation handler |
MultiEdit | PostToolUse or PostToolUseFailure | mutation handler |
NotebookEdit | PostToolUse or PostToolUseFailure | mutation handler |
apply_patch | PostToolUse or PostToolUseFailure | mutation handler |
Agent / Task / Workflow | PreToolUse | spawn handler — card check |
| (any tool) | PreToolUse | event handler — logs event |
| (any tool) | PostToolUse | event handler — logs event |
| Session terminated | Stop | close + event + learn handlers |
State commands — Claude Code usage
# Check current phase, skill, and generation gap
bun ./bin/get-fable.js status --json-v1
# Run 42 system checks
bun ./bin/get-fable.js doctor --json-v1
# Route the current task and get selected specialist
bun ./bin/get-fable.js route "<task description>" --json-v1
# Declare a work card
bun ./bin/get-fable.js card "Implement X with acceptance criterion Y"
# Record evidence
bun ./bin/get-fable.js evidence pass test "bun test" "all 47 tests pass"
bun ./bin/get-fable.js evidence pass build "bun run build" "build clean"
# Advance mutation generation manually (if bypassing a known safe write)
bun ./bin/get-fable.js mutation "manual-state-write"
# Check ledger lint
bun ./bin/get-fable.js lintArchitecture guard behavior
When fable_architecture_guard.py fires at SessionStart:
- Reads
arch-evaloutput from.fable/arch-manifest.jsonif present. - If composite score >= 7.0: injects
allowMonolith: falseconstraint into the session context. - Claude Code must not scaffold a single-process monolith when this constraint is active.
- Transport contract (ADR 0007) is injected: North-South = REST, East-West = gRPC.
- Language matrix is injected: Claude must not propose a language outside the prescribed matrix for the current workload profile.
To run a fresh evaluation:
bun ./bin/get-fable.js arch-eval "Your project specification here"
# Output is written to .fable/arch-manifest.json and displayed as TOON/JSONSecurity rules specific to Claude Code
What Claude Code must never do
- Write API keys, tokens, bearer credentials, or secrets into any file — including test fixtures,
.envexamples, config defaults, and commit messages. - Use
bash -c "... | base64 -d | bash"or equivalent eval-of-downloaded-content patterns. - Call
Agent,Task, orWorkflowwith a payload that includes session tokens, file paths outside the project root, or credentials. - Accept a
$CLAUDE_PLUGIN_ROOTredirection that escapes the expected plugin directory. - Execute
redteam scancommands against targets that have not been explicitly scoped in.fable/redteam-scope.json.
Secret hygiene
Claude Code sessions inherit secrets from the shell environment. When working on code that handles external API calls or auth flows, verify that no credential is reflected into:
- Evidence detail fields
- Ledger card descriptions
.fable/events.jsonl- Commit messages
Multi-session continuity
When resuming after a prior session:
- The
fable_profile_inject.pyhook restores compact state atSessionStart. - If
phase != idleandsubstantial: true, the session is mid-work — do not restart from scratch. - Check
mutationGenerationvsverifiedGeneration. If stale, verify before any new mutation. - Open ledger cards from the prior session are re-injected. Address them before accepting new work.
- If no
.fable/state.jsonexists: runbun ./bin/get-fable.js initto initialize.
To explicitly create a handoff before closing:
bun ./bin/get-fable.js route "handoff current work"
# fable-handoff selected
# Follow handoff instructions to produce continuation state
bun ./bin/get-fable.js evidence pass handoff "session-end" "handoff complete — next: <action>"Failure recovery quick reference
Symptom: same Bash error 2+ times
Action: bun ./bin/get-fable.js route "diagnose repeated failure"
-> fable-recover selected automatically by fable_fail_streak.py
Symptom: Stop hook blocked "stale proof"
Action: bun ./bin/get-fable.js evidence pass test "bun test" "<results>"
Symptom: Stop hook blocked "open ledger card"
Action: bun ./bin/get-fable.js card --clear # only if scope was genuinely removed
OR complete the card first
Symptom: Stop hook blocked "pending mutations"
Action: bun ./bin/get-fable.js status --json-v1 # check pending token count
bun ./bin/get-fable.js lint # check for reconciliation errors
Symptom: Architecture guard injected allowMonolith: false
Action: Decompose into microservices per the injected language matrix
Use REST (external) and gRPC (internal) transport boundariesRelated files
| File | Purpose |
AGENTS.md | Authoritative agent rules for all 29 skills, state machine, and evidence protocol |
hooks/hooks.json | Full Claude Code hook declaration |
hooks/fable_hook_dispatch.py | Universal dispatcher for all hook events |
hooks/fable_profile_inject.py | Session context injection |
hooks/fable_close_guard.py | Stop handler — completion guard |
hooks/fable_fail_streak.py | Failure detection and recovery routing |
hooks/fable_mutation.py | Mutation generation tracking |
hooks/fable_spawn_guard.py | Delegation guard |
hooks/fable_architecture_guard.py | Architecture constraint enforcement |
hooks/fable_session_learn.py | Session learning extraction |
hooks/README.md | Full hook contract and safety rules |
.claude-plugin/plugin.json | Claude Code plugin manifest |
.claude-plugin/marketplace.json | Marketplace metadata |
skills/get-fable/registry.json | Canonical skill registry |
docs/USAGE.md | CLI usage guide |
CHANGELOG.md | Release history |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

