Root-cause debugging skill for AI coding agents. Four phases: Reproduce, Analyze, Hypothesize, Implement.
Most AI agents guess at fixes and retry until something sticks. This skill enforces the Iron Law: no fixes without understanding why the bug exists. Every fix requires confirmed evidence of the root cause.
git clone https://github.com/d-wwei/systematic-debugging ~/.claude/skills/systematic-debuggingOr install automatically as part of Apex Forge:
bash apex-forge/skill/install.sh/systematic-debugging
The skill activates a 4-phase investigation:
- Reproduce — confirm the bug, classify it, capture evidence
- Analyze — trace data flow, check recent changes, identify patterns
- Hypothesize — generate 3+ testable hypotheses, test most likely first
- Implement — write regression test first, then minimal fix, verify
- Iron Law: no fixes without root cause at direct evidence level or higher
- 3-Hypothesis Rule: minimum 3 distinct hypotheses before any fix
- 3-Strike Rule: after 3 failed hypotheses, your mental model is wrong. Start over from a different angle.
When used inside an orchestrator (e.g., Apex Forge):
output:
status: enum [RESOLVED, UNRESOLVED, NEEDS_HELP]
evidence_level: enum [guess, indirect, direct, confirmed, proven]
root_cause: string
fix_description: stringMIT
AI 编程 Agent 的根因调试 skill。四阶段:复现、分析、假设、实现。
多数 AI Agent 猜测修复、反复重试直到碰巧通过。这个 skill 强制执行 Iron Law:不理解 bug 成因就不许修复。每次修复都需要根因的确认级证据。
git clone https://github.com/d-wwei/systematic-debugging ~/.claude/skills/systematic-debugging或通过 Apex Forge 自动安装:
bash apex-forge/skill/install.sh/systematic-debugging
4 阶段调查流程:
- 复现 — 确认 bug 存在,分类,采集证据
- 分析 — 追踪数据流,检查近期变更,识别模式
- 假设 — 生成 3+ 个可测试假设,从最可能的开始验证
- 实现 — 先写回归测试,再最小修复,验证
- Iron Law:根因未达到 direct 级证据前不修复
- 3 假设规则:修复前至少 3 个不同假设
- 3 失败规则:3 个假设都错,说明你的思维模型有问题,换角度重来
output:
status: enum [RESOLVED, UNRESOLVED, NEEDS_HELP]
evidence_level: enum [guess, indirect, direct, confirmed, proven]
root_cause: string
fix_description: stringMIT