alexander-tyagunov/magician/orchestrate
Claude Code and agent skill by alexander-tyagunov/magician
- community
Checking that the SKILL.md file is still in the repository.
Drives full multi-agent implementation from a blueprint — fans out parallel-safe tasks into waves, runs sequential tasks in order, resolves conflicts, then verifies. Use to execute an approved plan.
Install
npx vskill@latest install alexander-tyagunov/magician/orchestrateSKILL.md
The same SKILL.md was published earlier as alexander-tyagunov/magician/orchestrate.
/orchestrate — Multi-Agent Implementation
Bundled command: ifkgis not found, run it as${CLAUDE_PLUGIN_ROOT}/tools/kgand give subagents that full path. If that is missing too (Claude chat ships no plugin tools), skip thekgsteps and search the code directly.
Execute an entire blueprint with parallel + sequential agent dispatch.
Pick the right engine first
- Inline with [`/ward`](../ward/SKILL.md) — first check: when the plan's Files lists name 3 files or fewer in total (about 300 changed lines or fewer), run its tasks in order in the main loop, one
/wardcycle each, with noTaskcall (lore/fold-first.md). - This skill — the default above that size: you control waves explicitly from a blueprint, with conflict checks between them.
- [`/weave`](../weave/SKILL.md) — for adaptive multi-item delivery (N tickets/features, a migration, a batch sweep) where you compose the pipeline to the work: it builds ONE native Workflow with magician's guardrails (TDD per unit, kg grounding, certify, multi-lens review + adversarial verify, write gates). Prefer it over hand-rolling many agents.
- Native dynamic workflows — for very large plans (hundreds of independent units), mention "workflow" so Claude builds a dynamic orchestration plan across many subagents. Works best in auto mode.
- Agent teams — when workers must talk to each other and share a task list, prefer an agent team over one-way subagents.
Choose by scale and whether workers must communicate; otherwise proceed with waves below. Whichever engine you pick, inline included, write `.workspace/local/session-state.md` (step 3) before the first task runs. The context contract (below) applies to every spawned agent — no worker inherits this conversation.
Effort & model
Effort: medium for implementation turns, high for certify/review/security turns (xhigh for very large plans; max only as an opt-in for frontier problems); on Bedrock/Vertex/gateways hold one level (an effort change drops the cache there). Dispatched implementers take the coding-optimal tier; suggest a session-model upgrade if it's older than the latest. See lore/models.md.
Cap the fan-out. The blueprint's parallelism map is the ceiling, not a floor. Above the inline threshold, a wave with two or more independent Parallel: YES tasks always fans out: one agent per task, dispatched together in one message, even when each task looks small. A one-task wave, or a sequential task you finish in a handful of tool calls, runs inline; that exception never applies to a parallel wave. Never spawn an agent purely to re-check work an agent just did — the per-task quality loop below is the check. See lore/fold-first.md and lore/model-behavior.md.
Process
- Read the blueprint — most recent in
.workspace/shared/plans/unless$ARGUMENTSnames one. If ambiguous, ask which plan via AskUserQuestion (one option per candidate plan file or folder, most-recent first); end your turn at the call and proceed with the chosen plan.
- Plan folder (
plan.jsonnext toplan.md):plan.jsonis the source — read it with Read. Task N issteps[N-1]; a step withreview.statusofdeferredis excluded from the graph (they are listed under## Deferred — not executed this runinplan.md). Check the last line ofplan.md,<!-- magician.plan/1 v<n> … -->: ifv<n>differs fromplan.json.version, say the plan is stale and ask the user to re-runplan-render all <dir>/plan.json(or/blueprint review <dir>) before executing; do not run it from here. - Plan folder with `plan.workflow.js` (
plan-render workflowwrites it next toplan.json; deferred steps are already omitted): prefer running it as one native Workflow — read the file and pass its contents as theWorkflowscript, as/weavedoes. The Workflow tool is not pre-approved here, so Claude Code shows its approval prompt. Nothing is copied into.claude/workflows/. Confirm the file is the plan's own version first (itsmeta.descriptioncarriesv<n>; a mismatch withplan.json.versionmeans stale — re-render). Skip the workflow and fall back to waves (below) whenplan.workflow.jsis missing, when workflows are disabled (disableWorkflows, Pro without the/configtoggle), when the user asks for wave-by-wave control, or when the Workflow run reportsnothing to resumeafter an interruption. Each workflowagent()already carries the context contract and the returnschemabelow; the per-task quality loop still runs on its results. - Single `plan.md` (legacy): parse it as before —
### Task N,Parallel:, Files, the five TDD lines.
- Build the execution graph — from
plan.json, thewavesare explicit: each wave'sparallel: truesteps run together, itsparallel: falsesteps one at a time after them. From a legacyplan.md, group PARALLEL-annotated tasks into waves; SEQUENTIAL tasks are singletons that run in order. (Withplan.workflow.jsthe graph is the script'sphase()/parallel()structure — skip to step 5 when the run completes, after ticking the- [ ]boxes of every step its results report as done.) - Execute wave by wave. Before the first wave, write
.workspace/local/session-state.md(goal · plan path · wave graph · decisions · blockers): with Task tools (TaskCreate/TodoWrite) absent on current models unlessCLAUDE_CODE_ENABLE_TODO_TOOLS=1, the plan file's- [ ]boxes plus that file are the compaction-proof checklist; tick a box only after its quality loop passes. When a parallel wave's prompts share a prefix (conventions, plan, return contract first; per-task text last), dispatch the first task alone, then the rest in ONE message (multipleTaskcalls) so siblings reuse the first agent's cached prefix; with no shared prefix, send the whole wave in one message. Wait for the whole wave before the next. Run sequential tasks one at a time. As each task's implementer returns, run the Per-task quality loop (below) before you mark that task done — completion is confirmed from the VCS diff, not the agent's report. - After each wave — sanity check:
git status,git log --oneline -3. Rewrite.workspace/local/session-state.md(goal · completed/remaining tasks · decisions · blockers · artifact paths) so the next wave's agents start current and a mid-run compaction loses nothing (the spawn template tells every agent to read it first). - After all waves — run /certify. If it fails, fix and re-certify (bounded evaluator-optimizer loop) before reporting complete — never report done on a red certify.
- Report — completed tasks and any blockers.
Independent sessions aren't in the graph. When a wave lands something that invalidates what a sibling Claude Code session is building on, and cross-session messaging is available, send that session one self-contained sentence. Feature-detect and skip silently; a wave never waits on a peer. See lore/cross-session.md.
Autonomy — approve the plan, then run
The blueprint is the gate. Once it's approved (step 1), run the rest — Execute wave by wave, the per-wave sanity checks, and the session-state refresh — autonomously: don't stop to ask the owner before reading, searching, kg query/blast, or read-only git (the git status/git log --oneline checks in steps 4–5), and never re-gate between waves. Claude Code's built-in read-only commands don't prompt; this skill pre-approves kg query/blast and edits to .workspace/local/session-state.md; anything else the agents run goes through the normal permission prompt unless the user runs in auto mode or approves it. Re-gate only on real side effects: the writes/git add·commit·push/PR actions the dispatched agents perform, a merge conflict surfaced by Conflict detection, the batched worker questions, and the final /certify. See lore/autonomy.md.
Agent prompt — context contract (no context loss)
Spawned agents see NONE of this conversation. Every Task prompt — and every agent() prompt in plan.workflow.js — MUST be self-contained (see lore/subagent-context.md):
In a Workflow, encode the same return as the agent() schema (maxLength strings, files_changed[], obstacles[]) — see /weave's template.
Handle results
- DONE — a claim, not proof: run the Per-task quality loop (below) and confirm the change from the VCS diff before recording it.
- NEEDS_CONTEXT — this is a context-completeness bug in the spawn prompt. Add the missing input and re-dispatch; don't guess for the agent.
- BLOCKED — assess the blocker, re-dispatch with more context, or escalate.
- A question for the human — a worker puts it in its Obstacles
NEXTfield and does not wait. Collect the questions of the whole wave, merge duplicates, and ask them in ONEAskUserQuestionafter the wave returns. Never ask once per worker (lore/obstacles.md).
Per-task quality loop — review before "done"
A subagent reporting STATUS: DONE is a claim, not evidence. Before you mark any task complete, confirm it from the VCS diff and put it through a two-stage review — see lore/verification.md.
- Confirm from the diff, not the report. Run
git show/git difffor the task's commit(s) and read the actual change. The diff is the evidence a task landed — a subagent's "success" is not. If the diff is empty, or doesn't match the deliverable, the task is not done: re-dispatch with the gap named. (These are read-only git reads, which Claude Code doesn't prompt for — see Autonomy above.) - Stage 1 — spec compliance. Against the task's full text and
.workspace/shared/specs/<feature>.md, does the change do exactly what the task specified — no more, no less? Flag missing requirements, scope creep, and silent deviations. - Stage 2 — code quality. Judge correctness, simplicity, and tests: does it hold on edge cases, is it the simplest thing that works, and are the tests real (proven RED→GREEN) and green? Prefer a fresh reviewer subagent (or `/scrutinize`) so no author bias carries over.
- Fix, then re-review. For any Critical or Important finding, dispatch a fresh fix-subagent — self-contained prompt, same context contract — to resolve it, then re-run this loop on the new diff. Minor findings can be recorded and batched. A task counts as DONE only once its diff is clean on both stages.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/orchestrate/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/alexander-tyagunov/magician/orchestrate)