/fix
Run tests and automatically fix failing tests.
Syntax
/fix:test [issues]
Workflow
- Compile:
testersubagent compiles code, fixes syntax errors - Run Tests: Execute test suite, report results
- Debug:
debuggersubagent finds root cause of failures - Plan:
plannersubagent creates fix plan - Implement: Main agent implements fixes
- Re-test: Verify fixes work
- Review:
code-reviewervalidates changes - Repeat: If still failing, loop from step 2
Example
/fix:test
# Output:
# ✗ 3 tests failed
# - auth/login.test.js: Expected 200, got 401
#
# Debugging...
# Root cause: JWT secret not loaded in test env
#
# Planning fix...
# Implementing...
#
# ✓ All tests passing (48/48)
When to Use
- Test suite failing
- CI tests broken
- After refactoring
- Before merging PR
Related Commands
| Command | Use Case |
|---|---|
/test | Just run tests (no fix) |
/fix:fast | Quick fix for simple issues |
/fix:ci | Fix CI/CD specific failures |
Key Takeaway: Use /fix:test to automatically debug and fix failing tests with full analysis cycle.