executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
root-cause-tracingSystematically trace bugs backward through call stack to find original trigger
Independent GitHub snapshot · Automated classification · Original documentation governs
name: root-cause-tracing description: Systematically trace bugs backward through call stack to find original trigger user-invocable: false disable-model-invocation: true when_to_use: when errors occur deep in execution and you need to trace back to find the original trigger version: 2.0.0 languages: all progressive_disclosure: entry_point: summary: "Trace bugs backward through call chains to find original triggers instead of fixing symptoms" when_to_use: "When errors manifest deep in execution, unclear data origins, or long call chains. Use AFTER systematic-debugging Phase 1." quick_start: "1. Observe symptom 2. Find immediate cause 3. Ask what called this 4. Keep tracing up 5. Fix at source + add defense" references: - tracing-techniques.md - examples.md - advanced-techniques.md - integration.md context_limit: 800 tags:
Bugs often manifest deep in the call stack (git init in wrong directory, file created in wrong location, database opened with wrong path). Your instinct is to fix where the error appears, but that's treating a symptom.
Core principle: Trace backward through the call chain until you find the original trigger, then fix at the source.
This skill is a specialized technique within the systematic-debugging workflow, typically applied during Phase 1 (Root Cause Investigation) when dealing with deep call stacks.
Use root-cause-tracing when:
Relationship with systematic-debugging:
NEVER FIX JUST WHERE THE ERROR APPEARS
ALWAYS TRACE BACK TO FIND THE ORIGINAL TRIGGER
Fixing symptoms creates bandaid solutions that mask root problems.
Error appears deep in stack?
→ Yes: Start tracing backward
→ Can identify caller? → Trace one level up → Repeat
→ Cannot identify caller? → Add instrumentation (see advanced-techniques.md)
→ No: May not need tracing (error at entry point)
Example: Git init in wrong directory
Error symptom → execFileAsync('git', ['init'], { cwd: '' })
← WorktreeManager.createSessionWorktree(projectDir='')
← Session.create() → Project.create() → Test code
← ROOT CAUSE: setupCoreTest() returns { tempDir: '' } before beforeEach
At each level ask: Where did this value come from? Is this the origin?
For detailed tracing methodology, see Tracing Techniques For complete real-world examples, see Examples
Fix at source (throw if accessed before initialization) + Add defense-in-depth (validate at Project.create, WorkspaceManager, environment guards, instrumentation).
This prevents similar bugs and catches issues earlier.
For detailed information:
console.error() for debugging in tests (logger may be suppressed)STOP when thinking:
ALL of these mean: Continue tracing to find root cause.
See Integration for complete workflow examples.
From debugging session (2025-10-03):
Bottom line: Tracing takes 15-30 minutes. Symptom fixes take hours of whack-a-mole.