debug-issuelisted
Install: claude install-skill nuttaruj/rolepod
# Debug Issue
Canonical debug workflow. Replace guess-and-check with disciplined narrowing: reproduce → trace upstream to root → write failing test → minimal fix → verify regression-clean.
## Iron Rule
<EXTREMELY-IMPORTANT>
1. NEVER fix before reproducing locally with a deterministic command. No repro = guess.
2. NEVER stop at the first symptom fix. Trace upstream to a legitimate stopping point (external input, system boundary, "designed this way"), then fix at root.
3. ALWAYS roll back your last action first when the error appeared right after your change.
4. ALWAYS write the failing test you wish had existed before shipping the fix.
5. After 3 failed fix attempts on the same surface, STOP fixing — get one cross-model opinion (§9). Its correction is the outside review that permits exactly ONE more attempt; fix #4 without it = thrashing.
</EXTREMELY-IMPORTANT>
## When to use
- Test was green, now red
- Unrecognized error / unfamiliar stack
- Wrong output, no exception thrown
- Build broke after a change
- Works locally, fails in CI (or the reverse)
- Two fix attempts did not stick
- Symptom keeps returning at a different surface
- About to add defensive `?.` / null-check / try-catch without knowing why
## Boundary
Owns:
- Unknown failure triage: reproduce, trace upstream, identify root cause, write a failing regression test, minimal fix.
Does not own:
- Planned feature work with known requirements.
- Broad refactor / simplification.
- Shipping decision.
Return / hand