ワンクリックで
systematic-debugging
Reproduce-first debugging protocol — never claim fixed without reproducing the bug
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Reproduce-first debugging protocol — never claim fixed without reproducing the bug
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Review existing Architecture Decision Records. Flag ADRs whose aging signals may have triggered given current state. Categorizes each as valid / aged / superseded and suggests follow-up actions.
Author an Architecture Decision Record (ADR). Captures decisions with implications beyond the current change — lasts months, affects multiple files, hard to reverse. Records context, alternatives considered, consequences, and aging signals so the decision can be revisited when conditions change.
4-phase loop-detection and recovery protocol. Fires when an agent detects it is stuck or repeating the same tool call with no progress — before tool-loop-detection circuit-breaks at 30 calls.
Socratic exploration of requirements before implementation. Refines spec through targeted questions. Use when user asks to 'explore options', 'refine requirements', or mentions 'unclear requirements'.
Generate structured changelog from git history. Groups commits by type, filters noise, produces Keep a Changelog format. Single source of truth — no /commands wrapper.
Generate pipe-delimited commits: Tipo|IdTarea|YYYYMMDD|Descripción. Single source of truth — no /commands wrapper.
| name | systematic-debugging |
| description | Reproduce-first debugging protocol — never claim fixed without reproducing the bug |
| allowed-tools | ["Read","Grep","Glob","Bash","Write","Edit"] |
| auto-activate | bug-fixing (all levels) |
| required-before | Any bug fix implementation |
| version | 2.0.0 |
| when | [{"task_type":"bug","risk_level":["low","medium","high","critical"]},{"user_mentions":["bug","error","fix","broken","not working","fails"]}] |
| load_when | ["debugging_production_issue","investigating_test_failure","diagnosing_unexpected_behavior"] |
| inputs | [{"name":"bug_description","type":"string","required":true},{"name":"error_logs","type":"string","required":false},{"name":"reproduction_steps","type":"array","required":false}] |
| outputs | [{"name":"root_cause_analysis","type":"structured_report","format":"Symptom | Root cause | Evidence | Fix | Verification"},{"name":"reproduction_test","type":"string","format":"Test that fails before fix, passes after"}] |
| constraints | ["reproduce_bug_before_fixing","write_failing_test_before_implementing_fix","never_claim_fixed_without_verification_evidence"] |
REGLA FUNDAMENTAL: NO BUG FIXES WITHOUT ROOT CAUSE ANALYSIS.
This skill enforces a 4-phase debugging process for any bug fix.
bug at any risk level| Phase | Goal | Reference |
|---|---|---|
| 1. Reproduce | Create a test that demonstrates the bug consistently (must fail) | references/phase-1-reproduce.md |
| 2. Root Cause | Identify the real cause via 5 Whys, stack trace, logs, diff | references/phase-2-root-cause.md |
| 3. Hypothesis | Propose fix and validate before implementing | references/phase-3-hypothesis.md |
| 4. Implementation | Implement fix + defense-in-depth + regression test | references/phase-4-implementation.md |
Each phase has a CHECKPOINT — cannot proceed to the next without completing the current.
For EACH component boundary in the suspected path:
Re-run the failing scenario. Compare boundary logs across components. The bug lives where expectations diverge from reality — usually at a boundary, not within a component.
Pattern indicating an architectural problem (not a failed hypothesis):
STOP and question fundamentals:
Discuss with the user BEFORE attempting fix #4. This is NOT a failed hypothesis to retry — this is a wrong architecture to redesign.
| Need | Reference |
|---|---|
| How to write a reproducing test | references/phase-1-reproduce.md |
| 5 Whys, stack trace, logging techniques | references/phase-2-root-cause.md |
| Forming and validating a hypothesis | references/phase-3-hypothesis.md |
| Implementing fix with defense-in-depth | references/phase-4-implementation.md |
| Concrete examples by bug type (perf, security, logic, race) | references/examples-by-bug-type.md |
| Ralph Loop iterative debugging mode | references/ralph-loop-integration.md |
Phase 1: Reproduce
Phase 2: Root Cause
Phase 3: Hypothesis
Phase 4: Implementation
FOR every bug fix:
PHASE 1: Create test that reproduces bug (must fail)
PHASE 2: Identify root cause (not symptom)
PHASE 3: Form hypothesis and validate
PHASE 4: Implement + defense-in-depth + regression test
NO shortcuts. NO quick fixes. NO "I know what it is."
The most expensive bug is the one that comes back.
Auto-Activated In: All bug-fixing workflows (all risk levels)
Ralph-Ready: Yes (v2.0) — see references/ralph-loop-integration.md
Can Be Skipped: NO (mandatory for bugs medium+ risk)
Integrates With: test-driven-development, verification-enforcement, ralph-loop-wrapper