mcpField
S
systematic-debugging

systematic-debugging

github.com/hjewkesDevelopment437 installsUpdated 35w ago
Repository

About systematic-debugging

systematic-debugging is a skill that guides technical investigations through root-cause analysis before fixes. Its four phases cover evidence gathering, pattern comparison, hypothesis testing, and implementation with verification.

Key features

  1. 01Four-phase debugging process
  2. 02Root-cause investigation before fixes
  3. 03Evidence gathering and reproduction
  4. 04Hypothesis testing with minimal changes
  5. 05Verification after implementation

Use cases

  1. 01Investigate failing tests or builds
  2. 02Trace unexpected behavior to its cause
  3. 03Analyze recurring failures after attempted fixes
  4. 04Resolve performance or integration problems

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/hjewkes/agent-skills --skill systematic-debugging

After installing, type/systematic-debuggingin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

condition-based-waiting-example.ts
condition-based-waiting.md
CREATION-LOG.md
defense-in-depth.md
find-polluter.sh
root-cause-tracing.md
test-academic.md
test-pressure-1.md
test-pressure-2.md
test-pressure-3.md
references/
debugging-signals.md
four-phases-detailed.md
scripts/
diagnose

Details

From the project README

Systematic Debugging

Overview

Random fixes waste time and create new bugs. Quick patches mask underlying issues.

Core principle: ALWAYS find root cause before attempting fixes. Symptom fixes are failure.

Violating the letter of this process is violating the spirit of debugging.

The Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

If you haven't completed Phase 1, you cannot propose fixes.

When to Use

Use for ANY technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.

Use ESPECIALLY when: under time pressure, "just one quick fix" seems obvious, you've already tried multiple fixes, you don't fully understand the issue.

Don't skip when: issue seems simple, you're in a hurry, manager wants it fixed NOW.

Quick Reference — The Four Phases

PhaseKey ActivitiesSuccess Criteria
1. Root CauseRead errors, reproduce, check changes, gather evidenceUnderstand WHAT and WHY
2. PatternFind working examples, compareIdentify differences
3. HypothesisForm theory, test minimallyConfirmed or new hypothesis
4. ImplementationCreate test, fix, verifyBug resolved, tests pass

For detailed step-by-step instructions for each phase, see references/four-phases-detailed.md.

Red Flags — STOP and Follow Process

If you catch yourself thinking:

  • "Quick fix for now, investigate later"
  • "Just try changing X and see if it works"
  • "Add multiple changes, run tests"
  • "Skip the test, I'll manually verify"
  • "It's probably X, let me fix that"
  • "I don't fully understand but this might work"
  • "Here are the main problems: [lists fixes without investigation]"
  • Proposing solutions before tracing data flow
  • "One more fix attempt" (when already tried 2+)
  • Each fix reveals new problem in different place

ALL of these mean: STOP. Return to Phase 1.

If 3+ fixes failed: Question the architecture (see Phase 4 in detailed reference).

Supporting Techniques

  • root-cause-tracing.md — Trace bugs backward through call stack
  • defense-in-depth.md — Add validation at multiple layers
  • condition-based-waiting.md — Replace arbitrary timeouts with condition polling

Related skills:

  • test-driven-development — For creating failing test case (Phase 4)
  • verification-before-completion — Verify fix worked before claiming success

For user signals, rationalizations table, and "no root cause" guidance, see references/debugging-signals.md.

Comments

Markdown supported