systematic-debugging

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

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/Avistian/nba --skill systematic-debugging-avistian
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/Avistian/nba/tree/main/.cursor/skills/systematic-debugging
Command: npx skills add https://github.com/Avistian/nba --skill systematic-debugging-avistian

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Random fixes and quick patches waste hours and introduce new bugs by masking underlying issues. This Skill enforces a disciplined four-phase debugging process that finds the true root cause before any fix is attempted, even under time pressure or social pressure to take shortcuts. ## Core Features & Use Cases - Four-Phase Process: Root Cause Investigation, Pattern Analysis, Hypothesis Testing, and Implementation, each with concrete checklists and explicit stop conditions. - Supporting Techniques: Includes root-cause tracing through call stacks, defense-in-depth validation at multiple layers, condition-based waiting to replace flaky test timeouts, and a bisection script to find test polluters. - Pressure Resistance: Built-in anti-patterns, rationalization tables, and escalation rules (e.g., question the architecture after 3 failed fixes) that hold up during emergencies. - Use Case: When a production API fails or a test is flaky, load this Skill to systematically reproduce the issue, trace data flow to the source, form a single testable hypothesis, and implement one verified fix instead of thrashing through guess-and-check attempts. ## 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 phases: first investigate the root cause by reading errors fully, reproducing consistently, and checking recent changes; then analyze patterns against working examples; form one testable hypothesis; finally implement a single fix with a failing test case. Never propose fixes before completing Phase 1.

How to find root cause of a bug deep in the call stack?▼

Use root-cause tracing: identify the immediate failing code, then trace backward through each caller asking what value was passed and where it originated. Add stack trace instrumentation with console.error before the failing operation if manual tracing stalls, and fix at the source rather than the symptom.

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 condition you need, such as an event appearing or state changing. Poll every 10ms with a clear timeout error, and only use fixed 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, so discuss refactoring the pattern with your team instead of stacking more patches.

When is it acceptable to skip root cause investigation for a quick fix?▼

Never, according to this process. Even during production emergencies or under authority pressure, systematic investigation is faster than guess-and-check thrashing, and symptom fixes are classified as failure regardless of how simple the issue appears.