| name | rifty-fix |
| description | Repair an unexpected, observed rifty runtime/package/toolchain correctness failure through root cause → fault class → RED → fix → proof. Invoke for a regression or flake, an unexpectedly failing previously-green behavioral test, or a concrete product-code review defect requested for repair. Excludes “continue/follow the plan”, other planned/ready work, expected RED, features/refactors, and process/docs/skills/review policy. |
rifty-fix
Apply the description's scope gate first. A task stays planned even when its title says “fix”; a defect already owned by a backlog item follows that contract's workflow, not this loop.
Steps
- Root cause. Reproduce. Cannot reproduce → record the attempt, capture (or keep the draft), stop — no speculative fix. Trace the bad value to where it is born; instrument each boundary when the path spans layers.
- Class. In
docs/process/fault-classes.md, name the axis and boundary; add a missing model first. Strike physically excluded faults — only on the boundary where step 1 traced the birth (a friendlier row = boundary-shopping), after the full sweep, each strike listed in the PR with its row and the step-1 trace evidence; surviving axes keep fault tests. Sweep the pattern repo-wide and enumerate sibling operations. A second reachable instance → §Class-kill.
- RED. Add a failing parity/regression/fault test before code. Assert the honest outcome. A conflicting old test means the contract changed; do not quietly retarget it.
- Fix once. Change the root owner; for a class, apply §Class-kill. Avoid wrappers and drive-by work.
- Prove. RED→GREEN, then revert-check each new guard. Run touched gates and verify the committed tree.
- Close honestly. If the class exceeds the unit, re-cut — the chokepoint/authority stays in the current unit; backlog takes only extra call-sites beyond it. Keep active-goal work reverse-linked; otherwise capture it. Backlog never makes a partial repair complete.