Bug Fix
Fix bug: $ARGUMENTS
Workflow
- •Reproduce - Understand exact steps to trigger bug
- •Locate - Use Task(Explore) to find relevant code
- •Root cause - Identify why bug exists:
- •Logic error?
- •Type unsafety?
- •Race condition?
- •Boundary validation missing?
- •Fix with minimal scope:
- •Fix ONLY the bug
- •Don't refactor surrounding code
- •Don't add unnecessary features
- •Verify:
- •Test the fix manually
- •Ensure no regressions
- •Check error handling
- •Commit:
code
fix: brief description Root cause: ... Fix: ... Tested: ...
Anti-Patterns to Avoid
❌ Over-engineering the fix ❌ Refactoring unrelated code ❌ Adding "improvements" beyond the bug ❌ Not testing edge cases
Reference: vercel-react-best-practices (for React bugs), supabase-postgres-best-practices (for DB bugs)