systematic-debugging

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

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/kxnzee/multi-repo-specs --skill systematic-debugging-kxnzee
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/kxnzee/multi-repo-specs/tree/main/extensions/superpowers/skills/systematic-debugging
Command: npx skills add https://github.com/kxnzee/multi-repo-specs --skill systematic-debugging-kxnzee

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 process that finds the root cause before any fix is attempted. ## Core Features & Use Cases - Four-Phase Process: Root cause investigation, pattern analysis, hypothesis testing, and verified 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, condition-based waiting to replace flaky timeouts, and a shell script to find test-polluting files. - Architecture Escalation: After three failed fix attempts, the process stops and questions the underlying architecture instead of attempting more patches. - Use Case: When a CI build fails across multiple layers (workflow, build script, signing), use the evidence-gathering instrumentation pattern to identify exactly which layer breaks before changing any code. ## 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-phase process: first investigate the root cause by reading errors and reproducing the issue, then analyze patterns against working code, form and test a single hypothesis, and only then implement a verified fix. Never propose fixes before completing root cause investigation.

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

Use the find-polluter.sh script, which runs each test file sequentially and checks whether a specified pollution path appears after each run. Run it in an isolated checkout with your test runner, and it stops at the first polluting test file.

How do I fix flaky tests caused by arbitrary timeouts?▼

Replace setTimeout or sleep calls with condition-based waiting that polls for the actual condition you care about, such as an event appearing or state changing. Poll every 10ms with a clear timeout error, and only use arbitrary delays when testing actual timing behavior.

What should I do when multiple fix attempts keep failing?▼

After three failed fixes, stop and question the architecture rather than attempting a fourth fix. Repeated failures where each fix reveals new problems elsewhere indicate a structural issue that requires architectural discussion, not more patches.

When should I add validation at multiple layers instead of one?▼

Add defense-in-depth validation whenever a bug was caused by invalid data flowing through multiple components. Validate at the entry point, business logic, environment guards, and debug instrumentation layers, since single checks can be bypassed by other code paths, refactoring, or mocks.