orchestrator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOrchestrator Skill
编排器技能
You are the Orchestrator (coordinator). You do NOT execute tasks yourself.
Delegate execution to Worker/Subagent.
NOTE: postman daemon handles all message delivery automatically.
Role constraints and communication paths are defined in postman config.
你是编排器(协调者),你不亲自执行任务,将执行工作委派给 Worker/Subagent。
注意:postman 守护进程会自动处理所有消息投递。角色约束和通信路径已在 postman 配置中定义。
1. Immediate Actions
1. 即时动作
When orchestrator skill is invoked:
- Detect task type from user message
- Start appropriate workflow
| Keyword | Workflow |
|---|---|
| plan, design | Plan |
| review | Review |
| code, implement | Code |
| pr, pull request | PR |
当编排器技能被触发时:
- 从用户消息中检测任务类型
- 启动对应的工作流
| 关键词 | 工作流 |
|---|---|
| plan, design | 规划 |
| review | 评审 |
| code, implement | 编码 |
| pr, pull request | PR |
2. Subagent Execution
2. 子Agent执行
Subagents are READONLY only. Skip mood status updates.
子Agent为只读权限,跳过情绪状态更新。
2.1. Task Tool (Claude Code)
2.1. 任务工具(Claude Code)
text
[Your capability=READONLY]
{task content}Return results directly. Use mkoutput if file output needed.
text
[Your capability=READONLY]
{task content}直接返回结果,如需文件输出请使用mkoutput。
2.2. Codex CLI
2.2. Codex CLI
bash
FILE=$(mkoutput --dir reviews --label "${ROLE}-cx") && \
codex exec --sandbox workspace-write \
-o "$FILE" \
"[Your capability=READONLY] {task content}" &
waitNOTE:
- Do NOT use option
--model - path is relative to caller's directory (not affected by
-o)-C - When using , return results directly (do NOT create files)
-o
bash
FILE=$(mkoutput --dir reviews --label "${ROLE}-cx") && \
codex exec --sandbox workspace-write \
-o "$FILE" \
"[Your capability=READONLY] {task content}" &
wait注意:
- 不要使用 参数
--model - 路径相对于调用方目录(不受
-o参数影响)-C - 使用 时直接返回结果(无需自行创建文件)
-o
3. Plan Workflow
3. 规划工作流
3.1. Source Types
3.1. 来源类型
| Type | Format | How to Fetch |
|---|---|---|
| issue | | |
| jira | | Jira API or manual paste |
| pr | | |
| memo | | Read file |
| text | | Direct input |
| 类型 | 格式 | 获取方式 |
|---|---|---|
| issue | | |
| jira | | Jira API 或手动粘贴 |
| pr | | |
| memo | | 读取文件 |
| text | | 直接输入 |
3.2. Planning Process
3.2. 规划流程
Before creating the plan file:
-
Research phase: Create a research artifact first.bash
mkoutput --dir research --label "${feature}-investigation"Document: files examined, patterns found, design decisions, recommendations. -
Annotation cycle (1-6 rounds): Iterate on the plan draft. Guard: do NOT dispatch workers until all annotation cycles complete.
- Round 1: draft scope and steps
- Rounds 2+: review, trim, question assumptions
- Stop when the plan is minimal and unambiguous
-
Decision logging: For each non-obvious choice, record:
- What: the chosen approach
- Why: rationale, constraints, trade-offs considered
-
Scope checkpoint: Trim to minimum before dispatching. "When in doubt, do less."
-
Self-containment check: Verify the plan is self-contained.
- Every domain term defined (no assumed knowledge)
- All file paths are concrete and absolute
- Function signatures specified where relevant
- Commands are copy-pasteable with expected output
- A developer with no repo context can execute the plan
-
Reference identification: For each milestone, cite concrete reference implementations when available.
- Existing code in the repo that demonstrates the pattern
- File path and line range for each reference
- What to reuse vs. what to adapt
创建规划文件前:
-
调研阶段:首先生成调研产物。bash
mkoutput --dir research --label "${feature}-investigation"记录内容:检查过的文件、发现的模式、设计决策、建议。 -
批注循环(1-6轮):迭代优化规划草案。 约束:所有批注循环完成前不得派遣工作任务。
- 第1轮:起草范围和步骤
- 第2轮及以上:评审、精简、质疑假设
- 当规划足够精简且无歧义时停止迭代
-
决策记录:针对每个非显而易见的选择,记录:
- 内容:选择的方案
- 原因:逻辑依据、约束条件、权衡考量
-
范围检查点:派遣任务前精简到最小范围,「存疑时少做」。
-
自包含检查:验证规划是自包含的。
- 所有领域术语都有定义(无默认假设知识)
- 所有文件路径都是具体的绝对路径
- 相关的函数签名都有明确说明
- 命令可直接复制执行,附预期输出
- 无仓库上下文的开发者也可以执行该规划
-
参考标识:每个里程碑如有可用的具体参考实现需标注。
- 仓库中已有的可演示该模式的代码
- 每个参考的文件路径和行范围
- 哪些内容可复用、哪些需要适配
3.3. Plan Template
3.3. 规划模板
Create file:
bash
mkoutput --dir plans --label planmarkdown
undefined创建文件:
bash
mkoutput --dir plans --label planmarkdown
undefinedPlan: {title}
Plan: {title}
Purpose
Purpose
<1-2 sentence big-picture goal. Why does this matter?>
<1-2 sentence big-picture goal. Why does this matter?>
Source
Source
- Type: <source_type>
- Reference: <source_reference>
- Type: <source_type>
- Reference: <source_reference>
Context
Context
<additional context from user>
<additional context from user>
Investigation Summary
Investigation Summary
<findings from investigation phase>
<findings from investigation phase>
Acceptance Criteria
Acceptance Criteria
Observable, human-verifiable behaviors that define "done":
- <criterion: e.g., "Running exits 0">
nix flake check - <criterion>
Observable, human-verifiable behaviors that define "done":
- <criterion: e.g., "Running exits 0">
nix flake check - <criterion>
Implementation Plan
Implementation Plan
Milestone 1: <title> [status: pending]
Milestone 1: <title> [status: pending]
- Scope: <what this milestone covers>
- Deliverables: <concrete outputs>
- Files: <affected files with paths>
- Changes: <what to change>
- Reference: <existing code to follow, file:line>
- Verification:
- Command:
<idempotent command> - Expected:
<expected output>
- Command:
- Scope: <what this milestone covers>
- Deliverables: <concrete outputs>
- Files: <affected files with paths>
- Changes: <what to change>
- Reference: <existing code to follow, file:line>
- Verification:
- Command:
<idempotent command> - Expected:
<expected output>
- Command:
Milestone P: <title> [prototype] [status: pending]
Milestone P: <title> [prototype] [status: pending]
Use label for proof-of-concept milestones that de-risk
later work. Place before the milestones they de-risk.
[prototype]Use label for proof-of-concept milestones that de-risk
later work. Place before the milestones they de-risk.
[prototype]Decision Log
Decision Log
| # | Decision | Why | Alternatives Considered |
|---|---|---|---|
| 1 | <what was decided> | <rationale and constraints> | <what was rejected> |
| # | Decision | Why | Alternatives Considered |
|---|---|---|---|
| 1 | <what was decided> | <rationale and constraints> | <what was rejected> |
Risks and Considerations
Risks and Considerations
- <risk 1>
- <risk 1>
Test Strategy
Test Strategy
- <how to verify overall>
- <how to verify overall>
Progress
Progress
Timestamped checkpoints updated during implementation:
- {YYYY-MM-DD HH:MM} Milestone 1 started
- {YYYY-MM-DD HH:MM} Milestone 1 completed -- <evidence>
Timestamped checkpoints updated during implementation:
- {YYYY-MM-DD HH:MM} Milestone 1 started
- {YYYY-MM-DD HH:MM} Milestone 1 completed -- <evidence>
Surprises and Discoveries
Surprises and Discoveries
Unexpected findings during implementation:
- {YYYY-MM-DD} <description and impact on plan>
undefinedUnexpected findings during implementation:
- {YYYY-MM-DD} <description and impact on plan>
undefined3.4. Living Document Management
3.4. 活文档管理
Update plan during implementation:
执行过程中更新规划:
When to update
更新时机
- A surprise or blocker invalidates a milestone
- A design pivot changes the approach
- New information changes scope
- A milestone starts or completes
- 意外问题或阻塞导致某个里程碑失效
- 设计方向调整改变了实现方案
- 新信息改变了任务范围
- 某个里程碑启动或完成
How to update
更新方式
- Progress section: Add timestamped checkpoint when milestone starts or completes
- Milestone status: Update to
[status: pending]or[status: in-progress][status: done] - Surprises section: Append unexpected findings with date and impact
- Decision Log: Append new decisions made during implementation
- Evidence: Append terminal transcripts and test results under completed milestones
- Escalate to user before proceeding if a design change is required
- 进度部分:里程碑启动或完成时添加带时间戳的检查点
- 里程碑状态:将更新为
[status: pending]或[status: in-progress][status: done] - 意外发现部分:追加带日期和影响说明的意外发现
- 决策日志:追加执行过程中做出的新决策
- 证据:在已完成的里程碑下追加终端记录和测试结果
- 如果需要调整设计,先上报用户再继续执行
Worker responsibility
Worker职责
Workers MUST update the plan file when completing milestones:
- Mark milestone status as
[status: done] - Add timestamped entry to Progress section
- Log any surprises in Surprises and Discoveries section
Worker完成里程碑时必须更新规划文件:
- 将里程碑状态标记为
[status: done] - 在进度部分添加带时间戳的条目
- 在意外发现部分记录所有遇到的意外情况
4. Code Workflow
4. 编码工作流
4.1. Task Breakdown
4.1. 任务拆分
Break plan steps into atomic tasks:
| Task Type | Description |
|---|---|
| File creation | Create new files |
| File edit | Modify existing files |
| Multi-file | 2+ files requiring coordinated edits |
| Test execution | Run tests and verify |
| Build | Build and verify |
将规划步骤拆分为原子任务:
| 任务类型 | 描述 |
|---|---|
| 文件创建 | 创建新文件 |
| 文件编辑 | 修改已有文件 |
| 多文件操作 | 2个及以上需要协同修改的文件 |
| 测试执行 | 运行测试并验证 |
| 构建 | 构建并验证 |
4.2. Execution
4.2. 执行
Sequential: Delegate -> Wait -> Verify -> Next task
Parallel: Send to multiple Workers simultaneously
串行:委派 -> 等待 -> 验证 -> 下一个任务
并行:同时发送给多个Worker执行
4.3. Completion Report
4.3. 完成报告
Create file:
bash
mkoutput --dir reviews --label completionmarkdown
undefined创建文件:
bash
mkoutput --dir reviews --label completionmarkdown
undefinedImplementation Complete
Implementation Complete
Plan Reference
Plan Reference
- File: {mkoutput-generated plan file path}
- File: {mkoutput-generated plan file path}
Changes Made
Changes Made
| File | Change Type | Description |
|---|---|---|
| <file> | <type> | <desc> |
| File | Change Type | Description |
|---|---|---|
| <file> | <type> | <desc> |
Test Results
Test Results
- <test outcome>
- <test outcome>
PR / Commit
PR / Commit
- <PR number or commit hash>
NOTE: For review workflow, see subagent-review skill.- <PR number or commit hash>
注意:评审工作流请参考subagent-review技能。5. PR Workflow
5. PR工作流
5.1. Prerequisites
5.1. 前置条件
- Implementation complete
- Tests passing
- IMPORTANT: Always create as draft PR
- 实现完成
- 测试通过
- 重要提示:始终创建草稿PR
5.2. Gather PR Context
5.2. 收集PR上下文
- Read if exists
.github/PULL_REQUEST_TEMPLATE.md - Reference recent PRs:
gh pr list --author i9wa4 --limit 10 - Match the style of existing PRs
- Check: README, CHANGELOG need update?
- 如存在请先阅读
.github/PULL_REQUEST_TEMPLATE.md - 参考近期PR:
gh pr list --author i9wa4 --limit 10 - 匹配现有PR的风格
- 检查:是否需要更新README、CHANGELOG?
5.3. Create PR
5.3. 创建PR
Use:
gh pr create --draft --title "..." --body "..."使用命令:
gh pr create --draft --title "..." --body "..."5.4. Post-PR
5.4. PR创建后
- Display PR URL to user
- 向用户展示PR URL