Loading...
Loading...
Compare original and translation side by side
| Scenario | Action |
|---|---|
| Multiple independent sub-phases | Use Parallel Mode (subagents) |
| Single sub-phase or subagents unavailable | Use Sequential Mode (fallback) |
| Code review needed | Use Phase 3.5 (subagent or self-review) |
| Parallel testing | Use Phase 4 parallel dispatch |
| 场景 | 操作 |
|---|---|
| 存在多个独立子阶段 | 使用并行模式(Subagent) |
| 单个子阶段或Subagent不可用 | 使用顺序模式(回退方案) |
| 需要代码审查 | 使用3.5阶段(Subagent审查或自审查) |
| 并行测试 | 使用第四阶段并行调度 |
## TODO## TODOundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedIF can invoke "agent" or "Task" tool → Use Parallel Mode
ELSE → Use Sequential Fallback ModeIF 可调用"agent"或"Task"工具 → 使用并行模式
ELSE → 使用顺序回退模式// Parallel dispatch for independent SPs
await Promise.all([
Task({ description: "Implement SP1", prompt: implementerPrompt(SP1) }),
Task({ description: "Implement SP2", prompt: implementerPrompt(SP2) }),
Task({ description: "Implement SP3", prompt: implementerPrompt(SP3) })
])// 为独立SP调度并行任务
await Promise.all([
Task({ description: "Implement SP1", prompt: implementerPrompt(SP1) }),
Task({ description: "Implement SP2", prompt: implementerPrompt(SP2) }),
Task({ description: "Implement SP3", prompt: implementerPrompt(SP3) })
])agents/code-reviewer.mdagents/code-reviewer.md// Parallel test execution
await Promise.all([
Task({ description: "Run unit tests", prompt: testPrompt("unit") }),
Task({ description: "Run integration tests", prompt: testPrompt("integration") }),
Task({ description: "Run E2E tests", prompt: testPrompt("e2e") })
])// 并行执行测试任务
await Promise.all([
Task({ description: "Run unit tests", prompt: testPrompt("unit") }),
Task({ description: "Run integration tests", prompt: testPrompt("integration") }),
Task({ description: "Run E2E tests", prompt: testPrompt("e2e") })
])**Subagent Check:** ❌ NOT AVAILABLE
**Reason:** [Tool not found / Platform limitation / User request]
**Action:** Using SEQUENTIAL fallback mode**Subagent检查:** ❌ 不可用
**原因:** [工具未找到 / 平台限制 / 用户要求]
**操作:** 使用顺序回退模式For each SP in [SP1, SP2, SP3...]:
1. Execute SP implementation
2. Self-review against plan (extended checklist)
3. Document in Phase 4 artifact
4. Run integration tests
5. Proceed to next SPFor each SP in [SP1, SP2, SP3...]:
1. 执行SP开发实现
2. 对照计划进行扩展自审查
3. 在第四阶段工件中记录
4. 运行集成测试
5. 进入下一个SPagents/code-reviewer.mdagents/code-reviewer.mdagents/implementer.mdYou are an Implementer Agent. Implement this sub-phase:
**SP Text:** [full sub-phase text]
**BASE_SHA:** [commit SHA]
**Context:** [relevant files]
Follow the process in agents/implementer.mdagents/implementer.mdYou are an Implementer Agent. Implement this sub-phase:
**SP Text:** [full sub-phase text]
**BASE_SHA:** [commit SHA]
**Context:** [relevant files]
Follow the process in agents/implementer.mdagents/code-reviewer.mdYou are a Code Reviewer Agent. Review this implementation:
**Plan:** [Phase 3 TO-BE]
**Git Range:** [BASE_SHA..HEAD_SHA]
**Implementation:** [Phase 4 summary]
Follow the process in agents/code-reviewer.mdagents/code-reviewer.mdYou are a Code Reviewer Agent. Review this implementation:
**Plan:** [Phase 3 TO-BE]
**Git Range:** [BASE_SHA..HEAD_SHA]
**Implementation:** [Phase 4 summary]
Follow the process in agents/code-reviewer.mdundefinedundefined
**3.5阶段工件(若使用):**
```markdown
**Phase 3.5 artifact (if used):**
```markdown
**第四阶段工件必须包含:**
```markdown
**Phase 4 artifact must include:**
```markdownundefinedundefinedStarting Phase 4
│
▼
Subagent available? ──NO──► SEQUENTIAL MODE
│ - Execute SPs sequentially
│ - Extended self-review
│ - Document as sequential
│
YES
│
▼
3+ independent SPs? ──NO──► SEQUENTIAL MODE
│ - Single sub-phase
│ - No parallelism benefit
│
YES
│
▼
PARALLEL MODE
- Dispatch implementer per SP
- Two-stage review
- Integration after all doneStarting Phase 4
│
▼
Subagent available? ──NO──► SEQUENTIAL MODE
│ - Execute SPs sequentially
│ - Extended self-review
│ - Document as sequential
│
YES
│
▼
3+ independent SPs? ──NO──► SEQUENTIAL MODE
│ - Single sub-phase
│ - No parallelism benefit
│
YES
│
▼
PARALLEL MODE
- Dispatch implementer per SP
- Two-stage review
- Integration after all doneundefinedundefined
**第四阶段执行:**
- SP1、SP2、SP3并行调度(独立领域)
- 每个开发实现Subagent处理独立文件
- 所有完成后执行集成测试
**Phase 4 execution:**
- SP1, SP2, SP3 dispatched in parallel (independent domains)
- Each implementer works on isolated files
- Integration testing after all completeSKILL.mdagents/implementer.mdagents/code-reviewer.mdreferences/artifact-template.mdSKILL.mdagents/implementer.mdagents/code-reviewer.mdreferences/artifact-template.md