Diagnose and fix a difficult bug
Replace speculative patches with reproduction, hypothesis testing, a minimal fix, and durable regression protection.
Use when
The error is intermittent, buried in a large system, or has already attracted several plausible fixes.
Outcome
A root-cause fix supported by a reproducible failure and a focused regression test.
The sequence
4 deliberate steps
- 01Open skill
Reproduce and narrow
Establish the exact symptom and reduce it to a reliable failing case.
- 02Open prompt
Minimize the system
Remove unrelated variables while keeping a successful control case.
- 03Open prompt
Fix through feedback
Write the failing regression at a stable seam, implement the smallest correction, and refactor after green.
- 04Open prompt
Prove the correction
Connect the change to the root cause and check adjacent behavior.