systematic-debugging

Diagnose bugs through a four-phase root cause investigation process before proposing fixes.

1|Updated Jul 6, 2015
One-click install
npx skills add https://github.com/ksolomon/dotfiles --skill systematic-debugging-ksolomon
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/ksolomon/dotfiles/tree/main/AI/.claude/plugins/cache/claude-plugins-official/superpowers/6.1.1/skills/systematic-debugging
Command: npx skills add https://github.com/ksolomon/dotfiles --skill systematic-debugging-ksolomon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Random fixes and quick patches waste time, mask underlying issues, and introduce new bugs. This Skill enforces a disciplined debugging methodology that finds the actual root cause before any fix is attempted, even under time pressure or social pressure to apply a quick workaround. ## Core Features & Use Cases - Four-Phase Process: Root cause investigation, pattern analysis, hypothesis testing, and implementation, with mandatory completion of each phase before proceeding. - Supporting Techniques: Includes root-cause tracing through call stacks, defense-in-depth validation at multiple layers, and condition-based waiting to replace flaky arbitrary timeouts in tests. - Pressure Resistance: Explicit anti-patterns, red flags, and rationalization tables that stop shortcut fixes during emergencies, exhaustion, or authority pressure. - Use Case: When a production test fails intermittently, use this Skill to trace the failure back through the call chain, form a single hypothesis, create a failing test case, and fix the source rather than adding another sleep timeout. ## Quick Start Use the systematic-debugging skill to investigate this failing test and find its root cause before suggesting any fix.

Frequently Asked Questions about systematic-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a test failure systematically instead of guessing?▼

Follow the four phases: investigate the root cause by reading errors and reproducing consistently, analyze patterns against working examples, form and test a single hypothesis, then implement one fix with a failing test case. Never propose fixes before completing the investigation phase.

How to fix flaky tests caused by arbitrary timeouts?▼

Replace setTimeout and sleep calls with condition-based waiting that polls for the actual condition you care about, such as an event appearing or state changing. The included condition-based-waiting technique raised one test suite's pass rate from 60% to 100% while running 40% faster.

Should I apply a quick fix during a production emergency?▼

No. The skill mandates root cause investigation first because systematic debugging is faster than guess-and-check thrashing, and symptom fixes mask underlying issues. Quick patches during emergencies set a pattern of accumulating workarounds and rework.

What should I do when three or more fix attempts have failed?▼

Stop attempting more fixes and question the architecture. Repeated failures where each fix reveals a new problem elsewhere indicate a fundamentally wrong pattern, not a failed hypothesis. Discuss refactoring the architecture with your team before attempting fix number four.

How do I find which test is polluting shared state or files?▼

Use the included find-polluter.sh bisection script, which runs test files one by one and stops at the first test that creates the unwanted file or directory. Combine this with stack trace instrumentation before the problematic operation to identify the exact trigger.

When is it acceptable to skip root cause investigation for simple bugs?▼

Never. The skill states that simple bugs have root causes too and the process is fast for simple issues. Skipping investigation for seemingly obvious fixes is listed as a red flag that requires returning to Phase 1.