Systematic Debugging
SkillMonitoring & opsUse this skill whenever a test fails, a code review surfaces a defect, or a bug is reported, to perform structured root-cause analysis rather than trial-and-error patches. Walks symptom → narrow → reproduce → minimal repro → root cause → fix → regression test. Outputs a debug log entry that feeds into Memory and AUDIT_BUNDLE. Chinese trigger examples: "调试", "找 bug 根因", "系统化调试", "Bug 定位", "test failure 调试", "review 反馈 修复". Do NOT use for stylistic feedback (just fix), do NOT use for known one-line fixes. Success = root cause identified with evidence, fix applied at root cause level, regression test added.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Systematic Debugging skill
What this skill tells your AI
The instructions your AI receives, as published by charliehzm/medharness in .claude/skills/systematic-debugging/SKILL.md and read by ahel’s review.
Stops the "patch the symptom, ship, repeat" anti-pattern.
The cycle
Symptom
↓ narrow (which input class / which code path)
Reproducer (smallest input that triggers it)
↓ instrument (log / trace / debugger)
Hypothesis (1 falsifiable claim)
↓ test the hypothesis directly
Root cause (the WHY behind the WHAT)
↓ fix at root (not symptom)
Regression test (locks behavior)
Anti-patterns
| Anti | What it looks like | Cost |
|---|---|---|
| Try-this-try-that | "let me change X and rerun" | hours wasted, no learning |
| Symptom patch | catch + log + return | bug returns elsewhere |
| Print debugging at scale | scattered prints, none removed | noise, audit hits |
| Fix without test | regression returns | infinite loop |
Workflow
- Capture the failure clearly (test name + error + line).
- Narrow input class — what's special about the failing case?
- Build a minimal reproducer (independent of the test suite).
- Form ONE hypothesis. Test it. If wrong, revise.
- Identify root cause; trace back to design / spec / data invariant.
- Apply fix at root.
- Add regression test that exercises the minimal reproducer.
- Write DEBUG_LOG entry: symptom + reproducer + root cause + fix + test ref.
Integration
- Triggered by: test failure (Step 9), review feedback (Step 8), bug report, compliance gap (Step 10 → Step 11)
- Output: DEBUG_LOG entries inform
memory-curate(Phase 3 inference rederive) andaudit-snapshot(prompts/debug_log/)
Common failure modes
- Hypothesis = "it should work" — not falsifiable. Mitigation: every hypothesis must predict an observable.
- Fix without regression test — the bug will return. Mitigation: discipline; reject the diff otherwise.
- Fix at the wrong layer — patches caller when bug is in callee's invariant. Mitigation: ask "why did the invariant break".
Signals
- GitHub stars
- 86
- Forks
- 8
- Last commit
- Jun 2026
Advanced
- Catalog kind
- skill
- Gateway key
systematic-debugging-charliehzm- Source
- github.com/charliehzm/medharness