version: "1.0.0" title: "RPI Iterate Plan" author: contact: angiejones description: "Update existing implementation plans based on feedback with thorough research" instructions: | 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. ## Process Steps ### Step 1: Read and Understand Current Plan 1. **Read the existing plan file COMPLETELY**: - Use file reading 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. **Spawn parallel sub-tasks for research** using subrecipes: - **find_files** (rpi-codebase-locator): Find relevant files - **analyze_code** (rpi-codebase-analyzer): Understand implementation details - **find_patterns** (rpi-pattern-finder): Find similar patterns 2. **Read any new files identified by research** FULLY into main context 3. **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 surgical changes, not wholesale rewrites - 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 - Keep language clear and actionable ### Step 5: Sync and Review **Present the changes made**: ``` I've updated the plan at `thoughts/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? ``` **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. **No Open Questions**: - If the requested change raises questions, ASK - Research or get clarification immediately - Do NOT update the plan with unresolved questions - Every change must be complete and actionable ## Success Criteria Guidelines When updating success criteria, always maintain the two-category structure: 1. **Automated Verification** (can be run by execution agents): - Commands that can be run: `make test`, `npm run lint`, etc. - Specific files that should exist - Code compilation/type checking 2. **Manual Verification** (requires human testing): - UI/UX functionality - Performance under real conditions - Edge cases that are hard to automate - User acceptance criteria parameters: - key: plan_path input_type: string requirement: user_prompt description: "Path to the implementation plan file to update" - key: feedback input_type: string requirement: optional default: "" description: "Changes or feedback to apply to the plan" sub_recipes: - name: "find_files" path: "./subrecipes/rpi-codebase-locator.yaml" - name: "analyze_code" path: "./subrecipes/rpi-codebase-analyzer.yaml" - name: "find_patterns" path: "./subrecipes/rpi-pattern-finder.yaml" extensions: - type: builtin name: developer timeout: 300 bundled: true prompt: | {% if plan_path %} Let me read the existing plan and understand the requested changes. Plan: {{ plan_path }} {% if feedback %} Requested changes: {{ feedback }} {% else %} What changes would you like to make to this plan? 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" {% endif %} {% else %} 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/plans/2025-01-08-feature.md`). Tip: You can list recent plans with `ls -lt thoughts/plans/ | head` {% endif %}