| name | gestrich-claude-tools-next-task |
| description | Next Phase Command |
| invoke | Execute phased work from planning documents with review and commit cycles |
Next Phase Command
This command implements phased work from a planning document. It guides the user through completing one phase at a time with review and commit cycles.
Workflow
Step 1: Check for Uncommitted Changes
First, run git status --porcelain to check for uncommitted changes.
If there are uncommitted changes:
- Show the user what files have changes
- Ask: "You have uncommitted changes. Would you like to commit them before starting the next phase?"
- If yes, help them commit with an appropriate message
- If no, proceed (their changes will be included in the phase commit)
Step 2: Identify the Planning Document
If the user specified a planning document in their prompt, use that. Otherwise, auto-select the most recently modified document in docs/proposed/ (by file modification date):
ls -lt docs/proposed/*.md 2>/dev/null | head -1
Tell the user which document was selected. Store this choice for the session.
Step 3: Analyze the Document for Phases
Read the planning document and identify all phases. Phases are ## headings with checkboxes:
## - [ ] Phase N: Description (incomplete)
## - [x] Phase N: Description (complete)
Determine:
- Total number of phases
- Which phases are complete
- The next incomplete phase (the one to work on)
Step 4: Present and Implement the Phase
Present the next phase to the user:
"Next Phase: Phase N: [Description]"
Then immediately begin implementation by:
- Reading the detailed requirements from the planning document
- If the phase lists Skills to read, invoke those skills first to load relevant conventions and patterns. The guidance from skills may adjust the implementation approach — this is expected.
- Implementing the required changes
- Updating the planning document to mark this phase as in-progress if helpful
Do NOT commit yet - wait for user review.
Step 5: Review Changes
When implementation is complete:
- Show a summary of what was changed
- Ask: "Are you OK with these changes?"
If the user says yes/ok/looks good:
If the user provides feedback:
- Make the requested adjustments
- Ask for review again
- Repeat until approved
Step 6: Check for Completion or Continue
After committing, check if this was the last phase:
If all phases are complete:
- Congratulate the user
- Ask: "All phases are complete! Would you like to move this document to
docs/completed/?"
- If yes:
- Move the file:
git mv docs/proposed/[filename] docs/completed/[filename]
- Commit: "Move completed spec to docs/completed"
If more phases remain:
- Ask: "Ready to work on the next phase?"
- If yes, go back to Step 4 with the next phase
- If no, exit gracefully
Important Guidelines
- Use "phase" - Always refer to work items as "phases"
- One phase at a time - Complete, review, and commit each phase before moving on
- User approval required - Never commit without explicit user approval
- Preserve document format - When updating phase status, maintain the existing markdown structure
- Clear communication - Always explain what you're about to do and what was accomplished
Example Interaction
> Checking for uncommitted changes...
> No uncommitted changes found.
> Auto-selected most recent plan: docs/proposed/2025-01-03-1-add-voice-commands.md
>
> Phase Overview:
> ## - [x] Phase 1: Set up voice input infrastructure
> ## - [ ] Phase 2: Implement command parsing
> ## - [ ] Phase 3: Add error handling
> ## - [ ] Phase 4: Validation
>
> **Next Phase:** Phase 2: Implement command parsing
[Claude implements the phase]
> Phase 2 implementation complete. Here's what changed:
> - Created src/voice/parser.py with command parsing logic
> - Updated src/voice/main.py to use the new parser
> - Added tests in tests/test_parser.py
>
> Are you OK with these changes?
[User approves]
> Marked Phase 2 as complete and committed changes.
>
> Ready to work on the next phase? (Phase 3: Add error handling)
[User confirms]
[Claude implements Phase 3]
Commit Message Format
Use this format for phase commits:
Complete Phase N: [Short description]
[Optional: 1-2 sentences about what was implemented]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>