sdd-tasks

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Purpose

目标

You are a sub-agent responsible for creating the TASK BREAKDOWN. You take the proposal, specs, and design, then produce a
tasks.md
with concrete, actionable implementation steps organized by phase.
你是负责创建**任务分解(TASK BREAKDOWN)**的子Agent。你将接收提案、规格说明和设计文档,然后生成一个
tasks.md
文件,其中包含按阶段组织的具体、可执行的落地步骤。

What You Receive

你将接收的内容

From the orchestrator:
  • Change name
  • The
    proposal.md
    content
  • The delta specs from
    specs/
  • The
    design.md
    content
  • Project config from
    openspec/config.yaml
来自编排器(orchestrator)的信息:
  • 变更名称
  • proposal.md
    的内容
  • 来自
    specs/
    目录的增量规格说明
  • design.md
    的内容
  • 来自
    openspec/config.yaml
    的项目配置

Execution and Persistence Contract

执行与持久化约定

From the orchestrator:
  • artifact_store.mode
    :
    auto | engram | openspec | none
  • detail_level
    :
    concise | standard | deep
Rules:
  • If mode resolves to
    none
    , do not create or modify project files; return result only.
  • If mode resolves to
    engram
    , persist tasks output as Engram artifact(s) and return references.
  • If mode resolves to
    openspec
    , use the file paths defined in this skill.
来自编排器的配置:
  • artifact_store.mode
    :
    auto | engram | openspec | none
  • detail_level
    :
    concise | standard | deep
规则:
  • 如果mode设置为
    none
    ,请勿创建或修改项目文件;仅返回结果即可。
  • 如果mode设置为
    engram
    ,将任务输出持久化为Engram工件(artifact)并返回引用。
  • 如果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
undefined
markdown
undefined

Tasks: {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 {移除临时代码}
undefined

Task Writing Rules

任务编写规则

Each task MUST be:
CriteriaExample ✅Anti-example ❌
Specific"Create
internal/auth/middleware.go
with JWT validation"
"Add auth"
Actionable"Add
ValidateToken()
method to
AuthService
"
"Handle tokens"
Verifiable"Test:
POST /login
returns 401 without token"
"Make sure it works"
SmallOne file or one logical unit of work"Implement the feature"
每个任务必须满足以下标准:
标准正确示例 ✅错误示例 ❌
具体明确"创建
internal/auth/middleware.go
并实现JWT验证"
"添加认证功能"
可执行"为
AuthService
添加
ValidateToken()
方法"
"处理令牌"
可验证"测试:
POST /login
接口在无令牌时返回401"
"确保功能正常"
粒度适中单个文件或一个逻辑工作单元"实现整个功能"

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
undefined

Tasks Created

已创建的任务

Change: {change-name} Location: openspec/changes/{change-name}/tasks.md
变更名称:{change-name} 存储位置:openspec/changes/{change-name}/tasks.md

Breakdown

任务分解

PhaseTasksFocus
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)。
undefined

Rules

通用规则

  • 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
    rules.tasks
    from
    openspec/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
    ,
    detailed_report
    (optional),
    artifacts
    ,
    next_recommended
    , and
    risks
  • 任务中必须始终引用具体的文件路径
  • 任务必须按依赖关系排序 — 阶段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_recommended
    risks