systematic-debugging

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

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/NT-boop-star/BRMV-tract --skill systematic-debugging-nt-boop-star
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/NT-boop-star/BRMV-tract/tree/main/antigravity/skills/systematic-debugging
Command: npx skills add https://github.com/NT-boop-star/BRMV-tract --skill systematic-debugging-nt-boop-star

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 explicit gates between phases. - Pressure-Resistant Rules: Anti-patterns, red flags, and rationalization tables that stop shortcut fixes during emergencies, exhaustion, or authority pressure. - Supporting Techniques: 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. - Use Case: A test fails intermittently in CI. Instead of adding arbitrary sleep delays, follow Phase 1 to gather evidence across component boundaries, trace the bad value to its source, form a single hypothesis, and verify the fix with a failing test. ## 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: investigate the root cause by reading errors and reproducing consistently, 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 find root cause of a bug deep in the call stack?

Trace backward through the call chain from the immediate cause to the original trigger, asking what called each level and what value was passed. Add stack trace instrumentation with console.error before the failing operation, then fix at the source rather than the symptom.

What should I do when my first fix doesn't work?

Stop and return to Phase 1 to re-analyze with new information instead of stacking more fixes. If three or more fixes have failed, question the architecture itself and discuss with your team before attempting another fix.

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 care about, such as an event appearing or state changing. Poll every 10ms with a timeout, which eliminates race conditions and typically speeds up execution.

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

Never, according to this methodology. Emergencies, simple-looking bugs, and manager pressure are exactly when systematic investigation matters most, since guess-and-check thrashing is slower than disciplined debugging and symptom fixes create new bugs.

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

Use the find-polluter.sh bisection script, which runs test files one by one and checks whether the unwanted file or directory appears after each run. It stops at the first polluting test and reports the file for investigation.