planprocess
Use when the user asks to "execute the plan", "run the plan", "/ar:planprocess", or "/ar:pp". Executes an approved plan step by step with the wait process, task tracking, and verification before each
SKILL.mdplugins/autorun/skills/planprocess/SKILL.md
GitHubExecute an Approved Plan (/ar:planprocess)
<purpose>This skill executes a plan that is already written and approved. It starts
autorun's three-stage execution for that plan: work through every step, run the
wait process after each one, and claim completion only with evidence. To write
or improve a plan first, use /ar:plannew or /ar:planrefine.
The user's argument is the plan's path or the task it covers. With no argument, execute the plan approved most recently in this session.
Harness-specific plan lifecycle
- Claude Code: Use
EnterPlanModeandExitPlanModewhere this skill instructs;ExitPlanModeis the approval boundary. - Pi: Do not call
EnterPlanModeorExitPlanModeon Pi because Pi exposes neither tool. Write or refine the durable plan note directly, report its exact path for approval, and after approval start execution with/ar planprocess <path>. - Native task tracking is conditional: Before following any task-operation instruction below, use only a mutation tool that the current session actually exposes. Claude uses
TaskCreate/TaskUpdate; Pi and Prime use those tools only when the autorun extension registered them; Codex uses the flatupdate_planchecklist only when exposed (update_planis unavailable in Codex Plan mode). If no native task mutation tool is available, keep progress in the durable Markdown checklist, do not call or retry an unavailable task tool, and report that native task state was not updated. Every unqualifiedTaskCreate,TaskUpdate, dependency, andTaskListinstruction below is conditional on those capabilities. - Other harnesses: Use a native plan-mode boundary and native task tracking only when those tools actually exist; otherwise use the same durable-note approval and checklist workflow as Pi with that harness's documented autorun command spelling.
<requirements>
Rules that survive compaction
If this session was compacted, these rules still apply without exception:
Execute only an approved plan. If the plan has not been approved, stop and ask for approval: on Claude Code through
ExitPlanMode, on Pi by reporting the durable plan note path.When TaskCreate is exposed, ALL plan steps require TaskCreate. If another native checklist mutation tool is exposed, track every step with that tool instead. Otherwise, use the durable Markdown checklist as required by the capability rule above.
Before writing any code, scaffold every task and check it is visible in
TaskList. For each implementation step N:TaskCreate(subject="[TDD] Step N: Write tests for <step description>")TaskCreate(subject="[EXEC] Step N: <step description>")TaskUpdate([EXEC] task, addBlockedBy=[[TDD] task]): tests must pass before implementationTaskUpdate([EXEC] Step N, addBlockedBy=[[EXEC] Step N-1]): steps run in order
Then
TaskCreate(subject="[VERIFY] Run full test suite and confirm all steps complete").Keep tasks current:
TaskUpdate(status="in_progress")before starting a step,TaskUpdate(status="completed")only when its tests pass and its requirements are met, thenTaskListto find the next one. Unexpected blocking work getsTaskCreate(subject="[BLOCKER] description")at once. After every 3 tool calls, check that the current task isin_progress.Never delete content from plan files. Only add or make micro-edits: tick checkboxes, append results and new user messages to the plan's quoted list. Read before editing; verify after.
Concrete evidence for every claim: file paths,
file:lineranges, function names, exact error messages, the exact commands run and their output, and full URIs for every external source.
Hold each step to these principles: TDD (test first, location named), DRY, OODA before each decision, KISS, YAGNI, SOLID, RAII (resources released) and WOLOG (the solution generalizes as far as it should, no further).
</requirements><workflow>
Process
Load the plan. Read the whole plan file. List its steps, its quoted user messages and its verification commands. If a step's premise is false in the code (a cited line moved, a file is gone), record that in the plan and fix the step before executing it.
Create the tasks of rules 2 and 3.
For each step, in dependency order:
- Mark it in progress.
- Write or update the test first and run it; see it fail for the stated reason.
- Make the change.
- Run the step's verification command and read the output.
- Output the exact string "Wait," and run the wait process below out loud, step by step.
- Tick the plan's checkbox and complete the task only when the check passed and any error correction is done.
Delegate independent work in parallel when it helps (subagent table below), then verify every finding yourself: Read every file reference, confirm code snippets match the file, cite
file:lineranges, mark anything you could not verify "[UNVERIFIED]", and never pass on an unchecked claim.Name each competing approach with an incrementing version (
<taskname>-v1,<taskname>-v2) so a later note can say which one was tried and why it changed.Final verification before any completion claim:
- Primary use case works
- Every edge case in the requirements is covered
- Every language and platform named is covered
- Every file type and format named is handled
- Every user example is addressed
- No requirement was silently dropped
Then check your work again: verify file references with Read, confirm code runs, check
TaskListfor skipped steps. If any case is missing, return to its step.
Wait process
After outputting "Wait,", execute these 8 steps:
- Elaborate Best Practices: Elaborate and refine best practices lists (create new lists if none exist yet) as numbered list for current context; keep refining as new circumstances develop
- Comprehensive Critique: Harshly and constructively critique overall + line-by-line against every single best practice and criteria
- Pre-mortem Analysis: Identify potential failure modes, edge cases, weaknesses. Assume disaster → determine what went wrong → prevent those outcomes
- Multiple Solution Generation: Propose ≥3 concrete solutions (high-level + specific code quotes) to each identified issue in your task, critiques, and pre-mortem analysis
- Synthesized Solution Building: Synthesize insights from all cumulative context including all previous critiques, the original work (if applicable), all previous proposed solutions, and all accumulated best practices to create refined solutions that incorporate lessons learned from the complete analysis
- Sequential Quality Enhancement: Each proposal builds on the benefits of previous iterations
- Best Solution Selection: Choose the optimal solution from all proposals including the original, synthesized, or combinations of all proposals, in ranked order with the reason for each rank
- Error Correction Protocol: On error: immediately TaskCreate(fix) → TaskUpdate ALL steps from error point onward (failed_step and all subsequent steps) back to "pending" or "in_progress" status → Update dependencies (addBlockedBy) for reset steps to reflect corrected sequence → execute corrective steps → return to the step that produced the error and redo from there
Before ticking a step, answer yes to each: Is the code clean, robust and concise? Is the plan file up to date with what was learned? Does the change fit the existing code and patterns? Does it handle each backend the plan names?
</workflow><delegation>
Subagents
| Subagent Type | When to Use |
|---|---|
| Explore | Codebase exploration, finding patterns, understanding implementations |
| Plan | Designing approaches, alternatives, architectural decisions |
| code-architect | Complex architectural planning (Claude Code feature-dev plugin, when installed) |
| code-explorer | Deep analysis of existing features (same plugin) |
| code-reviewer | Code quality, bugs, security review (Claude Code pr-review-toolkit plugin, when installed) |
| pr-test-analyzer | Test coverage analysis (same plugin) |
Launch independent subagents in one message so they run in parallel.
</delegation><acceptance_protocol>
Execution protocol
Execution mode
- Continue the uninterrupted, autonomous, non-interactive, patient and safe execution of the plan until every step is verified.
- Work carefully and concretely, per your instructions and the definition of concrete in rule 6.
- Bias mitigation: be cautious and check your assumptions and your work; explore the environment to learn what is already done, because overconfidence leads to duplicated work and to calling incomplete tasks "complete" or "production ready".
System stop signals. Never output either unless its condition is met:
AUTORUN_STATE_PRESERVATION_EMERGENCY_STOPAUTORUN_ALL_TASKS_COMPLETED_AND_VERIFIED_SUCCESSFULLY
Safety protocol. Run it only when a step involves a high-risk or irreversible action (database operations, file deletion, state modification).
- Assess risk: is the action irreversible, or could it corrupt state?
- Mitigate: if it is high-risk, say what you do at each step:
- Announce 'INITIATE SAFETY PROTOCOL'.
- Create a backup or state checkpoint before proceeding.
- Verify the checkpoint succeeded.
- List the options, evaluate their failure modes, select the best.
- Escape pre-check: if the risk is still irreversible after mitigation, go to step 4.
Escape to stop: only if the action is irreversible, catastrophic or cannot be mitigated, output this exact string to halt all actions: AUTORUN_STATE_PRESERVATION_EMERGENCY_STOP
Final output on success: when every step is complete and verified, check once more where your tasks come from and whether anything was missed, then output this exact string: AUTORUN_ALL_TASKS_COMPLETED_AND_VERIFIED_SUCCESSFULLY