Instruction file imported from while-linhhq/transpot-sv-webapp (
.cursor/rules/command-fix-issue.mdc). Copyright stays with the author.
Fix Issue Command
Description
Analyze and fix a reported bug or issue systematically.
Usage
Tell the AI: "Fix issue: [describe the issue]" or "Fix bug in [file/module]"
Process
1. Understand the Issue
- Read the error message or bug description carefully
- Identify the affected component(s)
- Reproduce the issue locally if possible
2. Root Cause Analysis
- Check recent git changes:
git log --oneline -20 - Review affected files
- Look for related tests that may reveal expected behavior
3. Plan the Fix
- Identify the minimal change needed
- Consider side effects on other components
- Update or add tests to cover the fix
4. Implement
- Make the targeted fix
- Ensure code follows
.cursor/rules/code-style.mdc - Handle errors per
.cursor/rules/error-handling.mdc
5. Verify
- Run relevant tests:
npm test -- --testPathPattern=[affected] - Run full test suite:
npm test - Check linting:
npm run lint
6. Commit
Follow rules/command-git-commmit.mdc (commit spec inside):
fix: [short description of the fix]
Closes #[issue-number]