systematic-debugging

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

1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/stefaniuk/loadout --skill systematic-debugging-stefaniuk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/stefaniuk/loadout/tree/main/.github/skills/systematic-debugging
Command: npx skills add https://github.com/stefaniuk/loadout --skill systematic-debugging-stefaniuk

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Developers under time pressure often apply quick symptom fixes that fail repeatedly, causing thrashing, flaky tests, and recurring production incidents. This Skill enforces a disciplined debugging methodology that finds the actual root cause before any fix is attempted. ## Core Features & Use Cases - Four-Phase Process: Enforces Root Cause Investigation, Pattern Analysis, Hypothesis Testing, and Implementation in strict order, with explicit stop conditions when fixes fail. - Supporting Techniques: Includes root-cause tracing through call stacks, defense-in-depth validation across four layers, and condition-based waiting to replace flaky arbitrary timeouts in tests. - Bisection Script: Ships a find-polluter.sh script that runs test files one by one to identify which test creates unwanted files or state. - Use Case: When a test fails intermittently or a production bug resists obvious fixes, apply the process to trace the failure to its source, write a failing test, and implement a single verified fix. ## 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 find the root cause of a bug instead of fixing symptoms?▼

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

How to fix flaky tests caused by arbitrary timeouts?▼

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

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

Stop after three failed fixes and question the architecture rather than attempting a fourth. Repeated failures where each fix reveals new problems elsewhere indicate a structural issue that requires architectural discussion, not another symptom patch.

How do I find which test is polluting the filesystem or state?▼

Use the find-polluter.sh bisection script with the polluted path and a test file pattern. It runs each test individually and stops at the first one that creates the unwanted file or directory, identifying the exact polluting test.

When should I add validation at multiple layers of my code?▼

Add defense-in-depth validation after fixing a bug caused by invalid data. Validate at the entry point, business logic, environment guards, and debug instrumentation layers so the bug becomes structurally impossible even if one check is bypassed.