systematic-debugging

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

1|Updated May 16, 2026
One-click install
npx skills add https://github.com/ludotype/game-adventurertown --skill systematic-debugging-ludotype
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/ludotype/game-adventurertown/tree/main/.agent/skills/systematic-debugging
Command: npx skills add https://github.com/ludotype/game-adventurertown --skill systematic-debugging-ludotype

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 root causes instead of treating symptoms, even under time pressure or social pressure to apply quick fixes. ## 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: 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 behavior during emergencies, plus escalation to architectural review after 3 failed fixes. - Use Case: A test fails intermittently in CI. Instead of adding sleep delays, you trace the data flow backward, find the actual race condition, write a failing test, fix the source, and add validation layers so the bug cannot recur. ## Quick Start Use the systematic-debugging skill to investigate this test failure 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 the four-phase process: investigate the root cause by reading errors and reproducing the issue, 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 and 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, which eliminated flakiness and ran 40% faster in real sessions.

What should I do when my first fix does not work?▼

Stop and return to Phase 1 to re-analyze with the new information rather than stacking more fixes. If three or more fixes have failed, stop entirely and question whether the underlying architecture is wrong, discussing it with your team before attempting another fix.

Should I skip systematic debugging during a production emergency?▼

No. Systematic investigation is faster than guess-and-check thrashing, which typically causes hours of rework and new bugs. The skill explicitly addresses time pressure rationalizations and mandates root cause investigation even when a quick fix seems obvious.

How do I trace a bug that appears deep in the call stack?▼

Trace backward from the immediate cause by asking what called each function and what values were passed, until you find the original trigger. Add stack trace instrumentation with console.error before the failing operation, and fix at the source rather than where the error appears.

When is a single validation check not enough after fixing a bug?▼

Single-point validation can be bypassed by other code paths, refactoring, or mocks. Apply defense-in-depth by validating at every layer data passes through: entry points, business logic, environment guards, and debug instrumentation, making the bug structurally impossible.