fable-recover
Skill6 starsChanged 3 months agoMITView on GitHub
Diagnose repeated command failures, stale build caches, branch drift, or contradictory evidence before attempting further code edits. Use when commands fail repeatedly, tests stay red after attempted fixes, build output contradicts source code, or the execution path is confused — even if the user does not explicitly say \"fable-recover\" (e.g. \"still failing\", \"why did this fail again\", \"stuck in a failure loop\", \"diagnose this error\"). Do NOT use for routine first-time test failures in fresh TDD (use fable-tdd).
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
- CLAUDE.mdCLAUDE.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-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 skill into the rules it gives an agent
17 rules. About 0 are common, 14 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Stop spending mutations on a failing hypothesis.
- Distinctive: line 56
Start by classifying the evidence, not the code.
- Distinctive: line 70
Do not jump to product logic until cheaper external explanations are falsified.
- Distinctive: line 75
No new production edits until the diagnosis changes.
- Distinctive: line 88
Create 2-5 plausible causes ranked by:
- Distinctive: line 100
Use the cheapest separating probes first:
- Distinctive: line 112
Use narrow temporary diagnostics, binary search/bisect, toggling one variable, or comparing known-good/bad states.
- Distinctive: line 122
Do not keep contradicted explanations alive as "maybe still related."
- Distinctive: line 135
Never repeat an unchanged failed command unless a named environmental/state variable changed or the rerun is explicitly measuring …
- Distinctive: line 136
Do not delete caches/build artifacts reflexively before recording evidence.
- Distinctive: line 137
If source changes have no runtime effect, prove the executed artifact/path before editing logic again.
- Very specific: line 138
If CI-only failure exists, compare environment/version/parallelism first.
- Distinctive: line 139
If failure is data-specific, minimize the failing data/state before broad refactor.
- Very specific: line 140
If a dependency/version hypothesis emerges, route external semantic verification to fable-research.
- Very specific: line 141
If local patches shift failure between components, suspect a shared invariant/design and return to fable-plan.
- Distinctive: line 146
Every new probe is chosen to distinguish hypotheses.
- Distinctive: line 162
Only probes supporting first theory are run.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Fable Recover
Stop spending mutations on a failing hypothesis. Rebuild causal confidence before changing code again.
Mission
Recovery exists for the moment an agent is most likely to become expensive and irrational: the same task has failed more than once, output contradicts expectations, or edits appear to have no effect.
The goal is not to "try something different." The goal is to explain why previous attempts failed, falsify competing causes, and issue one repair that is justified by new evidence.
Activate When
- the same command/test/behavior fails after two materially similar implementation attempts;
- output appears stale or unaffected by known source changes;
- tests/runtime disagree;
- evidence contradicts a load-bearing assumption;
- failures alternate or depend on timing/environment;
- the agent is about to repeat a command/patch without new diagnostic information.
Do Not Activate When
- first failure is a trivial syntax/type error introduced by the current edit;
- architecture is simply unknown and no repeated failure occurred (
fable-discover); - expected RED in TDD is being observed correctly;
- a narrow review finding already has an obvious bounded repair.
Failure Classification
Start by classifying the evidence, not the code.
| Class | Typical signals | First probes |
| Harness | assertion never reached, fixture/mock/setup error | prove test path and fixture |
| Environment | local/CI/OS/env-specific | versions, env, cwd, permissions |
| Artifact/cache | source changes not reflected | entrypoint, build timestamps, cache, dist |
| Execution path | edited code never executes | tracing/instrumentation/registration |
| Dependency/version | unexpected API/runtime semantics | lockfile, resolved version, official source |
| Data/state | only some fixtures/accounts/orders fail | minimal failing state, persistence boundaries |
| Concurrency/timing | intermittent/order-sensitive | deterministic coordination, shared state |
| Product logic | harness/path proven, assertion consistently wrong | isolate algorithm/branch |
| Invariant/design | local fixes move failure elsewhere | identify violated cross-component rule |
Do not jump to product logic until cheaper external explanations are falsified.
Recovery Protocol
Stage 1 — Freeze mutation
No new production edits until the diagnosis changes. Preserve the failing state and collect exact evidence.
Record:
- command/action;
- exact error/output;
- workspace/commit/mutation generation;
- attempts already made and what differed;
- expected observation.
Stage 2 — Reproduce minimally
Find the smallest reliable reproduction. If the failure is flaky, capture seeds/order/time/environment and work on determinism before another fix.
Stage 3 — Build a hypothesis queue
Create 2-5 plausible causes ranked by:
- ability to explain all observed evidence;
- probability given recent changes;
- cost/safety of falsification.
Each hypothesis must predict an observation that would distinguish it.
Bad: "maybe cache."
Good: "CLI executes stale dist/cli.js; if true, source timestamp will be newer than dist and direct source invocation will show new behavior."
Stage 4 — Walk the attribution ladder
Use the cheapest separating probes first:
- Harness — does the test/probe reach the intended assertion/path with realistic inputs?
- Environment/artifact — correct branch, cwd, env, version, build, cache, process?
- Execution path — is edited code actually reached? which implementation is registered?
- Data/dependency — does input/version/state differ from assumptions?
- Product logic — with above proven, isolate the wrong branch/algorithm.
- Invariant/design — if local logic is individually reasonable but system remains wrong, identify the violated system contract.
The ladder is guidance, not ritual. Skip a rung only when existing evidence already proves it.
Stage 5 — Instrument or bisect when observation is weak
Use narrow temporary diagnostics, binary search/bisect, toggling one variable, or comparing known-good/bad states.
Change one diagnostic dimension at a time so the result is interpretable.
Stage 6 — Falsify, do not accumulate guesses
After each probe:
- reject hypothesis;
- strengthen hypothesis;
- or revise the queue.
Do not keep contradicted explanations alive as "maybe still related."
Stage 7 — Form the revised diagnosis
A valid diagnosis explains:
- why the observed failure occurred;
- why previous attempts did not fix it;
- what evidence distinguishes it from alternatives;
- what smallest repair should change the outcome.
Stage 8 — Issue one bounded repair
Return to fable-execute or fable-tdd with one repair and one expected proof. If diagnosis reveals architecture uncertainty, route to plan/discover instead.
Decision Rules
- Never repeat an unchanged failed command unless a named environmental/state variable changed or the rerun is explicitly measuring nondeterminism.
- Do not delete caches/build artifacts reflexively before recording evidence; destructive cleanup can erase the clue that proves staleness.
- If source changes have no runtime effect, prove the executed artifact/path before editing logic again.
- If CI-only failure exists, compare environment/version/parallelism first; do not assume CI is "random."
- If failure is data-specific, minimize the failing data/state before broad refactor.
- If a dependency/version hypothesis emerges, route external semantic verification to
fable-research. - If local patches shift failure between components, suspect a shared invariant/design and return to
fable-plan. - Similar failed fixes count as a failure streak; superficial syntax changes do not reset diagnostic responsibility.
Invariants
- Recovery is diagnostic/read-only until a revised diagnosis exists.
- Every new probe is chosen to distinguish hypotheses.
- Contradicted hypotheses are removed.
- Diagnostic instrumentation is temporary and cleaned after repair.
- Final repair is bounded and tied to a predicted observable outcome.
Failure Taxonomy of Recovery Itself
Blind cleanup
Cache/build reset makes problem disappear but root cause is unknown. Record as unresolved unless causal evidence is obtained.
Hypothesis sprawl
Long list of possibilities with no discriminating probes. Rank and test the cheapest separator.
Mutation during diagnosis
Agent edits product while still uncertain, invalidating the failing state. Revert/restore diagnostic baseline where safe and restart evidence collection.
Confirmation bias
Only probes supporting first theory are run. Add at least one falsifier for the leading hypothesis.
Non-minimal reproduction
Huge suite/system creates too many confounders. Isolate smaller path before interpreting results.
Anti-Patterns
- third/fourth patch with same causal theory;
- "clear cache and see" without recording before/after evidence;
- rerunning flaky command until green;
- blaming environment without comparing environments;
- adding broad logging everywhere;
- changing multiple diagnostic variables at once;
- preserving disproved assumptions;
- solving symptom while unable to explain previous failures.
Recovery Packet
Failure/reproduction:
Attempts already made:
Hypothesis queue:
Probe → observation → hypothesis effect:
Revised diagnosis:
Why prior attempts failed:
Bounded repair:
Expected proof after repair:
Residual uncertainty:
Next Skill:Completion Criteria
Recovery completes only when:
- a reliable enough reproduction exists or nondeterminism is explicitly characterized;
- leading alternative causes were falsified with evidence;
- diagnosis materially differs from the failed assumption/attempt;
- proposed repair is bounded and predicts a concrete changed observation;
- execution can resume without another blind retry.
Progressive Resources
- Deep guide:
references/diagnostic-falsification-playbook.md - Existing ladder:
references/attribution-ladder.md - Example:
examples/recovering-stale-test-cache.md
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.

