task-breakdown

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Writing Task Breakdown

任务拆解撰写指南

Overview

概述

Write comprehensive task breakdowns assuming the expert who is going to implement the specs has zero context for our project and questionable taste. Document everything they need to know: which existing files to check, which files to touch for each task and what changes to make to them. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD.
Assume they are a skilled worker, but know almost nothing about our toolset or problem domain. Assume they don't know how to verify they are doing the right thing.
Review available skills and propose creating new skills if needed. If you propose creating new skills, you MUST create them before creating the task breakdown.
Announce at start: "I'm using the task-breakdown skill to create a plan."
Save tasks to:
docs/YYYY-MM-DD-<feature-name>-tasks.md
撰写全面的任务拆解文档时,假设将要实现这些规格的专家对我们的项目毫无了解,且缺乏相关经验。记录他们需要知道的所有信息:需要查看哪些现有文件、每个任务需要修改哪些文件以及具体修改内容。将整个计划拆分为一个个易于处理的小任务。遵循DRY、YAGNI和TDD原则。
假设他们是熟练的从业者,但对我们的工具集或问题领域几乎一无所知。同时假设他们不知道如何验证自己的操作是否正确。
审核现有技能,如有需要建议创建新技能。如果建议创建新技能,必须在创建任务拆解前完成技能创建。
开头声明: "我正在使用task-breakdown技能来制定计划。"
保存任务至:
docs/YYYY-MM-DD-<feature-name>-tasks.md

Bite-Sized Task Granularity

小粒度任务拆分

Each step is one action (2-5 minutes):
  • "Write the failing test" - step
  • "Run it to make sure it fails" - step
  • "Implement the minimal code to make the test pass" - step
  • "Run the tests and make sure they pass" - step
  • "Commit" - step
每个步骤对应一个操作(耗时2-5分钟):
  • "编写失败的测试用例" - 步骤
  • "运行测试以确认失败" - 步骤
  • "编写最小化代码使测试通过" - 步骤
  • "运行测试以确认通过" - 步骤
  • "提交代码" - 步骤

Task Breakdown Document Header

任务拆解文档头部

Every task breakdown MUST start with this header:
markdown
undefined
所有任务拆解文档必须以以下头部开头:
markdown
undefined

[Task Name] Task Breakdown

[任务名称] 任务拆解

For Claude: REQUIRED SUB-SKILL: Use executing-plan skill to execute this task breakdown task-by-task.
Goal: [One sentence describing what this achieves]
Approach: [2-3 sentences about approach]
Skills: [List of skills to use]
Tech Details: [Key tools, services, technologies/libraries to use]

undefined
针对Claude: 必备子技能:使用executing-plan技能逐步执行此任务拆解。
目标: [一句话描述此任务要达成的结果]
方法: [2-3句话说明实现方法]
技能: [所需技能列表]
技术细节: [要使用的关键工具、服务、技术/库]

undefined

Task Structure

任务结构

markdown
undefined
markdown
undefined

Task N: [Component Name]

任务N: [组件名称]

Files:
  • Create:
    exact/path/to/file.py
  • Modify:
    exact/path/to/existing.py:123-145
  • Test:
    tests/exact/path/to/test.py
Step 1: Write the failing test
python
def test_specific_behavior():
    result = function(input)
    assert result == expected
Step 2: Run test to verify it fails
Run:
pytest tests/path/test.py::test_name -v
Expected: FAIL with "function not defined"
Step 3: Write minimal implementation
python
def function(input):
    return expected
Step 4: Run test to verify it passes
Run:
pytest tests/path/test.py::test_name -v
Expected: PASS
Step 5: Commit
bash
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
undefined
文件:
  • 创建:
    exact/path/to/file.py
  • 修改:
    exact/path/to/existing.py:123-145
  • 测试:
    tests/exact/path/to/test.py
步骤1:编写失败的测试用例
python
def test_specific_behavior():
    result = function(input)
    assert result == expected
步骤2:运行测试以验证失败
运行:
pytest tests/path/test.py::test_name -v
预期结果: 失败,提示"function not defined"
步骤3:编写最小化实现代码
python
def function(input):
    return expected
步骤4:运行测试以验证通过
运行:
pytest tests/path/test.py::test_name -v
预期结果: 通过
步骤5:提交代码
bash
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
undefined

Remember

注意事项

  • Exact file paths always
  • For coding tasks, complete code in task breakdown (not "add validation")
  • Exact commands with expected output
  • Reference relevant skills with @ syntax
  • DRY, YAGNI, TDD
  • 始终使用精确的文件路径
  • 对于编码任务,在任务拆解中提供完整代码(而非仅描述如"添加验证")
  • 提供精确的命令及预期输出
  • 使用@语法引用相关技能
  • 遵循DRY、YAGNI、TDD原则

Execution Handoff

执行交接

After saving the task breakdown, offer task execution:
"Task breakdown complete and saved to
docs/YYYY-MM-DD-<feature-name>-tasks.md
.
Subagent-based task execution (this session) - I dispatch fresh subagent per task, review between tasks, fast iteration
  • REQUIRED SUB-SKILL: Use subagent-task-execution
  • Stay in this session
  • Fresh subagent per task + code review
保存任务拆解文档后,提供任务执行选项:
"任务拆解已完成并保存至
docs/YYYY-MM-DD-<feature-name>-tasks.md
基于子代理的任务执行(本次会话) - 我会为每个任务分配新的子代理,在任务间进行审核,实现快速迭代
  • 必备子技能: 使用subagent-task-execution
  • 保持在本次会话中
  • 每个任务分配新的子代理 + 代码审核"