plan-orchestrate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Plan Orchestrate

计划编排

Bridge a plan document to
/orchestrate custom
by emitting one ready-to-paste invocation per step. The skill is generative only — it never executes
/orchestrate
. The user pastes each line when ready.
通过为每个步骤生成一个可直接粘贴的调用命令,将计划文档与
/orchestrate custom
打通。本技能仅负责生成内容——绝不执行
/orchestrate
。用户可在准备就绪时粘贴每一行命令。

When to Activate

激活场景

  • User has a multi-step plan document (PRD, RFC, implementation plan) and wants to drive it through
    /orchestrate
    .
  • 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
    /orchestrate custom
    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.
  • 用户拥有多步骤计划文档(PRD、RFC、实施计划),并希望通过
    /orchestrate
    执行该计划。
  • 用户提出类似“编排这个计划”、“给我每个步骤的orchestrate提示词”、“为这个计划组合链”的需求。
  • 存在分步计划,但用户不想为每个步骤手动选择Agent。
跳过场景:
  • 工作仅为单个临时步骤→直接调用
    /orchestrate custom
  • 计划不可读或为空。仅缺少明确编号不构成跳过条件——请参阅下文“步骤不清晰”边缘情况。

Inputs

输入参数

<plan-doc-path> [--lang=python|typescript|go|rust|cpp|java|kotlin|flutter|auto] [--scope=all|step:<n>|range:<a>-<b>] [--dry-run]
  • <plan-doc-path>
    — required; relative or absolute path (
    @docs/...
    accepted).
  • --lang
    — reviewer language variant; defaults to
    auto
    (detected from project).
  • --scope
    — limits emitted steps; defaults to
    all
    .
  • --dry-run
    — print decomposition + chain rationale only; do not emit final prompts.
<plan-doc-path> [--lang=python|typescript|go|rust|cpp|java|kotlin|flutter|auto] [--scope=all|step:<n>|range:<a>-<b>] [--dry-run]
  • <plan-doc-path>
    — 必填;相对或绝对路径(支持
    @docs/...
    格式)。
  • --lang
    — 评审器语言变体;默认值为
    auto
    (从项目中自动检测)。
  • --scope
    — 限制生成的步骤范围;默认值为
    all
  • --dry-run
    — 仅输出步骤分解结果和链设计依据;不生成最终提示词。

Authoritative
/orchestrate
shape (do not deviate)

标准
/orchestrate
命令格式(请勿偏离)

{ORCH_CMD} custom "<agent1>,<agent2>,...,<agentN>" "<task description>"
Where
{ORCH_CMD}
is determined in Phase 0 (see below). The command string in the emitted output always uses one concrete form — never both, never a placeholder.
  • custom
    is a sequential chain; each agent's HANDOFF feeds the next.
  • Comma-separated agent list. No spaces preferred; one space tolerated.
  • No
    --mode
    /
    --gate
    /
    --agents=...
    flags exist — never invent them.
  • Agent names come from the catalogue in this skill. Embedded double quotes in the task description are escaped as
    \"
    .
{ORCH_CMD} custom "<agent1>,<agent2>,...,<agentN>" "<task description>"
其中
{ORCH_CMD}
由阶段0确定(见下文)。生成输出中的命令字符串始终采用一种具体格式——绝不混用两种格式,也不使用占位符。
  • custom
    表示顺序链;每个Agent的HANDOFF结果会传递给下一个Agent。
  • Agent列表用逗号分隔。优先无空格格式;允许单个空格。
  • 不存在
    --mode
    /
    --gate
    /
    --agents=...
    等参数——请勿自行添加。
  • Agent名称来自本技能中的目录。任务描述中的嵌入式双引号需转义为
    \"

ECC install form and namespacing

ECC安装形式与命名空间

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
<claude-home>
denote the Claude Code home directory:
~/.claude
on macOS/Linux,
%USERPROFILE%\.claude
on Windows. Resolve it the way the host platform resolves the user home directory (do not hardcode
~
).
FormDetection
{ORCH_CMD}
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 installAbove absent; agent files under
<claude-home>/agents/
/orchestrate
<name>
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.
两种安装形式决定了斜杠命令和每个Agent名称的前缀。两者必须保持一致——每个输出仅使用一种形式,绝不混用:
<claude-home>
表示Claude Code的主目录:macOS/Linux系统为
~/.claude
,Windows系统为
%USERPROFILE%\.claude
。需按照宿主平台解析用户主目录的方式解析该路径(请勿硬编码
~
)。
形式检测方式
{ORCH_CMD}
Agent名称格式
插件安装(1.9.0+)
<claude-home>/plugins/marketplaces/everything-claude-code/
目录存在
/everything-claude-code:orchestrate
everything-claude-code:<name>
传统裸安装上述目录不存在;Agent文件位于
<claude-home>/agents/
/orchestrate
<name>
为何这一点很重要:在插件安装模式下,Agent注册为
everything-claude-code:tdd-guide
形式。裸名称会触发模糊匹配,在并行调用时可能间歇性失败。在传统模式下,带前缀的形式未注册,会直接执行失败。

Available agent catalogue (must pick from these)

可用Agent目录(必须从中选择)

General:
  • planner
    — requirement restatement, risk decomposition, step planning
  • architect
    — architecture, system design, refactor proposals
  • tdd-guide
    — write tests → implement → 80%+ coverage
  • code-reviewer
    — generic code review
  • security-reviewer
    — security audit, OWASP, secret leakage
  • refactor-cleaner
    — dead code, duplicates, knip-class cleanup
  • doc-updater
    — documentation, codemap, README
  • docs-lookup
    — third-party library API lookups (Context7)
  • e2e-runner
    — end-to-end test orchestration
  • database-reviewer
    — PostgreSQL schema, migration, performance
  • harness-optimizer
    — local agent harness configuration
  • loop-operator
    — long-running autonomous loops
  • chief-of-staff
    — multi-channel triage (rarely a fit for plan steps)
Build error resolvers:
  • build-error-resolver
    (generic) /
    cpp-build-resolver
    /
    go-build-resolver
    /
    java-build-resolver
    /
    kotlin-build-resolver
    /
    rust-build-resolver
    /
    pytorch-build-resolver
Code reviewers:
  • python-reviewer
    /
    typescript-reviewer
    /
    go-reviewer
    /
    rust-reviewer
    /
    cpp-reviewer
    /
    java-reviewer
    /
    kotlin-reviewer
    /
    flutter-reviewer
A misspelled agent name fails
/orchestrate
. Cross-check against this list before emitting.
通用类:
  • planner
    — 需求重述、风险分解、步骤规划
  • architect
    — 架构设计、系统设计、重构提案
  • tdd-guide
    — 编写测试→实现→覆盖率达80%以上
  • code-reviewer
    — 通用代码评审
  • security-reviewer
    — 安全审计、OWASP合规、密钥泄露检查
  • refactor-cleaner
    — 死代码清理、重复代码移除、knip类清理
  • doc-updater
    — 文档更新、代码映射、README维护
  • docs-lookup
    — 第三方库API查询(基于Context7)
  • e2e-runner
    — 端到端测试编排
  • database-reviewer
    — PostgreSQL schema、迁移、性能优化
  • harness-optimizer
    — 本地Agent harness配置优化
  • loop-operator
    — 长期运行的自主循环
  • chief-of-staff
    — 多渠道分类处理(很少适用于计划步骤)
构建错误解决器:
  • build-error-resolver
    (通用)/
    cpp-build-resolver
    /
    go-build-resolver
    /
    java-build-resolver
    /
    kotlin-build-resolver
    /
    rust-build-resolver
    /
    pytorch-build-resolver
代码评审器:
  • python-reviewer
    /
    typescript-reviewer
    /
    go-reviewer
    /
    rust-reviewer
    /
    cpp-reviewer
    /
    java-reviewer
    /
    kotlin-reviewer
    /
    flutter-reviewer
拼写错误的Agent名称会导致
/orchestrate
执行失败。生成输出前请对照此列表进行交叉检查。

How It Works

工作流程

Phase 0 — Detect ECC mode + language

阶段0 — 检测ECC模式与语言

  1. Read
    <plan-doc-path>
    . If missing or empty, report and stop.
  2. Detect ECC install form once and freeze it into
    ECC_MODE
    . Algorithm (run in order, stop at the first match):
    1. If
      <claude-home>/plugins/marketplaces/everything-claude-code/
      exists →
      ECC_MODE=plugin
      .
    2. Else if
      <claude-home>/agents/
      exists and contains at least one ECC agent file (e.g.
      tdd-guide.md
      ,
      code-reviewer.md
      ) →
      ECC_MODE=legacy
      .
    3. Else → default to
      ECC_MODE=legacy
      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.
    4. If both markers exist (mixed install),
      plugin
      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.
  3. Resolve
    --lang
    . When
    auto
    , run a polyglot-aware detection:
    • Probe markers:
      pyproject.toml
      /
      uv.lock
      /
      requirements.txt
      → python;
      package.json
      → typescript;
      go.mod
      → go;
      Cargo.toml
      → rust;
      CMakeLists.txt
      or top-level
      *.cpp
      → cpp;
      pom.xml
      /
      build.gradle
      (Java) → java;
      build.gradle.kts
      or top-level Kotlin → kotlin;
      pubspec.yaml
      → flutter.
    • Polyglot tie-break: if more than one marker matches, pick the language whose source files outnumber the others (count via
      git ls-files
      , excluding
      vendor/
      ,
      node_modules/
      ,
      dist/
      ,
      build/
      ,
      .venv/
      , generated files, and obvious test fixtures). On a tie or when no language exceeds 60% of source files, set
      lang=unknown
      .
    • No marker matched → set
      lang=unknown
      .
    • lang=unknown
      is a sentinel — it is not an agent name. Phase 2 rules 4 and 5 turn it into
      code-reviewer
      /
      build-error-resolver
      at chain composition time.
  4. Detect a PyTorch sub-profile: when
    lang=python
    and any of
    pyproject.toml
    /
    requirements.txt
    /
    uv.lock
    declares a dependency on
    torch
    , set
    pytorch=true
    . This only affects
    build
    chain selection (Phase 2 rule below); the reviewer remains
    python-reviewer
    .
  5. 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
    ECC_MODE
    (Phase 4). Never let a pre-prefixed name flow into chain composition — it would double-prefix in plugin mode.
  1. 读取
    <plan-doc-path>
    。若文件缺失或为空,报告并终止操作。
  2. 检测ECC安装形式并将其固定为
    ECC_MODE
    。检测算法(按顺序执行,匹配到第一个即停止):
    1. <claude-home>/plugins/marketplaces/everything-claude-code/
      目录存在→
      ECC_MODE=plugin
    2. 否则,若
      <claude-home>/agents/
      目录存在且包含至少一个ECC Agent文件(如
      tdd-guide.md
      code-reviewer.md
      )→
      ECC_MODE=legacy
    3. 否则→默认设置为
      ECC_MODE=legacy
      ,并在输出顶部生成一行警告:
      > Warning: could not detect ECC install; defaulting to legacy form. If you use the plugin install, edit the prefixes manually.
    4. 若两种标记都存在(混合安装),
      plugin
      模式优先——插件命名空间是唯一能准确解析Agent名称而无需模糊匹配的模式。
    从此时起,所有生成的行都将使用与
    ECC_MODE
    匹配的前缀,斜杠命令和每个Agent名称均需遵循绝不允许在同一输出中混用两种形式
  3. 解析
    --lang
    参数。当设置为
    auto
    时,执行多语言感知检测:
    • 探测标记文件:
      pyproject.toml
      /
      uv.lock
      /
      requirements.txt
      →python;
      package.json
      →typescript;
      go.mod
      →go;
      Cargo.toml
      →rust;
      CMakeLists.txt
      或顶级
      *.cpp
      文件→cpp;
      pom.xml
      /
      build.gradle
      (Java)→java;
      build.gradle.kts
      或顶级Kotlin文件→kotlin;
      pubspec.yaml
      →flutter。
    • 多语言平局处理:若多个标记文件匹配,选择源文件数量最多的语言(通过
      git ls-files
      统计,排除
      vendor/
      node_modules/
      dist/
      build/
      .venv/
      、生成文件和明显的测试夹具)。若出现平局或没有语言的源文件占比超过60%,则设置
      lang=unknown
    • 无匹配标记文件→设置
      lang=unknown
    • lang=unknown
      是一个标记值——并非Agent名称。阶段2的规则4和5会在链组合时将其转换为
      code-reviewer
      /
      build-error-resolver
  4. 检测PyTorch子配置:当
    lang=python
    pyproject.toml
    /
    requirements.txt
    /
    uv.lock
    中声明了
    torch
    依赖时,设置
    pytorch=true
    。这仅影响构建链的选择(见下文阶段2规则);评审器仍为
    python-reviewer
  5. 标准化计划中声明的Agent名称:若计划文本引用了带插件前缀的Agent(如
    everything-claude-code:tdd-guide
    ),在验证或组合链之前需剥离前缀以获取目录中的裸名称。仅在输出阶段根据
    ECC_MODE
    重新添加前缀(阶段4)。绝不允许带前缀的名称进入链组合流程——否则在插件模式下会出现双重前缀。

Phase 1 — Decompose steps

阶段1 — 步骤分解

Identify "step units" in priority order:
  1. Explicit numbering:
    ## Step N
    /
    ### Phase N
    /
    ## N. ...
    / top-level ordered list.
  2. A "Step" column in a table.
  3. ---
    -separated blocks with verb-led headings.
  4. Otherwise treat each H2 as one step.
Per step extract
id
(1-based),
title
(≤ 80 chars),
intent
(1–3 sentences),
tags
.
按优先级识别“步骤单元”:
  1. 明确编号:
    ## Step N
    /
    ### Phase N
    /
    ## N. ...
    /顶级有序列表。
  2. 表格中的“Step”列。
  3. ---
    分隔的、以动词开头的标题块。
  4. 否则将每个H2标题视为一个步骤。
为每个步骤提取
id
(从1开始)、
title
(≤80字符)、
intent
(1-3句话)、
tags

Phase 2 — Tag and pick chain

阶段2 — 标记与链选择

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.
TagTrigger wordsDefault chain
design
architecture, design, choose, evaluate, RFC
planner,architect
plan
plan, breakdown, milestone
planner
impl
implement, build, add, create, port
tdd-guide,<lang>-reviewer
test
test, coverage, e2e, integration
tdd-guide,e2e-runner
refactor
refactor, cleanup, dedupe, split
architect,refactor-cleaner,<lang>-reviewer
migration
migrate, upgrade, rewrite, port
architect,tdd-guide,<lang>-reviewer
db
schema, migration, index, SQL, Postgres, alembic, sqlmodel
database-reviewer,<lang>-reviewer
security
encrypt, auth, secret, OWASP, PII
security-reviewer,<lang>-reviewer
build
build, compile, lint failure, CI
<lang>-build-resolver
(falls back to
build-error-resolver
)
docs
docs, readme, codemap, changelog
doc-updater
lookup
lookup, reference, API usage
docs-lookup
review
review, audit, verify
<lang>-reviewer,code-reviewer
loop
loop, autonomous, watchdog
loop-operator
Chain composition rules:
  1. 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.
  2. impl
    +
    security
    tdd-guide,<lang>-reviewer,security-reviewer
    .
  3. impl
    +
    db
    tdd-guide,database-reviewer,<lang>-reviewer
    .
  4. Deduplicate the resulting chain (preserve first occurrence). E.g.
    review
    +
    lang=unknown
    would yield
    code-reviewer,code-reviewer
    after rule 5; deduplication collapses it to
    code-reviewer
    .
  5. <lang>-reviewer
    resolves to
    code-reviewer
    when
    lang=unknown
    .
  6. <lang>-build-resolver
    resolves to
    build-error-resolver
    when
    lang=unknown
    . Special case: if Phase 0 set
    pytorch=true
    , use
    pytorch-build-resolver
    for
    build
    chains regardless of
    <lang>
    . There is no
    python-build-resolver
    ;
    --lang=python
    without
    pytorch=true
    resolves to
    build-error-resolver
    .
  7. Zero-tag steps: if no trigger word matches, set chain to
    code-reviewer
    and write
    no tag matched; default review-only chain
    under "Chain rationale".
  8. Chain length ≤ 4 after deduplication. If exceeded, drop weakest tag (
    lookup
    and
    docs
    first).
  9. Do not pair
    planner
    and
    architect
    in an
    impl
    chain (token waste). Pair them only on
    design
    steps.
  10. Steps tagged
    impl
    ,
    refactor
    , or
    migration
    end with a reviewer-class agent — any of
    <lang>-reviewer
    ,
    code-reviewer
    ,
    security-reviewer
    , or
    database-reviewer
    . The most domain-specific reviewer wins the tail position (e.g. rule 2's
    impl+security
    ends with
    security-reviewer
    ; rule 3's
    impl+db
    ends with
    <lang>-reviewer
    because
    database-reviewer
    already gates the migration earlier in the chain).
    test
    and
    build
    steps are gated by their own validators (
    e2e-runner
    and the build resolver respectively) and do not require an additional reviewer.
根据意图标记(允许多标记;链由主标记+次要标记堆叠构建):
以下触发词不区分大小写。支持多语言计划,只要含义与列出的英文触发词一致,匹配任何语言的词干即可。
标记触发词默认链
design
architecture, design, choose, evaluate, RFC
planner,architect
plan
plan, breakdown, milestone
planner
impl
implement, build, add, create, port
tdd-guide,<lang>-reviewer
test
test, coverage, e2e, integration
tdd-guide,e2e-runner
refactor
refactor, cleanup, dedupe, split
architect,refactor-cleaner,<lang>-reviewer
migration
migrate, upgrade, rewrite, port
architect,tdd-guide,<lang>-reviewer
db
schema, migration, index, SQL, Postgres, alembic, sqlmodel
database-reviewer,<lang>-reviewer
security
encrypt, auth, secret, OWASP, PII
security-reviewer,<lang>-reviewer
build
build, compile, lint failure, CI
<lang>-build-resolver
(回退到
build-error-resolver
docs
docs, readme, codemap, changelog
doc-updater
lookup
lookup, reference, API usage
docs-lookup
review
review, audit, verify
<lang>-reviewer,code-reviewer
loop
loop, autonomous, watchdog
loop-operator
链组合规则:
  1. 主标记选择:当一个步骤匹配多个标记时,表格中顺序靠前的标记(表格顶部优先级最高)为主标记;其余为次要标记。以下规则2和3明确处理特定多标记组合;否则,按标记表格顺序追加次要链。
  2. impl
    +
    security
    tdd-guide,<lang>-reviewer,security-reviewer
  3. impl
    +
    db
    tdd-guide,database-reviewer,<lang>-reviewer
  4. 去重生成的链(保留首次出现的Agent)。例如,
    review
    +
    lang=unknown
    在规则5处理后会得到
    code-reviewer,code-reviewer
    ;去重后简化为
    code-reviewer
  5. lang=unknown
    时,
    <lang>-reviewer
    解析为
    code-reviewer
  6. lang=unknown
    时,
    <lang>-build-resolver
    解析为
    build-error-resolver
    特殊情况:若阶段0设置
    pytorch=true
    ,则无论
    <lang>
    是什么,构建链都使用
    pytorch-build-resolver
    。不存在
    python-build-resolver
    --lang=python
    pytorch=false
    时解析为
    build-error-resolver
  7. 无标记步骤:若未匹配到任何触发词,将链设置为
    code-reviewer
    ,并在“链设计依据”下标注
    no tag matched; default review-only chain
  8. 去重后链长度≤4。若超过,移除最弱标记(优先移除
    lookup
    docs
    )。
  9. impl
    链中不要同时搭配
    planner
    architect
    (浪费token)。仅在
    design
    步骤中搭配两者。
  10. 标记为
    impl
    refactor
    migration
    的步骤必须以评审类Agent结尾——包括
    <lang>-reviewer
    code-reviewer
    security-reviewer
    database-reviewer
    。最具领域专业性的评审器位于链的末尾(例如规则2中的
    impl+security
    security-reviewer
    结尾;规则3中的
    impl+db
    <lang>-reviewer
    结尾,因为
    database-reviewer
    已在链的早期处理迁移验证)。
    test
    build
    步骤由各自的验证器(
    e2e-runner
    和构建解决器)把关,无需额外评审器。

Phase 3 — Compress task description

阶段3 — 压缩任务描述

Each emitted
<task description>
must:
  • Be self-contained (the first agent does not need the plan document open).
  • Start with
    [Plan: <path>#step-<id>]
    .
  • Include 1–3 verifiable Acceptance criteria.
  • Include a Scope guard (
    Out of scope: ...
    ) 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.
每个生成的
<task description>
必须:
  • 自包含(第一个Agent无需打开计划文档即可执行)。
  • [Plan: <path>#step-<id>]
    开头。
  • 包含1-3条可验证的验收标准。
  • 仅当计划中为此步骤声明了范围限制时,才包含范围防护语句(
    Out of scope: ...
    )。直接沿用原文表述。若计划中无范围限制声明,完全省略该语句——请勿自行编造。
  • 长度为200-600字符;单行;嵌入式
    "
    转义为
    \"
    ;无字面换行符。

Phase 4 — Output

阶段4 — 输出

Emit Markdown using the form determined by
ECC_MODE
. The output uses one form throughout — every
{ORCH_CMD}
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:
  • {ORCH_CMD}
    =
    /everything-claude-code:orchestrate
    under
    plugin
    ,
    /orchestrate
    under
    legacy
    .
  • {AGENT(name)}
    =
    everything-claude-code:<name>
    under
    plugin
    ,
    <name>
    under
    legacy
    .
  • The overview-table "Chain" column uses the same
    {AGENT(name)}
    rendering.
  • Per-step bash blocks contain only the runnable command. No
    # plugin form
    or
    # legacy form
    comments
    — the form is implicit and uniform across the whole output.
Output structure:
markdown
undefined
根据
ECC_MODE
确定的格式生成Markdown输出。整个输出统一使用一种格式——所有
{ORCH_CMD}
和Agent名称均使用阶段0确定的前缀。绝不输出两种格式;渲染后的输出中请勿包含“这是插件格式”/“移除前缀”等说明
具体渲染规则:
  • {ORCH_CMD}
    plugin
    模式下为
    /everything-claude-code:orchestrate
    legacy
    模式下为
    /orchestrate
  • {AGENT(name)}
    plugin
    模式下为
    everything-claude-code:<name>
    legacy
    模式下为
    <name>
  • 概览表格的“Chain”列使用相同的
    {AGENT(name)}
    渲染方式。
  • 每个步骤的bash块仅包含可运行的命令。请勿添加
    # plugin form
    # legacy form
    注释
    ——格式是隐含的,且在整个输出中保持一致。
输出结构:
markdown
undefined

Plan-Orchestrate Result

Plan-Orchestrate Result

Plan:
<path>
Lang:
<detected-or-given>
ECC mode:
<plugin | legacy>
Steps: <N> Scope: <all | step:n | range:a-b>
Plan:
<path>
Lang:
<detected-or-given>
ECC mode:
<plugin | legacy>
Steps: <N> Scope: <all | step:n | range:a-b>

Steps overview

Steps overview

#TitleTagsChain
1...impl, db
{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}
...

#TitleTagsChain
1...impl, db
{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}
...

Step 1 — <title>

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 `{ORCH_CMD}` and `{AGENT(...)}` 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.
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: <…>"

> 上述`{ORCH_CMD}`和`{AGENT(...)}`表示法描述了本技能在运行时执行的替换操作。实际生成的Markdown包含解析后的字符串,绝不包含占位符。

最后添加一个“批量执行”块,按顺序汇总每个步骤的命令,方便用户一次性粘贴所有命令。**在仅概览模式下跳过批量块**(见“大型计划”边缘情况):当仅生成概览表格时,无需生成每个步骤的命令,因此无需汇总。

Phase 5 — Self-check (run before emitting)

阶段5 — 自检(生成输出前执行)

  • Every agent in every chain comes from the catalogue (after stripping any
    everything-claude-code:
    prefix that appeared in the plan; see Phase 0 step 5).
  • Resolved
    {ORCH_CMD}
    and every resolved
    {AGENT(...)}
    use the same form (
    plugin
    or
    legacy
    ) — never mixed in one output.
  • No
    # plugin form
    /
    # legacy form
    annotations and no "strip the prefix" instructions remain in the rendered output.
  • No invented
    --mode
    /
    --gate
    /
    --agents=...
    fields.
  • Each task description is single-line, double-quoted, with embedded
    "
    escaped.
  • Each task description begins with
    [Plan: <path>#step-<id>]
    and includes Acceptance (1–3 items). The
    Out of scope:
    clause is present only when inherited from the plan.
  • No duplicate agent in any chain after Phase 2 dedup.
  • Chain length ≤ 4.
  • Steps tagged
    impl
    /
    refactor
    /
    migration
    end with a reviewer-class agent (
    <lang>-reviewer
    ,
    code-reviewer
    ,
    security-reviewer
    , or
    database-reviewer
    ).
    test
    and
    build
    are exempt — see Phase 2 rule 10.
  • Zero-tag steps emit
    code-reviewer
    with the rationale
    no tag matched; default review-only chain
    .
  • Overview table lists every step in the plan, regardless of
    --scope
    .
  • Per-step detail block count matches the resolved
    --scope
    (full plan when
    --scope=all
    ; one block for
    step:n
    ; range size for
    range:a-b
    ). In overview-only mode, no per-step blocks and no Batch block are emitted.
  • 每个链中的所有Agent均来自目录(已剥离计划中出现的任何
    everything-claude-code:
    前缀;见阶段0步骤5)。
  • 解析后的
    {ORCH_CMD}
    和所有解析后的
    {AGENT(...)}
    使用相同格式(
    plugin
    legacy
    )——同一输出中绝不混用。
  • 渲染后的输出中无
    # plugin form
    /
    # legacy form
    注释,也无“移除前缀”等说明。
  • 无自行添加的
    --mode
    /
    --gate
    /
    --agents=...
    参数。
  • 每个任务描述均为单行、双引号包裹,嵌入式
    "
    已转义。
  • 每个任务描述以
    [Plan: <path>#step-<id>]
    开头,并包含验收标准(1-3项)。
    Out of scope:
    语句仅在从计划中继承时才存在。
  • 阶段2去重后,任何链中无重复Agent。
  • 链长度≤4。
  • 标记为
    impl
    /
    refactor
    /
    migration
    的步骤以评审类Agent结尾(
    <lang>-reviewer
    code-reviewer
    security-reviewer
    database-reviewer
    )。
    test
    build
    步骤除外——见阶段2规则10。
  • 无标记步骤生成
    code-reviewer
    链,并标注依据
    no tag matched; default review-only chain
  • 概览表格列出计划中的所有步骤,无论
    --scope
    设置如何。
  • 每个步骤的详细块数量与解析后的
    --scope
    匹配(
    --scope=all
    时为完整计划;
    step:n
    时为1个块;
    range:a-b
    时为对应范围的数量)。在仅概览模式下,不生成每个步骤的详细块和批量执行块。

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
    --scope
    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
    everything-claude-code:
    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
    ECC_MODE
    .
  • Polyglot project where
    --lang=auto
    cannot pick a winner
    : set
    lang=unknown
    ; reviewer resolves to
    code-reviewer
    and build resolver to
    build-error-resolver
    . Mention the fallback under "Chain rationale".
  • 步骤不清晰:优先按H2/H3拆分;若仍不明确,报告“未检测到结构化步骤”并提供文档大纲,请求用户确认按大纲执行。
  • 大型计划(>1500行):进入仅概览模式——仅生成概览表格,并请求用户使用
    --scope
    缩小范围后重新运行以获取详细内容。在此模式下,跳过每个步骤的详细块和批量执行块。
  • 步骤过于宽泛(例如“完成所有后端工作”):不要强制使用单个链。建议拆分为N.a和N.b步骤,并提出拆分方案。
  • 计划中声明了Agent(罕见):首先剥离任何
    everything-claude-code:
    前缀
    以获取目录中的裸名称(阶段0步骤5),然后对照目录验证。替换无效Agent并在“链设计依据”下说明原因。裸名称会在输出阶段根据
    ECC_MODE
    重新添加前缀。
  • 多语言项目中
    --lang=auto
    无法确定主导语言
    :设置
    lang=unknown
    ;评审器解析为
    code-reviewer
    ,构建解决器解析为
    build-error-resolver
    。在“链设计依据”下提及回退方案。

Examples

示例

Example 1 — Plugin mode, Python plan

示例1 — 插件模式,Python计划

Input:
plan-orchestrate @docs/plan/example-feature.md --lang=python
Excerpt of expected output:
markdown
undefined
输入:
plan-orchestrate @docs/plan/example-feature.md --lang=python
预期输出节选:
markdown
undefined

Step 2 — Encrypt sensitive UserProfile fields

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"
undefined
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"
undefined

Example 2 — Legacy mode, same step

示例2 — 传统模式,同一步骤

If
ECC_MODE=legacy
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.
若检测到
ECC_MODE=legacy
,同一步骤会生成为统一的命令(输出中无任何带插件前缀的形式):
bash
/orchestrate custom "tdd-guide,database-reviewer,python-reviewer,security-reviewer" "[Plan: docs/plan/example-feature.md#step-2] ..."
上述两个示例展示了两种不同环境下的可能输出。单次技能调用只会生成其中一种输出,全程保持一致。

Notes

注意事项

  • Generative only. Never invoke
    /orchestrate
    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.
  • 仅生成内容。绝不从本技能内部调用
    /orchestrate
  • 任务描述需与计划文档的语言匹配(Agent名称始终保持英文)。
  • 除非用户明确要求,否则请勿在输出中插入“Co-Authored-By”行或表情符号。