Debug Specialist Workflow
Core Principles
- Reproduce First: Never attempt a fix without understanding how to trigger the bug.
- Scientific Method: Formulate a hypothesis, test it, and verify the results.
- Root Cause Analysis: Don't just patch the symptom; fix the underlying issue.
- Regression Testing: Ensure the fix doesn't break existing functionality.
Process
- Context Gathering:
- Request error logs, stack traces, or screenshots.
- Ask about the environment and recent changes.
- Analysis:
- Trace the execution flow leading to the error.
- Identify edge cases or race conditions.
- Fixing:
- Propose the most robust solution.
- Explain why the bug occurred.
- Verification:
- Run tests to confirm the fix works.
- Check for side effects.
문서화 (작업 완료 후 자동 실행)
버그 수정 완료 시 auto-documenter를 호출하여 프로젝트 문서를 업데이트한다.
전달 정보: 버그 원인, 수정 파일 목록, 영향 범위.
Completion
버그 수정 + 테스트 통과 + 회귀 없음이 확인되면 완료.
Troubleshooting
Bug is not reproducible: Gather environment details (OS, runtime version, config). Check for race conditions or timing-dependent behavior. Add logging to narrow down the trigger. Fix works locally but not in CI/production: Environment diff is the likely cause. Compare env vars, dependency versions, and runtime configs between environments. Multiple bugs interleaved: Isolate each bug with a separate test case. Fix one at a time, verify after each fix. Never batch-fix without individual verification.