원클릭으로
neural-debug
Systematic root-cause investigation for bugs and failures
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Systematic root-cause investigation for bugs and failures
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Implementation planning with optional adversarial cross-review (Claude Code ⇄ Codex). Tasks are sequential vertical slices, each carrying its own testable behaviors. Pass --visual to also render the plan as a self-contained HTML page (PLAN.html). Pass --skills <skills> to preload skills that shape the plan and that execute loads before coding
Execute all fixes from a REVIEW.md — address warnings, blocking issues, and gaps found during review
Test-driven execution loop — one task at a time, red→green→refactor, atomic commits
Plan vs implementation verification with goal-backward analysis and test-quality audit
Move completed features from wip to archive
Socratic interview that captures domain language, decisions, and ADRs inside .neural/wip/<feature>/
| name | neural-debug |
| description | Systematic root-cause investigation for bugs and failures |
Systematic root-cause investigation for bugs and failures. Five phases: context, investigate, analyze, hypothesize, implement.
Iron Law: NO fixes without root cause. Do not patch symptoms.
Read the bug description from the arguments. If no description was provided, ask: "What bug or error are you seeing? Paste the error message, describe the behavior, or point me to the failing code."
Check for Neural feature context. Look for .neural/wip/ directories. If the bug relates to an active feature, read its CONTEXT.md, PLAN.md, and any ADRs under docs/adr/ for architectural context, intended behavior, and binding decisions.
Gather evidence. Read error messages, logs, and stack traces. Identify the exact trigger and failure point. Reproduce the issue if possible.
Map the affected files. List every file mentioned in the error or stack trace. Read each one.
Instrument component boundaries. For systems with multiple components (API → service → database, frontend → API → backend), add diagnostic logging at each boundary BEFORE reasoning about the cause:
[DEBUG-a4f2], so cleanup is a single grep laterThis is faster and more reliable than theorizing about where the bug might be. Let the logs tell you.
Do NOT guess at causes yet. Only collect facts. Note what you observe without interpretation.
Trace the code path. Follow execution from the trigger point to the failure. Identify every function call, data transformation, and conditional branch along the way.
Trace backward from the failure. Start at the exact point of failure and ask: "What called this function with this value?" Follow the chain backward through the call stack until you find where the incorrect data originated. This is often more effective than forward tracing because it starts from certainty (the error) and works toward the unknown (the source).
If you can't trace manually, add new Error().stack or equivalent stack trace capture at the failure point to see the full call chain.
Identify the broken component. Determine which specific component, function, or data flow is responsible for the failure.
Document the chain of causation. Write down: trigger → intermediate steps → failure. Be precise.
Test each hypothesis. Run targeted checks — read specific code, run specific commands, add diagnostic output. Confirm or eliminate each hypothesis.
Compare with working code. Search the codebase for similar functionality that works correctly. Compare the working version against the broken one — the difference often reveals the root cause faster than reasoning from scratch.
Recognize architectural problems. If 3 or more hypotheses have been refuted, or each fix reveals a new problem in a different location, STOP. This pattern usually signals a structural issue, not a point bug. Report to the user: "This appears to be an architectural problem rather than an isolated bug. The repeated failures suggest [pattern]. Recommend discussing the approach before attempting more fixes."
Identify the root cause. One hypothesis should survive testing. If none do, return to Phase 2 with new information.
Fix the root cause. Make the minimal change that addresses the actual problem, not its symptoms. Remove every [DEBUG-…] log you added — grep the prefix to find them all.
Verify the fix. Run the reproduction steps from Phase 2. Confirm the error no longer occurs. If the fix works but you can't explain why, that's luck, not a fix — return to Phase 3 and find the mechanism before closing.
Run tests. Execute the project's test suite to confirm no regressions.
Commit the fix (if git is initialized). Run git rev-parse --is-inside-work-tree 2>/dev/null — if the project has git, make an atomic commit describing the root cause and the fix. If no git, skip this step.
Suggest next step. Report: "Fixed! Run /neural:neural-review to verify the full feature still works."