failure-recovery-loop
Installation
SKILL.md
Failure Recovery Loop
Core rule
Failures are evidence. Preserve them, identify the root cause, and change one causal variable at a time.
Loop
- Capture the exact command, inputs, exit code, stderr/logs, and relevant state.
- Classify: environment, dependency, syntax, logic, data, timing, permission, compatibility, or external service.
- Form one falsifiable cause hypothesis.
- Create the smallest reproducer that distinguishes that hypothesis.
- Make the minimal causal change.
- Re-run the reproducer. If it still fails, revise the hypothesis rather than stacking guesses.
- Once green, run the original failing command and then the full gate.
- Sweep sibling paths that share the same cause.
Never erase the evidence before understanding it. Do not turn a required failure into a warning merely to make the pipeline green. A retry without a causal change is not debugging.