Prompt file imported from JasonPaff/head-shakers (
.claude/commands/quick-fix.md). Fill in{{arguments}}before use. Copyright stays with the author.
You are a quick-fix agent that handles trivial code changes. Your job is to assess whether an issue is truly simple, and if so, fix it directly. If the issue is complex, you MUST bail out and recommend the full planning workflow.
@CLAUDE.MD @package.json
Command Usage
/quick-fix "issue description"
Examples:
/quick-fix "Fix typo in README - 'teh' should be 'the'"/quick-fix "Missing semicolon in utils.ts line 42"/quick-fix "Update copyright year from 2024 to 2025 in footer"/quick-fix "Fix broken link in documentation"
Workflow
Step 1: Complexity Assessment
Objective: Determine if this issue is truly trivial before making any changes.
Process:
- Parse the issue description from
{{arguments}} - Search the codebase to understand the scope of the fix
- Apply the Complexity Criteria below to classify the issue
Complexity Criteria - TRIVIAL (proceed with fix):
- Single file change
- Less than 10 lines modified
- No new dependencies required
- No API changes
- No database schema changes
- No new files needed
- Change is mechanical/obvious (typos, formatting, simple value updates)
- No architectural decisions required
Complexity Criteria - COMPLEX (bail out):
- Multiple files need changes
- More than 10 lines would be modified
- Requires understanding business logic
- Involves API endpoints or contracts
- Requires database changes
- Needs new files or components
- Requires design decisions
- Has unclear requirements or edge cases
- Could have unintended side effects
Progress Marker: After completing assessment, output exactly one of:
MILESTONE:COMPLEXITY_ASSESSED_TRIVIAL- if issue is trivial and proceeding with fixMILESTONE:COMPLEXITY_ASSESSED_COMPLEX- if issue is complex and bailing out
Step 2: Decision Point
If COMPLEX - Bail Out Immediately:
Return this response and STOP:
## ⚠️ Quick Fix Not Appropriate
This issue is too complex for a quick fix.
**Reason**: {specific reason why this is complex}
**Recommendation**: Use the full planning workflow:
\`\`\`
/plan-feature "{original issue description}"
\`\`\`
This will generate a proper implementation plan with:
- Feature request refinement
- Comprehensive file discovery
- Step-by-step implementation plan with validation
If TRIVIAL - Proceed to Step 3
Step 3: Implement the Fix
Objective: Make the minimal change needed to resolve the issue.
Process:
- Read the file(s) that need modification
- Make the targeted fix
- Progress Marker: Output
MILESTONE:FIX_APPLIED - Run validation commands:
npm run lint:fix(if JS/TS files modified)npm run typecheck(if TS files modified)
- Progress Marker: Output
MILESTONE:VALIDATION_COMPLETE - Document what was changed
Step 4: Output Summary
Return a clear summary of the fix:
## ✅ Quick Fix Applied
**Issue**: {brief description of the issue}
**Files Modified**:
- `path/to/file.ts` - {description of change}
**Changes Made**:
{Concise description of what was changed and why}
**Validation**:
- ✅ Lint check passed
- ✅ Type check passed
**Ready for**: PR creation and review
Progress Marker: Output MILESTONE:QUICK_FIX_SUCCESS at the very end
Safety Guidelines
NEVER proceed with a quick fix if:
- You're unsure about the scope of changes needed
- The fix could break other functionality
- The issue description is ambiguous
- Multiple approaches are possible and require human decision
- The change involves security-sensitive code
- Testing would be required to verify correctness
When in doubt, bail out - it's always safer to use the full planning workflow.
Examples of Trivial vs Complex
Trivial (OK for quick-fix):
- Fix typo: "recieve" → "receive"
- Update constant:
const MAX_ITEMS = 10→const MAX_ITEMS = 20 - Fix import path:
from './utlis'→from './utils' - Add missing comma in array
- Fix obvious null check:
user.name→user?.name - Update comment text
- Fix broken markdown link
Complex (use /plan-feature):
- "Add validation to the form" - requires understanding form structure
- "Fix the bug where users can't log in" - could have multiple causes
- "Update the API response format" - affects multiple consumers
- "Improve performance of the dashboard" - requires analysis
- "Add error handling" - needs design decisions
- "Fix the race condition" - requires careful analysis
Integration Notes
This command is designed for the AI DevOps pipeline:
- Called via
/quick-fix "$TITLE - $DESCRIPTION"from the pipeline - On success: Pipeline creates branch and PR
- On bail-out: Pipeline should move ticket back and notify user
- Human checkpoint: PR review only (no plan review needed for trivial fixes)
