/iterate_plan
Iterate on existing implementation plans with thorough research and updates
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/iterate_plan
Context preview
What this command does when you run it.
Iterate on existing implementation plans with thorough research and updates
Command definition
iterate_plan.mddescription: Iterate on existing implementation plans with thorough research and updates
model: opus
Iterate Implementation Plan
You are tasked with updating existing implementation plans based on user feedback. You should be skeptical, thorough, and ensure changes are grounded in actual codebase reality.
Initial Response
When this command is invoked:
1. **Parse the input to identify**:
- Plan file path (e.g., `thoughts/shared/plans/2025-10-16-feature.md`)
- Requested changes/feedback
2. **Handle different input scenarios**:
**If NO plan file provided**:
I'll help you iterate on an existing implementation plan.
Which plan would you like to update? Please provide the path to the plan file (e.g., `thoughts/shared/plans/2025-10-16-feature.md`).
Tip: You can list recent plans with `ls -lt thoughts/shared/plans/ | head`
Wait for user input, then re-check for feedback.
**If plan file provided but NO feedback**:
I've found the plan at [path]. What changes would you like to make?
For example:
- "Add a phase for migration handling"
- "Update the success criteria to include performance tests"
- "Adjust the scope to exclude feature X"
- "Split Phase 2 into two separate phases"
Wait for user input.
**If BOTH plan file AND feedback provided**:
- Proceed immediately to Step 1
- No preliminary questions needed
Process Steps
Step 1: Read and Understand Current Plan
1. **Read the existing plan file COMPLETELY**:
- Use the Read tool WITHOUT limit/offset parameters
- Understand the current structure, phases, and scope
- Note the success criteria and implementation approach
2. **Understand the requested changes**:
- Parse what the user wants to add/modify/remove
- Identify if changes require codebase research
- Determine scope of the update
Step 2: Research If Needed
**Only spawn research tasks if the changes require new technical understanding.**
If the user's feedback requires understanding new code patterns or validating assumptions:
1. **Create a research todo list** using TodoWrite
2. **Spawn parallel sub-tasks for research**: Use the right agent for each type of research:
**For code investigation:**
- **codebase-locator** - To find relevant files
- **codebase-analyzer** - To understand implementation details
- **codebase-pattern-finder** - To find similar patterns
**For historical context:**
- **thoughts-locator** - To find related research or decisions
- **thoughts-analyzer** - To extract insights from documents
**Be EXTREMELY specific about directories**:
- If the change involves "WUI", specify `humanlayer-wui/` directory
- If it involves "daemon", specify `hld/` directory
- Include full path context in prompts
3. **Read any new files identified by research**:
- Read them FULLY into the main context
- Cross-reference with the plan requirements
4. **Wait for ALL sub-tasks to complete** before proceeding
Step 3: Present Understanding and Approach
Before making changes, confirm your understanding:
Based on your feedback, I understand you want to:
- [Change 1 with specific detail]
- [Change 2 with specific detail]
My research found:
- [Relevant code pattern or constraint]
- [Important discovery that affects the change]
I plan to update the plan by:
1. [Specific modification to make]
2. [Another modification]
Does this align with your intent?
Get user confirmation before proceeding.
Step 4: Update the Plan
1. **Make focused, precise edits** to the existing plan:
- Use the Edit tool for surgical changes
- Maintain the existing structure unless explicitly changing it
- Keep all file:line references accurate
- Update success criteria if needed
2. **Ensure consistency**:
- If adding a new phase, ensure it follows the existing pattern
- If modifying scope, update "What We're NOT Doing" section
- If changing approach, update "Implementation Approach" section
- Maintain the distinction between automated vs manual success criteria
3. **Preserve quality standards**:
- Include specific file paths and line numbers for new content
- Write measurable success criteria
- Use `make` commands for automated verification
- Keep language clear and actionable
Step 5: Sync and Review
1. **Sync the updated plan**:
- Run `humanlayer thoughts sync`
- This ensures changes are properly indexed
2. **Present the changes made**:
I've updated the plan at `thoughts/shared/plans/[filename].md`
Changes made:
- [Specific change 1]
- [Specific change 2]
The updated plan now:
- [Key improvement]
- [Another improvement]
Would you like any further adjustments?
3. **Be ready to iterate further** based on feedback
Important Guidelines
1. **Be Skeptical**:
- Don't blindly accept change requests that seem problematic
- Question vague feedback - ask for clarification
- Verify technical feasibility with code research
- Point out potential conflicts with existing plan phases
2. **Be Surgical**:
- Make precise edits, not wholesale rewrites
- Preserve good content that doesn't need changing
- Only research what's necessary for the specific changes
- Don't over-engineer the updates
3. **Be Thorough**:
- Read the entire existing plan before making changes
- Research code patterns if changes require new technical understanding
- Ensure updated sections maintain quality standards
- Verify success criteria are still measurable
4. **Be Interactive**:
- Confirm understanding before making changes
- Show what you plan to change before doing it
- Allow course corrections
- Don't disappear into research without communicating
5. **Track Progress**:
- Use TodoWrite to track update tasks if complex
- Update todos as you complete research
- Mark tasks complete when done
6. **No Open Questions**:
Read more
description: Iterate on existing implementation plans with thorough research and updates model: opus
Iterate Implementation Plan
You are tasked with updating existing implementation plans based on user feedback. You should be skeptical, thorough, and ensure changes are grounded in actual codebase reality.
Initial Response
When this command is invoked:
1. **Parse the input to identify**:
- Plan file path (e.g., `thoughts/shared/plans/2025-10-16-feature.md`)
- Requested changes/feedback
2. **Handle different input scenarios**:
**If NO plan file provided**:
I'll help you iterate on an existing implementation plan. Which plan would you like to update? Please provide the path to the plan file (e.g., `thoughts/shared/plans/2025-10-16-feature.md`). Tip: You can list recent plans with `ls -lt thoughts/shared/plans/ | head`
Wait for user input, then re-check for feedback.
**If plan file provided but NO feedback**:
I've found the plan at [path]. What changes would you like to make? For example: - "Add a phase for migration handling" - "Update the success criteria to include performance tests" - "Adjust the scope to exclude feature X" - "Split Phase 2 into two separate phases"
Wait for user input.
**If BOTH plan file AND feedback provided**:
- Proceed immediately to Step 1
- No preliminary questions needed
Process Steps
Step 1: Read and Understand Current Plan
1. **Read the existing plan file COMPLETELY**:
- Use the Read tool WITHOUT limit/offset parameters
- Understand the current structure, phases, and scope
- Note the success criteria and implementation approach
2. **Understand the requested changes**:
- Parse what the user wants to add/modify/remove
- Identify if changes require codebase research
- Determine scope of the update
Step 2: Research If Needed
**Only spawn research tasks if the changes require new technical understanding.**
If the user's feedback requires understanding new code patterns or validating assumptions:
1. **Create a research todo list** using TodoWrite
2. **Spawn parallel sub-tasks for research**: Use the right agent for each type of research:
**For code investigation:**
- **codebase-locator** - To find relevant files
- **codebase-analyzer** - To understand implementation details
- **codebase-pattern-finder** - To find similar patterns
**For historical context:**
- **thoughts-locator** - To find related research or decisions
- **thoughts-analyzer** - To extract insights from documents
**Be EXTREMELY specific about directories**:
- If the change involves "WUI", specify `humanlayer-wui/` directory
- If it involves "daemon", specify `hld/` directory
- Include full path context in prompts
3. **Read any new files identified by research**:
- Read them FULLY into the main context
- Cross-reference with the plan requirements
4. **Wait for ALL sub-tasks to complete** before proceeding
Step 3: Present Understanding and Approach
Before making changes, confirm your understanding:
Based on your feedback, I understand you want to: - [Change 1 with specific detail] - [Change 2 with specific detail] My research found: - [Relevant code pattern or constraint] - [Important discovery that affects the change] I plan to update the plan by: 1. [Specific modification to make] 2. [Another modification] Does this align with your intent?
Get user confirmation before proceeding.
Step 4: Update the Plan
1. **Make focused, precise edits** to the existing plan:
- Use the Edit tool for surgical changes
- Maintain the existing structure unless explicitly changing it
- Keep all file:line references accurate
- Update success criteria if needed
2. **Ensure consistency**:
- If adding a new phase, ensure it follows the existing pattern
- If modifying scope, update "What We're NOT Doing" section
- If changing approach, update "Implementation Approach" section
- Maintain the distinction between automated vs manual success criteria
3. **Preserve quality standards**:
- Include specific file paths and line numbers for new content
- Write measurable success criteria
- Use `make` commands for automated verification
- Keep language clear and actionable
Step 5: Sync and Review
1. **Sync the updated plan**:
- Run `humanlayer thoughts sync`
- This ensures changes are properly indexed
2. **Present the changes made**:
I've updated the plan at `thoughts/shared/plans/[filename].md` Changes made: - [Specific change 1] - [Specific change 2] The updated plan now: - [Key improvement] - [Another improvement] Would you like any further adjustments?
3. **Be ready to iterate further** based on feedback
Important Guidelines
1. **Be Skeptical**:
- Don't blindly accept change requests that seem problematic
- Question vague feedback - ask for clarification
- Verify technical feasibility with code research
- Point out potential conflicts with existing plan phases
2. **Be Surgical**:
- Make precise edits, not wholesale rewrites
- Preserve good content that doesn't need changing
- Only research what's necessary for the specific changes
- Don't over-engineer the updates
3. **Be Thorough**:
- Read the entire existing plan before making changes
- Research code patterns if changes require new technical understanding
- Ensure updated sections maintain quality standards
- Verify success criteria are still measurable
4. **Be Interactive**:
- Confirm understanding before making changes
- Show what you plan to change before doing it
- Allow course corrections
- Don't disappear into research without communicating
5. **Track Progress**:
- Use TodoWrite to track update tasks if complex
- Update todos as you complete research
- Mark tasks complete when done
6. **No Open Questions**:
The best way to get AI coding agents to solve hard problems in complex codebases.
Repo: humanlayer/humanlayer
Other commands on humanlayer.
- /ci_commit
Create git commits for session changes with clear, atomic messages
Open command - /ci_describe_pr
Generate comprehensive PR descriptions following repository templates
Open command - /commit
Create git commits with user approval and no Claude attribution
Open command - /create_handoff
Create handoff document for transferring work to another session
Open command - /create_plan
Create detailed implementation plans through interactive research and iteration
Open command - /create_plan_generic
Create detailed implementation plans with thorough research and iteration
Open command

