/fix - Quick Bug Fix
Rapidly fix small bugs with root cause analysis and TDD verification.
Input
- Bug or issue description:
$1
- OR: Suggestion ID from
/audit output (e.g., /fix SUG-001)
- If
$1 is empty → select fix type via AskUserQuestion
- Scope: small, well-understood issues (1-3 files)
Fix Prompt
| Question | Options |
|---|
| Fix type | Bug fix / Error message / Test failure |
| Description | [free text via Other] |
Suggestion ID Mode (/fix SUG-XXX)
| Step | Action |
|---|
| 1 | Read latest snapshot from $HOME/.claude/workspace/history/ |
| 2 | Find matching suggestion by ID |
| 3 | Apply fix directly (skip 5 Whys) |
| 4 | Verify tests pass |
Skills & Agents
| Type | Name | Purpose |
|---|
| Skill | analyzing-root-causes | 5 Whys methodology |
| Agent | test-generator | Regression test creation (fork) |
| Agent | build-error-resolver | TypeScript/build error fix |
Execution
Build Check
Run project build command (detect from package.json or project config).
| Result | Action |
|---|
| Build errors | Task with subagent_type: build-error-resolver |
| No errors | Continue to Step 1 |
Standard Flow (No Build Errors)
| Step | Action |
|---|
| 1 | Root cause analysis (5 Whys) |
| 2 | Task with subagent_type: test-generator for reg test |
| 3 | Fix implementation |
| 4 | Verify all tests pass |
Escalation
| Confidence | Action |
|---|
| [?] <70% | Escalate → /research |
| Complex | Multi-file → /code |
| New scope | Feature → /think |