Files
2025-11-30 09:06:07 +08:00

3.6 KiB

Create Tasks

Create a tasks list with sub-tasks to execute an artifact based on its spec.

Spec Creation Rules

Overview

With the user's approval, proceed to creating a tasks list based on the current feature spec.

<pre_flight_check>

  • IMPORTANT: For any step that specifies a subagent in the subagent="" XML attribute you MUST use the specified subagent to perform the instructions for that step.

  • Process XML blocks sequentially

  • Read and execute every numbered step in the process_flow EXACTLY as the instructions specify.

  • If you need clarification on any details of your current task, stop and ask the user specific numbered questions and then continue once you have all of the information you need.

  • Use exact templates as provided </pre_flight_check>

<process_flow>

Step 1: Create tasks.md

Use the file-creator subagent to create file: tasks.md inside of the current feature's spec folder.

<file_template>

# Spec Tasks

<task_structure> <major_tasks> - count: 1-5 - format: numbered checklist - grouping: by feature or component </major_tasks> - count: up to 8 per major task - format: decimal notation (1.1, 1.2) - first_subtask: typically write tests - last_subtask: verify all tests pass </task_structure>

<task_template>

Tasks

  • 1. [MAJOR_TASK_DESCRIPTION]

    • 1.1 Write tests for [COMPONENT]
    • 1.2 [IMPLEMENTATION_STEP]
    • 1.3 [IMPLEMENTATION_STEP]
    • 1.4 Verify all tests pass
  • 2. [MAJOR_TASK_DESCRIPTION]

    • 2.1 Write tests for [COMPONENT]
    • 2.2 [IMPLEMENTATION_STEP] </task_template>

<ordering_principles>

  • Consider technical dependencies
  • Follow TDD approach
  • Group related functionality
  • Build incrementally </ordering_principles>

Step 2: Execution Readiness Check

Evaluate readiness to begin implementation by presenting the first task summary and requesting user confirmation to proceed.

<readiness_summary> <present_to_user> - Spec name and description - First task summary from tasks.md - Estimated complexity/scope - Key deliverables for task 1 </present_to_user> </readiness_summary>

<execution_prompt> PROMPT: "The spec planning is complete. The first task is:

Task 1: [FIRST_TASK_TITLE] [BRIEF_DESCRIPTION_OF_TASK_1_AND_SUBTASKS]

Would you like me to proceed with implementing Task 1? I will focus only on this first task and its subtasks unless you specify otherwise.

Type 'yes' to proceed with Task 1, or let me know if you'd like to review or modify the plan first." </execution_prompt>

<execution_flow> IF user_confirms_yes: Execute the /execute-task command. FOCUS: Only Task 1 and its subtasks CONSTRAINT: Do not proceed to additional tasks without explicit user request ELSE: WAIT: For user clarification or modifications </execution_flow>

</process_flow>

<post_flight_check> After completing all steps in a process_flow, always review your work and verify:

  • Every numbered step has read, executed, and delivered according to its instructions.

  • All steps that specified a subagent should be used, did in fact delegate those tasks to the specified subagent. IF they did not, see why the subagent was not used and report your findings to the user.

  • IF you notice a step wasn't executed according to its instructions, report your findings and explain which part of the instructions were misread or skipped and why. </post_flight_check>