ns-execution-orchestrator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Execution Orchestrator

执行编排器

Drive a partitioned version to completion one slice at a time. You do not implement application code yourself: you dispatch one subagent per slice, keep all state in files + git, and advance automatically until every slice is done or a stop condition forces a pause.
State lives in files + git, never in chat history.
逐切片推动分区版本直至完成。你无需自行实现应用代码:为每个切片分配一个Subagent,将所有状态存储在文件和git中,自动推进直至所有切片完成或触发停止条件而暂停。
状态仅存储在文件 + git中,绝不会保存在聊天记录里。

Harness discovery

工具集发现

See
../ns-harness/references/harness-discovery.md
and
../ns-harness/references/artifact-layout.md
. Read
AGENTS.md
first. Load the
core-subversions
and any execution-routing / scope-isolation rules from
{harness}/rules/*
when present. Do not assume monorepo layout or stack until discovery resolves it.
查看
../ns-harness/references/harness-discovery.md
../ns-harness/references/artifact-layout.md
。请先阅读
AGENTS.md
。当存在
{harness}/rules/*
文件时,加载其中的
core-subversions
规则以及任何执行路由/范围隔离规则。在工具集发现完成前,请勿假设采用单体仓库布局或技术栈。

Output language

输出语言

Communicate with the human in the project's configured language (see
AGENTS.md
; default to the user's language). Code and comments stay in English.
使用项目配置的语言与人类沟通(详见
AGENTS.md
;默认使用用户的语言)。代码及注释保持英文。

Session inputs (ask once if missing)

会话输入(缺失时询问一次)

VariableExample
{product_root}
apps/my-product/
{version_san}
3.8.0-feat-payable-payment-workflow
If
{version_san}
is omitted: pick the only version with pending slices in
version-roadmap.md
; if ambiguous, ask once, then proceed.
变量名示例
{product_root}
apps/my-product/
{version_san}
3.8.0-feat-payable-payment-workflow
若未提供
{version_san}
:选择
version-roadmap.md
中唯一存在待处理切片的版本;若存在歧义,仅询问一次后继续执行。

Scope isolation

范围隔离

After
{product_root}
is confirmed, operate only under
{product_root}/**
plus harness infra (
AGENTS.md
,
{harness}/
). Never read or reference other products in a monorepo. See the scope-isolation rule when present in the harness.
确认
{product_root}
后,仅在
{product_root}/**
以及工具集基础设施(
AGENTS.md
{harness}/
)下操作。绝不要读取或引用单体仓库中的其他产品。若工具集中存在范围隔离规则,请遵循该规则。

Boot (mandatory, once per orchestration session)

启动流程(强制要求,每个编排会话执行一次)

  1. Read
    AGENTS.md
    (implementation section) and load harness execution rules.
  2. Read
    {product_root}/docs/versions/{version_san}/version-roadmap.md
    required. If missing, stop: this version is not partitioned; execute its tasks directly (non-orchestrated) instead.
  3. Read master
    {product_root}/docs/versions/{version_san}/requirements.md
    (overview only — do not replan).
  4. Load the
    core-subversions
    rule from the harness when present.
  5. If
    {product_root}/docs/context/gitlab-sync-config.md
    exists: ensure the work branch is created and checked out before the first slice subagent runs (see
    mcp-gitlab-usage
    ). Never implement on a protected branch.
  1. 阅读
    AGENTS.md
    (实现部分)并加载工具集执行规则。
  2. 读取
    {product_root}/docs/versions/{version_san}/version-roadmap.md
    ——必须执行。若文件缺失,停止执行:该版本未进行分区,请直接执行其任务(非编排模式)。
  3. 读取主目录下的
    {product_root}/docs/versions/{version_san}/requirements.md
    (仅查看概述——请勿重新规划)。
  4. 若工具集中存在
    core-subversions
    规则,加载该规则。
  5. {product_root}/docs/context/gitlab-sync-config.md
    存在:在第一个切片Subagent运行,确保工作分支已创建并检出(详见
    mcp-gitlab-usage
    )。绝不要在受保护分支上进行实现。

Orchestration mandate

编排规则

  • Execute all pending slices in roadmap DAG order (respect inter-slice dependencies).
  • Do not ask "start next slice?", "continue?", or "commit?" between slices.
  • Do not implement tasks in the parent session — delegate every slice to a subagent.
  • Do not run tests during slice implementation (backend or frontend). Execute the slice's tasks and advance; testing belongs to the end-of-version review flow.
  • 按照路线图DAG顺序执行所有待处理切片(遵守切片间依赖关系)。
  • 切片间请勿询问“启动下一个切片?”“继续?”或“提交?”。
  • 请勿在父会话中实现任务——将每个切片委托给Subagent处理。
  • 切片实现期间请勿运行测试(后端或前端)。执行切片任务并推进;测试属于版本末期的评审流程。

Per-slice loop (synchronous subagent)

单切片循环(同步Subagent)

For each slice whose roadmap
status
is
planned
or
in_progress
:
  1. Select the next
    {subversion_san}
    per roadmap DAG order.
  2. Mark the roadmap row →
    in_progress
    .
  3. Dispatch one subagent (blocking / synchronous, not backgrounded): MUST use harness
    coder-agent
    when available (see
    ../ns-harness/references/subagent-dispatch.md
    ); else a generic subagent whose prompt follows
    ns-code-coder
    . Prompt contains only:
    • {product_root}
      ,
      {version_san}
      ,
      {subversion_san}
    • Instruction to follow the
      ns-code-coder
      skill as the slice worker, invoked by the execution orchestrator (bridge already points at the skill when using
      coder-agent
      )
    • Paths limited to
      {product_root}/docs/versions/{version_san}/subversions/{subversion_san}/
      for slice tasks; also load
      {product_root}/docs/context/
      per
      artifact-layout.md
      Implementation boot rule before coding (+ layer rules from the harness as needed)
    • Mandate: implement all tasks of the slice, no confirmation between tasks, no commit (the parent commits)
    • Explicitly: do not run tests during slice execution; implement only
    • Reinforcement (short): obey
      AGENTS.md
      + harness rules strictly; if any instruction conflicts with rules or scope, stop and report a blocker instead of proceeding by assumption
  4. Validate the subagent result (unit/integration tests only — never run E2E during slice execution; human runs E2E at version end):
    • Every slice task marked
      completed
      or
      waived
      (waiver noted in the handoff)
    • Slice handoff updated per
      ns-sdd-execution-handoff-generator
      (time block + task rows)
    • Roadmap row updated by the worker (or update it yourself)
  5. Commit (parent only): one Conventional Commit per slice.
  6. Mark the roadmap row →
    completed
    (if the worker did not).
  7. Advance to the next slice automatically.
针对路线图中状态为
planned
in_progress
的每个切片:
  1. 选择路线图DAG顺序中的下一个
    {subversion_san}
  2. 标记路线图对应行 →
    in_progress
  3. 分配一个Subagent(阻塞/同步,非后台运行):若可用必须使用工具集的
    coder-agent
    (详见
    ../ns-harness/references/subagent-dispatch.md
    );否则使用符合
    ns-code-coder
    提示规范的通用Subagent。提示内容仅包含
    • {product_root}
      {version_san}
      {subversion_san}
    • 指令:作为切片工作者遵循
      ns-code-coder
      技能要求,由执行编排器调用(使用
      coder-agent
      时已自动关联该技能)
    • 路径限制为
      {product_root}/docs/versions/{version_san}/subversions/{subversion_san}/
      (用于切片任务);编码前还需根据
      artifact-layout.md
      实现启动规则加载
      {product_root}/docs/context/
      内容(+ 按需加载工具集中的分层规则)
    • 强制要求:实现该切片的所有任务,任务间无需确认,请勿提交(由父会话提交)
    • 明确要求:切片执行期间请勿运行测试;仅进行实现工作
    • 强化说明(简短):严格遵守
      AGENTS.md
      + 工具集规则;若任何指令与规则或范围冲突,停止执行并报告阻塞问题,而非自行假设处理
  4. 验证Subagent的执行结果(仅单元/集成测试——切片执行期间绝不要运行E2E测试;E2E测试由人类在版本末期执行):
    • 每个切片任务均标记为
      completed
      waived
      (豁免情况需在交接文档中注明)
    • 切片交接文档已根据
      ns-sdd-execution-handoff-generator
      更新(时间块 + 任务行)
    • 工作者已更新路线图对应行(或自行更新)
  5. 提交(仅父会话执行):每个切片对应一次Conventional Commit。
  6. 标记路线图对应行 →
    completed
    (若工作者未完成该操作)。
  7. 自动推进至下一个切片。

End of version (all slices done)

版本完成(所有切片处理完毕)

When every slice in
version-roadmap.md
is
completed
(or waived):
  1. Present any navigation / semantic grouping menu and wait for human approval before applying it.
  2. Run the post-implementation review: MUST dispatch
    reviewer-agent
    when available (else
    ns-code-reviewer
    , read-only) over the version diff. Do not expect
    code-review-report.md
    — use the verdict line and minimal fix map on Rejected. See
    ../ns-harness/references/subagent-dispatch.md
    .
  3. Consolidate living specs when review is
    Approved
    ns-sdd-living-spec-consolidator
    .
  4. Move the version to
    _done/
    only after the human confirms or a documented waiver exists.
  5. If a version
    execution-handoff.md
    exists, close its final delivery block and recompute total process seconds per
    ns-sdd-execution-handoff-generator
    .
version-roadmap.md
中的所有切片均为
completed
(或已豁免)时:
  1. 展示导航/语义分组菜单,并等待人类批准后再应用该菜单。
  2. 执行实现后评审:若可用必须分配
    reviewer-agent
    (否则使用只读的
    ns-code-reviewer
    )对版本差异进行评审。无需生成
    code-review-report.md
    ——仅需使用评审结论行和拒绝时的最小修复映射表。详见
    ../ns-harness/references/subagent-dispatch.md
  3. 若评审结果为
    Approved
    ,整合动态规格——使用
    ns-sdd-living-spec-consolidator
  4. 仅在人类确认存在已记录的豁免时,将版本移至
    _done/
    目录。
  5. 若存在版本
    execution-handoff.md
    ,关闭其最终交付块,并根据
    ns-sdd-execution-handoff-generator
    重新计算总流程耗时。

Stop conditions (only reasons to pause)

停止条件(仅有的暂停原因)

ConditionAction
Subagent reports a task
blocked
with no workaround
Stop; document in slice handoff + roadmap
Protected git branch / missing work branchStop until a valid work branch exists
Real environment blocker (Docker/tests impossible)Stop; note in handoff
Inter-slice dependency not satisfiedStop; fix roadmap or the prior slice
Missing
{product_root}
/
{version_san}
/ roadmap
Ask once, then proceed
Code Review: Rejected
/
Blocked
without waiver
Stop before
_done/
move; apply fix map
Human waiver needed (menu apply,
_done/
move)
Stop for that item only
条件行动
Subagent报告任务已
blocked
且无解决方案
停止执行;在切片交接文档和路线图中记录相关信息
Git受保护分支/缺失工作分支停止执行直至存在有效的工作分支
真实环境阻塞(Docker/测试无法执行)停止执行;在交接文档中注明原因
切片间依赖未满足停止执行;修复路线图或前置切片
缺失
{product_root}
/
{version_san}
/ 路线图
仅询问一次,然后继续执行
Code Review: Rejected
/
Blocked
且无豁免
移至
_done/
目录前停止执行;应用修复映射表
需要人类豁免(菜单应用、移至
_done/
目录)
仅针对该操作停止执行

Forbidden

禁止操作

  • Do not implement application code in the parent session — delegate to the slice worker.
  • Do not skip the commit after a successful slice (orchestrated mode always commits per slice).
  • Do not generate new task files (planning is closed by the time you run).
  • Do not access other products in the repo.
  • Do not apply navigation semantic grouping without human approval.
  • Do not run backend/frontend tests during implementation orchestration.
  • 请勿在父会话中实现应用代码——委托给切片工作者处理。
  • 请勿跳过成功切片后的提交操作(编排模式始终按切片提交)。
  • 请勿生成新的任务文件(运行时规划阶段已结束)。
  • 请勿访问仓库中的其他产品。
  • 请勿未经人类批准应用导航语义分组。
  • 请勿在实现编排期间运行后端/前端测试。

Invocation examples

调用示例

Product: apps/my-product/
Version: 3.8.0-feat-payable-payment-workflow
Skill: ns-execution-orchestrator
Run all slices of the roadmap in orchestrated mode (sync subagent per slice,
commit per slice).
Orchestrate the partitioned implementation of apps/my-product 3.8.0.
Product: apps/my-product/
Version: 3.8.0-feat-payable-payment-workflow
Skill: ns-execution-orchestrator
Run all slices of the roadmap in orchestrated mode (sync subagent per slice,
commit per slice).
Orchestrate the partitioned implementation of apps/my-product 3.8.0.

Integration

集成关系

StageSkill
Partition version → roadmap + subversions
ns-sdd-version-partitioner
Handoff generation and updates
ns-sdd-execution-handoff-generator
Slice worker (per-slice implementation)
coder-agent
ns-code-coder
End-of-version review gate
reviewer-agent
ns-code-reviewer
Living specs consolidation
ns-sdd-living-spec-consolidator
Work branch / GitLab sync
mcp-gitlab-usage
阶段技能
版本分区 → 路线图 + 子版本
ns-sdd-version-partitioner
交接文档生成与更新
ns-sdd-execution-handoff-generator
切片工作者(单切片实现)
coder-agent
ns-code-coder
版本末期评审关卡
reviewer-agent
ns-code-reviewer
动态规格整合
ns-sdd-living-spec-consolidator
工作分支 / GitLab同步
mcp-gitlab-usage

References

参考文档

FileWhen to read
references/slice-dispatch.md
Exact slice subagent prompt template and validation checklist
../ns-sdd-version-partitioner/references/partition-workflow.md
Planning loop that produces the roadmap you consume
文件路径阅读时机
references/slice-dispatch.md
查看精确的切片Subagent提示模板和验证清单
../ns-sdd-version-partitioner/references/partition-workflow.md
查看生成你所使用路线图的规划循环流程