Implement Tasks - executes tasks from the tasks document using subagents. Use when ready to start coding a feature.
You are a Senior Engineer orchestrating implementation. Your job is to execute the plan faithfully and verify results.
Executes tasks from a specification's tasks document. Supports three modes: execute all pending tasks, execute the next pending task, or execute a specific task by number.
Use this skill when the user needs to:
Parse $ARGUMENTS to determine the execution mode:
| Format | Mode | Description |
|---|---|---|
$0 | All | Execute all pending tasks |
$0 next | Next | Execute the next pending task |
$0 $1 | Specific | Execute task N (e.g., "1.2", "3") |
$0 = spec name (e.g., "user-auth")$1 = mode — next, or a task number (e.g., "2.1", "3"). If omitted, defaults to all.If no spec name provided, list available specs in .specs/ and use the AskUserQuestion tool to let the user choose.
Examples:
/spec:implement user-auth — execute all pending tasks for user-auth/spec:implement user-auth next — execute the next pending task/spec:implement user-auth 2.1 — execute task 2.1/spec:implement user-auth 3 — execute major task 3 and all its subtasksAll specification documents are located in .specs/<spec-name>/ directory:
| File | Description |
|---|---|
.specs/<spec-name>/requirements.md | Requirements and acceptance criteria |
.specs/<spec-name>/research.md | Research findings and chosen solutions |
.specs/<spec-name>/design.md | Technical design and architecture |
.specs/<spec-name>/tasks.md | Implementation tasks with checkboxes |
Always read all four files to understand the full context before executing tasks.
Read the frontmatter of each prerequisite document. A document's status is in its YAML frontmatter status field. If no frontmatter exists, treat as DRAFT.
| Prerequisite | Path | Gate |
|---|---|---|
| tasks | .specs/<spec-name>/tasks.md | HARD |
| test-plan | .specs/<spec-name>/test-plan.md | SOFT |
APPROVED): Display: "Cannot proceed: tasks.md is missing or not APPROVED (current status: <status>). Run spec:approve <spec-name> tasks first." Use AskUserQuestion with options: "Run spec:approve now", "Cancel". Do NOT offer "proceed anyway".APPROVED): Display: "Warning: test-plan.md is missing or not APPROVED. Consider running spec:test-plan first so tests are ready when implementation completes." Use AskUserQuestion with options: "Proceed anyway", "Run spec:test-plan first", "Cancel"..specs/<spec-name>/requirements.md - understand what needs to be builtresearch.md - understand chosen solutions and their rationaledesign.md - understand how it should be builttasks.md - get the list of tasks to executeBased on $0 and $1, follow one of:
Include these rules in every subagent prompt:
After each subagent completes, verify before marking as [x]:
git diff --stat)If verification fails, fix directly or re-run the subagent with specific corrections. Do NOT mark as [x] until verification passes.
[-] (in progress) - resume this task first[ ] (pending) - start this task[x] (completed)IMPORTANT: Each subtask is executed as a separate subagent and committed independently. Do NOT group subtasks into a single agent or commit.
If the next pending item is a subtask (e.g., 1.2):
[-] in tasks.mdsubagent_type: "general-purpose":
You are an **Engineer** implementing a specific subtask. Follow the task exactly — do not explore beyond listed files or add unrequested features.[x] in tasks.md only after verification passesgit:commit skill to commit (see Committing Changes section)[x] in tasks.md and commit this change using the git:commit skillIf the next pending item is a major task with subtasks, start with its first pending subtask using the flow above.
If the next task is a checkpoint:
After completing the task:
AskUserQuestion tool to ask if the user wants to continue, with options like "Continue with next task", "Stop here", "Review changes first"[ ] - Pending task (to be executed)[-] - In progress task (continue execution)[x] - Completed task (skip)CRITICAL RULE: Major tasks ALWAYS execute sequentially, one after another. Never start major task N+1 until major task N is fully complete. Parallelism is ONLY allowed between subtasks of the SAME major task.
For each major task:
[x] in tasks.mdgit:commit skillAnalyze subtask dependencies and choose parallel or sequential execution. For the full dependency analysis rules and parallel execution strategy, see parallel-execution.md.
Quick decision: If ALL subtasks touch completely different files with no shared dependencies → PARALLEL. Otherwise → SEQUENTIAL. When in doubt, choose sequential.
Use this strategy when the dependency analysis yields SEQUENTIAL, or for single subtasks, or as a fallback.
For each pending subtask in order:
[-] in tasks.mdsubagent_type: "general-purpose":
You are an **Engineer** implementing a specific subtask. Follow the task exactly — do not explore beyond listed files or add unrequested features.[x] in tasks.mdgit:commit skill (see Committing Changes section)When encountering a checkpoint task:
After completing all tasks:
spec:test-plan to create a test plan, spec:review to review)If the task number points to a single subtask (e.g., "1.2"), follow the same "Execute Single Subtask" flow from the Next Task section.
If the task number points to a major task (e.g., "2") that has subtasks:
[x] in tasks.md and commitIf the specified task depends on incomplete prerequisite tasks:
AskUserQuestion tool to ask how to proceed, with options like "Execute prerequisites first", "Proceed anyway", "Cancel"After completing the task:
Commit each subtask individually using the git:commit skill:
tasks.md is tracked by git (run git check-ignore .specs/<spec-name>/tasks.md). If it is NOT ignored, also stage tasks.md in the same commit so the task progress is capturedgit:commit skill — it will analyze staged changes, determine the commit type, and create a properly formatted Conventional Commits messageCommit ALL subtasks from the parallel batch together as a single commit:
tasks.md if trackedgit:commit skill — the commit message should reference the major task (e.g., "feat(auth): implement validation utilities (tasks 3.1-3.3)")When the design doesn't match reality during implementation, follow the protocol in deviation-protocol.md.
Quick summary: Minor deviations → log and continue. Moderate → pause and ask user. Major → STOP, mark design as SUPERSEDED, escalate.
[-]AskUserQuestion tool to ask how to proceed, with options like "Skip this task", "Retry", "Abort execution"