Ratchet — making learnings permanent
After fixing a bug, /debug used Generalize to look for "the same pattern elsewhere." If you stop there, the learning vanishes on the spot. The Ratchet is the flow that turns that learning into a mechanism, so you stop repeating the same failure structurally.
The ratchet metaphor
A ratchet is a gear that turns in only one direction. What you tighten does not loosen. The Ratchet in a harness is the same: "once you have learned something, put it into a state where it is automatically enforced from now on, and never let it slide back."
The /debug workflow has this judgment built in. When Generalize finds a bug of the same pattern, or when you judge that recurrence is likely, it asks: "Should we make this permanent?"
Should we ratchet this bug pattern?
- Add a norm to rules ... write it as a prose norm in rules/*.md (Inferential Guide)
- Add a hook ... enforce it deterministically with a hook (Computational)
- Add a fitness function ... detect it as a structural constraint
- learnings record only / skip ... if recurrence is unlikely, just record it
Which promotion target to choose
The options correspond to the cross-classification in Guides and Sensors. You choose based on "the damage if it recurs" and "how hard it is to false-positive."
| Promotion target | What kind of learning it suits | Classification |
|---|---|---|
| Add to rules | A norm that involves judgment and is hard for a machine to detect | Inferential Guide |
| Add a hook | A failure with a clear pattern that a machine can detect | Computational |
| Fitness function | Constraints on dependency direction or structure (architecture violations, etc.) | Computational |
| learnings only | Low recurrence probability, or a one-off insight | Record |
For example, if "returning array[0] raw and crashing" happens often, a lint rule or hook could detect it (promote to Computational). On the other hand, a norm that involves judgment—like "call this API only after checking its state"—is better written as prose in rules/ (Inferential Guide).
As we saw in Guides and Sensors, prose norms (Inferential Guides) slip through probabilistically. So the more important a norm is, the more you promote it to a two-sided stance—write it in rules (Guide) and at the same time detect it with a hook (Sensor). The pair of "avoid symptomatic fixes (the SKILL prose)" and check-suppression.sh (the hook) that we saw in the /debug lifecycle is exactly an example that grew into this shape.
Phases as a way of growing it
This harness was not completed all at once; it was grown by going through Phases. Each time a new failure pattern was found, it was promoted via the Ratchet, and that accumulation is recorded as Phases. In the author's environment, Phases 0 through 13 are complete and Phase 14 is in progress, and 26 important design decisions remain in docs/adr/ (Architecture Decision Records) (as of 2026-06-12). They are records that let you trace "why we did it this way" after the fact. Note that the Phase numbers here are the author's own organizing axis; they are a separate axis from the Phase 0-6 shown in the blog post (specific to this series).
A concrete example of the ratchet's "do not loosen the gear you tightened" is check-stray-prefix.sh, which we saw in The Stop hook. Even after the underlying old-model-specific problem was resolved and the workaround was removed, the detecting Sensor was kept. Fixing the cause and continuing to detect recurrence are two different jobs.
The key points:
- The Ratchet is the flow of "putting a single learning into a state where it is automatically enforced from now on, and never letting it slide back"
- At the recurrence-prevention stage,
/debugdecides the promotion target: "rules / hook / fitness / record only" - You choose the target by "the damage of recurrence" and "how easy it is to detect by machine"
- Grow important norms into a two-sided stance of Guide (rules) and Sensor (hook)
Next, in Subagents and role separation, we use a detour into /review to see "running multiple agents in parallel," which does not come up with /debug alone.