systematic-debugging

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

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

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 fixes during emergencies, plus guidance to question architecture after 3+ failed fixes. - Use Case: A test fails intermittently with a status mismatch. Instead of adding longer sleep delays, follow Phase 1 to reproduce and gather evidence, trace the data flow to the source, form a single hypothesis, and implement one verified fix with a failing test first. ## Quick Start Ask the AI to debug a failing test or production bug using the systematic-debugging skill, starting with root cause investigation before 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 fix verified by a failing test. Never propose fixes before completing Phase 1.

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 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 with documented justification.

What should I do when a bug appears deep in the call stack?▼

Use root cause tracing: find the immediate cause, then trace backward through each caller to find where the bad value originated. Add stack trace instrumentation with console.error before the failing operation, fix at the source, and add defense-in-depth validation at each layer.

When should I stop trying fixes and question the architecture?▼

Stop after three failed fix attempts. If each fix reveals new problems in different places or requires massive refactoring, the pattern indicates an architectural problem. Discuss fundamentals with your team before attempting a fourth fix.

Can I skip the debugging process for simple bugs or emergencies?▼

No. The skill explicitly states simple bugs have root causes too, and systematic debugging is faster than guess-and-check thrashing even under time pressure. Skipping the process is listed as a rationalization that leads to rework.