원클릭으로
debugging
Systematic root-cause investigation for hard bugs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Systematic root-cause investigation for hard bugs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Flags risky shell commands and unsafe tree ops.
Detects high-confidence security risks in code.
Surfaces the dojo's non-negotiable prime directives.
Activates the dojo framework at the start of a session.
Plans multi-step work before writing code.
Captures lessons and promotes recurring patterns.
| name | debugging |
| description | Systematic root-cause investigation for hard bugs. |
| tier | practical |
| category | workflow |
| created_by | human |
| platforms | ["windows","macos","linux"] |
| tags | ["debugging","diagnostics","root-cause"] |
| author | Andreas Wasita (@andreaswasita) |
Investigates hard or non-obvious bugs by gathering evidence, forming a hypothesis, and narrowing the search space — never by guessing or shotgun-changing code. Complements autonomous-bug-fix with deeper diagnostic technique. Does NOT replace running the failing test and reading the actual error.
view, grep, glob, and powershell Copilot tools.git for history and bisect.1. Reproduce the failure. Capture the exact error and stack.
2. Gather evidence: recent commits, environment, inputs, logs.
3. Form ONE hypothesis based on evidence.
4. Test the hypothesis with the cheapest technique that disproves it.
5. Narrow the layer, then the line.
6. Write a regression test BEFORE the fix.
7. Fix the root cause, not the symptom.
| Technique | Use when |
|---|---|
git bisect | Bug appeared recently, clean commit history |
| Print / log tracing | Need to see execution flow |
| Minimal repro | Complex system, need to isolate the variable |
| Breakpoint debugging | Need to inspect state at a specific point |
Diff analysis (git log, git diff) | "It worked before" — something changed |
| Input shrinking | Test with smaller inputs until the failure stops |
| Bug shape | First place to look |
|---|---|
| Race condition | Shared mutable state, missing await, missing lock |
| Memory leak | Growing collections, unclosed resources, retained refs |
| Performance | Database (N+1, missing index), network (uncached calls) |
| Intermittent | Timing, external dependencies, ordering assumptions |
Capture the exact failing command and full error output via the powershell tool. If you cannot reproduce locally, debugging is guessing. Stop and build a repro first.
Inspect:
git log --oneline -10.Use view to read the offending code path. Use grep to locate related call sites.
Based on evidence — not intuition — write down a single hypothesis:
"The cache is stale because invalidation runs before the write completes."
If you cannot articulate a hypothesis, you do not have enough evidence yet. Gather more.
Choose the cheapest technique that would falsify the hypothesis:
git bisect if a recent commit is suspect.Walk the request through the system:
Input → Layer A → Layer B → Layer C → Output
At each boundary, check: correct input in? correct output out? The bug lives at the boundary where correct input produces incorrect output.
Before changing code:
grep for the same anti-pattern elsewhere.If the technique was non-obvious, append to tasks/lessons.md:
- date: 2026-05-19
error_type: stale-cache
trigger: "Test passed alone, failed in suite"
root_cause: "Cache invalidated before write committed"
fix: "Made invalidation await the write"
rule: "All cache invalidations follow the source mutation, not lead it"
tasks/lessons.md).