task-breakdown

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Task Breakdown

任务拆分

Overview

概述

Break down complex features into atomic, verifiable subtasks with dependency tracking. Each subtask gets its own JSON file with clear acceptance criteria and deliverables.
Announce at start: "I'm using the task-breakdown skill to create an execution plan for [feature]."
将复杂功能拆分为可独立验证的原子子任务,并进行依赖跟踪。每个子任务都有独立的JSON文件,包含明确的验收标准和交付物。
开始时声明: "我将使用任务拆分技能为[功能]创建执行计划。"

The Process

执行流程

Step 1: Analyze Feature

步骤1:分析功能

Identify these elements:
  • Core objective and scope
  • Technical risks and dependencies
  • Natural task boundaries
  • Tasks that can run in parallel
明确以下要素:
  • 核心目标与范围
  • 技术风险与依赖项
  • 自然任务边界
  • 可并行执行的任务

Step 2: Create Task Plan

步骤2:创建任务计划

Write
.tmp/tasks/{feature}/task.json
:
json
{
  "id": "jwt-auth",
  "name": "JWT Authentication System",
  "status": "active",
  "objective": "Implement JWT-based authentication with refresh tokens",
  "context_files": [
    ".opencode/context/core/standards/code-quality.md",
    ".opencode/context/core/standards/security-patterns.md"
  ],
  "reference_files": [
    "src/middleware/auth.middleware.ts"
  ],
  "exit_criteria": [
    "All tests passing",
    "JWT tokens signed with RS256"
  ],
  "subtask_count": 3,
  "completed_count": 0,
  "created_at": "2026-02-16T02:00:00Z"
}
Rules:
  • Feature ID: kebab-case
  • Objective: max 200 chars
  • context_files
    : standards/conventions ONLY
  • reference_files
    : project source files ONLY
  • Exit criteria: binary pass/fail
编写
.tmp/tasks/{feature}/task.json
json
{
  "id": "jwt-auth",
  "name": "JWT Authentication System",
  "status": "active",
  "objective": "Implement JWT-based authentication with refresh tokens",
  "context_files": [
    ".opencode/context/core/standards/code-quality.md",
    ".opencode/context/core/standards/security-patterns.md"
  ],
  "reference_files": [
    "src/middleware/auth.middleware.ts"
  ],
  "exit_criteria": [
    "All tests passing",
    "JWT tokens signed with RS256"
  ],
  "subtask_count": 3,
  "completed_count": 0,
  "created_at": "2026-02-16T02:00:00Z"
}
规则:
  • 功能ID:采用短横线命名法(kebab-case)
  • 目标:最多200字符
  • context_files
    :仅包含标准/规范文件
  • reference_files
    :仅包含项目源文件
  • 退出标准:二元判断(通过/不通过)

Step 3: Generate Subtasks

步骤3:生成子任务

Write
.tmp/tasks/{feature}/subtask_01.json
,
subtask_02.json
, etc:
json
{
  "id": "jwt-auth-01",
  "seq": "01",
  "title": "Create JWT service with token generation",
  "status": "pending",
  "depends_on": [],
  "parallel": true,
  "suggested_agent": "CoderAgent",
  "context_files": [
    ".opencode/context/core/standards/security-patterns.md"
  ],
  "reference_files": [],
  "acceptance_criteria": [
    "JWT tokens signed with RS256 algorithm",
    "Access tokens expire in 15 minutes"
  ],
  "deliverables": [
    "src/auth/jwt.service.ts",
    "src/auth/jwt.service.test.ts"
  ]
}
Rules:
  • Sequential numbering: 01, 02, 03...
  • Atomic tasks: completable in 1-2 hours
  • Dependencies: map via
    depends_on
    array
  • Parallel tasks: set
    parallel: true
    for isolated work
  • Agent assignment: CoderAgent, TestEngineer, CodeReviewer, OpenFrontendSpecialist
  • Acceptance criteria: binary pass/fail only
  • Deliverables: specific file paths or endpoints
编写
.tmp/tasks/{feature}/subtask_01.json
subtask_02.json
等:
json
{
  "id": "jwt-auth-01",
  "seq": "01",
  "title": "Create JWT service with token generation",
  "status": "pending",
  "depends_on": [],
  "parallel": true,
  "suggested_agent": "CoderAgent",
  "context_files": [
    ".opencode/context/core/standards/security-patterns.md"
  ],
  "reference_files": [],
  "acceptance_criteria": [
    "JWT tokens signed with RS256 algorithm",
    "Access tokens expire in 15 minutes"
  ],
  "deliverables": [
    "src/auth/jwt.service.ts",
    "src/auth/jwt.service.test.ts"
  ]
}
规则:
  • 序号编号:01、02、03……
  • 原子任务:可在1-2小时内完成
  • 依赖项:通过
    depends_on
    数组关联
  • 并行任务:对于独立工作设置
    parallel: true
  • Agent分配:CoderAgent、TestEngineer、CodeReviewer、OpenFrontendSpecialist
  • 验收标准:仅采用二元判断(通过/不通过)
  • 交付物:具体文件路径或端点

Step 4: Validate Structure

步骤4:验证结构

Verify:
  • ✅ All JSON files valid
  • ✅ Dependency references exist
  • ✅ Context files separate from reference files
  • ✅ Acceptance criteria are binary
  • ✅ Deliverables are specific
确认:
  • ✅ 所有JSON文件格式有效
  • ✅ 依赖引用存在
  • ✅ 上下文文件与参考文件分离
  • ✅ 验收标准为二元判断
  • ✅ 交付物具体明确

Step 5: Return Summary

步骤5:返回摘要

undefined
undefined

Tasks Created

创建的任务

Location: .tmp/tasks/jwt-auth/ Files: task.json + 3 subtasks
Subtasks:
  • 01: Create JWT service (parallel: true, agent: CoderAgent)
  • 02: Create password hashing util (parallel: true, agent: CoderAgent)
  • 03: Integrate middleware (parallel: false, agent: CoderAgent)
Next Steps:
  • Execute subtasks in dependency order
  • Tasks 01 and 02 can run in parallel
  • Task 03 depends on completion of 01 and 02
undefined
位置:.tmp/tasks/jwt-auth/ 文件:task.json + 3个子任务
子任务:
  • 01:创建JWT服务(可并行:是,Agent:CoderAgent)
  • 02:创建密码哈希工具(可并行:是,Agent:CoderAgent)
  • 03:集成中间件(可并行:否,Agent:CoderAgent)
下一步:
  • 按依赖顺序执行子任务
  • 任务01和02可并行执行
  • 任务03需等待01和02完成后执行
undefined

Red Flags

警示信号

If you think any of these, STOP and re-read this skill:
  • "I can just implement it directly, it's not that complex"
  • "The breakdown will take longer than just doing it"
  • "I already know what needs to be done"
  • "There's only really one task here"
如果你有以下任何想法,请停止操作并重新阅读本技能说明:
  • "我可以直接实现,没那么复杂"
  • "拆分任务比直接做更费时间"
  • "我已经知道需要做什么了"
  • "这里其实只有一个任务"

Common Rationalizations

常见借口与事实

ExcuseReality
"It's only 3-4 files, I don't need a breakdown"3-4 files = multiple subtasks with dependencies. Skipping tracking means losing progress on failure.
"I'll track it in my head"Subagents don't share memory. JSON files are the only reliable state.
"The tasks are obvious, no need to document them"Obvious tasks still need acceptance criteria. "Done" without binary criteria is not done.
"Parallel execution isn't worth it for this"Parallel tasks cut execution time in half. The JSON overhead is 2 minutes. The time saving is 20+.
借口事实
"只涉及3-4个文件,不需要拆分"3-4个文件意味着存在多个带依赖的子任务。跳过跟踪会导致失败时丢失进度。
"我会在脑子里记着"子Agent不共享内存。JSON文件是唯一可靠的状态记录方式。
"任务很明显,不需要记录"显而易见的任务仍需要验收标准。没有二元标准的“完成”不算真正完成。
"这个功能不值得并行执行"并行任务可将执行时间缩短一半。编写JSON的开销仅2分钟,而节省的时间可达20分钟以上。

Remember

注意事项

  • Each subtask completable in 1-2 hours (atomic)
  • context_files
    = standards ONLY,
    reference_files
    = source code ONLY
  • Acceptance criteria must be binary (pass/fail)
  • Mark isolated tasks as
    parallel: true
  • Assign appropriate agent for each subtask
  • Deliverables must be specific file paths
  • 每个子任务需在1-2小时内完成(原子性)
  • context_files
    = 仅标准文件,
    reference_files
    = 仅源代码文件
  • 验收标准必须是二元判断(通过/不通过)
  • 将独立任务标记为
    parallel: true
  • 为每个子任务分配合适的Agent
  • 交付物必须是具体的文件路径

Related

相关技能

  • context-discovery
  • code-execution
  • parallel-execution

Task: Break down this feature into atomic subtasks: $ARGUMENTS
  • context-discovery
  • code-execution
  • parallel-execution

任务:将以下功能拆分为原子子任务:$ARGUMENTS