kiro-spec-tasks Skill
Core Mission
- Success Criteria:
- All requirements mapped to specific tasks
- Tasks properly sized (1-3 hours each)
- Clear task progression with proper hierarchy
- Natural language descriptions focused on capabilities
- A lightweight task-plan sanity review confirms the task graph is executable before
tasks.md is written
Execution Steps
Step 1: Gather Context
If steering/spec context is already available from conversation, skip redundant file reads.
Otherwise, load all necessary context:
.kiro/specs/{feature}/spec.json, requirements.md, design.md
.kiro/specs/{feature}/tasks.md (if exists, for merge mode)
Core steering context: product.md, tech.md, structure.md
Additional steering files only when directly relevant to requirements coverage, design boundaries, runtime prerequisites, or team conventions that affect task executability
.kiro/settings/templates/specs/localized-spec-terminology.md for localized spec terms
Determine execution mode:
sequential = (sequential flag is true)
Validate approvals:
- If auto-approve flag (
-y) is true: Auto-approve requirements and design in spec.json. Tasks approval is also handled automatically in Step 4.
- Otherwise: Verify both approved (stop if not, see Safety & Fallback)
Step 2: Generate Implementation Tasks
- Read
rules/tasks-generation.md from this skill's directory for principles
- Read
rules/tasks-parallel-analysis.md from this skill's directory for parallel judgement criteria
- Select the matching tasks template from
spec.json.language: .kiro/settings/templates/specs/tasks.md for ja, or .kiro/settings/templates/specs/tasks.en.md for en. Stop for unsupported languages. Both templates support (P) markers.
Parallel Research
The following research areas are independent and can be executed in parallel:
- Context loading: Spec documents (requirements.md, design.md), steering files
- Rules loading: tasks-generation.md, tasks-parallel-analysis.md, localized spec terminology, tasks template
After all parallel research completes, synthesize findings before generating tasks.
Generate task list following all rules:
- Use language specified in spec.json
- Map all requirements to tasks and list numeric requirement IDs only (comma-separated) without descriptive suffixes, parentheses, translations, or free-form labels
- Ensure all design components included
- Verify task progression is logical and incremental
- Ensure each executable sub-task includes at least one detail bullet that states what "done" looks like in observable terms
- Keep normal implementation tasks within a single responsibility boundary; if work crosses boundaries, make it an explicit integration task
- Apply
(P) markers to tasks that satisfy parallel criteria when !sequential
- Explicitly note dependencies preventing
(P) when tasks appear parallel but are not safe
- If sequential mode is true, omit
(P) entirely
- If existing tasks.md found, merge with new content
Step 3: Review Task Plan
- Keep the draft task plan in working memory; do NOT write
tasks.md yet
- Run the
Task Plan Review Gate from rules/tasks-generation.md
- Review coverage:
- Every requirement ID appears in at least one task
- Every design component, contract, integration point, runtime prerequisite, and validation concern is represented
- Review executability:
- Each sub-task is an executable 1-3 hour work unit
- Each sub-task has a verifiable deliverable
- Each executable sub-task includes an observable completion bullet
- No implicit prerequisites remain hidden
_Depends:_, _Boundary:_, and (P) markers still match the dependency graph and architecture boundaries
- If issues are task-plan-local, repair the draft and re-run the review gate before writing
- Keep the review bounded to at most 2 repair passes
- If review exposes a real requirements/design gap or contradiction, stop and send the user back to requirements/design instead of inventing filler tasks
Step 3.5: Run Task-Graph Sanity Review
Before writing tasks.md, run one lightweight independent sanity review of the task graph.
- If fresh subagent dispatch is available, spawn one fresh review subagent for this step. Otherwise perform the same review in the current context.
- Provide only file paths, the draft task plan, and merge context if an existing
tasks.md is being updated. The reviewer should read requirements.md, design.md, and the task-generation rules directly instead of relying on a parent-synthesized coverage summary.
- Check only:
- hidden prerequisites or missing setup tasks
- dependency or ordering mistakes
- boundary overlap or ambiguous ownership between tasks
- tasks that are too large, too vague, cross boundaries without being explicit integration tasks, or are missing a verifiable deliverable
- contradictions introduced between requirements, design, and the task graph
- Return one verdict:
PASS
NEEDS_FIXES
RETURN_TO_DESIGN
- If
NEEDS_FIXES, repair the draft once and re-run the sanity review one time.
- If
RETURN_TO_DESIGN, stop without writing tasks.md and point back to the exact gap in requirements/design.
- Keep this bounded. Do not turn it into a second full planning cycle.
Step 4: Finalize
Write tasks.md:
- Create/update
.kiro/specs/{feature}/tasks.md
- Update spec.json metadata:
- Set
phase: "tasks-generated"
- Set
approvals.tasks.generated: true, approved: false
- Set
approvals.requirements.approved: true
- Set
approvals.design.approved: true
- Update
updated_at timestamp
Approval:
- If auto-approve flag (
-y) is true:
- Set
approvals.tasks.approved: true in spec.json
- Display task summary (task count, major groups, parallel markers)
- Respond: "Tasks generated and auto-approved. Start implementation with
/kiro-impl {feature}"
- Otherwise (interactive):
- Display a summary of the generated tasks (task count, major groups, parallel markers)
- Ask the user: "Tasks generated. Approve and proceed to implementation?"
- If the user approves:
- Set
approvals.tasks.approved: true in spec.json
- Respond: "Tasks approved. Start implementation with
/kiro-impl {feature}"
- If the user wants changes:
- Keep
approvals.tasks.approved: false
- Respond with guidance on what to adjust and re-run
Critical Constraints
- Task Integration: Every task must connect to the system (no orphaned work)
- Boundary annotations: Required for every executable task (
_Boundary:_ ComponentName)
- Explicit dependencies: Every executable task declares
_Depends:_ none or a specific cross-boundary dependency such as _Depends:_ X.X
- Executable deliverable granularity: Each task must produce a verifiable deliverable (file, endpoint, UI component, config). Infrastructure tasks (project scaffolding, manifest, host integration, build config) must be explicit — never assume they exist
- Observable done state: Each executable sub-task must include at least one detail bullet that makes the completed state visible without adding new bookkeeping fields
- No implicit prerequisites: If a task requires a runtime, SDK, framework setup, or config file, that setup must be a separate preceding task
Output Description
Provide brief summary in the language specified in spec.json:
- Status: Confirm tasks generated at
.kiro/specs/{feature}/tasks.md
- Task Summary:
- Total: X major tasks, Y sub-tasks
- All Z requirements covered
- Average task size: 1-3 hours per sub-task
- Quality Validation:
- All requirements mapped to tasks
- Design coverage and runtime prerequisites reviewed
- Task dependencies verified
- Task plan review gate passed
- Independent task-graph sanity review passed
- Testing tasks included
- Next Action: Review tasks and proceed when ready
Format: Concise (under 200 words)
Safety & Fallback
Error Scenarios
Requirements or Design Not Approved:
- Stop Execution: Cannot proceed without approved requirements and design
- User Message: "Requirements and design must be approved before task generation"
- Suggested Action: "Run
/kiro-spec-tasks {feature} -y to auto-approve all (requirements, design, and tasks) and proceed"
Missing Requirements or Design:
- Stop Execution: Both documents must exist
- User Message: "Missing requirements.md or design.md at
.kiro/specs/{feature}/"
- Suggested Action: "Complete requirements and design phases first"
Incomplete Requirements Coverage:
- Warning: "Not all requirements mapped to tasks. Review coverage."
- User Action Required: Confirm intentional gaps or regenerate tasks
Spec Gap Found During Task Review:
- Stop Execution: Do not write a patched-over
tasks.md
- User Message: "Requirements/design do not provide enough clear coverage to generate an executable task plan"
- Suggested Action: "Refine requirements.md or design.md, then re-run
/kiro-spec-tasks {feature}"
Template/Rules Missing:
- Stop Execution: The selected language-specific template and required rules files must exist
- User Message: "Template or rules files missing in
.kiro/settings/"
- Suggested Action: "Check repository setup or restore template files"
- Missing Numeric Requirement IDs:
- Stop Execution: All requirements in requirements.md MUST have numeric IDs. If any requirement lacks a numeric ID, stop and request that requirements.md be fixed before generating tasks.
Next Phase: Implementation
Tasks are approved in Step 4 via user confirmation. Once approved:
- Autonomous implementation:
/kiro-impl {feature}
- Specific tasks only:
/kiro-impl {feature} 1.1,1.2
1---2name: kiro-spec-tasks-23description: Generate implementation tasks from requirements and design. Use when creating actionable task lists.4---56# kiro-spec-tasks Skill78## Core Mission9- **Success Criteria**:10 - All requirements mapped to specific tasks11 - Tasks properly sized (1-3 hours each)12 - Clear task progression with proper hierarchy13 - Natural language descriptions focused on capabilities14 - A lightweight task-plan sanity review confirms the task graph is executable before `tasks.md` is written1516## Execution Steps1718### Step 1: Gather Context1920If steering/spec context is already available from conversation, skip redundant file reads.21Otherwise, load all necessary context:22- `.kiro/specs/{feature}/spec.json`, `requirements.md`, `design.md`23- `.kiro/specs/{feature}/tasks.md` (if exists, for merge mode)24- Core steering context: `product.md`, `tech.md`, `structure.md`25- Additional steering files only when directly relevant to requirements coverage, design boundaries, runtime prerequisites, or team conventions that affect task executability26- `.kiro/settings/templates/specs/localized-spec-terminology.md` for localized spec terms2728- Determine execution mode:29 - `sequential = (sequential flag is true)`3031**Validate approvals**:32- If auto-approve flag (`-y`) is true: Auto-approve requirements and design in spec.json. Tasks approval is also handled automatically in Step 4.33- Otherwise: Verify both approved (stop if not, see Safety & Fallback)3435### Step 2: Generate Implementation Tasks3637- Read `rules/tasks-generation.md` from this skill's directory for principles38- Read `rules/tasks-parallel-analysis.md` from this skill's directory for parallel judgement criteria39- Select the matching tasks template from `spec.json.language`: `.kiro/settings/templates/specs/tasks.md` for `ja`, or `.kiro/settings/templates/specs/tasks.en.md` for `en`. Stop for unsupported languages. Both templates support `(P)` markers.4041#### Parallel Research4243The following research areas are independent and can be executed in parallel:441. **Context loading**: Spec documents (requirements.md, design.md), steering files452. **Rules loading**: tasks-generation.md, tasks-parallel-analysis.md, localized spec terminology, tasks template4647After all parallel research completes, synthesize findings before generating tasks.4849**Generate task list following all rules**:50- Use language specified in spec.json51- Map all requirements to tasks and list numeric requirement IDs only (comma-separated) without descriptive suffixes, parentheses, translations, or free-form labels52- Ensure all design components included53- Verify task progression is logical and incremental54- Ensure each executable sub-task includes at least one detail bullet that states what "done" looks like in observable terms55- Keep normal implementation tasks within a single responsibility boundary; if work crosses boundaries, make it an explicit integration task56- Apply `(P)` markers to tasks that satisfy parallel criteria when `!sequential`57- Explicitly note dependencies preventing `(P)` when tasks appear parallel but are not safe58- If sequential mode is true, omit `(P)` entirely59- If existing tasks.md found, merge with new content6061### Step 3: Review Task Plan6263- Keep the draft task plan in working memory; do NOT write `tasks.md` yet64- Run the `Task Plan Review Gate` from `rules/tasks-generation.md`65- Review coverage:66 - Every requirement ID appears in at least one task67 - Every design component, contract, integration point, runtime prerequisite, and validation concern is represented68- Review executability:69 - Each sub-task is an executable 1-3 hour work unit70 - Each sub-task has a verifiable deliverable71 - Each executable sub-task includes an observable completion bullet72 - No implicit prerequisites remain hidden73 - `_Depends:_`, `_Boundary:_`, and `(P)` markers still match the dependency graph and architecture boundaries74- If issues are task-plan-local, repair the draft and re-run the review gate before writing75- Keep the review bounded to at most 2 repair passes76- If review exposes a real requirements/design gap or contradiction, stop and send the user back to requirements/design instead of inventing filler tasks7778### Step 3.5: Run Task-Graph Sanity Review7980Before writing `tasks.md`, run one lightweight independent sanity review of the task graph.8182- If fresh subagent dispatch is available, spawn one fresh review subagent for this step. Otherwise perform the same review in the current context.83- Provide only file paths, the draft task plan, and merge context if an existing `tasks.md` is being updated. The reviewer should read `requirements.md`, `design.md`, and the task-generation rules directly instead of relying on a parent-synthesized coverage summary.84- Check only:85 - hidden prerequisites or missing setup tasks86 - dependency or ordering mistakes87 - boundary overlap or ambiguous ownership between tasks88 - tasks that are too large, too vague, cross boundaries without being explicit integration tasks, or are missing a verifiable deliverable89 - contradictions introduced between requirements, design, and the task graph90- Return one verdict:91 - `PASS`92 - `NEEDS_FIXES`93 - `RETURN_TO_DESIGN`94- If `NEEDS_FIXES`, repair the draft once and re-run the sanity review one time.95- If `RETURN_TO_DESIGN`, stop without writing `tasks.md` and point back to the exact gap in requirements/design.96- Keep this bounded. Do not turn it into a second full planning cycle.9798### Step 4: Finalize99100**Write tasks.md**:101- Create/update `.kiro/specs/{feature}/tasks.md`102- Update spec.json metadata:103 - Set `phase: "tasks-generated"`104 - Set `approvals.tasks.generated: true, approved: false`105 - Set `approvals.requirements.approved: true`106 - Set `approvals.design.approved: true`107 - Update `updated_at` timestamp108109**Approval**:110- If auto-approve flag (`-y`) is true:111 - Set `approvals.tasks.approved: true` in spec.json112 - Display task summary (task count, major groups, parallel markers)113 - Respond: "Tasks generated and auto-approved. Start implementation with `/kiro-impl {feature}`"114- Otherwise (interactive):115 - Display a summary of the generated tasks (task count, major groups, parallel markers)116 - Ask the user: "Tasks generated. Approve and proceed to implementation?"117 - If the user approves:118 - Set `approvals.tasks.approved: true` in spec.json119 - Respond: "Tasks approved. Start implementation with `/kiro-impl {feature}`"120 - If the user wants changes:121 - Keep `approvals.tasks.approved: false`122 - Respond with guidance on what to adjust and re-run123124## Critical Constraints125- **Task Integration**: Every task must connect to the system (no orphaned work)126- **Boundary annotations**: Required for every executable task (`_Boundary:_ ComponentName`)127- **Explicit dependencies**: Every executable task declares `_Depends:_ none` or a specific cross-boundary dependency such as `_Depends:_ X.X`128- **Executable deliverable granularity**: Each task must produce a verifiable deliverable (file, endpoint, UI component, config). Infrastructure tasks (project scaffolding, manifest, host integration, build config) must be explicit — never assume they exist129- **Observable done state**: Each executable sub-task must include at least one detail bullet that makes the completed state visible without adding new bookkeeping fields130- **No implicit prerequisites**: If a task requires a runtime, SDK, framework setup, or config file, that setup must be a separate preceding task131132## Output Description133134Provide brief summary in the language specified in spec.json:1351361. **Status**: Confirm tasks generated at `.kiro/specs/{feature}/tasks.md`1372. **Task Summary**:138 - Total: X major tasks, Y sub-tasks139 - All Z requirements covered140 - Average task size: 1-3 hours per sub-task1413. **Quality Validation**:142 - All requirements mapped to tasks143 - Design coverage and runtime prerequisites reviewed144 - Task dependencies verified145 - Task plan review gate passed146 - Independent task-graph sanity review passed147 - Testing tasks included1484. **Next Action**: Review tasks and proceed when ready149150**Format**: Concise (under 200 words)151152## Safety & Fallback153154### Error Scenarios155156**Requirements or Design Not Approved**:157- **Stop Execution**: Cannot proceed without approved requirements and design158- **User Message**: "Requirements and design must be approved before task generation"159- **Suggested Action**: "Run `/kiro-spec-tasks {feature} -y` to auto-approve all (requirements, design, and tasks) and proceed"160161**Missing Requirements or Design**:162- **Stop Execution**: Both documents must exist163- **User Message**: "Missing requirements.md or design.md at `.kiro/specs/{feature}/`"164- **Suggested Action**: "Complete requirements and design phases first"165166**Incomplete Requirements Coverage**:167- **Warning**: "Not all requirements mapped to tasks. Review coverage."168- **User Action Required**: Confirm intentional gaps or regenerate tasks169170**Spec Gap Found During Task Review**:171- **Stop Execution**: Do not write a patched-over `tasks.md`172- **User Message**: "Requirements/design do not provide enough clear coverage to generate an executable task plan"173- **Suggested Action**: "Refine requirements.md or design.md, then re-run `/kiro-spec-tasks {feature}`"174175**Template/Rules Missing**:176- **Stop Execution**: The selected language-specific template and required rules files must exist177- **User Message**: "Template or rules files missing in `.kiro/settings/`"178- **Suggested Action**: "Check repository setup or restore template files"179- **Missing Numeric Requirement IDs**:180 - **Stop Execution**: All requirements in requirements.md MUST have numeric IDs. If any requirement lacks a numeric ID, stop and request that requirements.md be fixed before generating tasks.181182### Next Phase: Implementation183184Tasks are approved in Step 4 via user confirmation. Once approved:185- Autonomous implementation: `/kiro-impl {feature}`186- Specific tasks only: `/kiro-impl {feature} 1.1,1.2`