Use Case: Bug Fixing
Intake format
Start with a reproducible report:
Symptom:
Environment:
Steps to reproduce:
Expected vs actual:
Logs/trace:
Regression window (if known):
Severity triage
Classify early to choose response speed:
P0: data loss, auth bypass, production outageP1: major user flow brokenP2: degraded behavior with workaroundP3: minor/non-blocking
P0/P1 should always involve QA/security review.
Execution loop
- Reproduce exactly in a minimal environment.
- Isolate root cause (not just symptom patching).
- Implement smallest safe fix.
- Add regression tests for the failing path.
- Re-check adjacent paths likely to share the same failure mode.
Prompt template for debug-agent
Bug: <error/symptom>
Repro steps: <steps>
Scope: <files/modules>
Expected behavior: <expected>
Need:
1) root cause
2) minimal fix
3) regression tests
4) adjacent-risk scan
Common escalation signals
Escalate to QA or security when bug touches:
- authentication/session/token refresh
- permission boundaries
- payment/transaction consistency
- performance regressions under load
Post-fix validation
- original repro no longer fails
- no new errors in related flows
- tests fail before fix and pass after fix
- rollback path is clear if hotfix is required
Done criteria
Bug-fixing is done when:
- root cause is identified and documented
- fix is verified through reproducible checks
- regression coverage is in place