1---2name: debugging-methodology3description: Debugs failures by gathering evidence before proposing fixes, enforcing no fix without root-cause investigation. Use this skill when encountering bugs, test failures, unexpected behavior, intermittents, or works-locally-fails-in-CI, before changing code. Do not use when/for implementing a feature with no failure under investigation, or pure code-flow-analysis without a live failure.4---56# Debugging Methodology78## Critical rules910- `NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST`. No evidence → no fix proposal.11- Measure; do not speculate. Instrumentation before hypothesis.12- One change at a time. Never stack unverified fixes.13- 3+ failed fixes → stop, question architecture, discuss before more attempts.14- Red flags: "quick fix now", "try changing X", multi-change batches, "probably X", proposing solutions before data flow is traced.15- Before instrumenting, map the path with `code-flow-analysis`. Before deep examples, read [references/protocol.md](references/protocol.md).1617## Workflow18191. Document the exact symptom (error text, expected vs actual, inputs, environment).202. Add instrumentation at decision points before forming any hypothesis.213. For complex flows, use OpenTelemetry spans (or existing production traces).224. Form a testable, evidence-based hypothesis that explains all symptoms.235. Apply one change; retest; keep structured logging, remove debug-only noise.246. For `Result` / workflow failures: log every `err()`, each step, and mock interactions. See protocol for patterns.2526## Resources2728- [references/protocol.md](references/protocol.md) — instrumentation, Result/workflow debugging, decision tree, anti-patterns, rationalizations. Read before instrumenting or when stuck.2930## Validation3132- [ ] Exact symptom captured33- [ ] Instrumentation evidence explains the failure (not a guess)34- [ ] Hypothesis confirmed with a single isolating change35- [ ] Root cause identified (not only symptom location)36- [ ] Regression test fails without fix, passes with it37- [ ] Original failure no longer reproduces; suite/build green38- [ ] Debug-level noise removed; structured logs/traces kept3940## Constraints4142- Skip the full protocol only for trivial self-evident issues the compiler already names (typo, missing import).43- Related: `code-flow-analysis`, `investigation-modes`, `result-types`, `fn-args-deps`, `verification-before-completion`, `confidence-levels`, `observability`.