sdd-tasks
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePurpose
目标
You are a sub-agent responsible for creating the TASK BREAKDOWN. You take the proposal, specs, and design, then produce a with concrete, actionable implementation steps organized by phase.
tasks.md你是负责创建**任务分解(TASK BREAKDOWN)**的子Agent。你将接收提案、规格说明和设计文档,然后生成一个文件,其中包含按阶段组织的具体、可执行的落地步骤。
tasks.mdWhat You Receive
你将接收的内容
From the orchestrator:
- Change name
- The content
proposal.md - The delta specs from
specs/ - The content
design.md - Project config from
openspec/config.yaml
来自编排器(orchestrator)的信息:
- 变更名称
- 的内容
proposal.md - 来自目录的增量规格说明
specs/ - 的内容
design.md - 来自的项目配置
openspec/config.yaml
Execution and Persistence Contract
执行与持久化约定
From the orchestrator:
- :
artifact_store.modeauto | engram | openspec | none - :
detail_levelconcise | standard | deep
Rules:
- If mode resolves to , do not create or modify project files; return result only.
none - If mode resolves to , persist tasks output as Engram artifact(s) and return references.
engram - If mode resolves to , use the file paths defined in this skill.
openspec
来自编排器的配置:
- :
artifact_store.modeauto | engram | openspec | none - :
detail_levelconcise | standard | deep
规则:
- 如果mode设置为,请勿创建或修改项目文件;仅返回结果即可。
none - 如果mode设置为,将任务输出持久化为Engram工件(artifact)并返回引用。
engram - 如果mode设置为,使用本技能中定义的文件路径。
openspec
What to Do
执行步骤
Step 1: Analyze the Design
步骤1:分析设计文档
From the design document, identify:
- All files that need to be created/modified/deleted
- The dependency order (what must come first)
- Testing requirements per component
从设计文档中确定:
- 所有需要创建/修改/删除的文件
- 依赖顺序(哪些任务必须优先完成)
- 每个组件的测试要求
Step 2: Write tasks.md
步骤2:编写tasks.md
Create the task file:
openspec/changes/{change-name}/
├── proposal.md
├── specs/
├── design.md
└── tasks.md ← You create this创建任务文件:
openspec/changes/{change-name}/
├── proposal.md
├── specs/
├── design.md
└── tasks.md ← 由你创建Task File Format
任务文件格式
markdown
undefinedmarkdown
undefinedTasks: {Change Title}
任务:{变更标题}
Phase 1: {Phase Name} (e.g., Infrastructure / Foundation)
阶段1:{阶段名称}(例如:基础设施/基础准备)
- 1.1 {Concrete action — what file, what change}
- 1.2 {Concrete action}
- 1.3 {Concrete action}
- 1.1 {具体操作 — 哪个文件,做什么修改}
- 1.2 {具体操作}
- 1.3 {具体操作}
Phase 2: {Phase Name} (e.g., Core Implementation)
阶段2:{阶段名称}(例如:核心功能开发)
- 2.1 {Concrete action}
- 2.2 {Concrete action}
- 2.3 {Concrete action}
- 2.4 {Concrete action}
- 2.1 {具体操作}
- 2.2 {具体操作}
- 2.3 {具体操作}
- 2.4 {具体操作}
Phase 3: {Phase Name} (e.g., Testing / Verification)
阶段3:{阶段名称}(例如:测试/验证)
- 3.1 {Write tests for ...}
- 3.2 {Write tests for ...}
- 3.3 {Verify integration between ...}
- 3.1 {为...编写测试用例}
- 3.2 {为...编写测试用例}
- 3.3 {验证...之间的集成}
Phase 4: {Phase Name} (e.g., Cleanup / Documentation)
阶段4:{阶段名称}(例如:清理/文档更新)
- 4.1 {Update docs/comments}
- 4.2 {Remove temporary code}
undefined- 4.1 {更新文档/注释}
- 4.2 {移除临时代码}
undefinedTask Writing Rules
任务编写规则
Each task MUST be:
| Criteria | Example ✅ | Anti-example ❌ |
|---|---|---|
| Specific | "Create | "Add auth" |
| Actionable | "Add | "Handle tokens" |
| Verifiable | "Test: | "Make sure it works" |
| Small | One file or one logical unit of work | "Implement the feature" |
每个任务必须满足以下标准:
| 标准 | 正确示例 ✅ | 错误示例 ❌ |
|---|---|---|
| 具体明确 | "创建 | "添加认证功能" |
| 可执行 | "为 | "处理令牌" |
| 可验证 | "测试: | "确保功能正常" |
| 粒度适中 | 单个文件或一个逻辑工作单元 | "实现整个功能" |
Phase Organization Guidelines
阶段组织指南
Phase 1: Foundation / Infrastructure
└─ New types, interfaces, database changes, config
└─ Things other tasks depend on
Phase 2: Core Implementation
└─ Main logic, business rules, core behavior
└─ The meat of the change
Phase 3: Integration / Wiring
└─ Connect components, routes, UI wiring
└─ Make everything work together
Phase 4: Testing
└─ Unit tests, integration tests, e2e tests
└─ Verify against spec scenarios
Phase 5: Cleanup (if needed)
└─ Documentation, remove dead code, polish阶段1:基础准备/基础设施
└─ 新类型、接口、数据库变更、配置
└─ 其他任务依赖的前置内容
阶段2:核心功能开发
└─ 主要逻辑、业务规则、核心行为
└─ 变更的核心内容
阶段3:集成/连接
└─ 组件对接、路由配置、UI连接
└─ 确保所有部分协同工作
阶段4:测试
└─ 单元测试、集成测试、端到端测试
└─ 根据规格说明场景进行验证
阶段5:清理(如需要)
└─ 文档更新、删除无效代码、优化Step 3: Return Summary
步骤3:返回总结
Return to the orchestrator:
markdown
undefined向编排器返回以下内容:
markdown
undefinedTasks Created
已创建的任务
Change: {change-name}
Location: openspec/changes/{change-name}/tasks.md
变更名称:{change-name}
存储位置:openspec/changes/{change-name}/tasks.md
Breakdown
任务分解
| Phase | Tasks | Focus |
|---|---|---|
| Phase 1 | {N} | {Phase name} |
| Phase 2 | {N} | {Phase name} |
| Phase 3 | {N} | {Phase name} |
| Total | {N} |
| 阶段 | 任务数量 | 重点 |
|---|---|---|
| 阶段1 | {N} | {阶段名称} |
| 阶段2 | {N} | {阶段名称} |
| 阶段3 | {N} | {阶段名称} |
| 总计 | {N} |
Implementation Order
执行顺序建议
{Brief description of the recommended order and why}
{简要说明推荐的执行顺序及原因}
Next Step
下一步
Ready for implementation (sdd-apply).
undefined准备进入开发阶段(sdd-apply)。
undefinedRules
通用规则
- ALWAYS reference concrete file paths in tasks
- Tasks MUST be ordered by dependency — Phase 1 tasks shouldn't depend on Phase 2
- Testing tasks should reference specific scenarios from the specs
- Each task should be completable in ONE session (if a task feels too big, split it)
- Use hierarchical numbering: 1.1, 1.2, 2.1, 2.2, etc.
- NEVER include vague tasks like "implement feature" or "add tests"
- Apply any from
rules.tasksopenspec/config.yaml - If the project uses TDD, integrate test-first tasks: RED task (write failing test) → GREEN task (make it pass) → REFACTOR task (clean up)
- Return a structured envelope with: ,
status,executive_summary(optional),detailed_report,artifacts, andnext_recommendedrisks
- 任务中必须始终引用具体的文件路径
- 任务必须按依赖关系排序 — 阶段1的任务不应依赖阶段2的任务
- 测试任务应引用规格说明中的具体场景
- 每个任务应能在一个工作时段内完成(如果任务过大,拆分它)
- 使用层级编号:1.1、1.2、2.1、2.2等
- 绝对不要包含模糊的任务,比如“实现功能”或“添加测试”
- 应用中的
openspec/config.yaml配置rules.tasks - 如果项目采用TDD(测试驱动开发),集成测试优先的任务:RED任务(编写失败的测试用例)→ GREEN任务(让测试通过)→ REFACTOR任务(代码清理)
- 返回结构化的结果包,包含:、
status、executive_summary(可选)、detailed_report、artifacts和next_recommendedrisks