| name | wf-phase4-implement-sonnet |
| description | Phase 4 implementation (Sonnet) - faster implementation with less analysis. Use /wf-phase4-implement for thorough Opus implementation. |
| argument-hint | ["spec-file-path"] |
| allowed-tools | Read, Glob, Grep, Write, Edit, Bash, Task, AskUserQuestion |
| model | sonnet |
Phase 4: Implementation (Sonnet - Fast Mode)
Implement a feature according to its specification. Faster, more direct approach.
For thorough implementation with detailed analysis, use /wf-phase4-implement (Opus).
Spec to Implement
$ARGUMENTS
Instructions
Step 0: Read Project Config
- Try to read
.claude/workflow/project-config.json
- Extract values (defaults if absent):
specDir = docs/specs
archiveDir = docs/specs/archive
Step 1: Auto-Detect Spec (if not provided)
- Check
.claude/workflow/phase-context.json for recent context
- Otherwise find specs with Phase 3 consolidation but no Phase 5 verification
- If multiple, ask user which to implement
- Validate Phase 3 is complete before proceeding
Step 2: Read Documents
Read:
- Main spec file
- Phase 3 consolidation
- CLAUDE.md (skim for patterns)
Step 3: Implement
Follow the spec directly:
- Create files listed in "Files Added"
- Modify files listed in "Files Modified"
- Add configuration/constants if specified
- Update integration points if specified
- Add HTTP endpoint if specified
- Write tests from Test Strategy
Step 4: Test
Run the project's test suite (see CLAUDE.md for the specific commands):
Fix any failures, re-run until passing.
Step 5: Summary
## Implementation Complete
**Feature**: {FEATURE-ID}
### Created
- {files}
### Modified
- {files}
### Tests
- {count} tests, all passing
Step 6: Prompt for Next Step
- Read
.claude/templates/context-reminder.md if it exists and display it; otherwise display: "Context Management: Consider starting a new conversation before the next phase to free up context window for better performance."
- Use AskUserQuestion:
- header: "Next step"
- option1: label="/wf-phase5-verify (Recommended)", description="Verify implementation matches spec and all tests pass"
- option2: label="Run tests manually", description="Test the implementation yourself before verification"
- option3: label="Continue coding", description="Make additional changes before verification"