add-task
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate Draft Task File
创建草稿任务文件
Role
角色
Your role is to create a draft task file that exactly matches the user's request.
你的角色是创建一个完全匹配用户需求的草稿任务文件。
Goal
目标
Create a task file in with:
.specs/tasks/draft/- Clear, action-oriented title (verb + specific description)
- Appropriate type classification (feature/bug/refactor/test/docs/chore/ci)
- Correct dependencies if any
- Useful description preserving user intent
- Correct file name
在目录下创建任务文件,需包含:
.specs/tasks/draft/- 清晰、面向动作的标题(动词+具体描述)
- 合适的类型分类(feature/bug/refactor/test/docs/chore/ci)
- 若有依赖则需标注正确的依赖项
- 保留用户原始需求的实用描述
- 正确的文件名
Input
输入
- User Input: The task description/title provided by the user (passed as argument)
- Target Directory: Default is
.specs/tasks/draft/
- 用户输入:用户提供的任务描述/标题(作为参数传入)
- 目标目录:默认是
.specs/tasks/draft/
Instructions
说明
1. Ensure Directory Structure
1. 确保目录结构
Run the folder creation script to create task directories and configure gitignore:
bash
bash ${CLAUDE_PLUGIN_ROOT}/scripts/create-folders.shThis creates:
- - New tasks awaiting analysis
.specs/tasks/draft/ - - Tasks ready to implement
.specs/tasks/todo/ - - Currently being worked on
.specs/tasks/in-progress/ - - Completed tasks
.specs/tasks/done/ - - Temporary working files (gitignored)
.specs/scratchpad/
运行文件夹创建脚本来创建任务目录并配置gitignore:
bash
bash ${CLAUDE_PLUGIN_ROOT}/scripts/create-folders.sh该脚本会创建:
- - 待分析的新任务
.specs/tasks/draft/ - - 准备实施的任务
.specs/tasks/todo/ - - 正在处理的任务
.specs/tasks/in-progress/ - - 已完成的任务
.specs/tasks/done/ - - 临时工作文件(已加入git忽略)
.specs/scratchpad/
2. Analyze Input
2. 分析输入
-
Parse the user's request:
- Extract the core task objective
- Identify implied type (bug, feature, task)
- List of task files that this task depends on
-
Clarify if ambiguous (only if truly unclear):
- Is this a bug fix or new feature?
- Any related tasks or dependencies? (if not proided, then assume none)
-
解析用户请求:
- 提取核心任务目标
- 识别隐含类型(bug、feature、task)
- 列出当前任务依赖的其他任务文件
-
若存在歧义则澄清(仅当确实不明确时):
- 这是bug修复还是新功能?
- 是否有相关任务或依赖项?(若未提供则假设无)
3. Structure the Task
3. 构建任务结构
-
Create action-oriented title:
- Start with verb: Add, Fix, Update, Implement, Remove, Refactor
- Be specific but concise
- Examples:
- "Add validation to login form"
- "Fix null pointer in user service"
- "Implement caching for API responses"
-
Determine type:
Type Use When featureNew functionality or capability bugSomething is broken or not working correctly refactorCode restructuring without changing behavior testAdding or updating tests docsDocumentation changes only choreMaintenance tasks, dependency updates ciCI/CD configuration changes
-
创建面向动作的标题:
- 以动词开头:Add、Fix、Update、Implement、Remove、Refactor
- 具体且简洁
- 示例:
- "Add validation to login form"
- "Fix null pointer in user service"
- "Implement caching for API responses"
-
确定类型:
类型 使用场景 feature新增功能或能力 bug功能损坏或无法正常工作 refactor重构代码但不改变功能 test添加或更新测试 docs仅修改文档 chore维护任务、依赖更新 ciCI/CD配置变更
4. Generate File Name
4. 生成文件名
-
Create short name from the task title:
- Lowercase the title
- Replace spaces with hyphens
- Remove special characters
- Keep it concise (3-5 words max)
- Example: "Add validation to login form" ->
add-validation-login-form
-
Form file name:
<short-name>.<issue-type>.md- Examples:
add-validation-login-form.feature.mdfix-null-pointer-user-service.bug.mdrestructure-auth-module.refactor.mdadd-unit-tests-api.test.mdupdate-readme.docs.mdupgrade-dependencies.chore.mdadd-github-actions.ci.md
- Examples:
-
Verify uniqueness: Check,
.specs/tasks/draft/,.specs/tasks/todo/, and.specs/tasks/in-progress/for existing files with same name.specs/tasks/done/
-
从任务标题生成短名称:
- 将标题转为小写
- 用连字符替换空格
- 移除特殊字符
- 保持简洁(最多3-5个词)
- 示例:"Add validation to login form" ->
add-validation-login-form
-
组合文件名:
<short-name>.<issue-type>.md- 示例:
add-validation-login-form.feature.mdfix-null-pointer-user-service.bug.mdrestructure-auth-module.refactor.mdadd-unit-tests-api.test.mdupdate-readme.docs.mdupgrade-dependencies.chore.mdadd-github-actions.ci.md
- 示例:
-
验证唯一性:检查、
.specs/tasks/draft/、.specs/tasks/todo/和.specs/tasks/in-progress/目录下是否存在同名文件.specs/tasks/done/
5. Create Task File
5. 创建任务文件
Use Write tool to create :
.specs/tasks/todo/<short-name>.<issue-type>.mdmarkdown
---
title: <ACTION-ORIENTED TITLE>
depends_on: <list of task files that this task depends on>
---使用Write工具创建:
.specs/tasks/todo/<short-name>.<issue-type>.mdmarkdown
---
title: <ACTION-ORIENTED TITLE>
depends_on: <list of task files that this task depends on>
---Initial User Prompt
Initial User Prompt
{EXACT user input as provided}
{EXACT user input as provided}
Description
Description
// Will be filled in future stages by business analyst
undefined// Will be filled in future stages by business analyst
undefinedConstraints
约束条件
- Do NOT invoke the plan skill - the workflow handles subsequent phases
- Do NOT create files outside
.specs/tasks/draft/ - Do NOT modify existing task files
- Do NOT write description, only put placeholder as specified in the task file.
// ... - Do NOT write depends_on section if no dependencies are provided.
- 请勿调用plan技能 - 后续阶段由工作流处理
- 请勿在目录外创建文件
.specs/tasks/draft/ - 请勿修改现有任务文件
- 请勿编写描述内容,仅按任务文件中的指定放置占位符
// ... - 若未提供依赖项,请勿编写depends_on部分
Expected Output
预期输出
Return to the orchestrator:
- Task file path: Full path to created file (e.g., )
.specs/tasks/todo/add-validation-login-form.feature.md - Generated title: The action-oriented title created
- Issue type: ,
task, orbugfeature
Format:
Created task file: .specs/tasks/draft/<name>.<type>.md
Title: <action-oriented title>
Type: <task|bug|feature>
Depends on: <list of task files that this task depends on>向编排器返回:
- 任务文件路径:创建文件的完整路径(例如:)
.specs/tasks/todo/add-validation-login-form.feature.md - 生成的标题:创建的面向动作的标题
- 问题类型:、
task或bugfeature
格式:
Created task file: .specs/tasks/draft/<name>.<type>.md
Title: <action-oriented title>
Type: <task|bug|feature>
Depends on: <list of task files that this task depends on>Success Criteria
成功标准
- Directories ,
.specs/tasks/draft/,.specs/tasks/todo/,.specs/tasks/in-progress/exist.specs/tasks/done/ - Task file created in with correct naming convention (
.specs/tasks/draft/)<name>.<type>.md - File name is unique across all status folders (no overwriting existing files)
- Depends on section is correct if dependencies are provided
- Title starts with action verb (Add, Fix, Implement, Update, Remove, Refactor)
- Type is correctly classified and reflected in file extension (,
.feature.md,.bug.md,.refactor.md,.test.md,.docs.md,.chore.md).ci.md - Original user input preserved in "Initial User Prompt" section
- Description is empty placeholder
// Will be filled in future stages by business analyst
- 目录、
.specs/tasks/draft/、.specs/tasks/todo/、.specs/tasks/in-progress/已存在.specs/tasks/done/ - 任务文件已在目录下创建,且命名符合规范(
.specs/tasks/draft/)<name>.<type>.md - 文件名在所有状态目录中唯一(不会覆盖现有文件)
- 若提供依赖项,depends_on部分正确
- 标题以动作动词开头(Add、Fix、Implement、Update、Remove、Refactor)
- 类型分类正确,并在文件扩展名中体现(、
.feature.md、.bug.md、.refactor.md、.test.md、.docs.md、.chore.md).ci.md - 用户原始输入已保留在“Initial User Prompt”部分
- 描述内容为空白占位符
// Will be filled in future stages by business analyst
Examples
示例
Test task ():
.specs/tasks/draft/add-unit-tests-auth.test.mdmarkdown
---
title: Add unit tests for auth module
---测试任务():
.specs/tasks/draft/add-unit-tests-auth.test.mdmarkdown
---
title: Add unit tests for auth module
---Initial User Prompt
Initial User Prompt
add tests for auth
add tests for auth
Description
Description
// Will be filled in future stages by business analyst
**Bug with context** (`.specs/tasks/draft/fix-login-timeout.bug.md`):
```markdown
---
title: Fix login timeout on slow connections
---// Will be filled in future stages by business analyst
**带上下文的Bug**(`.specs/tasks/draft/fix-login-timeout.bug.md`):
```markdown
---
title: Fix login timeout on slow connections
---Initial User Prompt
Initial User Prompt
users getting 504 errors on slow wifi
users getting 504 errors on slow wifi
Description
Description
// Will be filled in future stages by business analyst
**Feature request** (`.specs/tasks/draft/implement-dark-mode.feature.md`):
```markdown
---
title: Implement dark mode toggle
---// Will be filled in future stages by business analyst
**功能请求**(`.specs/tasks/draft/implement-dark-mode.feature.md`):
```markdown
---
title: Implement dark mode toggle
---Initial User Prompt
Initial User Prompt
add dark mode to settings page
add dark mode to settings page
Description
Description
// Will be filled in future stages by business analyst
undefined// Will be filled in future stages by business analyst
undefined