delegate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Delegation Skill

任务委派Skill

Dispatch implementation tasks to subagents with proper context, worktree isolation, and TDD requirements. This skill follows a three-step flow: Prepare, Dispatch, Monitor.
在具备合适上下文、工作树隔离和TDD要求的前提下,将实现任务分派给子Agent。该Skill遵循三步流程:准备、分派、监控

Triggers

触发条件

Activate this skill when:
  • User runs
    /delegate
    command
  • Implementation plan is ready with extractable tasks
  • User wants to parallelize work across subagents
Exception — oneshot workflows skip delegation entirely. The oneshot playbook runs an in-session TDD loop in the main agent's context, with no subagent dispatch or review phase. If
workflowType === "oneshot"
, do not call this skill — see
@skills/oneshot/SKILL.md
for the lightweight path.
在以下场景激活本Skill:
  • 用户执行
    /delegate
    命令
  • 实现计划已准备就绪,可提取出具体任务
  • 用户希望通过子Agent并行处理工作
例外情况 —— 单次执行工作流完全跳过委派流程。单次执行剧本会在主Agent的上下文中运行会话内TDD循环,无需子Agent分派或审查阶段。若
workflowType === "oneshot"
,请勿调用本Skill —— 请查看
@skills/oneshot/SKILL.md
了解轻量级流程。

Core Principles

核心原则

Fresh Context Per Task (MANDATORY)

任务专属独立上下文(强制要求)

Each subagent MUST start with a clean, self-contained context. As established in the Anthropic best practices for multi-agent coordination:
  • No shared state assumptions. Every subagent prompt must contain the full task description, file paths, TDD requirements, and acceptance criteria. Never say "see the plan" or "as discussed earlier."
  • No cross-agent references. Subagent A must not depend on output from Subagent B unless explicitly sequenced with a dependency edge in the plan.
  • Isolated worktrees. Each subagent operates in its own
    git worktree
    . Parallel agents in the same worktree will corrupt branch state.
Rationalization patterns that violate this principle are catalogued in
references/rationalization-refutation.md
.
每个子Agent必须从干净、独立的上下文启动。根据Anthropic多Agent协作最佳实践:
  • 无共享状态假设。每个子Agent的提示必须包含完整的任务描述、文件路径、TDD要求和验收标准。绝不能说“查看计划”或“如之前讨论”。
  • 无跨Agent引用。子Agent A不得依赖子Agent B的输出,除非计划中明确设置了依赖顺序。
  • 隔离工作树。每个子Agent在独立的
    git worktree
    中运行。同一工作树中的并行Agent会破坏分支状态。
违反此原则的常见合理化借口已整理在
references/rationalization-refutation.md
中。

Delegation Modes

委派模式

The default
subagent
mode dispatches each task using the runtime's spawn primitive:
task
.
Use the
recommendedModel
from
prepare_delegation
task classifications when available. If no classification exists (e.g., fixer dispatch), omit
model
to inherit the session default.
默认的
subagent
模式使用运行时的生成原语
task
分派每个任务。
prepare_delegation
任务分类中提供了
recommendedModel
,请使用该模型。若无分类信息(例如修复任务分派),则省略
model
参数,继承会话默认模型。

Pre-Dispatch Schema Discovery

分派前模式发现

Before dispatching, query decision runbooks to classify the work and select the right strategy:
  1. Task complexity:
    exarchos_orchestrate({ action: "runbook", id: "task-classification" })
    to get the cognitive complexity classification tree. Low-complexity tasks can use the scaffolder agent spec for faster execution.
  2. Dispatch strategy:
    exarchos_orchestrate({ action: "runbook", id: "dispatch-decision" })
    for dispatch strategy (parallel vs sequential, team sizing, isolation mode).

分派前,查询决策手册对工作进行分类并选择合适策略:
  1. 任务复杂度:调用
    exarchos_orchestrate({ action: "runbook", id: "task-classification" })
    获取认知复杂度分类树。低复杂度任务可使用脚手架Agent规范以提升执行速度。
  2. 分派策略:调用
    exarchos_orchestrate({ action: "runbook", id: "dispatch-decision" })
    获取分派策略(并行/串行、团队规模、隔离模式)。

Step 1: Prepare

步骤1:准备

Use the
prepare_delegation
composite action to validate readiness in a single call. This replaces manual script invocations and individual checks.
Authoritative spec: the canonical list of preconditions, blockers, and arguments for
prepare_delegation
lives in the runtime — query it with
exarchos_orchestrate({ action: "describe", actions: ["prepare_delegation"] })
if anything in this skill drifts from observed behavior. Treat the runtime
describe
output as the source of truth.
使用
prepare_delegation
复合操作一次性验证就绪状态。这替代了手动脚本调用和单独检查。
权威规范
prepare_delegation
的前提条件、阻塞因素和参数的标准列表存储在运行时中 —— 若本Skill内容与实际行为不符,请调用
exarchos_orchestrate({ action: "describe", actions: ["prepare_delegation"] })
查询。请将运行时的
describe
输出视为唯一可信来源。

Step 0 — Pre-emit (required before
prepare_delegation
)

步骤0 —— 预发送(调用
prepare_delegation
前必须执行)

Before calling
prepare_delegation
, the workflow stream must contain a
task.assigned
event for each task. The readiness view counts these events to populate
taskCount
; without them,
prepare_delegation
returns
{ ready: false, blockers: ["no task.assigned events found ..."] }
.
typescript
exarchos_event({
  action: "batch_append",
  stream: "<featureId>",
  events: tasks.map((t) => ({
    type: "task.assigned",
    data: { taskId: t.id, title: t.title, branch: t.branch },
  })),
})
调用
prepare_delegation
前,工作流流必须包含每个任务的
task.assigned
事件。就绪视图会统计这些事件以填充
taskCount
;若无这些事件,
prepare_delegation
会返回
{ ready: false, blockers: ["未找到task.assigned事件..."] }
typescript
exarchos_event({
  action: "batch_append",
  stream: "<featureId>",
  events: tasks.map((t) => ({
    type: "task.assigned",
    data: { taskId: t.id, title: t.title, branch: t.branch },
  })),
})

Step 1 — Prepare (readiness check)

步骤1 —— 准备(就绪检查)

typescript
exarchos_orchestrate({
  action: "prepare_delegation",
  featureId: "<featureId>",
  planPath: "docs/specs/<the-decomposition-spec>.md",
  tasks: [{ id: "task-001", title: "...", modules: [...] }, ...]
})
Pass
planPath
.
It points
prepare_delegation
at the decomposition markdown so it lifts each task's
**Risk Tier:**
/
**Boundary Touching:**
stamp automatically (deterministic parse — no hand-transcription). The stamp is what selects the per-task verification depth below; without
planPath
(and without an explicit
riskTier
/
boundaryTouching
on a task) every task falls back to a keyword/glob heuristic that under-provisions planner-
high
/boundary tasks (#1636). You may still set
riskTier
/
boundaryTouching
explicitly on a
tasks[]
entry to override the plan for one task; an explicit value always wins.
The composite action is read-only — it queries delegation readiness and assembles quality hints. It does not create worktrees and does not run
npm install
(its authoritative description is "Query delegation readiness and prepare quality hints for subagent dispatch"). Worktree materialization is the host's responsibility under native isolation, or an explicit
setup_worktree
call — which lays out the canonical
.worktrees/<taskId>-<taskName>
path. The action performs:
  1. State validation — verifies workflow state is in
    delegate
    phase, plan exists, plan approved
  2. Quality signal assembly — queries
    code_quality
    view; if
    gatePassRate < 0.80
    , returns quality hints to embed in prompts. Emits
    gate.executed('plan-coverage')
    on success (no pre-query needed)
  3. Benchmark detection — sets
    verification.hasBenchmarks
    if any task has benchmark criteria
  4. Readiness verdict — returns
    { ready: true, worktrees: [...], qualityHints: [...] }
    (the
    worktrees
    array reports the expected paths, not created ones) or
    { ready: false, reason: "..." }
If
blocked: true
with
reason: "current-branch-protected"
:
the response includes a
hint
field (e.g. "checkout the feature/phase branch before dispatching delegation"). Apply the hint, then re-call.
If
ready: false
:
Stop. Report the reason to the user. Do not proceed.
If
ready: true
:
Extract the
worktrees
paths and
qualityHints
for prompt construction.
Native isolation — verify worktrees before agents edit. Under native isolation (
nativeIsolation: true
),
prepare_delegation
returns
ready: true
even when the host has not yet materialized worktrees (
worktrees.ready: 0
), because isolation is the host's responsibility — readiness cannot be confirmed at prepare-time. When
worktrees.expected > 0
and none are confirmed ready, the response carries a warning: "native isolation requested; N worktree(s) expected but 0 confirmed ready — verify the host materializes worktrees or dispatch may land in the shared checkout." Do not ignore it. After dispatching, and before any agent edits files, confirm each agent's working directory is under
.worktrees/
(e.g. the agent's first reported
pwd
). If an agent is NOT in a worktree it has landed in the shared checkout — stop it, create the worktree manually with
git worktree add -b <task-branch> .worktrees/<taskId>-<taskName> <integration-tip>
(the same
<taskId>-<taskName>
layout
setup_worktree
uses, so a manually-created worktree is recognized without a second-path retry), redirect the agent to that path, and only then allow edits. Skipping this check risks silent shared-tree corruption across parallel agents.
typescript
exarchos_orchestrate({
  action: "prepare_delegation",
  featureId: "<featureId>",
  planPath: "docs/specs/<the-decomposition-spec>.md",
  tasks: [{ id: "task-001", title: "...", modules: [...] }, ...]
})
传入
planPath
。它指引
prepare_delegation
找到分解文档,以便自动提取每个任务的
**Risk Tier:**
/
**Boundary Touching:**
标记(确定性解析 —— 无需手动转录)。该标记用于选择下文的任务验证深度;若无
planPath
(且任务未显式设置
riskTier
/
boundaryTouching
),所有任务会回退到关键词/通配符启发式规则,这会导致规划师标记为
high
/边界任务的验证资源不足(#1636)。你仍可在
tasks[]
条目中显式设置
riskTier
/
boundaryTouching
以覆盖计划中的单个任务值;显式设置的值始终优先。
复合操作是只读的 —— 它查询委派就绪状态并收集质量提示。它不会创建工作树,也不会运行
npm install
(其权威描述为“查询委派就绪状态并为子Agent分派准备质量提示”)。工作树实例化是原生隔离下宿主的责任,或需显式调用
setup_worktree
—— 该操作会创建标准路径
.worktrees/<taskId>-<taskName>
。此操作执行以下内容:
  1. 状态验证 —— 验证工作流状态处于
    delegate
    阶段、计划存在且已获批
  2. 质量信号收集 —— 查询
    code_quality
    视图;若
    gatePassRate < 0.80
    ,则返回质量提示以嵌入到提示词中。成功时会发送
    gate.executed('plan-coverage')
    事件(无需预查询)
  3. 基准检测 —— 若任何任务包含基准标准,则设置
    verification.hasBenchmarks
  4. 就绪判定 —— 返回
    { ready: true, worktrees: [...], qualityHints: [...] }
    worktrees
    数组报告预期路径,而非已创建路径)或
    { ready: false, reason: "..." }
若返回
blocked: true
reason: "current-branch-protected"
:响应包含
hint
字段(例如“分派前切换到feature/phase分支”)。应用该提示后重新调用。
ready: false
:停止操作。向用户报告原因。请勿继续。
ready: true
:提取
worktrees
路径和
qualityHints
用于提示词构建。
原生隔离 —— Agent编辑前验证工作树。在原生隔离模式下(
nativeIsolation: true
),即使宿主尚未实例化工作树(
worktrees.ready: 0
),
prepare_delegation
仍会返回
ready: true
,因为隔离是宿主的责任 —— 准备阶段无法确认就绪状态。当
worktrees.expected > 0
且无已确认就绪的工作树时,响应会携带警告:*“请求原生隔离;预计N个工作树,但0个已确认就绪 —— 请验证宿主已实例化工作树,否则分派可能会进入共享检出目录。”*请勿忽略该警告。分派后,在任何Agent编辑文件前,确认每个Agent的工作目录位于
.worktrees/
下(例如Agent首次报告的
pwd
)。若Agent不在工作树中,则它已进入共享检出目录 —— 停止该Agent,手动创建工作树:
git worktree add -b <task-branch> .worktrees/<taskId>-<taskName> <integration-tip>
(使用与
setup_worktree
相同的
<taskId>-<taskName>
结构,以便手动创建的工作树无需二次路径重试即可被识别),将Agent重定向到该路径,然后才允许编辑。跳过此检查可能导致并行Agent之间的共享树静默损坏。

Task Extraction

任务提取

From the implementation plan, extract for each task:
  • Full task description (paste inline; never reference external files)
  • The
    **Risk Tier:**
    /
    **Boundary Touching:**
    stamps are lifted automatically when you pass
    planPath
    (above) — you do NOT need to re-transcribe them into
    tasks[]
    ; pass them explicitly only to override the plan for a specific task
  • Files to create/modify as worktree-relative paths rooted inside the worktree (e.g.
    src/foo.ts
    ) — never an absolute parent-repo path, and never a
    ..
    sequence that escapes the worktree root. Either form resolves outside the agent's worktree cwd and silently writes into the main worktree. This is the platform-agnostic line of defense — it must hold on every runtime.
  • Test file paths (worktree-relative) and expected test names
  • Dependencies on other tasks (for sequencing)
  • Property-based testing flag (
    testingStrategy.propertyTests
    )
For a complete worked example of this flow, see
references/worked-example.md
.

从实现计划中为每个任务提取以下内容:
  • 完整任务描述(直接粘贴;绝不要引用外部文件)
  • 传入
    planPath
    后,
    **Risk Tier:**
    /
    **Boundary Touching:**
    标记会自动提取(上文已说明)—— 你无需将其重新转录到
    tasks[]
    中;仅需为特定任务显式传入以覆盖计划值
  • 要创建/修改的文件路径(工作树内的相对路径,例如
    src/foo.ts
    )—— 绝不要使用绝对父仓库路径,也不要使用
    ..
    序列跳出工作树根目录。这两种形式都会解析到Agent工作树当前工作目录之外,并静默写入主工作树。这是平台无关的防御线 —— 必须在所有运行时中严格遵守。
  • 测试文件路径(工作树相对路径)和预期测试名称
  • 对其他任务的依赖(用于排序)
  • 属性测试标记(
    testingStrategy.propertyTests
有关此流程的完整示例,请查看
references/worked-example.md

Step 2: Dispatch

步骤2:分派

Build subagent prompts using
references/implementer-prompt.md
as the template. Each prompt MUST include the full task context — this is the fresh-context principle in action.
使用
references/implementer-prompt.md
作为模板构建子Agent提示词。每个提示词必须包含完整的任务上下文 —— 这是独立上下文原则的具体体现。

Prompt Construction

提示词构建

On runtimes with native agent definitions:
The implementer agent definition already includes the system prompt, model, isolation, skills, hooks, and memory. The dispatch prompt should contain ONLY task-specific context:
  1. Full task description (requirements, acceptance criteria)
  2. Working directory (worktree path from Step 1)
  3. File paths to create/modify and test file paths
  4. Quality hints (if any)
  5. PBT flag when
    propertyTests: true
Full prompt template (default):
For each task:
  1. Fill the implementer prompt template with task-specific details
  2. Set the
    Working Directory
    to the worktree path from Step 1
  3. Include quality hints (if any) in the Quality Signals section
  4. Include PBT section from
    references/pbt-patterns.md
    when
    propertyTests: true
  5. Include testing patterns from
    references/testing-patterns.md
在具备原生Agent定义的运行时中:
实现者Agent定义已包含系统提示词、模型、隔离设置、Skill、钩子和内存。分派提示词应仅包含任务特定上下文:
  1. 完整任务描述(需求、验收标准)
  2. 工作目录(步骤1中的工作树路径)
  3. 要创建/修改的文件路径和测试文件路径
  4. 质量提示(若有)
  5. propertyTests: true
    时的PBT标记
完整提示词模板(默认):
针对每个任务:
  1. 使用任务特定细节填充实现者提示词模板
  2. Working Directory
    设置为步骤1中的工作树路径
  3. 在Quality Signals部分包含质量提示(若有)
  4. propertyTests: true
    时,包含
    references/pbt-patterns.md
    中的PBT部分
  5. 包含
    references/testing-patterns.md
    中的测试模式

Tier-selected verification note — dispatch the rendered prompt

按层级选择的验证说明 —— 分派渲染后的提示词

prepare_delegation
resolves each task's risk tier — from the plan stamp when you passed
planPath
(the planner's authored value wins over the heuristic; a divergence is surfaced as a
stamp:
advisory in
warnings
). To keep a wave's payload economical it does not repeat a full rendered prompt on every task. Instead it returns, once, a shared
implementerPromptTemplate
carrying a
verificationNote
placeholder token, a deduped
verificationNotes
map (keyed by
"<riskTier>|<boundaryTouching>"
), and a per-task
taskClassifications[i].verificationNoteKey
. Reconstruct a task's tier-selected prompt by replacing that placeholder token in the template with the task's note —
verificationNotes[taskClassifications[i].verificationNoteKey]
— where a low-tier task's key selects a terse static-analysis steer and a high-tier task's selects the test-after + integration-suite rung. (Pass
detail: true
— alias
outputFormat: "prompt-only"
— to get the fully inline
taskClassifications[i].implementerPrompt
per task instead; it is lossless vs. the splice.)
Dispatch THAT reconstructed prompt — not the static agent default. The shipped
agents/implementer.md
bakes a fixed medium-tier note (a self-contained fallback for runtimes that pre-bind a named agent). Use it verbatim only when no classification exists (e.g. a fixer dispatch). Otherwise, the orchestrator's dispatch payload must be built from
implementerPromptTemplate
with the task's
verificationNoteKey
note spliced in, then fill its
taskDescription
/
requirements
/
filePaths
placeholders (the same template slots in
references/implementer-prompt.md
) with the task-specific context above. Dispatching the static default instead re-imposes medium-RGR ceremony on every task regardless of tier — the exact gap this seam closes. The tier is pure data from the classification stamp; no workflow-type branching is involved.
prepare_delegation
会解析每个任务的风险层级 —— 传入
planPath
时从计划标记获取(规划师设定的值优先于启发式规则;若存在差异,会在
warnings
中以
stamp:
提示显示)。为减少批量负载,它不会为每个任务重复完整渲染的提示词。相反,它会返回一个共享的
implementerPromptTemplate
(包含
verificationNote
占位符)、去重的
verificationNotes
映射(键为
"<riskTier>|<boundaryTouching>"
),以及每个任务的
taskClassifications[i].verificationNoteKey
。通过将模板中的占位符替换为任务对应的说明 ——
verificationNotes[taskClassifications[i].verificationNoteKey]
—— 重构任务的层级化提示词:低层级任务的键会选择简洁的静态分析指引,高层级任务则选择测试后+集成套件验证。(传入
detail: true
—— 别名
outputFormat: "prompt-only"
—— 可获取每个任务完整内联的
taskClassifications[i].implementerPrompt
;与拼接方式相比无信息损失。)
分派重构后的提示词 —— 而非静态Agent默认提示词。发布的
agents/implementer.md
包含固定的中等级别说明(为预绑定命名Agent的运行时提供独立 fallback)。仅当无分类信息时(例如修复任务分派),才直接使用该默认提示词。否则,编排器的分派负载必须基于
implementerPromptTemplate
,将任务的
verificationNoteKey
对应的说明插入其中,然后用上述任务特定上下文填充
taskDescription
/
requirements
/
filePaths
占位符(与
references/implementer-prompt.md
中的模板插槽一致)。若分派静态默认提示词,会导致所有任务无论层级如何都强制执行中等RGR流程 —— 这正是此机制要解决的问题。层级直接来自分类标记的纯数据;无需基于工作流类型进行分支处理。

Decision Runbooks

决策手册

For dispatch strategy decisions, query the decision runbook:
exarchos_orchestrate({ action: "runbook", id: "dispatch-decision" })
This runbook provides structured criteria for parallel vs sequential dispatch, team sizing, and failure escalation.
有关分派策略决策,请查询决策手册:
exarchos_orchestrate({ action: "runbook", id: "dispatch-decision" })
该手册提供了并行/串行分派、团队规模和故障升级的结构化标准。

Parallel Dispatch

并行分派

Dispatch all independent tasks using the runtime's native spawn primitive in a single message so the dispatches run in parallel.
typescript
task --agent implementer 'Implement task-001: [title]: Task-specific context: requirements, file paths, acceptance criteria'
Note: Include the full implementer prompt template from
references/implementer-prompt.md
in the dispatch payload so the spawned agent has a self-contained context — runtimes that pre-bind the implementer prompt to a named agent will discard the redundant content automatically.
For parallel grouping strategy and model selection, see
references/parallel-strategy.md
.
使用运行时的原生生成原语,在单个消息中分派所有独立任务,以便任务并行运行。
typescript
task --agent implementer 'Implement task-001: [title]: Task-specific context: requirements, file paths, acceptance criteria'
注意: 在分派负载中包含
references/implementer-prompt.md
中的完整实现者提示词模板,以便生成的Agent具备独立上下文 —— 预绑定实现者提示词到命名Agent的运行时会自动丢弃冗余内容。
有关并行分组策略和模型选择,请查看
references/parallel-strategy.md

Verification Ownership Contract (ONE owner per claim)

验证所有权契约(每个声明仅一个所有者)

Every verification claim has exactly one owner. Re-verifying a claim you do not own is duplicated work, not defense in depth — it inflates the wave's cost and hides which run is authoritative when the two disagree.
ClaimOwnerWhere it runsEveryone else
"This task's behavior is covered and its tests can fail"Implementer subagentIts own worktree, via the per-task gates in the task-completion runbookLead consumes the recorded evidence; it does not re-run the gates
"This task's diff is clean (types, lint, contracts, mocks)"Implementer subagentSame per-task gate sequenceLead consumes the evidence
"The wave as a whole did not cascade"LeadOnce at the wave boundary —
check_integration_suite
after every wave merge lands
Implementers never run the cumulative suite
"The wave is complete (all tasks done, branches exist)"Lead
post_delegation_check
, after the cumulative suite
Two consequences bind the runbooks:
  1. task_complete
    is the terminal step of the task-completion runbook. No blocking gate may run after it — a task that is marked complete has already passed every gate that could block it.
  2. check_integration_suite
    is a wave-boundary backstop, not a per-task gate. It runs exactly once per wave, after the merges, matching its own action description. Per-task cascade risk is covered by the task's own scoped gates.
The lead's only independent verification is a spot check — reading the recorded evidence and, at most, sampling one claim it has concrete reason to doubt. A blanket re-run of the per-task chain is a contract violation.

每个验证声明有且仅有一个所有者。重新验证非你所有的声明属于重复工作,而非深度防御 —— 这会增加批量成本,且当两个结果不一致时难以确定哪个运行结果是权威的。
声明所有者运行位置其他角色
"此任务的行为已覆盖,测试可失败"实现者子Agent自身工作树中,通过任务完成手册中的每任务验证门主导者消费记录的证据;不会重新运行验证门
"此任务的差异干净(类型、 lint、契约、模拟)"实现者子Agent同一每任务验证门序列主导者消费证据
"整体批量未产生连锁故障"主导者一次在批量边界处 —— 每次批量合并完成后运行
check_integration_suite
实现者从不运行累积套件
"批量已完成(所有任务完成,分支存在)"主导者
post_delegation_check
,在累积套件运行后
此契约对手册有两个约束:
  1. task_complete
    是任务完成手册的终端步骤。不得在其之后运行阻塞性验证门 —— 标记为完成的任务已通过所有可能阻塞它的验证门。
  2. check_integration_suite
    批量边界的后备检查,而非每任务验证门。它在每个批量中仅运行一次,在合并完成后,与其自身的操作描述一致。每任务连锁风险由任务自身的范围验证门覆盖。
主导者仅需进行抽查 —— 读取记录的证据,最多对有具体怀疑理由的声明进行抽样验证。 blanket重新运行每任务验证链属于契约违规。

Step 3: Monitor and Collect

步骤3:监控与收集

Subagent Monitoring

子Agent监控

Collect background task results using the runtime's result-collection primitive (this may be a poll/await per task or inline replies, depending on the runtime):
text
inline reply from task --agent (no separate collection API)
After each subagent reports completion:
Runbook: For each completed task, execute the task-completion runbook:
exarchos_orchestrate({ action: "runbook", id: "task-completion" })
Execute the returned steps in order. Stop on gate failure. If the runbook action is unavailable, use
describe
to retrieve gate schemas and run manually:
exarchos_orchestrate({ action: "describe", actions: ["check_test_adequacy", "check_static_analysis", "task_complete"] })
  1. Extract provenance from subagent report — parse the subagent's completion output and extract structured provenance fields (
    implements
    ,
    tests
    ,
    files
    ). These fields are reported by the subagent following the Provenance Reporting section of the implementer prompt.
  2. Verify worktree state — confirm each worktree has clean
    git status
    and passing tests
  3. Run blocking gates — the
    task-completion
    runbook (referenced above) defines the exact gate sequence (test adequacy, static analysis, then task_complete). On any gate failure, keep the task in-progress and report findings. All gate handlers auto-emit
    gate.executed
    events, so manual
    exarchos_event
    calls are not needed.
  4. Pass provenance in task completion — when marking a task complete, pass the extracted provenance fields in the
    result
    parameter so they flow into the
    task.completed
    event:
typescript
exarchos_orchestrate({
  action: "task_complete",
  taskId: "<taskId>",
  streamId: "<featureId>",
  result: {
    summary: "<task summary>",
    implements: ["DR-1", "DR-3"],
    tests: [{ name: "testName", file: "path/to/test.ts" }],
    files: ["path/to/impl.ts", "path/to/test.ts"]
  }
})
  1. Update workflow state — set each passing
    tasks[].status
    to
    "complete"
    via
    exarchos_workflow update
  2. Delegation completion gate (D4, advisory) — after ALL tasks pass, run an operational resilience check on the full branch diff before transitioning to review:
typescript
exarchos_orchestrate({
  action: "check_operational_resilience",
  featureId: "<featureId>",
  repoRoot: ".",
  baseBranch: "main"
})
This is advisory — findings are recorded for the convergence view but do not block the delegation→review transition. Include findings in the delegation summary for review-phase attention.
  1. Schema sync — if any task modified API files (
    *Endpoints.cs
    ,
    Models/*.cs
    ), run
    npm run sync:schemas
使用运行时的结果收集原语收集后台任务结果(根据运行时不同,可能是每个任务的轮询/等待或内回复):
text
inline reply from task --agent (no separate collection API)
每个子Agent报告完成后:
手册: 针对每个已完成任务,执行任务完成手册:
exarchos_orchestrate({ action: "runbook", id: "task-completion" })
按顺序执行返回的步骤。验证门失败时停止。 若手册操作不可用,使用
describe
获取验证门模式并手动运行:
exarchos_orchestrate({ action: "describe", actions: ["check_test_adequacy", "check_static_analysis", "task_complete"] })
  1. 从子Agent报告中提取来源信息 —— 解析子Agent的完成输出并提取结构化来源字段(
    implements
    tests
    files
    )。这些字段由子Agent根据实现者提示词中的来源报告部分进行报告。
  2. 验证工作树状态 —— 确认每个工作树的
    git status
    干净且测试通过
  3. 运行阻塞性验证门 ——
    task-completion
    手册(上文提及)定义了确切的验证门序列(测试充分性、静态分析,然后是task_complete)。任何验证门失败时,保持任务进行中并报告结果。所有验证门处理程序会自动发送
    gate.executed
    事件,因此无需手动调用
    exarchos_event
  4. 在任务完成时传入来源信息 —— 标记任务完成时,在
    result
    参数中传入提取的来源字段,使其流入
    task.completed
    事件:
typescript
exarchos_orchestrate({
  action: "task_complete",
  taskId: "<taskId>",
  streamId: "<featureId>",
  result: {
    summary: "<task summary>",
    implements: ["DR-1", "DR-3"],
    tests: [{ name: "testName", file: "path/to/test.ts" }],
    files: ["path/to/impl.ts", "path/to/test.ts"]
  }
})
  1. 更新工作流状态 —— 通过
    exarchos_workflow update
    将每个通过的
    tasks[].status
    设置为
    "complete"
  2. 委派完成验证门(D4,建议性) —— 所有任务通过后,在过渡到审查阶段前,对完整分支差异运行操作弹性检查:
typescript
exarchos_orchestrate({
  action: "check_operational_resilience",
  featureId: "<featureId>",
  repoRoot: ".",
  baseBranch: "main"
})
这是建议性检查 —— 结果会记录到收敛视图中,但不会阻止委派→审查的过渡。请在委派总结中包含检查结果,以供审查阶段关注。
  1. 模式同步 —— 若任何任务修改了API文件(
    *Endpoints.cs
    Models/*.cs
    ),运行
    npm run sync:schemas

Failure Recovery

故障恢复

When a task fails:
  1. Read the failure output from the runtime's result-collection primitive (
    inline reply from task --agent (no separate collection API)
    )
  2. Diagnose root cause — do NOT trust the implementer's self-assessment (see R3 adversarial posture)
  3. Fix the task using the fixer flow below
  4. Run the
    task-fix
    runbook gate chain after the fix completes
For the full recovery flow with a concrete example, see
references/worked-example.md
.
任务失败时:
  1. 从运行时的结果收集原语读取失败输出(
    inline reply from task --agent (no separate collection API)
  2. 诊断根本原因 —— 不要信任实现者的自我评估(请参考R3对抗性姿态)
  3. 使用以下修复流程修复任务
  4. 修复完成后运行
    task-fix
    手册验证门链
有关包含具体示例的完整恢复流程,请查看
references/worked-example.md

Fix Failed Tasks

修复失败任务

Dispatch a fresh fixer agent using the runtime's native spawn primitive, carrying the full failure context and the original task description:
typescript
task --agent fixer 'Fix failed task-001: Your implementation failed. [failure context from test output]. Apply adversarial verification: do NOT trust your previous self-assessment, re-read actual test output, identify root cause not symptoms. [Original task context].'
After fix completes, run the
task-fix
runbook gate chain:
exarchos_orchestrate({ action: "runbook", id: "task-fix" })
If runbook unavailable, use
describe
to retrieve gate schemas:
exarchos_orchestrate({ action: "describe", actions: ["check_test_adequacy", "check_static_analysis", "task_complete"] })

使用运行时的原生生成原语分派新的修复Agent,携带完整的故障上下文和原始任务描述:
typescript
task --agent fixer 'Fix failed task-001: Your implementation failed. [failure context from test output]. Apply adversarial verification: do NOT trust your previous self-assessment, re-read actual test output, identify root cause not symptoms. [Original task context].'
修复完成后,运行
task-fix
手册验证门链:
exarchos_orchestrate({ action: "runbook", id: "task-fix" })
若手册不可用,使用
describe
获取验证门模式:
exarchos_orchestrate({ action: "describe", actions: ["check_test_adequacy", "check_static_analysis", "task_complete"] })

Fix Mode (--fixes)

修复模式(--fixes)

Handles review failures instead of initial implementation. Uses
references/fixer-prompt.md
template with adversarial verification posture, dispatches fix tasks per issue, then re-invokes review to re-integrate fixes.
Arguments:
--fixes <state-file-path>
— state JSON containing review results in
.reviews.<taskId>.specReview
or
.reviews.<taskId>.qualityReview
.
For detailed fix-mode process, see
references/fix-mode.md
.
Deprecated:
--pr-fixes
has been superseded by
/exarchos:shepherd
. Use the shepherd skill for PR feedback workflows.

处理审查失败,而非初始实现。使用
references/fixer-prompt.md
模板,采用对抗性验证姿态,针对每个问题分派修复任务,然后重新调用审查以整合修复内容。
参数:
--fixes <state-file-path>
—— 包含审查结果的状态JSON,位于
.reviews.<taskId>.specReview
.reviews.<taskId>.qualityReview
中。
有关修复模式的详细流程,请查看
references/fix-mode.md
已弃用:
--pr-fixes
已被
/exarchos:shepherd
取代。PR反馈工作流请使用shepherd Skill。

Context Compaction Recovery

上下文压缩恢复

If context compaction occurs during delegation:
  1. Query workflow state:
    exarchos_workflow get
    with
    fields: ["tasks"]
  2. Check active worktrees:
    ls .worktrees/
    and verify branch state
  3. Reconcile:
    exarchos_workflow reconcile
    replays the event stream and patches stale task state (CAS-protected)
  4. Do NOT re-create branches or re-dispatch agents until confirmed lost
若委派过程中发生上下文压缩:
  1. 查询工作流状态:
    exarchos_workflow get
    并传入
    fields: ["tasks"]
  2. 检查活动工作树:
    ls .worktrees/
    并验证分支状态
  3. 协调:
    exarchos_workflow reconcile
    重放事件流并修补过期任务状态(受CAS保护)
  4. 确认任务丢失前,请勿重新创建分支或重新分派Agent

Worktree State Schema

工作树状态模式

Worktree entries are stored as
worktrees["<wt-id>"]
in workflow state. Each entry requires:
FieldTypeRequiredNotes
branch
stringYesGit branch name
taskId
stringConditionalSingle task ID (use for 1-task worktrees)
tasks
string[]ConditionalMultiple task IDs (use for multi-task worktrees)
status
"active"
|
"merged"
|
"removed"
YesWorktree lifecycle status
Either
taskId
or
tasks
(non-empty array) is required — at least one must be present.
Single-task example:
json
{ "branch": "feat/task-001", "taskId": "task-001", "status": "active" }
Multi-task example:
json
{ "branch": "feat/integration", "tasks": ["task-001", "task-002"], "status": "active" }

工作树条目存储在工作流状态的
worktrees["<wt-id>"]
中。每个条目需要:
字段类型必填说明
branch
stringGit分支名称
taskId
string可选单个任务ID(用于单任务工作树)
tasks
string[]可选多个任务ID(用于多任务工作树)
status
"active"
|
"merged"
|
"removed"
工作树生命周期状态
必须提供
taskId
tasks
(非空数组)中的至少一个。
单任务示例:
json
{ "branch": "feat/task-001", "taskId": "task-001", "status": "active" }
多任务示例:
json
{ "branch": "feat/integration", "tasks": ["task-001", "task-002"], "status": "active" }

Phase Transitions and Guards

阶段过渡与守卫

For the full transition table, consult
@skills/checkpoint/references/phase-transitions.md
.
Quick reference: The
delegate
review
transition requires guard
all-tasks-complete
— all
tasks[].status
must be
"complete"
in workflow state.
Before transitioning to review: You MUST first update all task statuses to
"complete"
via
exarchos_workflow update
with the tasks array. The phase transition will be rejected by the guard if any task is still pending/in_progress/failed. Update tasks first, then set the phase in a separate call.
完整的过渡表请参考
@skills/checkpoint/references/phase-transitions.md
快速参考:
delegate
review
过渡需要守卫
all-tasks-complete
—— 工作流状态中所有
tasks[].status
必须为
"complete"
过渡到审查前: 必须先通过
exarchos_workflow update
传入tasks数组,将所有任务状态更新为
"complete"
。若任何任务仍处于pending/in_progress/failed状态,阶段过渡会被守卫拒绝。请先更新任务状态,再通过单独调用设置阶段。

Worktree-Bearing Tasks: Auto-Detour to
merge-pending

关联工作树的任务:自动转向
merge-pending

When a
task.completed
event carries a worktree association (
data.worktree
or
data.worktreePath
), the HSM auto-transitions through
feature/merge-pending
before reaching
review
. The
next_actions
projection surfaces the merge verb (idempotency-keyed by
${streamId}:merge_orchestrate:${taskId}
) so a runtime that consumes
next_actions
will dispatch the merge automatically.
Land it through
serialize_merge
.
The integration branch is shared — sibling worktree merges within the same wave (or a concurrent operator) can race for it.
serialize_merge
is THE integration-merge path: it holds an optimistic per-
integrationRef
single-writer lease, then composes
merge_orchestrate
unchanged to do the local
git merge
with a recorded recovery-point SHA — see
@skills/merge-orchestrator/SKILL.md
. Do not dispatch raw
merge_orchestrate
to land onto the integration branch — a live foreign lease makes it fail closed (
MERGE_LEASE_HELD
, naming
serialize_merge
). Raw
merge_orchestrate
is for a non-integration merge (a private / scratch branch no sibling will touch) or a crash-resumed caller re-presenting its original lease.
The HSM exits
merge-pending
back to
delegate
once the merge terminates (
completed
/
rolled-back
/
aborted
), at which point
delegate
either re-enters
merge-pending
for the next worktree-bearing task or transitions on to
review
when all delegation is complete.
This detour is invisible to the delegation skill itself — the all-tasks-complete guard still gates the
delegate → review
transition. The merge-pending substate just sits between task completion and the next dispatch decision.
task.completed
事件携带工作树关联信息(
data.worktree
data.worktreePath
)时,HSM会自动通过
feature/merge-pending
子状态,然后进入
review
阶段。
next_actions
投影会显示合并动词(由
${streamId}:merge_orchestrate:${taskId}
生成幂等键),因此消费
next_actions
的运行时会自动分派合并操作。
通过
serialize_merge
完成合并
。集成分支是共享的 —— 同一批量内的兄弟工作树合并(或并发操作)可能会产生竞争。
serialize_merge
是唯一的集成合并路径:它持有每个
integrationRef
的乐观单写入者租约,然后调用未修改的
merge_orchestrate
执行本地
git merge
并记录恢复点SHA —— 请查看
@skills/merge-orchestrator/SKILL.md
。请勿直接分派原始
merge_orchestrate
以合并到集成分支 —— 若存在外部活动租约,操作会失败(
MERGE_LEASE_HELD
,提示使用
serialize_merge
)。原始
merge_orchestrate
适用于非集成合并(兄弟分支不会触及的私有/临时分支),或崩溃恢复的调用者重新提交其原始租约。
合并终止后(
completed
/
rolled-back
/
aborted
),HSM会从
merge-pending
回到
delegate
阶段,此时
delegate
要么为下一个关联工作树的任务重新进入
merge-pending
,要么在所有委派完成后过渡到
review
此转向对委派Skill本身不可见 —— all-tasks-complete守卫仍会控制
delegate → review
过渡。merge-pending子状态仅存在于任务完成与下一个分派决策之间。

Task Status Values

任务状态值

StatusWhen to use
pending
Task not yet started
in_progress
Task actively being worked on
complete
Task finished successfully
failed
Task encountered an error (requires fix cycle)
状态使用场景
pending
任务尚未开始
in_progress
任务正在进行中
complete
任务成功完成
failed
任务遇到错误(需要修复循环)

Schema Discovery

模式发现

Use
exarchos_workflow({ action: "describe", actions: ["update", "init"] })
for parameter schemas and
exarchos_workflow({ action: "describe", playbook: "feature" })
for phase transitions, guards, and playbook guidance. Use
exarchos_orchestrate({ action: "describe", actions: ["check_test_adequacy", "task_complete"] })
for orchestrate action schemas.

参数模式请使用
exarchos_workflow({ action: "describe", actions: ["update", "init"] })
查询;阶段过渡、守卫和剧本指引请使用
exarchos_workflow({ action: "describe", playbook: "feature" })
查询;编排操作模式请使用
exarchos_orchestrate({ action: "describe", actions: ["check_test_adequacy", "task_complete"] })
查询。

When integration advances mid-wave

批量进行中时集成分支更新

Runbook for recovering when a subagent worktree's branch has diverged from the integration branch. Triggered by the integration merge's ancestry preflight (run by the composed
merge_orchestrate
inside
serialize_merge
): the failure message links here verbatim and includes the manual
git rebase
command. Auto-rebase is not wired today — operators must drive recovery by hand.
当子Agent工作树的分支与集成分支发生分歧时的恢复手册。由
serialize_merge
内部调用的
merge_orchestrate
执行的集成合并祖先预检触发:失败消息会直接链接到此处,并包含手动
git rebase
命令。目前未支持自动变基 —— 必须由操作人员手动驱动恢复。

Symptom

症状

The merge-orchestrator reports an ancestry failure of the form:
text
source branch <feature-branch> is not a descendant of <integration-branch>.
Rebase manually with: git rebase <integration-branch> (run from the <feature-branch> worktree).
Runbook: skills-src/delegate/SKILL.md#when-integration-advances-mid-wave
This means the integration branch advanced (typically because an earlier worktree merge landed) while the failing worktree was still in flight. Fast-forward merge is no longer safe — the working branch must catch up first.
合并编排器报告以下形式的祖先失败:
text
source branch <feature-branch> is not a descendant of <integration-branch>.
Rebase manually with: git rebase <integration-branch> (run from the <feature-branch> worktree).
Runbook: skills-src/delegate/SKILL.md#when-integration-advances-mid-wave
这意味着集成分支已更新(通常是因为较早的工作树合并已完成),而失败的工作树仍在运行中。此时快速前向合并已不安全 —— 工作分支必须先追上集成分支。

Why this happens

原因

With the worktree base pinned to local HEAD (see prerequisite below), each subagent worktree is created at the integration branch's tip at dispatch time. When the orchestrator merges sibling worktrees serially, each merge moves the integration branch forward. A worktree that was dispatched against an older integration tip will fail the ancestry preflight when its turn comes.
This is expected behavior under the current single-writer merge contract — preflight is fail-only on purpose so the operator stays in control.
工作树基础固定到本地HEAD(请参考下文前提条件),每个子Agent工作树在分派时创建于集成分支的最新提交。当编排器串行合并兄弟工作树时,每次合并都会推进集成分支。针对较旧集成分支提交分派的工作树,轮到它合并时会失败祖先预检。
这是当前单写入者合并契约下的预期行为 —— 预检故意仅失败不自动处理,以便操作人员保持控制权。

Recovery procedure

恢复流程

Before each step, verify you are in the main worktree (not the failing subagent worktree) and that
git status
is clean.
  1. Capture the rollback SHA before doing anything destructive:
    bash
    git rev-parse <feature-branch> > /tmp/rollback.sha
    Keep this until the merge has been verified. If anything goes wrong,
    git reset --hard "$(cat /tmp/rollback.sha)"
    on the feature branch restores the pre-rebase state. The filename is intentionally branch-name-free so slash-delimited branches like
    feature/dr-6
    don't break the path with embedded
    /
    characters.
  2. Rebase the feature branch onto the current integration tip:
    bash
    cd <feature-worktree-path>
    git fetch origin
    git rebase <integration-branch>
    Resolve any conflicts that surface. The conflicts are real — they reflect genuine drift between the two branches, not preflight noise. Do not pass
    --strategy-option=theirs
    blindly; that drops the subagent's work.
  3. Re-run the integration merge from the main worktree — through
    serialize_merge
    , which re-composes
    merge_orchestrate
    's ancestry preflight under the single-writer lease:
    typescript
    exarchos_orchestrate({
      action: "serialize_merge",
      featureId: "<featureId>",
      integrationRef: "<integration-branch>",
      sourceBranch: "<feature-branch>",
      strategy: "squash",           // squash | rebase | merge
      taskId: "<taskId>",
      dryRun: false,                // REQUIRED to execute — the action DEFAULTS to dry-run
    })
    serialize_merge
    defaults to a dry-run (preflight only, no lease claimed): omit
    dryRun
    and it reports whether the merge would apply without mutating anything. Pass
    dryRun: false
    to actually claim the single-writer lease and perform the merge. The action is declared shared-mutating, so a read-only caller (a session without write capability) is denied even the apply path; in that case fall back to a local-git merge from the main worktree (
    git merge --squash <feature-branch>
    then commit) and record the equivalent merge state/events yourself, since that merge sits outside the serialized lease.
    The preflight should now pass. Proceed with the orchestrator's normal merge flow. (Re-run raw
    merge_orchestrate
    directly only for a non-integration merge, or as the crash-resumed caller re-presenting its original
    leaseOperationId
    .)
每个步骤前,请确认你处于主工作树(而非失败的子Agent工作树)且
git status
干净。
  1. 捕获回滚SHA,然后再执行任何破坏性操作:
    bash
    git rev-parse <feature-branch> > /tmp/rollback.sha
    保留此SHA直到合并验证完成。若出现任何问题,在功能分支上执行
    git reset --hard "$(cat /tmp/rollback.sha)"
    可恢复变基前的状态。文件名故意不包含分支名称,因此像
    feature/dr-6
    这样包含斜杠的分支不会破坏路径。
  2. 将功能分支变基到当前集成分支最新提交:
    bash
    cd <feature-worktree-path>
    git fetch origin
    git rebase <integration-branch>
    解决出现的任何冲突。这些冲突是真实的 —— 反映了两个分支之间的实际差异,而非预检噪声。请勿盲目使用
    --strategy-option=theirs
    ;这会丢弃子Agent的工作成果。
  3. 从主工作树重新运行集成合并 —— 通过
    serialize_merge
    ,它会在单写入者租约下重新调用
    merge_orchestrate
    的祖先预检:
    typescript
    exarchos_orchestrate({
      action: "serialize_merge",
      featureId: "<featureId>",
      integrationRef: "<integration-branch>",
      sourceBranch: "<feature-branch>",
      strategy: "squash",           // squash | rebase | merge
      taskId: "<taskId>",
      dryRun: false,                // 必须设为false才能执行 —— 操作默认是试运行
    })
    serialize_merge
    默认是试运行(仅预检,不获取租约):省略
    dryRun
    时,它会报告合并是否可应用,但不会修改任何内容。传入
    dryRun: false
    以实际获取单写入者租约并执行合并。该操作被标记为共享修改,因此只读调用者(无写入权限的会话)即使在应用路径下也会被拒绝;在这种情况下,回退到主工作树的本地git合并(
    git merge --squash <feature-branch>
    然后提交)并自行记录等效的合并状态/事件,因为该合并在序列化租约之外。
    此时预检应会通过。继续执行编排器的正常合并流程。(仅针对非集成合并,或崩溃恢复的调用者重新提交其原始
    leaseOperationId
    时,才直接调用原始
    merge_orchestrate
    。)

Rollback procedure

回滚流程

If the rebase produces conflicts you cannot resolve safely, or the merge still fails after rebase:
  1. Reset the feature branch to the captured rollback SHA:
    bash
    cd <feature-worktree-path>
    git rebase --abort   # if mid-rebase
    git reset --hard "$(cat /tmp/rollback.sha)"
  2. Mark the task
    failed
    in workflow state and dispatch a fixer (see the Failure Recovery section above). Do not delete the worktree — the fixer needs the original branch state to diagnose the conflict.
  3. Record the incident by emitting a
    merge.aborted
    event with
    reason: "ancestry-rebase-conflict"
    and the failing branch's pre-rebase SHA so the convergence view captures the rollback.
若变基产生无法安全解决的冲突,或变基后合并仍失败:
  1. 将功能分支重置到捕获的回滚SHA:
    bash
    cd <feature-worktree-path>
    git rebase --abort   # 若正在变基中
    git reset --hard "$(cat /tmp/rollback.sha)"
  2. **在工作流状态中标记任务为
    failed
    **并分派修复Agent(请参考上文故障恢复部分)。请勿删除工作树 —— 修复Agent需要原始分支状态来诊断冲突。
  3. 记录事件,发送
    merge.aborted
    事件,包含
    reason: "ancestry-rebase-conflict"
    和失败分支变基前的SHA,以便收敛视图捕获回滚操作。

Why no auto-rebase yet

为何暂不支持自动变基

Auto-rebase is not yet wired. Today the orchestrator stops at the ancestry preflight on purpose: a botched auto-rebase across diverged worktrees risks silently dropping subagent work, and the recovery path above is short enough that operator-driven rebase is preferable to clever-but-fragile automation.

暂未支持自动变基。目前编排器在祖先预检处停止是有意为之:在分歧工作树之间进行自动变基可能会静默丢弃子Agent的工作成果,而上述恢复流程足够简短,操作人员手动变基比复杂但脆弱的自动化更可靠。

Transition

过渡

After all tasks complete, auto-continue immediately (no user confirmation):
  1. Verify all
    tasks[].status === "complete"
    in workflow state
  2. Update state:
    exarchos_workflow update
    with
    phase: "review"
  3. Invoke:
    [Invoke the exarchos:review skill with args: <plan-path>]
This is NOT a human checkpoint — the workflow continues autonomously.

所有任务完成后,立即自动继续(无需用户确认):
  1. 验证工作流状态中所有
    tasks[].status === "complete"
  2. 更新状态:
    exarchos_workflow update
    并传入
    phase: "review"
  3. 调用:
    [Invoke the exarchos:review skill with args: <plan-path>]
这不是人工检查点 —— 工作流会自主继续。

References

参考文档

DocumentPurpose
references/implementer-prompt.md
Full prompt template for implementation tasks
references/fixer-prompt.md
Fix agent prompt with adversarial verification posture
references/worked-example.md
Complete delegation trace with recovery path (R1)
references/rationalization-refutation.md
Common rationalizations and counter-arguments (R2)
references/parallel-strategy.md
Parallel grouping and model selection
references/testing-patterns.md
Arrange/Act/Assert, naming, mocking conventions
references/pbt-patterns.md
Property-based testing patterns
references/fix-mode.md
Detailed fix-mode process
references/state-management.md
State patterns and benchmark labeling
references/troubleshooting.md
Common failure modes and resolutions
references/adaptive-orchestration.md
Adaptive team composition
references/workflow-steps.md
Cross-platform step-by-step delegation reference
references/worktree-enforcement.md
Worktree isolation rules
文档用途
references/implementer-prompt.md
实现任务的完整提示词模板
references/fixer-prompt.md
具备对抗性验证姿态的修复Agent提示词
references/worked-example.md
包含恢复路径的完整委派跟踪示例(R1)
references/rationalization-refutation.md
常见合理化借口及反驳(R2)
references/parallel-strategy.md
并行分组和模型选择
references/testing-patterns.md
Arrange/Act/Assert、命名、模拟约定
references/pbt-patterns.md
属性测试模式
references/fix-mode.md
修复模式详细流程
references/state-management.md
状态模式和基准标记
references/troubleshooting.md
常见故障模式及解决方案
references/adaptive-orchestration.md
自适应团队组成
references/workflow-steps.md
跨平台分步委派参考
references/worktree-enforcement.md
工作树隔离规则