systematic-debugging

Enforces four-phase root-cause investigation before proposing any bug fix.

10|3|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/Cynthia1070711/PHYCOOL_Tools --skill systematic-debugging-cynthia1070711
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/Cynthia1070711/PHYCOOL_Tools/tree/main/config-templates/claude/skills/systematic-debugging
Command: npx skills add https://github.com/Cynthia1070711/PHYCOOL_Tools --skill systematic-debugging-cynthia1070711

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Random fixes and quick patches waste hours and mask underlying issues. This Skill forces a disciplined investigation process so bugs are fixed at their root cause instead of treating symptoms, even under time pressure, exhaustion, or authority pressure. ## Core Features & Use Cases - Four-Phase Process: Root Cause Investigation, Pattern Analysis, Hypothesis Testing, and Implementation, with a hard rule that no fix may be proposed before Phase 1 completes. - Evidence Grading: Every debug conclusion must be tagged [C] Confirmed, [D] Deduced, or [H] Hypothesized so readers can judge confidence levels. - Architecture Escalation: After three failed fixes, the process stops and questions the architecture instead of attempting a fourth patch. - Supporting Techniques: Includes root-cause call-stack tracing, defense-in-depth validation layers, condition-based waiting for flaky tests, and a test-polluter bisection script. - Use Case: A production test fails intermittently. Instead of adding arbitrary sleep timeouts, you trace the data flow backward, form a single hypothesis, create a failing test, and fix the actual source. ## Quick Start Ask the AI to debug a failing test or bug using the systematic-debugging skill and require root cause evidence 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 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. Never propose fixes before completing Phase 1.

What should I do when multiple fix attempts keep failing?

Stop after three failed fixes and question the architecture rather than attempting a fourth patch. Repeated failures where each fix reveals new problems elsewhere indicate a structural issue, not a wrong hypothesis, and warrant discussion before more changes.

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. The included condition-based-waiting reference shows polling patterns with 10ms intervals and explicit timeouts.

How do I find which test is polluting shared state?

Use the included find-polluter.sh bisection script, which runs test files one by one and checks whether a target file or directory appears after each run. It stops at the first test that creates the pollution and reports the culprit.

When is it acceptable to skip root cause investigation?

Never, according to the skill's iron law. Even for simple bugs, emergencies, or when a quick fix seems obvious, skipping Phase 1 is forbidden because symptom fixes mask underlying issues and create new bugs.

What are evidence grades in debugging conclusions?

Every conclusion must be prefixed with [C] Confirmed (direct file:line or execution evidence), [D] Deduced (traceable inference chain), or [H] Hypothesized (unverified with stated confirmation steps). This prevents presenting guesses as verified facts.