| name | bug-triage |
| description | Diagnose and prioritize bugs systematically. Use when the user reports a bug, error, crash, broken feature, or something that doesn't work. Walks through reproduction, P0-P4 classification, 5 hypothesis types (recent change, environment, race condition, dependency, data), quick-fix vs root-fix decision, and regression test addition. |
Bug Triage
When user reports a bug:
Step 1: Reproduce
- Get exact reproduction steps
- Environment (OS, Node version, browser)
- Logs / stack trace if available
- Screenshots if UI-related
Step 2: Classify
- P0 — Blocker: production down, data loss, security
- P1 — Critical: feature broken for >50% users
- P2 — Major: feature broken, has workaround
- P3 — Minor: cosmetic, edge case
- P4 — Trivial: typo, polish
Step 3: Diagnose
Hypotheses, in order:
- Recent code change? (
git log -p last 24h)
- Environment difference? (works on my machine)
- Race condition? (intermittent failures)
- External dependency? (API down)
- Data issue? (specific user/account)
Step 4: Quick fix vs root fix
- Quick fix: revert, feature flag, hotfix
- Root fix: identify and fix underlying cause
Step 5: Verify
- Test the fix
- Test regression scenarios
- Add a test that would have caught this bug
Output Format
Always structure as:
SEVERITY: Px
REPRO: [steps]
HYPOTHESIS: [most likely cause]
FIX: [minimal fix]
TEST: [how to verify]
PREVENTION: [test/monitor to add]