What problem does it solve?
This skill addresses the challenge of debugging errors that manifest deep within the call stack, preventing symptom-fixing and ensuring the true source of invalid data or incorrect behavior is identified. It provides a systematic method to trace issues backward, saving significant debugging time and leading to more robust solutions.
Core Features & Use Cases
- Backward Tracing Process: Guides through observing symptoms, finding immediate causes, and tracing up the call chain to the original trigger.
- Instrumentation for Debugging: Instructs on adding
console.error() with stack traces to pinpoint problematic operations.
- Test Polluter Identification: Provides a script (
find-polluter.sh) to isolate which test introduces unwanted files or state.
- Root Cause Principle: Emphasizes "NEVER fix just where the error appears," promoting deep understanding over superficial patches.
- Use Case: When a
git init command unexpectedly creates a .git directory in the wrong location, use this skill to trace back through the call stack, identify the empty projectDir parameter, and find the exact test setup that caused the incorrect value.
Quick Start
I'm seeing an error deep in the execution stack. Use the root-cause-tracing skill to find the original trigger.