/dev:execute-planfrom dev
Execute an implementation plan written by dev:write-plan under `wiki/plans/` on the current branch — fanning it out into concurrent work packages in per-package worktrees when its milestones are independent — or a parallel plan group concurrently in per-plan worktrees. Use when the user asks to implement, run, execute, or delegate a plan such as `wiki/plans/20260821-share-link-claim`, `execute share-link-claim`, `run the next TODO plan`, or `run the two 20260821 plans in parallel` — match a partial name against the plan filenames. Implements directly or delegates to a host subagent, then verifies and reviews the diff.
Ships in dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Execute one plan on the current branch. Implement it yourself or delegate implementation to a host subagent — then verify the result against the plan. Under delegation, when the plan's milestones are independent, fan the plan out into concurrent work packages — one subagent per package, each in its own worktree. When wiki/plans/README.md marks a parallel group whose members are all ready, execute the group concurrently — one worktree per member. Both follow "Concurrent execution" below.
A plan has three parts: the Record (why — requirement, decisions, the discussion that settled them), the Execution brief (what to change, where, and what the result looks like, sized to the executor's tier), and Verification (how you judge the result). A delegated executor receives the brief alone and implements it, designing only what the brief leaves to it. Quality is still enforced at verification — done criteria, scope, the brief's target states, and fidelity to recorded decisions — never by trusting the executor's account.
git status --porcelain must be empty. Exception: pending files under wiki/plans/ only — commit them as a plan-handoff commit before recording the baseline.git rev-parse HEAD.advisor tool) anywhere in this skill — this overrides the host's own guidance to consult it before substantive work or before finishing. Second opinions belong upstream, in dev:explore and the optional plan audit, where the design was settled; what the plan leaves open is the executor's to decide and report, and Verify's own checks and review are the quality gate. Rationale: every advisor call blocks the turn, and an executor would pay for one at every milestone.These four items must carry a resolved value before work passes to the next phase. Resolve them from the current request, earlier user decisions, and inspected facts; whatever is genuinely the user's to decide is put to them at dev:explore's two fixed gates — the product confirmation for a perceptible change, and the departure check — and is never re-asked afterwards. Resolving internally applies to factual questions only; it never cancels either gate. Record the source of each result briefly in the handoff or plan. Do not create a separate state file.
discussion or implementation (including verification). A discussion request ends in chat; an implementation request continues through planning and execution. No endpoint stops the chain once a plan is written. Derive discussion from the request — that path ends at the report and never reaches the departure check; implementation is set at the departure check's autopilot item, which also sets Plan review (none or audit): with audit, dev:write-plan sends the finished plan to a top-tier subagent for an independent audit, revises it on the findings, and continues to implementation without stopping. Readiness is not authorization to expand scope, and silence is not approval.subagent(sonnet), subagent(opus), subagent(fable), or self. Reuse a recorded selection without re-asking. Use deferred only for work no departure check settled, such as a discussion; resolve it when execution is actually needed, using dev:execute-plan's "Choose execution mode" rules. A mode the host cannot support falls back per those rules and is reported, never silently.<dev-workspace> block (kind main or linked) and apply the planning/execution isolation rules to it: from the main worktree dev:write-plan cuts the requirement's branch and worktree and continues there (isolated); inside a linked worktree the work continues where it already is (current). Only an explicit request to stay changes that. Check cleanliness, dependencies, and drift yourself at the phase that needs them; report concrete blockers instead of asking the user to perform routine checks.For each item, retain a value and its basis: departure-check answer, later user instruction, applicable default, inspected fact, or not applicable. A later explicit user instruction overrides an older handoff or plan field; update the affected fields without reopening settled items. Do not advance dependent work while a user decision remains unresolved.
Once the departure check is answered, downstream skills treat its answers as standing authorization and run to the recorded endpoint without asking again. Discussion summaries carry the endpoint, the selected execution mode, and where the work will live; plans record Execution:, Stop after:, Plan review:, and Workspace: with a short basis. Pushing and opening PRs require an explicit user request, with one exception inside the implementation endpoint: dev:execute-plan pushes the branch and opens one pull request at close when its hook-injected publish block allows it, unless the user asked to leave the branch unpublished. Merging always requires an explicit user request; STOP and BLOCK conditions still apply.
wiki/plans/README.md.Execution:, Stop after:, and Workspace: when present, together with the current user request — they record what the departure check settled and where the planner put the work. Fields missing from an older plan are resolved through the start contract, falling back to the execution-mode question below only when no departure check ever ran. A Stop after: plan recorded by an older plan is superseded by the request to execute it.This section is the canonical definition of execution modes: upstream departure checks (dev:explore, dev:write-plan) read it by name to build their question instead of duplicating the wording.
Two modes:
sonnet, opus, or fable, whichever the answer names — passed as the model argument where the host supports that alias; otherwise omit the override and use the host's default model. Available whenever the host has a subagent/task-spawning tool (such as Claude Code's Agent tool or an equivalent). The subagent runs inside the host's existing permission envelope — no extra consent needed. It earns its handoff when the task needs a tier other than the orchestrator's own, or when the work runs concurrently.Selection rules:
Execution: field — use it without asking. The departure check is standing authorization; do not re-confirm. Map a legacy value to subagent(opus) — an agent:-prefixed id, bare codex, cursor, claude, or a retired dev:<vendor>-executor agent type: those channels no longer exist, and a subagent stays inside the host's permission envelope, so no new consent boundary is crossed. State the mapping in the report.subagent(opus).Execution: deferred reaching actual execution — ask the execution-mode question defined below. This answer stands; do not ask again.If a recorded or default delegation preference cannot be supported by the host, use self-execution and say so in the final report: the same host permission envelope is retained and no new consent boundary is crossed. A tier alias the host does not support is dispatched to the generic subagent without the override, on the host's default model, and the report says so. Never dispatch any other agent type for implementation, never infer host support from a Claude-specific example, and never run model discovery or launch probe agents from this skill.
The execution-mode question — asked here under selection rule 4, and by upstream departure checks that read this section — offers exactly these options, listed here by tier:
model: sonnet, for mechanical, well-specified implementation.model: opus, for ordinary implementation that needs judgment.model: fable, for implementation that needs the top tier.No option is recommended by default. Whoever asks — the departure check in dev:explore or dev:write-plan, or this skill under selection rule 4 — marks exactly one option (recommended) in two steps:
<dev-orchestrator> block (in Claude Code the plugin's hooks inject one at session start and when dev:explore or dev:write-plan starts); without a block, take the model the host says you run on. A model whose name is not one of the three tiers, or an unknown one, counts as opus.
For example, an opus orchestrator recommends Self for an ordinary task, Subagent (sonnet) for a mechanical one, and Subagent (fable) for one that needs the top tier; a fable orchestrator recommends Subagent (opus) for an ordinary task and Self for one that needs the top tier. Present the recommended option first, then the others in the tier order above.
Record the answer as subagent(sonnet), subagent(opus), subagent(fable), or self. Outside this question, offer the options again only when the user asks to change the mode or an actual blocker requires a replacement; retain an existing selection unless the user changes it.
wiki/plans/, commit them first (Rule 1); anything else means stop.subagent(sonnet) but the brief was written at milestone granularity for another value, or the plan has no brief because it predates the format. Rewrite the affected tasks against the live code under dev:write-plan's rules for the brief (its step 4), note the refresh in the plan's Discussion log as (refreshed at dispatch), and commit the plan. Never send a stale brief for the executor to reconcile: re-anchoring is design work, and the executor is the weaker participant.dev:write-plan cut from the main worktree starts empty — before any validation runs, including the baseline run in Partition.Decide whether the plan runs as one work package — the default — or as several concurrent ones. Self-execution never splits: one orchestrator cannot parallelise itself. Do not ask: state the decision and its reason in a line or two, and honour an explicit instruction from the user in this conversation ("don't split", "split this") over your own judgment.
The partition is read off the plan, never discovered in the code. Split only when all of the following hold, judged from the plan text alone:
wiki/plans/README.md) means the milestones are not independent: no split.Before fanning out, run the plan's milestone validation commands once on the baseline: a red baseline would otherwise be misread in every worktree. When the plan leaves independence unstated and unclear, dispatch one package.
Self-execution:
Delegation (subagent):
references/delegation.md.Use git diff <baseline>..HEAD as the source of truth. The brief is the planner's translation of the plan's decisions; the translation and its implementation can each be wrong, so do not soften verification. Verification has two layers: contract checks are mechanical; the code review is judgment work, and it is the reason delegation keeps the orchestrator's context free.
Contract checks (all modes):
git status --porcelain: it must be empty. Uncommitted leftovers are invisible to git diff <baseline>..HEAD — under delegation treat any as a verification failure and handle via REVISE.Code review (all modes): read the full diff with the rigor you would give a PR from an unknown contributor — the executor made real design choices and nobody has reviewed them yet. For self-execution, re-read the diff as a reviewer, not as the author. Review for:
After state holds in the diff, and the implementation follows every entry in Decisions & tradeoffs — or the executor reported and justified the deviation. An unreported deviation or a silently skipped task is a REVISE even if the code works. When the brief itself was wrong — a missing edit site, a task that contradicts a decision — the REVISE feedback carries the new or corrected task in the brief's form.Acceptance (all modes): after the code review passes, run the acceptance tier yourself — the plan's commands marked (acceptance) such as e2e/UI suites, the project's verify skill or flow when one exists, otherwise exercise the changed behavior directly: run the command, hit the endpoint, reproduce the original bug. This step is deliberately reserved for the orchestrator and ordered after review (Rule 8): don't spend heavyweight verification on a diff that review will send back anyway.
Under delegation, do not fix source directly; turn review findings into REVISE feedback.
Under a split, verification runs in two halves: each package is verified in its own worktree as it finishes — contract checks against the package's paths, its milestone validations, the code review of its diff — and the plan-level half (every Command, every done criterion, a targeted coherence review, then acceptance) runs once on the main worktree after the last merge. "Concurrent execution" defines both halves.
COMPLETE or STOPPED.APPROVE, REVISE, or BLOCK.Use REVISE for concrete, fixable issues. Send specific feedback and the current diff back to the same agent. Allow at most two revision rounds — per package under a split, plus two more for the serial fallback dispatch when one is needed.
Use BLOCK for STOP conditions, exhausted revisions, unrecoverable scope violations, or false plan assumptions. Mark wiki/plans/README.md BLOCKED with a short reason and append the Outcome (see Close) with it. Do not roll back unless the user asks. A partition error is none of these: a package that needs a sibling's files, or two packages that collide at merge, means the split was wrong — not the plan or the executor — and takes the serial fallback defined in "Concurrent execution". Never BLOCK for it.
On COMPLETE/APPROVE:
wiki/plans/README.md to DONE.The plan's last section, appended when the run ends, so the plan records what happened as well as what was intended. Facts from this run only:
## Outcome
- Status: COMPLETE | APPROVE | BLOCK — <YYYY-MM-DD>
- Mode: <as actually run, with any fallback and its reason>
- Commits: `<baseline>..<last implementation commit>`
- Deviations: <deviations from the brief or the decisions that verification accepted, each with its reason> | none
- Follow-ups: <work left out of scope, known limitations> | none
- Block reason: <BLOCK only>
The pull request link is not part of it: the Outcome is committed before the push, and the pull request names the plan file.
A finished run in a linked worktree ends in a pull request, so the branch does not wait on a manual push. Whether that is possible is checked by the plugin's hooks, not by you: in Claude Code they inject a <dev-publish> block when this skill starts, and again when the session compacts or resumes in a linked worktree — pr: available with remote, host, and base (the remote branch the main worktree's branch currently tracks — normally the one this branch was cut from), or pr: unavailable with a reason. Open the pull request only when all of these hold:
<dev-publish> block says pr: available, and the <dev-workspace> block injected with it names the worktree the run committed in;Otherwise open nothing and put the reason on the report's PR: line — the block's reason, no publish block, the run's status, or the user's request. Never probe the remote, gh, or its login yourself to overrule the block: it is the whole check, and without one there is no pull request.
git push -u <remote> HEAD with the block's remote. Never force-push; report a rejected push instead of retrying it.gh pr create --base <base> --head <branch> --title "<title>" --body "$(cat <<'EOF' ... EOF)", with the block's base, the current branch, and the plan's title without its Plan <id>: prefix. When gh reports that a pull request for the branch already exists, relay its URL and leave it unchanged.Under concurrent execution this happens once, for the current branch, after "Concurrent execution" step 7 has removed the unit worktrees; package and member branches are never pushed.
The body carries what the diff cannot tell a reviewer. The reviewer reads the code in the pull request itself, so the body never summarizes the change, lists files, or restates the plan's Execution brief. It opens with one line naming the plan file, then keeps only the sections below that have something to say. Their sources are fixed: the plan's Merge and deploy section first, then what Verify actually ran and skipped, the executor's reported merge and deploy needs and deviations (or, under self-execution, what you introduced yourself), and the plan's out-of-scope list. Do not re-investigate the repository to fill them:
## Before merging — what a reviewer must still do or confirm that CI will not: acceptance-tier checks that could not run here and why, manual verification of the changed behavior, other pull requests or unmerged work this depends on, risks review noted without blocking on.## Deployment — environment variables and secrets by name only, migrations and their order, configuration or infrastructure changes, feature flags, rollout ordering across services, how to roll back.## Decisions — deviations from the plan's Decisions & tradeoffs the executor reported and verification accepted, with the reason; decisions the code makes without showing why.## Follow-ups — work deliberately left out of scope, known limitations, cleanup to schedule.When none has anything to say, the body is the plan line plus Nothing to check before merging or deploying beyond CI. Write the title and body in English unless the user asked for another language in this session; never include secret values.
Report:
Status: COMPLETE | STOPPED | APPROVE | REVISE | BLOCK
Mode: self | subagent(sonnet) | subagent(opus) | subagent(fable)
Packages: one | <name>: <owned paths> — <worktree>, <branch> — <status>; ... — merge order: ...
Evidence: validation results, scope check, diff/test review
Changed files: ...
Commits: ...
PR: <url> | not opened — <reason>
Stop/block reason: ...
Notes: ...
Two triggers share this section:
wiki/plans/README.md whose members' prerequisites are all DONE. Each member is a plan of its own; the serial workflow applies to each, with the deltas below. Members are not split further.Both require subagent delegation: under self-execution a plan runs as one unit and group members run serially, since one orchestrator cannot parallelize itself. Never start two writers in the same worktree.
git worktree add .claude/worktrees/<unit> -b plan/<unit> <baseline>, where <unit> is the plan id (the filename without .md) for a member and <plan-id>--<package> for a package. First make sure the directory is ignored: git check-ignore -q .claude/worktrees — if it is not, append .claude/worktrees/ to the local .git/info/exclude, never to the tracked .gitignore; an unignored worktree shows up as an untracked directory and breaks every clean-tree check. Do not use the host's native subagent worktree isolation unless it branches from the baseline and tells you the path and branch (Claude Code's default branches from the repository's default branch and reports neither). The dispatch prompt names the absolute path and the branch, instructs the executor to switch into the worktree as its first action — with the host's enter-worktree tool when one exists, otherwise by addressing every file and every command through that path — and to open its report with the output of git rev-parse --show-toplevel and git rev-parse --abbrev-ref HEAD. When a host guard denies git worktree add, follow "Host-managed worktrees" below.git status --porcelain is empty there; the report's opening lines match the path and branch you created, confirmed against git worktree list; every changed file lies within the unit's paths — a member's plan scope, a package's owned paths; the unit's milestone validations pass — for a package, on the baseline plus its own work only; then the full code review of the unit's diff. REVISE feedback goes to that unit's subagent, names the absolute worktree path and branch, and you confirm afterwards that the new commits landed on that branch. Defer the plan-level half to after merge: project-level verify flows have runtime side effects (ports, databases, dev servers) that are not parallel-safe across worktrees, and a plan's Commands and done criteria describe the whole, not one package. After each unit, confirm the main worktree is still clean.git diff --stat <baseline>..HEAD, the units' reported key design choices, duplicated helpers, inconsistent naming and conventions. Each unit's diff has already had its full review; do not re-read the combined diff. Findings go back as REVISE to the responsible unit's subagent in its worktree, followed by a re-merge; then run acceptance. For a group, rerun each member's validation commands on the merged result here as well.wiki/plans/README.md — per member for a group; once for a split plan, whose Outcome lists each package and the merge order — then git worktree remove each worktree (a host-managed one goes through the host's removal tool, see below) and git branch -d each merged branch; leave nothing for a lazy sweep. One member's BLOCK does not block merging the others; mark it BLOCKED individually. A split plan is one plan: it is DONE only when every package, including any serial fallback, has been merged and verified.Host-managed worktrees. Some hosts manage worktrees themselves and deny git worktree add, remove, and move through a guard hook. Such a denial names the replacement: follow exactly what it hands you and nothing more — do not retry the denied command, do not work around the guard, and do not let the host's enter-worktree tool create the worktree (it branches from the remote default branch). The requirement does not change: the worktree must start at the intended start point, on the intended branch. When the replacement tool would pick the start point itself, create the branch first — git branch <branch> <start> is not guarded — and ask the tool for a worktree on that existing branch. Take the path from the tool's result or the host's listing, and accept it only once git worktree list shows it with its HEAD at the intended start point; otherwise stop and report. The worktree lives wherever the host puts it, so the .claude/worktrees/ exclusion does not apply to it, and the host's enter-worktree tool may refuse a path outside .claude/worktrees/ from a subagent or on a second switch — address every file and every command through the absolute path then. Remove such a worktree through the replacement the guard names for removal, never with git worktree remove; deleting the merged branch with git branch -d afterwards is not guarded.
An integration plan that depends on a whole group runs afterward as a normal serial plan. In the final report, list status, evidence, and commits per unit, plus the merge order.
wiki/plans/ files (which preflight commits).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mywsq/plugins --plugin dev3 skills in this plugin
/exploreRead-only requirement and codebase exploration before planning. Use when the user asks how code works, wants relevant files and validation commands identified, has an unclear or open-ended development request, needs implementation approaches compared before dev:write-plan, or wants a plan or design grilled/stress-tested. For a change its consumer can perceive — a page, a flow, copy, a CLI command or output, an API call shape — clarifies the product first (interaction flow, states, UI structure, scope) from the product surface, confirms it, and only then reads the implementation and grills the technical design. Clarifies by grilling by default — one question at a time with a recommended answer until the design holds up; say "don't grill me" for minimal questioning. Never edits files; reports findings, product conclusions, clarified requirements, and an approved design direction in chat./write-planTurn a clear development request into a self-contained plan under `wiki/plans/` for dev:execute-plan or another agent to implement — a record of the requirement, the decisions with their tradeoffs, and the discussion that settled them; an execution brief telling the executor what to change, where, and what the result looks like, at the depth its model tier needs; and the orchestrator's verification contract. A decomposable requirement may become a plan group (contract plan, parallel members with disjoint scopes, integration plan) whose members execute concurrently. Use when the user asks to plan, design an implementation approach, convert a bug/feature request into an executable plan, or continue after dev:explore. Planning is read-only except for files under `wiki/plans/`; from the repository's main worktree it first cuts a branch and worktree named after the requirement and continues there.