Plan Orchestrate
Bridge a plan document to
by emitting one ready-to-paste invocation per step. The skill is generative only — it never executes
. The user pastes each line when ready.
When to Activate
- User has a multi-step plan document (PRD, RFC, implementation plan) and wants to drive it through .
- User says "orchestrate this plan", "give me orchestrate prompts for each step", "compose chains for this plan".
- A step-by-step plan exists but the user does not want to manually pick agents per step.
Skip when:
- The work is one ad-hoc step → call directly.
- The plan is unreadable or empty. Lack of explicit numbering alone is not a skip condition — see the "No clear steps" edge case below.
Inputs
<plan-doc-path> [--lang=python|typescript|go|rust|cpp|java|kotlin|flutter|auto] [--scope=all|step:<n>|range:<a>-<b>] [--dry-run]
- — required; relative or absolute path ( accepted).
- — reviewer language variant; defaults to (detected from project).
- — limits emitted steps; defaults to .
- — print decomposition + chain rationale only; do not emit final prompts.
Authoritative shape (do not deviate)
{ORCH_CMD} custom "<agent1>,<agent2>,...,<agentN>" "<task description>"
Where
is determined in Phase 0 (see below). The command string in the emitted output
always uses one concrete form — never both, never a placeholder.
- is a sequential chain; each agent's HANDOFF feeds the next.
- Comma-separated agent list. No spaces preferred; one space tolerated.
- No / / flags exist — never invent them.
- Agent names come from the catalogue in this skill. Embedded double quotes in the task description are escaped as .
ECC install form and namespacing
Two install forms determine the prefix on both the slash command and every agent name. The two MUST stay in sync — one form per output, never mixed:
Let
denote the Claude Code home directory:
on macOS/Linux,
on Windows. Resolve it the way the host platform resolves the user home directory (do not hardcode
).
| Form | Detection | | Agent name format |
|---|
| Plugin install (1.9.0+) | <claude-home>/plugins/marketplaces/everything-claude-code/
exists | /everything-claude-code:orchestrate
| everything-claude-code:<name>
|
| Legacy bare install | Above absent; agent files under | | |
Why this matters: under the plugin install, agents register as
everything-claude-code:tdd-guide
. Bare names force fuzzy matching, which fails intermittently under parallel calls. Under legacy, the prefixed forms are not registered and fail outright.
Available agent catalogue (must pick from these)
General:
- — requirement restatement, risk decomposition, step planning
- — architecture, system design, refactor proposals
- — write tests → implement → 80%+ coverage
- — generic code review
- — security audit, OWASP, secret leakage
- — dead code, duplicates, knip-class cleanup
- — documentation, codemap, README
- — third-party library API lookups (Context7)
- — end-to-end test orchestration
- — PostgreSQL schema, migration, performance
- — local agent harness configuration
- — long-running autonomous loops
- — multi-channel triage (rarely a fit for plan steps)
Build error resolvers:
Code reviewers:
A misspelled agent name fails
. Cross-check against this list before emitting.
How It Works
Phase 0 — Detect ECC mode + language
-
Read
. If missing or empty, report and stop.
-
Detect ECC install form once and freeze it into
. Algorithm (run in order, stop at the first match):
- If
<claude-home>/plugins/marketplaces/everything-claude-code/
exists → .
- Else if exists and contains at least one ECC agent file (e.g. , ) → .
- Else → default to and emit a one-line warning at the top of the output:
> Warning: could not detect ECC install; defaulting to legacy form. If you use the plugin install, edit the prefixes manually.
- If both markers exist (mixed install), wins — the plugin namespace is the only one that resolves agent names without fuzzy matching.
From this point on, every emitted line uses the matching prefix on both the slash command and every agent name. Never emit both forms in the same output.
-
Resolve
. When
, run a polyglot-aware detection:
- Probe markers: / / → python; → typescript; → go; → rust; or top-level → cpp; / (Java) → java; or top-level Kotlin → kotlin; → flutter.
- Polyglot tie-break: if more than one marker matches, pick the language whose source files outnumber the others (count via , excluding , , , , , generated files, and obvious test fixtures). On a tie or when no language exceeds 60% of source files, set .
- No marker matched → set .
- is a sentinel — it is not an agent name. Phase 2 rules 4 and 5 turn it into / at chain composition time.
-
Detect a
PyTorch sub-profile: when
and any of
/
/
declares a dependency on
, set
. This only affects
chain selection (Phase 2 rule below); the reviewer remains
.
-
Normalize any agent names declared in the plan: if the plan text references agents by their plugin-prefixed form (e.g.
everything-claude-code:tdd-guide
), strip the prefix to get the bare catalogue name before validating or composing chains. Re-prefixing happens only at output time per
(Phase 4). Never let a pre-prefixed name flow into chain composition — it would double-prefix in plugin mode.
Phase 1 — Decompose steps
Identify "step units" in priority order:
- Explicit numbering: / / / top-level ordered list.
- A "Step" column in a table.
- -separated blocks with verb-led headings.
- Otherwise treat each H2 as one step.
Per step extract
(1-based),
(≤ 80 chars),
(1–3 sentences),
.
Phase 2 — Tag and pick chain
Tag by intent (multi-tag allowed; chain built from primary + stacked secondaries):
Trigger words below are matched case-insensitively. Multilingual plans are supported by matching the word stems in any language as long as the meaning aligns with the listed English trigger words.
| Tag | Trigger words | Default chain |
|---|
| architecture, design, choose, evaluate, RFC | |
| plan, breakdown, milestone | |
| implement, build, add, create, port | tdd-guide,<lang>-reviewer
|
| test, coverage, e2e, integration | |
| refactor, cleanup, dedupe, split | architect,refactor-cleaner,<lang>-reviewer
|
| migrate, upgrade, rewrite, port | architect,tdd-guide,<lang>-reviewer
|
| schema, migration, index, SQL, Postgres, alembic, sqlmodel | database-reviewer,<lang>-reviewer
|
| encrypt, auth, secret, OWASP, PII | security-reviewer,<lang>-reviewer
|
| build, compile, lint failure, CI | (falls back to ) |
| docs, readme, codemap, changelog | |
| lookup, reference, API usage | |
| review, audit, verify | <lang>-reviewer,code-reviewer
|
| loop, autonomous, watchdog | |
Chain composition rules:
- Primary tag selection: when a step matches multiple tags, the first one in table order (top of the table = highest priority) is the primary; the rest are secondaries. Composition rules 2 and 3 below handle specific multi-tag combinations explicitly; otherwise, append secondary chains in tag table order.
- + →
tdd-guide,<lang>-reviewer,security-reviewer
.
- + →
tdd-guide,database-reviewer,<lang>-reviewer
.
- Deduplicate the resulting chain (preserve first occurrence). E.g. + would yield
code-reviewer,code-reviewer
after rule 5; deduplication collapses it to .
- resolves to when .
- resolves to when . Special case: if Phase 0 set , use for chains regardless of . There is no ; without resolves to .
- Zero-tag steps: if no trigger word matches, set chain to and write
no tag matched; default review-only chain
under "Chain rationale".
- Chain length ≤ 4 after deduplication. If exceeded, drop weakest tag ( and first).
- Do not pair and in an chain (token waste). Pair them only on steps.
- Steps tagged , , or end with a reviewer-class agent — any of , , , or . The most domain-specific reviewer wins the tail position (e.g. rule 2's ends with ; rule 3's ends with because already gates the migration earlier in the chain). and steps are gated by their own validators ( and the build resolver respectively) and do not require an additional reviewer.
Phase 3 — Compress task description
- Be self-contained (the first agent does not need the plan document open).
- Start with .
- Include 1–3 verifiable Acceptance criteria.
- Include a Scope guard () only if the plan declares one for this step. Inherit verbatim. If the plan has no out-of-scope statement, omit the clause entirely — do not invent one.
- Be 200–600 characters; one line; embedded escaped as ; no literal newlines.
Phase 4 — Output
Emit Markdown using
the form determined by . The output uses one form throughout — every
and every agent name is rendered with the matching prefix from Phase 0.
Do not emit both forms; do not include "this is plugin form" / "strip the prefix" instructions in the rendered output.
Concrete rendering rules:
- =
/everything-claude-code:orchestrate
under , under .
- =
everything-claude-code:<name>
under , under .
- The overview-table "Chain" column uses the same rendering.
- Per-step bash blocks contain only the runnable command. No or comments — the form is implicit and uniform across the whole output.
Output structure:
markdown
# Plan-Orchestrate Result
**Plan**: `<path>`
**Lang**: `<detected-or-given>`
**ECC mode**: `<plugin | legacy>`
**Steps**: <N>
**Scope**: <all | step:n | range:a-b>
## Steps overview
|---|---|---|---|
| 1 | ... | impl, db | `{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}` |
| ... | | | |
---
## Step 1 — <title>
**Intent**: <1–3 sentences>
**Tags**: <a, b>
**Chain rationale**: <why this chain; which agent closes the loop>
```bash
{ORCH_CMD} custom "{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}" "[Plan: docs/foo.md#step-1] <compressed task description>; Acceptance: <1–3 items>; Out of scope: <…>"
```
The
and
notation above describes the substitution this skill performs at runtime. The actual emitted Markdown contains the resolved strings, never the placeholders.
Append a final "Batch execution" block aggregating every step's command in order so the user can paste them all at once. Skip the Batch block in overview-only mode (see "Large plan" edge case): when only the overview table is being emitted, there are no per-step commands to aggregate.
Phase 5 — Self-check (run before emitting)
Edge cases
- No clear steps: prefer H2/H3 splitting; if still ambiguous, report "no structured steps detected" with the document outline and ask the user to confirm running by outline.
- Large plan (>1500 lines): enter overview-only mode — emit only the overview table and ask the user to narrow with before re-running for details. In this mode, skip per-step detail blocks and skip the Batch execution block.
- Step too broad (e.g. "complete all backend work"): do not force a single chain. Suggest splitting into N.a and N.b and propose a split.
- Plan declares agents (rare): first strip any prefix to get the bare catalogue name (Phase 0 step 5), then validate against the catalogue. Replace invalid agents and explain under "Chain rationale". The bare name is re-prefixed at output time per .
- Polyglot project where cannot pick a winner: set ; reviewer resolves to and build resolver to . Mention the fallback under "Chain rationale".
Examples
Example 1 — Plugin mode, Python plan
Input:
plan-orchestrate @docs/plan/example-feature.md --lang=python
Excerpt of expected output:
markdown
## Step 2 — Encrypt sensitive UserProfile fields
**Intent**: Introduce an `EncryptedString` SQLAlchemy type and AES-GCM encrypt `birth_datetime` / `location` before persistence; load the key from an environment variable.
**Tags**: impl, security, db
**Chain rationale**: Security-sensitive write path, so `security-reviewer` closes the chain; `database-reviewer` validates the alembic migration; `python-reviewer` covers typing and PEP 8.
```bash
/everything-claude-code:orchestrate custom "everything-claude-code:tdd-guide,everything-claude-code:database-reviewer,everything-claude-code:python-reviewer,everything-claude-code:security-reviewer" "[Plan: docs/plan/example-feature.md#step-2] Implement EncryptedString SQLAlchemy type and migrate UserProfile.birth_datetime/location columns; key from ENV APP_DB_KEY; Acceptance: encrypt/decrypt roundtrip tests pass; alembic upgrade/downgrade clean on empty DB; no plaintext in DB after migrate; Out of scope: cross-tenant profile sharing logic"
```
Example 2 — Legacy mode, same step
If
were detected, the same step would be emitted as a single uniform command (no plugin-prefixed forms anywhere in the output):
bash
/orchestrate custom "tdd-guide,database-reviewer,python-reviewer,security-reviewer" "[Plan: docs/plan/example-feature.md#step-2] ..."
The two examples above illustrate the two possible outputs for two different environments. A single skill invocation produces only one of them, end to end.
Notes
- Generative only. Never invoke from inside this skill.
- Match the language of the plan document for task descriptions (agent names always remain English).
- Do not insert "Co-Authored-By" lines or emoji in the output unless the user explicitly asks.