Run plan
/run-planExecute the plan at {{plan_path}} using **intelligent segmentation** for optimal quality.
--- type:prompt description: Execute aPLAN.md file directly without loading the planningskill context arguments: - name:planpath description: Path toPLAN.md file (e.g.,.planning/phases/07-sidebar-reorganization/07-01-PLAN.md ) required: true --- Execute the plan at {{planpath }} using intelligent segmentation for optimal quality. Process: 1. Verify that the plan exists and has not been executed: - Read {{plan_path }} - Check if the correspondingSUMMARY.md file exists in the same directory - If SUMMARY exists: inform the user that the plan has already been executed, and ask if they want to re-run it - If the plan does not exist: return an error and exit 2. Parse the plan and determine the execution strategy: - Extract the sections:<objective> ,<execution_context> ,<context> ,<tasks> ,<verification> ,<success_criteria> - Analyze checkpoint structure:grep "type=\"checkpoint" {{plan_path}} - Determine routing strategy: Strategy A: Fully Autonomous (no checkpoints) - Spawn a single subagent to execute the entire plan - The subagent reads the plan, executes all tasks, creates a SUMMARY, and commits - Main context: Orchestration only (~5% usage) - Go to step 3A Strategy B: Segmented Execution (has verify-only checkpoints) - Parse into segments separated by checkpoints - Check if checkpoints are verify-only (checkpoint:human-verify) - If all checkpoints are verify-only: segmented execution enabled - Go to step 3B Strategy C: Decision-Dependent (has decision/action checkpoints) - Has checkpoint:decision or checkpoint:human-action checkpoints - Subsequent tasks depend on checkpoint outcomes - Must execute sequentially in the main context - Go to step 3C 3. Execute based on strategy: 3A: Fully Autonomous Execution `` Spawn Task tool (subagent_type="general-purpose"): Prompt: "Execute plan at {{plan_path}} This is a fully autonomous plan (no checkpoints). - Read the plan for full objective, context, and tasks - Execute ALL tasks sequentially - Follow all deviation rules and authentication gate protocols - Create SUMMARY.md in same directory as PLAN.md - Update ROADMAP.md plan count - Commit with format: feat({phase}-{plan}): [summary] - Report: tasks completed, files modified, commit hash" Wait for completion → Done **3B: Segmented Execution (verify-only checkpoints)** For each segment (autonomous block between checkpoints): IF segment is autonomous: Spawn subagent: "Execute tasks [X-Y] from {{plan_path}} Read plan for context and deviation rules. DO NOT create SUMMARY or commit. Report: tasks done, files modified, deviations" Wait for subagent completion Capture results ELSE IF task is checkpoint: Execute in main context: - Load checkpoint task details - Present checkpoint to user (action/verify/decision) - Wait for user response - Continue to next segment After all segments complete: - Aggregate results from all segments - Create SUMMARY.md with aggregated data - Update ROADMAP.md - Commit all changes - Done **3C: Decision-Dependent Execution** Execute in main context: Read execution context from plan <execution_context> section Read domain context from plan <context> section For each task in <tasks>: IF type="auto": execute in main, track deviations IF type="checkpoint:*": execute in main, wait for user After all tasks: - Create SUMMARY.md - Update ROADMAP.md - Commit - Done 4. **Summary and completion:** - Verify SUMMARY.md created - Verify commit successful - Present completion message with next steps **Critical Rules:** - **Read execution_context first:** Always load files from <execution_context > section before executing - **Minimal context loading:** Only read files explicitly mentioned in <execution_context > and <context>` sections - Noskill invocation: Execute directly using native tools:do not invoke create-plansskill - All deviations tracked: Apply deviation rules fromexecute-phase.md , docume