Add Task

NeoLabHQ/context-engineering-kit/antigravity/skills/add-task

作者 NeoLabHQ23e2428e809d77717f8acc9659c374a3a1fcb93e无许可证收录于 2026年10月9日更新于 2026年10月9日

creates draft task file in .specs/tasks/draft/ with original user intent

AI 生成的概览

在 .specs/tasks/draft/ 中创建草稿任务文件,保留用户的原始请求。

功能
将用户的任务描述转换为结构化的草稿任务文件。它会生成以动词开头的标题、判定任务类型(feature、bug、refactor、test、docs、chore、ci)、生成简短的连字符文件名,并原样保留用户输入。它还会确保 .specs 任务目录结构存在,并返回文件路径、标题、类型和依赖项。
适用场景
适用于需要在进一步分析或规划之前,先把新任务记录为草稿文件的场景。它适合将工作组织到 .specs/tasks 状态文件夹、并希望逐字保留用户原始意图的工作流。
运行要求
需要在具备文件写入能力并能访问项目工作区的智能体环境中运行。它会引用位于 ${CLAUDE_PLUGIN_ROOT}/scripts/create-folders.sh 的文件夹创建脚本,脚本不可用时提供手动回退方案;未说明其他软件包或凭据要求。

Create 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 .specs/tasks/draft/ with:

  • 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

Input

  • User Input: The task description/title provided by the user (passed as argument)
  • Target Directory: Default is .specs/tasks/draft/

Instructions

1. Ensure Directory Structure

Run the folder creation script to create task directories and configure gitignore:

bash
bash ${CLAUDE_PLUGIN_ROOT}/scripts/create-folders.sh

This creates:

  • .specs/tasks/draft/ - New tasks awaiting analysis
  • .specs/tasks/todo/ - Tasks ready to implement
  • .specs/tasks/in-progress/ - Currently being worked on
  • .specs/tasks/done/ - Completed tasks
  • .specs/scratchpad/ - Temporary working files (gitignored)
  • .specs/analysis/ - Analysis of the task
  • .specs/reports/ - Reports of the task

Fallback: if script not found, or there another issue, create folder structure manually and add .specs/scratchpad/ to .gitignore

2. Analyze Input

  1. 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
  2. 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)

3. Structure the Task

  1. 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"
  2. Determine type:

    TypeUse 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

4. Generate File Name

  1. 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
  2. Form file name: <short-name>.<issue-type>.md

    • Examples:
      • add-validation-login-form.feature.md
      • fix-null-pointer-user-service.bug.md
      • restructure-auth-module.refactor.md
      • add-unit-tests-api.test.md
      • update-readme.docs.md
      • upgrade-dependencies.chore.md
      • add-github-actions.ci.md
  3. Verify uniqueness: Check .specs/tasks/draft/, .specs/tasks/todo/, .specs/tasks/in-progress/, and .specs/tasks/done/ for existing files with same name

5. Create Task File

Use Write tool to create .specs/tasks/todo/<short-name>.<issue-type>.md:

markdown
---title: <ACTION-ORIENTED TITLE>depends_on: <list of task files that this task depends on>---
## Initial User Prompt
{EXACT user input as provided}
## Description
// Will be filled in future stages by business analyst

Constraints

  • 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.

Expected Output

Return to the orchestrator:

  1. Task file path: Full path to created file (e.g., .specs/tasks/todo/add-validation-login-form.feature.md)
  2. Generated title: The action-oriented title created
  3. Issue type: task, bug, or feature

Format:

Created task file: .specs/tasks/draft/<name>.<type>.mdTitle: <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/, .specs/tasks/done/ exist
  • Task file created in .specs/tasks/draft/ with correct naming convention (<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

Examples

Test task (.specs/tasks/draft/add-unit-tests-auth.test.md):

markdown
---title: Add unit tests for auth module---
## Initial User Prompt
add tests for auth
## 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---
## Initial User Prompt
users getting 504 errors on slow wifi
## 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---
## Initial User Prompt
add dark mode to settings page
## Description
// Will be filled in future stages by business analyst

来源与署名

来源:NeoLabHQ/context-engineering-kit位于antigravity/skills/add-task提交23e2428

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架