utility-pm-workflow-orchestrator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- PM-Skills | https://github.com/product-on-purpose/pm-skills | Apache 2.0 -->
<!-- PM-Skills | https://github.com/product-on-purpose/pm-skills | Apache 2.0 -->

PM Workflow Orchestrator (Dispatch Skill)

PM Workflow Orchestrator(调度Skill)

Cross-client dispatch wrapper for the
pm-workflow-orchestrator
sub-agent. Detects the runtime; dispatches to the native sub-agent on Claude Code; reads
agents/pm-workflow-orchestrator.md
and walks the run loop inline on non-Claude clients via the "reference + execute inline" pattern. The orchestrator runs an ordered sequence of pm-skills from a saved prioritized-action-plan (Mode A) or a user-named chain (Mode B), pausing for go/no-go by default and stopping on a failed or empty step.
Status summary (v2.24.0): EXPERIMENTAL on every client at ship.
  • Claude Code (native): EXPERIMENTAL until a live smoke test confirms the engine can invoke a downstream skill via the
    Skill
    tool in the installed plugin, and whether that skill runs inline in the engine context or isolated (see the v2.24.0 residual questions). The conductor is the model only for the run-loop / checkpoint / refusal SHAPE; no repo agent has ever declared
    Skill
    , so the mechanism is unproven.
  • All non-Claude clients (Codex CLI, Cursor, Windsurf, Copilot CLI, Gemini CLI): EXPERIMENTAL until a dedicated maintainer-gate test exercises a real multi-artifact inline WRITE run. The orchestrator writes up to three full PM artifacts and may thread state; this is strictly harder than the conductor's inline path and has never been live-validated off Claude Code.
On ANY client, run
--dry-run
FIRST as the readiness check (it exercises parsing, checkpointing, stop-on-fail, and the tool-capability pre-flight without invoking consequential skills). See the Sub-Agent Compatibility Matrix for the canonical safe-usage matrix.
pm-workflow-orchestrator子代理的跨客户端调度包装器。可检测运行时环境;在Claude Code上调度至原生子代理;在非Claude客户端上通过「参考+内联执行」模式读取
agents/pm-workflow-orchestrator.md
并内联执行运行循环。编排器会按顺序运行来自已保存的优先级行动计划(模式A)或用户命名链(模式B)的pm-skills序列,默认会暂停等待继续/终止确认,遇到失败或空步骤时停止运行。
状态摘要(v2.24.0): 发布时所有客户端均为实验性功能。
  • Claude Code(原生): 需通过实时冒烟测试确认引擎能否通过已安装插件中的
    Skill
    工具调用下游skill,以及该skill是在引擎上下文中内联运行还是隔离运行(详见v2.24.0遗留问题),在此之前均为实验性功能。指挥器仅负责运行循环/检查点/拒绝逻辑的框架;从未有仓库代理声明过
    Skill
    ,因此该机制尚未经过验证。
  • 所有非Claude客户端(Codex CLI、Cursor、Windsurf、Copilot CLI、Gemini CLI): 需通过专门的维护者网关测试完成真实的多工件内联WRITE运行,在此之前均为实验性功能。编排器可生成多达三个完整的PM工件并可能传递状态;这比指挥器的内联路径难度更高,且从未在Claude Code之外进行过实时验证。
在任何客户端上,都应先运行
--dry-run
作为就绪检查(它会测试解析、检查点、失败停止和工具能力预检,但不会调用有实际影响的skills)。如需规范的安全使用矩阵,请查看子代理兼容性矩阵

When to Use

使用场景

  • You produced a
    foundation-prioritized-action-plan
    and want to run its runnable Section 7 prompts in order, pausing for go/no-go (Mode A).
  • You want to run an ad-hoc, user-named chain of pm-skills against shared context (Mode B), for example
    deliver-prd
    then
    deliver-user-stories
    .
  • You want a generic runner for a dynamic chain that is NOT a pre-curated
    workflow-*
    command.
Run modes (orthogonal to client):
  • CHECKPOINTED (default): pause after each OK step for approve / edit / skip / redo.
  • GUARDED AUTO (
    --auto
    , opt-in):
    run without pausing on clean steps; still stop on failed, pause on empty, and stay checkpointed for Complex / Chaotic plans unless
    --force-auto
    .
  • 你已生成
    foundation-prioritized-action-plan
    ,希望按顺序运行其可执行的第7节提示,并在每个步骤后暂停等待确认(模式A)。
  • 你希望针对共享上下文运行临时的、用户命名的pm-skills链(模式B),例如先运行
    deliver-prd
    再运行
    deliver-user-stories
  • 你需要一个通用运行器来执行动态链,而非预定义的
    workflow-*
    命令。
运行模式(与客户端无关):
  • 带检查点(默认): 每个步骤执行成功后暂停,等待批准/编辑/跳过/重做。
  • 受保护自动模式(
    --auto
    ,可选启用):
    步骤执行正常时无需暂停;遇到失败仍会停止,遇到空步骤仍会暂停,除非使用
    --force-auto
    ,否则对于复杂/混乱的计划仍会保留检查点。

When NOT to Use

不适用场景

  • You want a fixed, curated, named chain that an author maintains by hand (for example a full Foundation Sprint or Customer Discovery) -> use the existing
    workflow-*
    command (
    workflow-foundation-sprint
    ,
    workflow-customer-discovery
    , ...). The orchestrator does NOT supersede those and surfaces a workflow step as MANUAL rather than nesting it.
  • You only need to PRODUCE a prioritized action plan (not run it) -> use
    foundation-prioritized-action-plan
    (which can then offer to hand its plan here).
  • You only need to review one artifact -> use
    utility-pm-critic
    .
  • You want to run library-maintenance machinery as if it were PM work -> the orchestrator refuses Tier-3 maintenance skills.
  • 你需要固定的、预定义的、人工维护的命名链(例如完整的基础冲刺或客户发现)-> 使用现有的
    workflow-*
    命令(
    workflow-foundation-sprint
    workflow-customer-discovery
    等)。编排器不会取代这些命令,而是将工作流步骤标记为手动操作,而非嵌套执行。
  • 你只需要生成优先级行动计划(不需要运行)-> 使用
    foundation-prioritized-action-plan
    (生成后可将计划移交至本工具)。
  • 你只需要审核单个工件-> 使用
    utility-pm-critic
  • 你希望将库维护机制当作PM工作运行-> 编排器会拒绝Tier-3维护skills。

Instructions

操作说明

Runtime detection step. Determine which AI client is invoking this skill. Run mode (checkpointed vs auto) comes from the user's flags and is independent of the client.
运行时检测步骤。确定调用此skill的AI客户端。运行模式(带检查点vs自动)来自用户的标志,与客户端无关。

If you are running in Claude Code with the pm-skills plugin installed

若在安装了pm-skills插件的Claude Code中运行

Invoke
@agent-pm-skills:pm-workflow-orchestrator
with the user's input plus any flags from
$ARGUMENTS
(
--auto
,
--force-auto
,
--dry-run
). The native sub-agent parses the input, builds the step list, and delegates each step via the
Skill
tool to the real downstream skill, running its own per-step loop with confirmation pauses. Relay the engine's per-step output blocks and the terminal output to the user.
This path is EXPERIMENTAL at v2.24.0 (see Status summary). Instruct the user to run
--dry-run
first.
调用
@agent-pm-skills:pm-workflow-orchestrator
,传入用户输入以及
$ARGUMENTS
中的所有标志(
--auto
--force-auto
--dry-run
)。原生子代理会解析输入、构建步骤列表,并通过
Skill
工具将每个步骤委派给实际的下游skill,运行自身的每步循环并等待确认。将引擎的每步输出块和终端输出传递给用户。
此路径在v2.24.0版本中为实验性功能(详见状态摘要)。请指导用户先运行
--dry-run

If you are running in any other AI client

若在其他任何AI客户端中运行

Codex CLI, Cursor, Windsurf, Copilot CLI, Gemini CLI, or any client without native pm-skills plugin sub-agent support:
  1. Tool-capability pre-flight (FIRST action, before parsing or step 1). Verify the client can (a) write a file under
    _pm-skills/plan-orchestrator/<run>/
    and (b) run any Bash a downstream skill needs.
    • If file write is unavailable: degrade explicitly to CHAT-ONLY mode (warn that multi-step reliability drops and context budget rises because full artifacts must stay in-window) for short runs, or refuse a long run with a clear message. Do not fail mid-chain.
    • If Bash is unavailable for a step that needs it: surface that step as blocked at its boundary.
    • Record the detected capabilities; they govern disk-write below.
  2. Read the canonical sub-agent definition at
    agents/pm-workflow-orchestrator.md
    .
  3. Read the shared parse and step-status contract at
    references/PARSE-CONTRACT.md
    (the engine reads the same file; this is what keeps the inline branch and the engine from drifting).
  4. Execute the engine body as your operating instructions: run the pre-flight refusals, build the ordered step list (Mode A parse or Mode B named chain), then walk the per-step loop.
  5. At each step, read the downstream skill's
    SKILL.md
    and execute its method inline in this window; classify the return PRODUCED / EMPTY / FAILED with the rubric in
    references/PARSE-CONTRACT.md
    ; write
    NN-<skill-name>.md
    to the run directory when disk-write is on.
  6. Honor the run mode: pause at each OK step in CHECKPOINTED; auto-advance only unambiguously-PRODUCED steps in GUARDED AUTO; a FAILED step STOPS the run; an EMPTY or ambiguous step always pauses for confirmation (a forced checkpoint pause the user can clear), regardless of
    --force-auto
    .
  7. Emit the terminal output (run complete or halted) per the engine's section 4.5.
The "reference + execute inline" pattern is what enables cross-client compatibility. It is EXPERIMENTAL here until the maintainer-gate WRITE harness validates a real multi-artifact run on each client.
Codex CLI、Cursor、Windsurf、Copilot CLI、Gemini CLI或任何不支持原生pm-skills插件子代理的客户端:
  1. 工具能力预检(第一步,在解析或执行步骤1之前)。验证客户端是否能够(a)在
    _pm-skills/plan-orchestrator/<run>/
    路径下写入文件,以及(b)运行下游skill所需的任何Bash命令。
    • 若无法写入文件:明确降级为仅聊天模式(警告多步骤运行的可靠性会下降,且上下文预算会增加,因为完整工件必须保留在窗口中)以支持短运行,或明确拒绝长运行并给出清晰提示。不要在链运行中途失败。
    • 若某步骤需要Bash但客户端无法提供:在该步骤边界处标记为阻塞。
    • 记录检测到的能力;这些能力将决定后续的磁盘写入操作。
  2. 读取位于
    agents/pm-workflow-orchestrator.md
    的规范子代理定义。
  3. 读取位于
    references/PARSE-CONTRACT.md
    的共享解析和步骤状态契约(引擎会读取同一文件;这是确保内联分支与引擎保持一致的关键)。
  4. 将引擎主体作为操作指令执行:运行预检拒绝逻辑、构建有序步骤列表(模式A解析或模式B命名链),然后执行每步循环。
  5. 在每个步骤中,读取下游skill的
    SKILL.md
    并在此窗口内联执行其方法;根据
    references/PARSE-CONTRACT.md
    中的规则将返回结果分类为已生成/空/失败;当磁盘写入功能启用时,将
    NN-<skill-name>.md
    写入运行目录。
  6. 遵循运行模式:在带检查点模式下,每个成功步骤后暂停;在受保护自动模式下,仅自动推进明确标记为已生成的步骤;失败步骤会停止运行;空步骤或不明确的步骤始终会暂停等待确认(用户可清除的强制检查点暂停),无论是否使用
    --force-auto
  7. 根据引擎的4.5节输出终端结果(运行完成或终止)。
「参考+内联执行」模式是实现跨客户端兼容性的关键。在维护者网关WRITE工具在每个客户端上验证真实的多工件运行之前,此模式均为实验性功能。

--dry-run
(readiness probe; run this FIRST on any client)

--dry-run
(就绪探测;在任何客户端上都应先运行此命令)

--dry-run
walks the full step list and exercises parsing, checkpointing, stop-on-fail, and the tool-capability pre-flight, but does NOT invoke any consequential downstream skill. Each step emits "NOT EXECUTED - dry run" plus what WOULD happen (which skill, which mode, whether disk-write would engage). Use it to confirm the plan parses, the chain resolves, and the client has the tool access the live run needs, before spending tokens on real delegation.
--dry-run
会遍历完整的步骤列表,测试解析、检查点、失败停止和工具能力预检,但不会调用任何有实际影响的下游skill。每个步骤都会输出“未执行 - 试运行”以及原本会执行的操作(哪个skill、哪种模式、是否会启用磁盘写入)。可通过此命令确认计划可解析、链可解析,且客户端具备实际运行所需的工具访问权限,再投入令牌进行真实的委派操作。

Cross-Client Notes

跨客户端注意事项

Because non-Claude clients run the loop and every step inline in ONE context window:
  1. Context budget. The combined budget (engine body + per-step downstream skill reads + produced artifacts) can approach context limits on multi-step runs. The engine auto-enables disk-write for 2+ step runs and keeps only a one-line summary per completed step in context; CHAT-ONLY mode loses that mitigation, so prefer a write-capable client for long chains.
  2. Tool authorization. Inline execution must have file-write and Bash access (not Read-only). The pre-flight (step 1 above) checks this. Codex may need its sandbox write flag enabled; Cursor and Gemini may interpose approval gates per step.
  3. No native chaining. This is why the engine delegates by
    Skill
    (Claude Code) or inline read-and-execute (non-Claude), never by spawning a sub-agent. A Mode A step that resolves to a dispatch skill which would fan out to a sub-agent (only
    utility-pm-critic
    ) is handled by inlining the leaf agent, never by chaining (engine section 7.2).
由于非Claude客户端会在同一个上下文窗口内运行循环和每个步骤:
  1. 上下文预算。多步骤运行的总预算(引擎主体+每步下游skill读取+生成的工件)可能接近上下文限制。引擎会自动为2步及以上的运行启用磁盘写入功能,仅在上下文中保留每个已完成步骤的一行摘要;仅聊天模式会失去此缓解措施,因此对于长链,建议支持写入的客户端。
  2. 工具授权。内联执行必须具备文件写入和Bash访问权限(非只读)。上述第一步的预检会检查此权限。Codex可能需要启用其沙箱写入标志;Cursor和Gemini可能会在每个步骤插入审批网关。
  3. 无原生链式调用。这就是引擎通过
    Skill
    (Claude Code)或内联读取执行(非Claude)进行委派,而非生成子代理的原因。模式A中解析为调度skill且会扩展至子代理的步骤(仅
    utility-pm-critic
    )会通过内联叶子代理处理,绝不会进行链式调用(引擎7.2节)。

Reference Files

参考文件

  • Canonical sub-agent definition:
    agents/pm-workflow-orchestrator.md
  • Shared parse and step-status contract:
    references/PARSE-CONTRACT.md
  • Output template:
    references/TEMPLATE.md
  • Worked example:
    references/EXAMPLE.md
  • Producer (hands plans here in HANDOFF mode):
    skills/foundation-prioritized-action-plan/SKILL.md
  • Sub-agent compatibility matrix:
    docs/reference/sub-agent-compatibility.md
  • Runtime components catalog:
    docs/reference/runtime-components.md
  • Library sample (single checkpointed run):
    library/sub-agent-samples/pm-workflow-orchestrator/
  • 规范子代理定义:
    agents/pm-workflow-orchestrator.md
  • 共享解析和步骤状态契约:
    references/PARSE-CONTRACT.md
  • 输出模板:
    references/TEMPLATE.md
  • 示例:
    references/EXAMPLE.md
  • 生成器(在HANDOFF模式下将计划移交至此):
    skills/foundation-prioritized-action-plan/SKILL.md
  • 子代理兼容性矩阵:
    docs/reference/sub-agent-compatibility.md
  • 运行时组件目录:
    docs/reference/runtime-components.md
  • 库示例(单个带检查点的运行):
    library/sub-agent-samples/pm-workflow-orchestrator/