Bug Fix Verification
Systematic workflow for verifying bug fixes to ensure quality and prevent regressions.
When to Use This Skill
Use this skill when:
- Fixing a reported bug
- Creating PR for bug fix
- Need to document bug fix verification
- Want to ensure fix doesn't introduce regressions
- Need structured approach to bug resolution
Why Bug Fix Verification Matters
Problems It Solves
- ❌ Fixing symptoms instead of root cause
- ❌ Introducing new bugs while fixing old ones
- ❌ Incomplete testing of edge cases
- ❌ No proof that bug is actually fixed
- ❌ Poor documentation of fix reasoning
Benefits
- ✅ Confirms bug is truly fixed (not masked)
- ✅ Documents root cause analysis
- ✅ Prevents regression with tests
- ✅ Provides clear evidence for stakeholders
- ✅ Improves team knowledge of codebase
Bug Fix Workflow
Step 1: Reproduce Before Fix
Critical: Never fix a bug without first reproducing it.
Reproduction Checklist
- Document exact steps to reproduce
- Capture error message/behavior with screenshots
- Note frequency (100% reproducible, intermittent, etc.)
- Video recording if UI-related or complex interaction
- Identify affected versions/environments
- Note any workarounds users have found
- Verify bug exists in clean environment (not just local)
Reproduction Documentation Template
Step 2: Root Cause Analysis
Investigate WHY the bug occurs, not just WHAT happens.
Investigation Steps
- Review Error Logs: Check server logs, browser console, error tracking
- Trace Code Path: Follow execution from trigger point to error
- Identify Breaking Point: Find exact line/function where bug occurs
- Understand Context: Why does code behave this way?
- Check Recent Changes: Did recent commit introduce this?
- Review Related Code: Are there similar patterns elsewhere?
Root Cause Documentation
Step 3: Implement Fix
Fix the root cause, not the symptom.
Fix Guidelines
- Minimal Change: Fix only what's necessary
- Defensive Coding: Add validation/guards
- Consistent Patterns: Follow existing error handling patterns
- Type Safety: Use types to prevent similar bugs
- Documentation: Comment non-obvious fixes
Example Fix
Step 4: Verify Fix
Prove the bug is fixed through systematic testing.
Verification Checklist
- Follow same reproduction steps
- Confirm bug no longer occurs
- Test edge cases around the fix
- Verify no new errors introduced
- Check fix works across environments (dev, staging)
- Validate fix matches expected behavior
Verification Documentation
Step 5: Add Tests to Prevent Regression
Critical: Every bug fix must include tests.
Test Requirements
- Test that reproduces original bug (should pass after fix)
- Tests for edge cases discovered during investigation
- Integration test if bug involved multiple components
- Update existing tests if they need to handle new scenarios
Example Tests
Step 6: Document in PR
Comprehensive PR description for bug fixes.
PR Template for Bug Fixes
Common Pitfalls to Avoid
During Investigation
- ❌ Assuming you know the cause without verifying
- ❌ Fixing symptoms instead of root cause
- ❌ Not checking if similar bugs exist elsewhere
- ❌ Skipping reproduction in clean environment
During Implementation
- ❌ Making changes beyond fixing the bug
- ❌ Refactoring unrelated code in bug fix PR
- ❌ Adding features while fixing bugs
- ❌ Not handling all edge cases discovered
During Verification
- ❌ Only testing happy path after fix
- ❌ Not testing in multiple environments
- ❌ Skipping regression testing
- ❌ Not documenting what was tested
During Documentation
- ❌ Vague PR descriptions ("Fixed bug")
- ❌ Not explaining root cause
- ❌ Missing before/after evidence
- ❌ Not linking to original bug report
Bug Fix Quality Standards
Minimum Requirements
- ✅ Root cause identified and documented
- ✅ Fix is minimal and targeted
- ✅ Tests added to prevent regression
- ✅ Verification documented with evidence
- ✅ No new bugs introduced
- ✅ Works across all supported environments
Excellence Indicators
- ✅ Similar patterns checked and fixed
- ✅ Multiple edge cases tested
- ✅ Performance impact measured
- ✅ Team knowledge shared (wiki/docs updated)
- ✅ Preventive measures suggested
Automation Support
Bug Fix PR Template
Create .github/PULL_REQUEST_TEMPLATE/bug_fix.md:
GitHub Actions for Bug Fix PRs
Success Criteria
Bug Fix is Complete When
- ✅ Bug can no longer be reproduced
- ✅ Root cause is understood and documented
- ✅ Fix is minimal and targeted
- ✅ Tests prevent regression
- ✅ Edge cases are handled
- ✅ Works in all environments
- ✅ PR documentation is comprehensive
- ✅ No new issues introduced
Related Skills
universal-verification-pre-merge- Pre-merge verification checklistuniversal-verification-screenshot- Visual verification for UI bugsuniversal-debugging-systematic-debugging- Systematic debugging methodologyuniversal-debugging-root-cause-tracing- Root cause analysis techniquesuniversal-testing-testing-anti-patterns- Testing patterns to avoid


