systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior. Enforces root cause investigation before proposing fixes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when encountering any bug, test failure, or unexpected behavior. Enforces root cause investigation before proposing fixes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when the user says "capture", or wants to remember, save, or note something for later.
Use when the user says "closeday", "close my day", or "end of day". End-of-day consolidation appended to today's Inbox note.
Use when the user says "today", "morning plan", "plan my day", "what should I work on", or asks about their priorities for the day.
Use whenever `jj root` succeeds. Use `jj` for all version-control operations; do not use `git`.
Use when the user asks to create a GitHub issue, file a bug, or track a task. Also use when the user describes a problem they found and wants to capture it.
Use when the user asks to open a PR, create a PR, or push and create a pull request.
| name | systematic-debugging |
| description | Use when encountering any bug, test failure, or unexpected behavior. Enforces root cause investigation before proposing fixes. |
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
If you have not completed Phase 1, you cannot propose fixes. Symptom fixes are failure.
Use for ANY technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.
Use ESPECIALLY when:
Do NOT skip because the issue "seems simple." Simple bugs have root causes too.
BEFORE attempting ANY fix:
Read error messages carefully. Read stack traces completely. Note line numbers, file paths, error codes. Do not skip past warnings.
Reproduce consistently. What are the exact steps? Does it happen every time? If not reproducible, gather more data -- do not guess.
Check recent changes. Git diff, recent commits, new dependencies, config changes, environmental differences.
Gather evidence at component boundaries. In multi-component systems (API -> service -> database, CI -> build -> deploy), add diagnostic logging at each boundary BEFORE proposing fixes. Run once, observe WHERE it breaks, THEN investigate that component.
Trace data flow backward. Find where the bad value appears, then ask: what called this with that value? Keep tracing up the call chain until you find the source. Fix at the source, not where the error manifests.
Do NOT implement the fix yourself. Produce a plan and hand off to the implementing skill.
.opencode/plans/ so it can be executed in a fresh session.implementing skill to execute the plan. The implementing skill handles both inline plans and .opencode/plans/ files. For inline plans, the implementing skill dispatches a subagent with fresh context -- this is the firewall against investigation fatigue leaking into the fix.Once the root cause is fixed, consider whether the bug could recur through a different code path. If so, include defense-in-depth tasks in the fix plan: validation at entry points, business logic boundaries, or environment guards. Goal: make the bug structurally impossible, not just fixed.
If you catch yourself thinking any of the following, you are skipping the process:
| Excuse | Reality |
|---|---|
| "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs. |
| "Emergency, no time for process" | Systematic debugging is faster than guess-and-check thrashing. |
| "Just try this first, then investigate" | The first fix sets the pattern. Do it right from the start. |
| "Multiple fixes at once saves time" | Cannot isolate what worked. Causes new bugs. |
| "I see the problem, let me fix it" | Seeing symptoms is not understanding root cause. |
| "One more fix attempt" after 2+ failures | 3+ failures = architectural problem. Question the approach. |
When debugging test flakiness caused by timing, replace arbitrary delays with condition polling:
# Bad: guessing at timing
sleep(300ms)
assert result exists
# Good: waiting for actual condition
wait until result exists (timeout 5s, poll every 10ms)
assert result exists
Always include a timeout with a clear error message. If an arbitrary delay IS correct (testing actual timed behavior like debounce), document WHY.