systematic-debugging

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

92|12|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/ARounder-183/HiFiShifter --skill systematic-debugging-arounder-183
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/ARounder-183/HiFiShifter/tree/main/.github/skills/systematic-debugging
Command: npx skills add https://github.com/ARounder-183/HiFiShifter --skill systematic-debugging-arounder-183

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 before any fix is attempted, even under time pressure or social pressure to take shortcuts. ## Core Features & Use Cases - Four-Phase Process: Structured workflow covering root cause investigation, pattern analysis, hypothesis testing, and verified implementation. - 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 counters that stop symptom-fixing when deadlines or authority figures push for quick patches. - Use Case: When a test fails intermittently or a production bug appears deep in the call stack, follow the phases to trace the bad value to its origin, form a single hypothesis, create a failing test, and fix at the source. ## Quick Start Ask the AI to debug a failing test or bug using the systematic-debugging process and require root cause investigation before any fix is proposed.

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?

Follow the four phases: read error messages and reproduce the failure consistently, compare against working examples, form a single hypothesis and test it minimally, then create a failing test case before implementing one fix at a time.

What is root cause tracing in debugging?

Root cause tracing follows a bug backward through the call stack to find where the bad value originated, rather than fixing where the error appears. Add stack trace logging with console.error before the failing operation to capture the full call chain.

How do I fix flaky tests caused by timing issues?

Replace arbitrary setTimeout or sleep delays with condition-based waiting that polls for the actual expected state, such as an event appearing or a count being reached. Poll every 10ms with a clear timeout error message.

When should I question the architecture instead of fixing a bug?

After three or more fix attempts have failed, especially when each fix reveals a new problem elsewhere or requires massive refactoring. This pattern indicates an architectural problem, so stop and discuss fundamentals before attempting more fixes.

What is defense-in-depth validation?

Defense-in-depth adds validation at every layer data passes through: entry point checks, business logic validation, environment guards, and debug instrumentation. This makes the bug structurally impossible rather than fixed at a single point.