prlorence/pi-claude-dispatcher/dispatch-plan
Claude Code and agent skill by prlorence/pi-claude-dispatcher
- community
Checking that the SKILL.md file is still in the repository.
Reference for handing implementation work to Pi workers via .plans/, with a saved spec, a read-only plan audit by Opus, the user's approval and a gate.
Install
npx vskill@latest install prlorence/pi-claude-dispatcher/dispatch-planSKILL.md
The same SKILL.md was published earlier as prlorence/pi-claude-dispatcher/dispatch-plan.
dispatch-plan
The orchestrator is the session the user talks to. It clarifies the request with the grilling skill into a saved spec, writes the plan from that spec, has Opus review the plan, gets the user's approval and reports the results. Opus runs as the read-only plan-auditor and reviews plans only; it never reviews worker results. Workers implement everything. Post-run quality rests on the dispatcher's gate, the verify: commands, the live worker guards and pair review.
Three agents can run a worker, chosen per role by agent: in .plans/config.json, never in a plan:
agent: | How it runs | Default for | |
|---|---|---|---|
dsh (default) | in-process dsh subagent, parented to the root agent | implement, review, security, qa | |
omp | an omp child process over its JSON stream | implement-omp, pair-omp, pair-omp-contributor | |
pi | a pi child process, the same adapters as before the dsh port | nothing by default |
dsh starts a fresh subagent for every attempt; pi keeps one session per task and resumes it on a retry when persistSessions is on; omp is one-shot with --no-session. All three honour the task's files:, the read-only flag and the live guard, so a plan does not change when a role moves between them. Which agents are available is fixed by the running profile: role "x" names agent "y", which is not available (known agents: …) is a preflight rejection, not a plan error.
The pasteable rules for the orchestrator are in dispatch-plan/ORCHESTRATOR.md; the audit checklist and output format are in dispatch-plan/agents/plan-auditor.md. This file holds the plan and spec formats, the audit and approval steps, and the commands. Dispatch work that splits into tasks that each touch a known, small set of files. The orchestrator never writes code: a tiny job, or one that needs judgment across the whole codebase, still goes out as a plan, and a one-task plan is fine. The orchestrator only reads files, runs read-only commands and answers questions.
1. Plan format
id:<trace>-r1for the first plan of a request,<trace>-r2up to<trace>-r4for fix rounds.trace:: shared by every plan of one user request, defaults to the plan id. Create it withnode ~/.claude/skills/dispatch-plan/trace.mjs new-id <slug>.spec:: the saved spec for the request (section 2). The plan parser ignores frontmatter keys it does not read, sospec:changes nothing for the dispatcher; it is there for the orchestrator, theplan-auditorand the reader.parent:absent on round 1, the previous plan id on a fix round;round:is1for the first plan,+1per fix round. Together they link the rounds.Covers:is the first body line of every task, for exampleCovers: R1, R2.It names the spec requirements the task implements. It is not a task metadata key, so it is ordinary instruction text the worker reads; the parser does not check it, theplan-auditordoes.files:lists every path the task may edit. A directory (src/other/) covers everything under it. Tasks whose files overlap never run at the same time. A task with nofiles:runs alone, so always list files.depends_on:holds task ids that must finish first. If a dependency fails, its dependents are skipped.verify:is a shell command the dispatcher runs, never the worker. A task-level one runs after the attempt reports success; exit 0 verifies it, non-zero or a timeout fails the attempt (retried with the output as feedback whenretriesallow). Scope it to that task's own files, for example a single test file, so a parallel worker's half-finished edits cannot break it. Write one per task.- The plan-level
verify:runs once after every task is done, so it can be the integration check (npm test). A failing plan-level check adds averify_failederror fault and fails the gate. role:picks the job:implementby default; add aqatask after implementation for features, and asecuritytask after all implementation tasks for anything touching input handling, auth, secrets, files, network or shell. Onlysecuritycan be a read-only task role;reviewand any other read-only role are onlypair:reviewers.implement-ompis the same job asimplementon theompagent, andpair-omp/pair-omp-contributorare read-only reviewers onomp; the three exist so a whole plan can run, and review, on omp. Roles, their agents and their models are indocs/roles.md, and the Dispatcher panel's Settings tab edits the per-repo overrides.pair: reviewon a risky implementation task runs a read-only reviewer before the task counts as done. It roughly doubles worker spend on that task, which is small next to an audit round;pair_rounds:(1-3) bounds it. WhenpairDefaultis set in.plans/config.json, every task without apair:line gets that read-only reviewer, so you need not writepair:lines; writepair: noneonly for a task that does not need a review, with the reason in the task body. On dsh,dshPairDefaultoverridespairDefaultwhen it is present, which is how a repo runspair-ompon dsh while the shared Pi preflight still acceptspairDefault; the preflight warns about the rolepairDefaultnames, so on a repo with both keys that warning can name a different role than the one dsh actually uses. The orchestrator never edits either key.- Never write model names in plans unless you are overriding on purpose.
.plans/config.jsonmaps roles to models; the per-task overridesmodel:andthinking:(for examplethinking: high) exist for that deliberate exception. - Preflight rejects the plan before any worker starts when a
files:entry is absolute, contains a..segment, or points inside.git/or.plans/; a task lists more thanmaxFilesPerTaskfiles (10); a task body is longer thanmaxTaskCharschars (8000); or averify:executable cannot be found. Keep tasks small: split rather than widen. - Two tasks that edit the same file need a
depends_onedge between them. Overlappingfiles:already stop them running at the same time; the edge also fixes the order, so one task's result is on disk before the other starts. - A task whose
verify:imports or runs another task's files must list that task independs_on. Otherwise a half-finished edit by one worker breaks this task's verify. - A plan that creates or audits untracked files needs a paragraph in its shared context: tell the read-only reviewer to read those files in full, because
git diffshows nothing for a new file, and to answer only in theVERDICT/FINDINGSformat. - Every
verify:command, plan-level ones included, must finish inside the dispatcher'sverifyTimeoutMinutes(default 10). Any innertimeoutvalues together must stay below that, or the dispatcher kills the command and the attempt fails. - Put shared interfaces in the plan context, or in an early task others depend on, so parallel workers agree. Workers don't commit; the user commits, and only when they asked.
2. Spec
The orchestrator clarifies the request with the grilling skill until the requirements are stable, then saves the spec at .plans/specs/<trace>.md. One spec serves every plan of the request, fix rounds included; the plan's spec: key points at it, and every task starts its body with Covers: R1, R2.
Number the requirements R1 to Rn and keep the numbers stable: plans, audit findings and the trace table refer to them by number. When the user confirms the spec, the orchestrator logs spec.confirmed (data {"spec": "<path>", "requirements": <count>}).
Amending a confirmed spec. Edit the spec, add a decisions-log line that says what changed and why, and tell the user in the next message. In a full repo, rewrite the vault spec note with note new spec, passing every property again, because it is an upsert that drops the properties you do not pass. A refinement that only makes a requirement more precise or stricter may be applied by the orchestrator and reported; one that adds scope or relaxes a rule needs the user's yes first.
3. Draft it atomically
Every draft is a .md.draft file with status: draft, round 1 and fix rounds alike. The dispatcher reads only *.md files, so a draft is never picked up while it is being written, audited or approved.
Write .plans/inbox/.<id>.md.draft.tmp first, then move it:
The flip command in section 5 is the only way to make a plan ready. After writing a draft, the orchestrator logs plan.drafted with data {"tasks": <count>, "spec": "<path>"}.
4. Plan audit
No plan runs before it is audited. Run the preflight CLI first and fix every ERROR: before spending an audit round; it runs the dispatcher's own parsing and preflight, so its errors are real rejections, not opinions. It prefers the repo's dsh plugin (dsh/plugins/harness-dispatch) and falls back to pi-plan-dispatch, reporting which one it used on stderr; both implement the same format, so either one's ERROR: lines are real. The two differ on dshPairDefault, which only dsh resolves, so the pairing role it reports on a repo with both keys is the one a dsh run uses:
Then run the read-only plan-auditor (Opus) on the draft, giving it the plan path, the spec path, the trace id, the plan id, the plan round and the audit round number. Its checklist and output format are in dispatch-plan/agents/plan-auditor.md.
- On dsh, call the
audit_plantool. It runs the unchanged Claude Codeplan-auditoragent through headlessclaude -p --agent plan-auditorand returns the findings and verdict. Passplan, andspec/trace/plan_id/roundonly to override the frontmatter, plusaudit_round. The executable is the config keyclaudeCommand(defaultclaude), andauditTimeoutMinutesbounds it. - On Claude Code, spawn the same agent with the Agent tool,
subagent_type: plan-auditor.
Either way the agent is Claude, not one of the three worker agents: the audit is a second opinion from outside the dispatcher, and plan.audit is logged by the auditor itself.
[blocker]: the plan would fail to run, would produce wrong results, loses data, or breaks a hard rule.[major]: a real defect with a workaround or a narrow trigger, or an ambiguity that will make a worker guess.[minor]: wording, cosmetic or style. Minors are recorded as notes and do not fail the round.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdispatch-plan/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/prlorence/pi-claude-dispatcher/dispatch-plan)