systematic-debugging

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

1|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/Emmanuel-R8/aikos --skill systematic-debugging-emmanuel-r8
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/Emmanuel-R8/aikos/tree/main/.cursor/skills/systematic-debugging
Command: npx skills add https://github.com/Emmanuel-R8/aikos --skill systematic-debugging-emmanuel-r8

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Random fixes and quick patches waste hours, mask underlying issues, and introduce new bugs. This Skill enforces a disciplined debugging methodology that finds the actual root cause before any fix is attempted, even under time pressure or social pressure to just ship a quick patch. ## Core Features & Use Cases - Four-Phase Process: Root Cause Investigation, Pattern Analysis, Hypothesis Testing, and Implementation, with mandatory completion of each phase before proceeding. - Pressure-Resistant Rules: Explicit anti-patterns, red flags, and rationalization tables that stop shortcut behavior like "one more quick fix" or guessing with timeouts. - Supporting Techniques: Root cause tracing through call stacks, defense-in-depth validation at multiple layers, condition-based waiting to replace flaky arbitrary timeouts, and a bisection script to find test polluters. - Use Case: A test fails intermittently in CI. Instead of adding sleep calls, you trace the data flow backward, find the empty variable causing the failure, fix it at the source, and add validation at each layer so the bug becomes structurally impossible. ## 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 find the root cause of a bug instead of fixing symptoms?▼

Follow a four-phase process: investigate the root cause by reading errors and reproducing the issue, analyze patterns against working examples, form and test a single hypothesis, then implement one fix with a failing test. Never propose fixes before completing the investigation phase.

How to fix flaky tests caused by arbitrary timeouts?▼

Replace setTimeout and sleep calls 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 clear timeout error, which eliminates race conditions and typically runs faster than fixed delays.

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

Stop and return to root cause investigation with the new information rather than stacking more fixes. If three or more fixes have failed, question the underlying architecture with your team instead of attempting a fourth fix, since repeated failures indicate a structural problem.

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

Use the find-polluter.sh bisection script, which runs each test file individually and checks whether the unwanted file or directory appears. It stops at the first polluting test and reports the file so you can investigate it directly.

When is it acceptable to skip systematic debugging for a quick fix?▼

Never, according to this methodology. Simple bugs have root causes too, and systematic investigation is faster than guess-and-check thrashing even during emergencies, since random fixes typically take hours while structured debugging resolves issues in 15-30 minutes.

What is defense-in-depth validation after fixing a bug?▼

It means adding validation at every layer data passes through: entry point checks, business logic validation, environment guards, and debug instrumentation. Single-point fixes can be bypassed by other code paths or mocks, while layered validation makes the bug structurally impossible.