| name | debugging |
| description | Systematic debugging for any type of issue. Activates when any error,
failure, or unexpected behavior is encountered during any task.
Root-cause investigation at the deepest architectural level.
Never symptom-by-symptom patching.
|
Debugging Skill
Core Principle
Find the generative mechanism, not the individual symptoms. Before solving any single error, examine the full error landscape to identify the deepest root cause that generates multiple symptoms.
Debugging Protocol
Phase 0: Landscape Assessment
This phase is NOT optional. It must complete before ANY individual error is touched.
- Survey all errors/symptoms — list every failure, warning, and unexpected behavior
- Read the code holistically — understand the architecture, not just the error site
- Identify patterns — are multiple errors originating from the same root?
- Find the deepest origin — where in the architecture does the problem first manifest?
- Decide: per-error fix or systemic refactor? — if the same mistake appears in multiple places, the fix is a refactor, not per-error patching
Phase 1: Reproduce
Before anything else, establish a reliable reproduction:
- Can reproduce the issue consistently
- Have a minimal reproduction case
- Know the exact steps to trigger it
- Have captured the exact error message/behavior
If you cannot reproduce, focus on reproduction first.
Phase 2: Isolate
Narrow down the problem space:
- When did it last work? Check recent changes
- What is different? Environment, dependencies, data, timing
- Where does it fail? Add logging/breakpoints to pinpoint location