debuglisted
Install: claude install-skill mehrad-dm/mastermind
# MasterMind — Debug
Hard bugs are lost by guessing and patching symptoms. This is the disciplined loop that finds the
actual cause. Bug: **$ARGUMENTS**. Grounded in `~/.mastermind/engineering/core/rigor.md` and `~/.mastermind/engineering/core/agent-loop.md`.
The cardinal rule: **understand the mechanism before you change a line.** A fix you can't explain is a
coincidence, not a fix.
## The six phases
1. **Reproduce deterministically.** Find the smallest reliable trigger and a check that goes red on the
bug (a failing test, a script, a repro URL/steps). No repro → no fix; keep narrowing inputs until it
fails on demand. This red check is also your definition of "fixed."
**If it still won't reproduce after honest effort:** stop — never guess at a fix for a bug you can't
reproduce, and never claim it's fixed. Ship instrumentation instead (logging/assertions at the suspect
boundaries) so the next occurrence is diagnosable, state explicitly what you ruled out and how, and
hand back with that evidence. "I couldn't reproduce it" is the honest answer, and usually a faster
route to the real cause than three speculative patches.
2. **Localize.** Bisect the space — git bisect across commits, binary-search the code path, add
instrumentation/logs at boundaries. Read the *actual* code and the *actual* data/state at the
failure point; don't theorize from memory. Narrow to the smallest region that still reproduces.
3. **Hypothesize.** List the credible causes