prlorence/pi-claude-dispatcher/dispatch-plan

Claude Code and agent skill by prlorence/pi-claude-dispatcher

Trust tier 3
  • community
Source check pending

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-plan

SKILL.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 runsDefault for
dsh (default)in-process dsh subagent, parented to the root agentimplement, review, security, qa
ompan omp child process over its JSON streamimplement-omp, pair-omp, pair-omp-contributor
pia pi child process, the same adapters as before the dsh portnothing 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

markdown
---
id: <trace>-r1
trace: <trace>
spec: .plans/specs/<trace>.md
round: 1
status: draft
max_parallel: 3
verify: npm test
---
<Shared context every worker needs: goal, conventions, key types/interfaces,
commands to run tests. Workers see ONLY this plus their own task. Be explicit.>
## task: <task-id>
files: path/one.ts, path/two.test.ts
depends_on: []
role: implement
verify: node --test path/two.test.ts
pair: review # optional: read-only review before the task is done
Covers: R1, R3.
<Instructions. Name the exact function signatures, behaviour, edge cases,
and the test command to run. Write it for a capable but context-free engineer.>
## task: <another-id>
files: src/other/
depends_on: [<task-id>]
Covers: R2.
...
  • id: <trace>-r1 for the first plan of a request, <trace>-r2 up to <trace>-r4 for fix rounds.
  • trace:: shared by every plan of one user request, defaults to the plan id. Create it with node ~/.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, so spec: changes nothing for the dispatcher; it is there for the orchestrator, the plan-auditor and the reader.
  • parent: absent on round 1, the previous plan id on a fix round; round: is 1 for the first plan, +1 per fix round. Together they link the rounds.
  • Covers: is the first body line of every task, for example Covers: 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, the plan-auditor does.
  • 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 no files: 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 when retries allow). 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 a verify_failed error fault and fails the gate.
  • role: picks the job: implement by default; add a qa task after implementation for features, and a security task after all implementation tasks for anything touching input handling, auth, secrets, files, network or shell. Only security can be a read-only task role; review and any other read-only role are only pair: reviewers. implement-omp is the same job as implement on the omp agent, and pair-omp/pair-omp-contributor are read-only reviewers on omp; the three exist so a whole plan can run, and review, on omp. Roles, their agents and their models are in docs/roles.md, and the Dispatcher panel's Settings tab edits the per-repo overrides.
  • pair: review on 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. When pairDefault is set in .plans/config.json, every task without a pair: line gets that read-only reviewer, so you need not write pair: lines; write pair: none only for a task that does not need a review, with the reason in the task body. On dsh, dshPairDefault overrides pairDefault when it is present, which is how a repo runs pair-omp on dsh while the shared Pi preflight still accepts pairDefault; the preflight warns about the role pairDefault names, 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.json maps roles to models; the per-task overrides model: and thinking: (for example thinking: 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 than maxFilesPerTask files (10); a task body is longer than maxTaskChars chars (8000); or a verify: executable cannot be found. Keep tasks small: split rather than widen.
  • Two tasks that edit the same file need a depends_on edge between them. Overlapping files: 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 in depends_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 diff shows nothing for a new file, and to answer only in the VERDICT / FINDINGS format.
  • Every verify: command, plan-level ones included, must finish inside the dispatcher's verifyTimeoutMinutes (default 10). Any inner timeout values 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.

markdown
# Spec: <title>
Trace: <trace>. Date: <date>. Status: draft, then confirmed by the user on <date>.
## Why
<the problem and what prompted it>
## Goal
<one paragraph: what changes and why>
## Requirements
-R1. <testable requirement>
-R2. <testable requirement>
## Non-goals
-<what is out of scope on purpose>
## Constraints
-<hard limits: files that must not change, formats, compatibility>
## Acceptance criteria
-<how a reader can tell the result is right>
## Decisions log
-<date>: <decision and its reason> (<who decided>)
## Open items (not blocking this spec)
-<question still open, or none>

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:

bash
mkdir -p .plans/inbox && mv .plans/inbox/.<id>.md.draft.tmp .plans/inbox/<id>.md.draft

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:

bash
node ~/.claude/skills/dispatch-plan/preflight.mjs <plan file>

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_plan tool. It runs the unchanged Claude Code plan-auditor agent through headless claude -p --agent plan-auditor and returns the findings and verdict. Pass plan, and spec/trace/plan_id/round only to override the frontmatter, plus audit_round. The executable is the config key claudeCommand (default claude), and auditTimeoutMinutes bounds 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/prlorence/pi-claude-dispatcher/dispatch-plan/badge)](https://verified-skill.com/skills/prlorence/pi-claude-dispatcher/dispatch-plan)

Something wrong with this skill or its page? Tell us.