systematic-debugging

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

Updated May 18, 2026
One-click install
npx skills add https://github.com/fts-pro/FTS-MMIS-AFRIKA --skill systematic-debugging-fts-pro
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/fts-pro/FTS-MMIS-AFRIKA/tree/main/.agent/skills/systematic-debugging
Command: npx skills add https://github.com/fts-pro/FTS-MMIS-AFRIKA --skill systematic-debugging-fts-pro

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 behavior 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 fix flaky tests, and a bisection script to find polluting tests. - Use Case: A test fails intermittently in CI. Instead of adding arbitrary sleep delays, follow Phase 1 to reproduce and gather evidence, trace the data flow to the source, then fix at the origin with a failing test proving the resolution. ## 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 with a failing test case. Never propose fixes before completing Phase 1.

How to find the 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.

Should I apply a quick fix during a production emergency?▼

No. The skill mandates root cause investigation even under time pressure, because systematic debugging is faster than guess-and-check thrashing. Quick symptom fixes set bad patterns, mask underlying issues, and typically create new bugs requiring rework.

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. Use a waitFor helper with 10ms polling intervals and a timeout with a clear error message.

What should I do when three or more fix attempts have failed?▼

Stop attempting more fixes and question the architecture. Repeated failures where each fix reveals new problems elsewhere indicate a fundamentally wrong pattern, not a failed hypothesis. Discuss architectural refactoring with your team before continuing.

How do I find which test is polluting shared state or files?▼

Use the find-polluter.sh bisection script with the polluted path and test pattern as arguments. It runs test files one by one, checks whether the pollution appears after each run, and stops at the first offending test.