Appearance
Coding Commands
Commands for executing implementation plans.
Overview
| Command | Mode | Testing | Use Case |
|---|---|---|---|
/code | Interactive | Yes | Step-by-step control |
/code:auto | Automatic | Yes | Full plan execution |
/code:no-test | Automatic | No | Skip testing phase |
/code:parallel | Parallel | Yes | Fast multi-task execution |
Commands
/code
Interactive plan execution with phase-by-phase control.
/codeProcess:
- Reads active plan
- Executes current phase
- Pauses for review
- Prompts for next phase
Best for: First-time implementations, learning the workflow.
/code:auto
Automatic execution of all plan phases.
/code:autoOr specify a plan:
/code:auto plans/241224-1030-user-authProcess:
- Reads plan (active or specified)
- Executes all phases sequentially
- Runs tests after each phase
- Spawns code reviewer at end
- Commits on success
Execution per phase:
Phase N:
├── Read phase-N.md
├── Implement tasks
├── Run tests
├── Self-review
└── Continue to N+1Best for: Validated plans, trusted workflows.
/code:no-test
Execute without running tests.
/code:no-testProcess:
- Same as
/code:autobut skips test execution - Still performs code review
- Use when tests don't exist yet
Best for: Greenfield projects, prototype phase.
/code:parallel
Parallel task execution within phases.
/code:parallelProcess:
- Analyzes phase tasks for dependencies
- Groups independent tasks
- Executes groups in parallel
- Waits for completion before next group
Example:
Phase tasks:
├── Create user model ─┐
├── Create auth service ─┼─ Parallel group 1
├── Create login endpoint ─┘
├── Add validation ─── Depends on above
└── Write tests ─── Depends on validationRequirements: claude-flow MCP tools available.
Best for: Large phases with independent tasks.
Execution Flow
Standard Flow
/code:auto
│
▼
┌─────────────────┐
│ Load Plan │
└────────┬────────┘
│
▼ (for each phase)
┌─────────────────┐
│ Read Phase File │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Execute Tasks │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Run Tests │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Self Review │
└────────┬────────┘
│
(next phase)
│
▼
┌─────────────────┐
│ Code Review │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Commit Changes │
└─────────────────┘Error Handling
If tests fail during execution:
- Execution pauses
- Error displayed
- Options presented:
- Fix and retry
- Skip test (with warning)
- Abort execution
Use /fix:test to debug failures.
Integration with Plans
Active Plan
Commands use the active plan by default:
bash
# Set active plan
node .claude/scripts/set-active-plan.cjs plans/241224-auth
# Now /code:auto uses this plan
/code:autoSpecify Plan
Override with explicit path:
/code:auto plans/241224-1030-user-authTips
- Run
/plan:validatebefore/code:autoon complex plans - Use
/codefirst time to understand the workflow - Use
/code:parallelfor phases with 5+ independent tasks - Check plan status with
/plan:statusduring execution - If stuck, use
/fix:hardto investigate
Related
- Planning Commands - Create plans
- Fixing Commands - Debug issues
- SPARC Agents - Specialized agents