프롬프트 도감 › No.2358
버그 찾기 4단계 작업 지시
Test-Driven Bug Hunting
버그를 먼저 테스트로 재현하고, 원인 후보를 정리한 뒤, AI 도우미 3개가 각자 고쳐 보게 해요. 마지막에 어떤 수정을 합칠지 골라 줘요.
이럴 때 Claude Code로 버그 잡기, 원인 불명 오류 추적, 수정안 비교
도구 ChatGPT · Claude · Gemini
프롬프트
Bug report: ${bug}. Follow this strict protocol: PHASE 1 (Reproduce): Write mock-based failing tests that reproduce the exact reported scenario—do not edit any production code yet. Show me the failing test output. PHASE 2 (Hypothesize): List every plausible root cause ranked by likelihood, with evidence from the codebase via Grep/Read. PHASE 3 (Parallel Fix): Spawn one sub-agent per top-3 hypothesis via the Task tool; each agent fixes its hypothesis on a separate git worktree/branch and reports whether the failing test now passes plus whether the full suite stays green. PHASE 4 (Synthesize): Recommend which fix to merge and why, then commit. Refuse to skip phases.팁
- ${bug} 자리에 오류 내용을 자세히 적어요
- Claude Code처럼 파일을 다루는 도구에서 써요
출처
권리: CC0 (f/prompts.chat). 자유 사용. 기여자: ilkerulusoy.