split-task
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDivide and Conquer
分而治之
Evaluate a task's complexity and, if warranted, split it into smaller, focused sub-tasks.
评估任务的复杂度,必要时将其拆分为更小、更聚焦的子任务。
Instructions
使用说明
The user's query is in (a task ID like , optionally followed by to skip the complexity check).
$ARGUMENTS077--force-
Look up the task: Runto find the task
taskmd get $ARGUMENTS- If not found, run to show available tasks and ask the user which one they meant
taskmd list
- If not found, run
-
Read the task file with thetool to get the full description, subtasks, and acceptance criteria
Read -
Assess complexity to decide whether the task should be divided. Consider:
- Effort field: effort tasks are good candidates;
largetasks almost never need splittingsmall - Subtask count: Tasks with 5+ checkbox items that span distinct concerns are candidates
- Scope breadth: Tasks that touch multiple unrelated areas (e.g., backend + frontend + docs) are candidates
- Independence: Subtasks that can be worked on in parallel by different people are candidates
- A task is NOT a good candidate if:
- It has or
smalleffort with fewer than 5 subtasksmedium - Its subtasks are tightly coupled sequential steps of a single feature
- Splitting would create trivial tasks that aren't worth tracking individually
- It has
- Effort field:
-
If the task is NOT complex enough:
- Explain why the task doesn't warrant splitting (be specific about which criteria it fails)
- Do NOT create any files
- Only proceed if contains
$ARGUMENTSor the user explicitly insists--force
-
If the task IS complex enough (oris used): a. Read the specification: Look for
--forceordocs/taskmd_specification.mdfor the correct format b. Determine available IDs by scanningdocs/TASKMD_SPEC.mdwithtasks/**/*.md:Glob- Extract numeric IDs from filenames (pattern: )
NNN-description.md - Allocate the next N sequential IDs for the sub-tasks c. Design the split: Group the original task's work into 2-5 focused sub-tasks where each:
- Has a single clear responsibility
- Can be independently verified
- Includes relevant subtasks and acceptance criteria from the original d. Create sub-task files as siblings of the original task file (same directory), each with:
yaml--- id: "<NNN>" title: "<focused title>" status: pending priority: <inherit from parent> effort: <estimated for this slice> tags: <inherit relevant tags from parent> parent: "<original task ID>" created: <today's date YYYY-MM-DD> ---Followed by a markdown body with:- An H1 heading matching the title
- An section describing this slice's goal
## Objective - A section with checkbox items (pulled or refined from the original)
## Tasks - An section
## Acceptance Criteria
e. Update the original task (only the markdown body, not the frontmatter status):- Add a section listing the created sub-task IDs and titles
## Sub-tasks - Keep the original content intact for reference
- Extract numeric IDs from filenames (pattern:
-
Report the result:
- List each created sub-task file with its ID and title
- Summarize how the work was divided
用户的查询位于中(格式为类似的任务ID,可选后跟参数以跳过复杂度检查)。
$ARGUMENTS077--force-
查询任务:运行查找对应任务
taskmd get $ARGUMENTS- 如果未找到,运行展示所有可用任务,询问用户想要操作的是哪一个
taskmd list
- 如果未找到,运行
-
使用工具读取任务文件,获取完整描述、子任务和验收标准
Read -
评估复杂度以判断是否需要拆分任务,考虑以下维度:
- 工作量字段:标记为工作量的任务适合拆分;
large工作量的任务几乎不需要拆分small - 子任务数量:包含5个及以上复选框项、且涉及不同领域的任务适合拆分
- 范围广度:涉及多个不相关领域(例如:后端 + 前端 + 文档)的任务适合拆分
- 独立性:可由不同人员并行开发的子任务所属的主任务适合拆分
- 任务不适合拆分的情况:
- 工作量为或
small且子任务少于5个medium - 子任务是单个功能下紧密耦合的顺序步骤
- 拆分后会产生不值得单独追踪的琐碎任务
- 工作量为
- 工作量字段:标记为
-
如果任务复杂度不足:
- 解释任务不适合拆分的原因(明确说明不符合哪项拆分标准)
- 不要创建任何文件
- 仅当包含
$ARGUMENTS或用户明确要求时才继续拆分--force
-
如果任务复杂度足够(或使用了参数): a. 读取规范:查找
--force或docs/taskmd_specification.md获取正确格式 b. 通过docs/TASKMD_SPEC.md扫描Glob确定可用ID:tasks/**/*.md- 从文件名中提取数字ID(格式:)
NNN-description.md - 分配接下来的N个连续ID给子任务 c. 设计拆分方案:将原任务的工作内容划分为2-5个聚焦的子任务,每个子任务满足:
- 具备单一清晰的职责
- 可独立验收
- 包含原任务中相关的子任务和验收标准 d. 在原任务文件的同级目录下创建子任务文件,每个文件包含:
yaml--- id: "<NNN>" title: "<focused title>" status: pending priority: <inherit from parent> effort: <estimated for this slice> tags: <inherit relevant tags from parent> parent: "<original task ID>" created: <today's date YYYY-MM-DD> ---后跟markdown正文,包含:- 与标题匹配的H1标题
- 描述本次拆分模块目标的部分
## 目标 - 带有复选框项的部分(从原任务提取或优化)
## 任务 - 一个部分
## 验收标准
e. 更新原任务(仅修改markdown正文,不修改前置元数据的状态):- 添加部分,列出创建的子任务ID和标题
## 子任务 - 保留原内容完整以便参考
- 从文件名中提取数字ID(格式:
-
汇报结果:
- 列出每个创建的子任务文件的ID和标题
- 总结工作拆分的方式