Systematic debugging

From bobmatnyc/claude-mpm · View interactive version

Systematic debugging is an AI agent skill from the GitHub repository bobmatnyc/claude-mpm. Methodical debugging instead of random changes

How to use this skill

Skill file

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.

This skill enforces a four-phase systematic approach that ensures root cause investigation before any fix attempt. Violating the letter of this process is violating the spirit of debugging.

When to Use This Skill

Activate when:

Use this ESPECIALLY when:

The Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

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

Core Principles

  1. Reproduce First: Ensure you can reliably reproduce the issue
  2. One Change at a Time: Change only one thing between tests
  3. Hypothesis-Driven: Form hypotheses before making changes
  4. Verify Fixes: Confirm the fix works and doesn't break anything else

Quick Start

  1. Read Error Messages: Read completely, including stack traces
  2. Reproduce Consistently: Create reliable reproduction steps
  3. Gather Evidence: Add diagnostic instrumentation in multi-component systems
  4. Form Hypothesis: State clearly "I think X because Y"
  5. Test Minimally: Make smallest possible change
  6. Verify Fix: Confirm resolution and no regressions

The Four Phases

Phase 1: Root Cause Investigation

BEFORE attempting ANY fix:

Phase 2: Pattern Analysis

Find working examples, compare against references, identify differences, understand dependencies.

Phase 3: Hypothesis and Testing

Form single hypothesis, test minimally (one variable at a time), verify before continuing.

Phase 4: Implementation

Create failing test case, implement single fix addressing root cause, verify fix works.

If 3+ fixes fail: STOP and question the architecture - this indicates architectural problems, not failed hypotheses.

Navigation

For detailed information:

Key Reminders

Red Flags - STOP and Follow Process

If you catch yourself thinking:

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

Integration with Other Skills

Real-World Impact

From debugging sessions:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.