/lazyspec:orchestratefrom lazyspec
Orchestrates batch delivery of documents by dispatching build agents, ordering by dependency edges, and managing review, commit, and status transitions.
Ships in lazyspec. 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.
None: SKILL.md is the whole skill.
YOU ORDER, DISPATCH, REVIEW, COMMIT, CLOSE. YOU DO NOT BUILD.
Orchestrate drives a chunk -- the set of delivery documents you were handed -- to done. You own ordering, dispatch, review, commits, status transitions, and the done check. Each unit's building is a dispatched agent's, running /execute.
The chunk is whatever set you were given. It may span several parent documents, or sit under one. Nothing here assumes a type name; read every type, relation, and status from lazyspec config --json.
REQUIRED SUB-SKILLS: /execute (loaded by each build agent), /review-work (both passes), /advance (every status move).
**Depth 1. You are the only agent that spawns agents.** Every agent you dispatch does its own work alone. Check each dispatch against the fan-out table before you send it; if it is not a row, you do not need it. **Never `sleep` to wait for an agent.** You are re-invoked when it finishes. Dispatch, then end your turn. That is the whole protocol. Do NOT build, edit, or fix anything yourself. Dispatch it. Do NOT re-run the gate command to confirm what an agent reported. Order comes from the documents' dependency edges, never from the order you were handed. STOP and end your turn if you catch yourself:sleep, for any reasongit diff --stat or git status to find out whether an agent is done| Rationalization | Reality |
|---|---|
| "A short sleep is cheaper than a round trip" | sleep 570 costs 570 seconds whether the agent took 20 seconds or 20 minutes, and buys nothing the notification would not have handed you. |
| "I have nothing else to do while it runs" | Nothing else to do is the signal to end the turn, not to sleep. |
| "The remaining units are queued on me" | They are queued on the agent. The notification unblocks them. |
| "One nested helper would speed this up" | One nested build can outspend three units put together. Depth 1. |
| "This fix is faster than dispatching" | Dispatching is the whole job. Your hands stay off the files. |
If an agent has genuinely gone silent -- no notification well past anything plausible -- use one ScheduleWakeup of 1200s or more. Never a sleep, never a poll loop.
Always run lazyspec help <subcommand> before using unfamiliar commands. Always pass --json.
The list you were handed is not the execution order.
relationships and find the dependency relation -- the one whose name and inverse express blocking (in the shipped default that pair is blocks / blocked-by, but read it).lazyspec list <type> --json and lazyspec context --json.for id in DOC-1 DOC-2 DOC-3; do lazyspec show "$id" --json; done. Same for every later sweep over the batch.If the config declares no dependency relation, the order you were handed is the only order there is -- say so in your opening report rather than inferring one from IDs.
Find the one gate command. The repo's chained verification -- typecheck, tests, lint, format in a single invocation returning one summary. Every brief carries the exact string. If there is none, write one and commit it as the chunk's first commit.
Split bundled scaffolding. A new package, workspace member, build config, exports map, or generator sitting alongside feature work carries a different kind of risk and attracts most of the review. Give it its own unit, first in the order. If you cannot split it, say so in the report.
For a chunk of N units, the whole run is:
| Agent | Count |
|---|---|
| Build | N |
| Per-unit review | N |
| Per-unit fix | only where that review returned RED |
| Chunk review | 1 |
| Chunk fix | 1 |
The rule is about who spawns, not how many run at once. A build agent that dispatches its tasks one at a time has broken depth 1 exactly as much as one that fans out six in parallel -- and pays a wait on every one. A unit with six tasks is six tasks for one agent, not six agents. /execute states this to the agent that loads it; you do not need to restate it.
For each eligible unit, in topo order:
Nothing returns to review. The fix agent's output goes straight to the commit. A fix that introduces a fresh convention violation is caught by the chunk pass.
Review happens at two points and only two.
| Per-unit | End of chunk | |
|---|---|---|
| When | Once, after the build agent reports | Once, after the last unit reaches its completion status |
| Depth | blocking-only | comprehensive |
| Scope | That unit's diff vs that unit's ACs | The chunk's whole combined diff, git diff <base>..HEAD, plus every document in the batch |
| Re-review | None | None |
Neither reviewer is capped -- /review-work emits everything it finds, ranked. The fix is budgeted, not the finding list: on the chunk pass, hand the fix agent the top 8 and record the remainder as follow-up documents. Truncating the reviewer hides drift; truncating the fix list is a scheduling decision you can see.
Every brief has these parts, in this order.
/execute, /review-work).lazyspec show <id> -e --json for the unit, one per ancestor carrying ACs. The agent reads the documents at full fidelity; you do not paste them, and you do not grep the source to write a better prompt.<unit>: <what landed> -> <files>. For a review brief, the build agent's report. For a fix brief, the reviewer's UNMET and CONVENTION lines verbatim.A well-formed brief runs 15-25 lines.
## Rules for this run
Do not spawn subagents — not in parallel, not one at a time, not "just a helper for this one task".
This work is yours. If it is too large for your context, stop at a task boundary and report what
landed and what remains. Running short is a reason to report, never a reason to delegate.
Do not commit, and do not advance any document past the status your skill tells you to open.
The orchestrator that dispatched you owns the commit, the review and the close.
Never `sleep` to wait for anything. If you are waiting, you are doing it wrong.
Read files with `Read`, change them with `Edit` or `Write`. Not `cat -n`, `sed -n`, or `cat >` heredocs.
Structural queries in `.ts`, `.tsx`, `.js`, `.rs`, `.py` use `ast-grep`. `grep` is for file types
`ast-grep` does not parse, such as `.astro`.
JSON goes through `jq`. Not `python3`.
A command that would run more than about three times with different arguments becomes one shell loop.
| Unit | Opened by | Closed by |
|---|---|---|
| Delivery document | The build agent, into the work-active status, as /execute's first act | You, to its completion status, after the commit |
| Its parent document | You, into the work-active status, when its first in-batch child starts (if the type's lifecycle has one) | Not by you. Advance it to its review status only, never to completion |
Completing a parent is a human or downstream decision. Advance a parent only when all of its in-batch children are done; if it owns children outside this batch, leave it and note that in the report. Order within a unit is commit, then the delivery document, then the parent -- /advance proposes only a status the type's own lifecycle edges permit.
Every unit at its completion status does not mean the chunk is done.
git diff <base>..HEAD plus every document in the batch. This is the pass the per-unit reviews deferred: nits, naming, duplication across units, dead code and scaffolding left behind, inconsistent patterns, missing tests, drifted seams, convention violations that only show at chunk scale.One review, one fix, one commit. No cycle here either.
Done iff every delivery document in the batch is at its completion status, every in-batch parent has advanced to its review status (or been noted as left alone), and the chunk pass has run with its cleanup commit landed. Verify with lazyspec status --json and lazyspec validate --json, and confirm one commit per unit plus the cleanup commit.
Report the resolved order, the commits, per-unit findings, the chunk pass findings, the follow-up documents you filed, and any sandbox blockers you had to stop on.
What SKILL.md sets; muted values are Claude Code's defaults
12 skills in this plugin
/advanceUse when moving a document to its next status along the type's lifecycle DAG, maintaining links across the transition./configure-typeUse when adding a new custom document type to a lazyspec project. Interviews the user to co-author the type's methodology -- intent, authorship, lifecycle, relations -- then writes its enriched template and `[[types]]` config via the config-write CLI. One type per run./co-writeUse when drafting a document of a configured type collaboratively -- AI proposes a draft body, the human edits, iterate -- up to the type's authorship ceiling./create-auditUse when running a criteria-based review (health check, security audit, accessibility review, pen test, bug bash, spec compliance). Creates an Audit document with findings and presents them to the user for triage./executeUse when carrying out the work a delivery document describes -- building against its task breakdown and acceptance criteria in one pass./generateUse when authoring a full document body of a configured type from context -- AI writes the complete body, then asks for review -- only permitted when the type's authorship ceiling is `generated`.npx claudepluginhub jkaloger/lazyspec --plugin lazyspecOther plugins' skills for the same job