$npx -y skills add parcadei/Continuous-Claude-v3 --skill implement_planImplement technical plans from thoughts/shared/plans with verification
| 1 | # Implement Plan |
| 2 | |
| 3 | You are tasked with implementing an approved technical plan from `thoughts/shared/plans/`. These plans contain phases with specific changes and success criteria. |
| 4 | |
| 5 | ## Execution Modes |
| 6 | |
| 7 | You have two execution modes: |
| 8 | |
| 9 | ### Mode 1: Direct Implementation (Default) |
| 10 | For small plans (3 or fewer tasks) or when user requests direct implementation. |
| 11 | - You implement each phase yourself |
| 12 | - Context accumulates in main conversation |
| 13 | - Use this for quick, focused implementations |
| 14 | |
| 15 | ### Mode 2: Agent Orchestration (Recommended for larger plans) |
| 16 | For plans with 4+ tasks or when context preservation is critical. |
| 17 | - You act as a thin orchestrator |
| 18 | - Agents execute each task and create handoffs |
| 19 | - Compaction-resistant: handoffs persist even if context compacts |
| 20 | - Use this for multi-phase implementations |
| 21 | |
| 22 | **To use agent orchestration mode**, say: "I'll use agent orchestration for this plan" and follow the Agent Orchestration section below. |
| 23 | |
| 24 | --- |
| 25 | |
| 26 | ## Getting Started |
| 27 | |
| 28 | When given a plan path: |
| 29 | - Read the plan completely and check for any existing checkmarks (- [x]) |
| 30 | - Read the original ticket and all files mentioned in the plan |
| 31 | - **Read files fully** - never use limit/offset parameters, you need complete context |
| 32 | - Think deeply about how the pieces fit together |
| 33 | - Create a todo list to track your progress |
| 34 | |
| 35 | ### Pre-Implementation Risk Check |
| 36 | |
| 37 | Before starting implementation, run a deep pre-mortem: |
| 38 | |
| 39 | ``` |
| 40 | /premortem deep <plan-path> |
| 41 | ``` |
| 42 | |
| 43 | This analyzes the plan against comprehensive checklists: |
| 44 | - Technical risks (scalability, dependencies, data, security) |
| 45 | - Integration risks (breaking changes, migration, rollback) |
| 46 | - Process risks (unclear requirements, stakeholder input) |
| 47 | - Testing risks (coverage gaps, load testing needs) |
| 48 | |
| 49 | **If HIGH severity risks are identified:** |
| 50 | - The premortem will block via AskUserQuestion |
| 51 | - User must: accept risks explicitly, add mitigations, or research solutions |
| 52 | - If mitigations are added, update the plan before proceeding |
| 53 | |
| 54 | **Skip premortem if:** |
| 55 | - Plan already has a "## Risks (Pre-Mortem)" section with mitigations |
| 56 | - User explicitly requests to skip (`--skip-premortem`) |
| 57 | |
| 58 | After premortem passes, start implementing if you understand what needs to be done. |
| 59 | |
| 60 | If no plan path provided, ask for one. |
| 61 | |
| 62 | ## Implementation Philosophy |
| 63 | |
| 64 | Plans are carefully designed, but reality can be messy. Your job is to: |
| 65 | - Follow the plan's intent while adapting to what you find |
| 66 | - Implement each phase fully before moving to the next |
| 67 | - Verify your work makes sense in the broader codebase context |
| 68 | - Update checkboxes in the plan as you complete sections |
| 69 | |
| 70 | When things don't match the plan exactly, think about why and communicate clearly. The plan is your guide, but your judgment matters too. |
| 71 | |
| 72 | If you encounter a mismatch: |
| 73 | - STOP and think deeply about why the plan can't be followed |
| 74 | - Present the issue clearly: |
| 75 | ``` |
| 76 | Issue in Phase [N]: |
| 77 | Expected: [what the plan says] |
| 78 | Found: [actual situation] |
| 79 | Why this matters: [explanation] |
| 80 | |
| 81 | How should I proceed? |
| 82 | ``` |
| 83 | |
| 84 | ## Verification Approach |
| 85 | |
| 86 | After implementing a phase: |
| 87 | - Run the success criteria checks (usually `make check test` covers everything) |
| 88 | - Fix any issues before proceeding |
| 89 | - Update your progress in both the plan and your todos |
| 90 | - Check off completed items in the plan file itself using Edit |
| 91 | - **Pause for human verification**: After completing all automated verification for a phase, pause and inform the human that the phase is ready for manual testing. Use this format: |
| 92 | ``` |
| 93 | Phase [N] Complete - Ready for Manual Verification |
| 94 | |
| 95 | Automated verification passed: |
| 96 | - [List automated checks that passed] |
| 97 | |
| 98 | Please perform the manual verification steps listed in the plan: |
| 99 | - [List manual verification items from the plan] |
| 100 | |
| 101 | Let me know when manual testing is complete so I can proceed to Phase [N+1]. |
| 102 | ``` |
| 103 | |
| 104 | If instructed to execute multiple phases consecutively, skip the pause until the last phase. Otherwise, assume you are just doing one phase. |
| 105 | |
| 106 | do not check off items in the manual testing steps until confirmed by the user. |
| 107 | |
| 108 | |
| 109 | ## If You Get Stuck |
| 110 | |
| 111 | When something isn't working as expected: |
| 112 | - First, make sure you've read and understood all the relevant code |
| 113 | - Consider if the codebase has evolved since the plan was written |
| 114 | - Present the mismatch clearly and ask for guidance |
| 115 | |
| 116 | Use sub-tasks sparingly - mainly for targeted debugging or exploring unfamiliar territory. |
| 117 | |
| 118 | ## Resumable Agents |
| 119 | |
| 120 | If the plan was created by `plan-agent`, you may be able to resume it for clarification: |
| 121 | |
| 122 | 1. Check `.claude/cache/agents/agent-log.jsonl` for the plan-agent entry |
| 123 | 2. Look for the `agentId` field |
| 124 | 3. To clarify or update the plan: |
| 125 | ``` |
| 126 | Task( |
| 127 | resume="<agentId>", |
| 128 | prompt="Phase 2 isn't matching the codebase. Can you clarify..." |
| 129 | ) |
| 130 | ``` |
| 131 | |
| 132 | The resumed agent retains its full prior context (research, codebase analysis). |
| 133 | |
| 134 | Available agents to resume: |
| 135 | - `plan-agent` - Created the im |