Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes...
npx skills add jbaruch/spec-kit-skills --skill "speckit-05-tasks"
Install specific skill from multi-skill repository
# Description
Generate actionable task breakdown from plan and specification
# SKILL.md
name: speckit-05-tasks
description: Generate actionable task breakdown from plan and specification
Spec-Kit Tasks
Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Constitution Loading (REQUIRED)
Before ANY action, load and internalize the project constitution:
-
Read constitution:
bash cat .specify/memory/constitution.md 2>/dev/null || echo "NO_CONSTITUTION" -
If exists, parse all principles - especially those affecting task ordering (e.g., TDD requirements).
Prerequisites Check
-
Run prerequisites check:
bash .specify/scripts/bash/check-prerequisites.sh --json -
Parse JSON for
FEATURE_DIRandAVAILABLE_DOCS. -
If error or missing
plan.md:
ERROR: plan.md not found in feature directory. Run /speckit-03-plan first to create the implementation plan.
Smart Validation (Skills Advantage)
BEFORE generating tasks, perform AI-powered validation that vanilla commands cannot do:
Plan Completeness Gate
- Tech Stack Validation:
- Verify plan.md has Language/Version defined (not "NEEDS CLARIFICATION")
-
WARN if missing: "Tech stack undefined - tasks may be too generic"
-
User Story Mapping:
- Extract all user stories from spec.md (P1, P2, P3...)
- Verify each has clear acceptance criteria
-
WARN if story lacks testable criteria: "US-X has no testable acceptance criteria"
-
Dependency Pre-Analysis:
- Identify shared entities from data-model.md
- Flag entities used by multiple stories (potential blockers)
- Suggest: "Entity X used by US1, US2, US3 - recommend Phase 2 (Foundational)"
Quality Report
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ PLAN READINESS REPORT (Skills Advantage) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Tech Stack: [Defined/Missing] [โ/โ]โ
โ User Stories: X found with criteria โ
โ Shared Entities: X (โ Foundational phase) โ
โ API Contracts: X endpoints defined โ
โ Research Items: X decisions documented โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ TASK GENERATION: [READY/NEEDS WORK] โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Execution Flow
1. Load Design Documents
Read from FEATURE_DIR:
- Required: plan.md (tech stack, libraries, structure), spec.md (user stories with priorities)
- Optional: data-model.md (entities), contracts/ (API endpoints), research.md (decisions), quickstart.md (test scenarios)
2. Execute Task Generation
- Load
plan.mdand extract tech stack, libraries, project structure - Load
spec.mdand extract user stories with their priorities (P1, P2, P3, etc.) - If
data-model.mdexists: Extract entities and map to user stories - If
contracts/exists: Map endpoints to user stories - If
research.mdexists: Extract decisions for setup tasks - Generate tasks organized by user story
- Generate dependency graph showing user story completion order
- Create parallel execution examples per user story
- Validate task completeness
3. Task Format (REQUIRED)
Every task MUST strictly follow this format:
- [ ] [TaskID] [P?] [Story?] Description with file path
Format Components:
- Checkbox: ALWAYS start with
- [ ](markdown checkbox) - Task ID: Sequential number (T001, T002, T003...) in execution order
- [P] marker: Include ONLY if task is parallelizable (different files, no dependencies)
- [Story] label: REQUIRED for user story phase tasks only
- Format: [US1], [US2], [US3], etc.
- Setup phase: NO story label
- Foundational phase: NO story label
- User Story phases: MUST have story label
- Polish phase: NO story label
- Description: Clear action with exact file path
Examples:
- CORRECT: - [ ] T001 Create project structure per implementation plan
- CORRECT: - [ ] T005 [P] Implement authentication middleware in src/middleware/auth.py
- CORRECT: - [ ] T012 [P] [US1] Create User model in src/models/user.py
- CORRECT: - [ ] T014 [US1] Implement UserService in src/services/user_service.py
- WRONG: - [ ] Create User model (missing ID and Story label)
- WRONG: T001 [US1] Create model (missing checkbox)
- WRONG: - [ ] [US1] Create User model (missing Task ID)
4. Phase Structure
- Phase 1: Setup (project initialization)
- Phase 2: Foundational (blocking prerequisites - MUST complete before user stories)
- Phase 3+: User Stories in priority order (P1, P2, P3...)
- Within each story: Tests (if requested) -> Models -> Services -> Endpoints -> Integration
- Each phase should be independently testable
- Final Phase: Polish & Cross-Cutting Concerns
5. Task Organization
From User Stories (spec.md) - PRIMARY ORGANIZATION:
- Each user story (P1, P2, P3...) gets its own phase
- Map all related components to their story:
- Models needed for that story
- Services needed for that story
- Endpoints/UI needed for that story
- Tests specific to that story (if requested)
- Mark story dependencies
From Contracts:
- Map each contract/endpoint to the user story it serves
- Each contract -> contract test task [P] before implementation
From Data Model:
- Map each entity to the user story(ies) that need it
- If entity serves multiple stories: Put in earliest story or Setup phase
- Relationships -> service layer tasks
From Setup/Infrastructure:
- Shared infrastructure -> Setup phase (Phase 1)
- Foundational/blocking tasks -> Foundational phase (Phase 2)
- Story-specific setup -> within that story's phase
6. Generate tasks.md
Use template structure with:
- Correct feature name from plan.md
- Phase 1: Setup tasks
- Phase 2: Foundational tasks
- Phase 3+: One phase per user story (in priority order)
- Final Phase: Polish & cross-cutting concerns
- Dependencies section
- Parallel execution examples
- Implementation strategy section (MVP first, incremental delivery)
7. Dependency Graph Validation (Skills Advantage)
After generating tasks, validate the dependency graph:
- Circular Dependency Detection:
- Build task dependency graph from blockedBy/blocks relationships
- Detect cycles: "CIRCULAR DEPENDENCY: T005 โ T012 โ T008 โ T005"
-
If found: HALT and require manual resolution
-
Orphan Task Detection:
- Find tasks with no dependencies AND not blocking anything
-
WARN: "Orphan tasks detected: T015, T023 - verify they belong to a phase"
-
Critical Path Analysis:
- Identify longest dependency chain
- Report: "Critical path: T001 โ T003 โ T012 โ T018 (4 tasks)"
-
Suggest parallelization opportunities
-
Phase Boundary Validation:
- Ensure no cross-phase dependencies go backwards
-
ERROR if Phase 4 task depends on Phase 5 task
-
Story Independence Check:
- Verify each user story phase CAN be implemented independently
- WARN if US2 tasks depend on US3 tasks (wrong priority order)
Dependency Report
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ DEPENDENCY GRAPH ANALYSIS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Total Tasks: X โ
โ Circular Deps: [None/X found] [โ/โ]โ
โ Orphan Tasks: [None/X found] [โ/!]โ
โ Critical Path: X tasks deep โ
โ Phase Boundaries: [Valid/X violations][โ/โ]โ
โ Story Independence: [Yes/No] [โ/โ]โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Parallel Opportunities: X task groups โ
โ Estimated Parallelism: X% speedup โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Report
Output:
- Path to generated tasks.md
- Summary:
- Total task count
- Task count per user story
- Parallel opportunities identified
- Independent test criteria for each story
- Suggested MVP scope (typically just User Story 1)
- Format validation confirmation
Semantic Diff on Re-run (Skills Advantage)
If tasks.md already exists, perform semantic diff before overwriting:
1. Detect Existing Tasks
If tasks.md exists with task items:
- Extract semantic elements:
- Task IDs and descriptions
- Phase structure
- Completion status (checked/unchecked)
-
User story assignments
-
Preserve completion status:
- Tasks marked
[x]should remain completed -
Map old task IDs to new task IDs by description similarity
-
Compare with new generation:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ SEMANTIC DIFF: tasks.md โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ Tasks: โ โ + Added: T025-T030 (new user story US4) โ โ ~ Renamed: T012 description updated โ โ - Removed: T008 (was for deleted FR-008) โ โ โ Preserved: 15 completed tasks kept โ โ โ โ Phases: โ โ + Added: Phase 5 (User Story 4) โ โ ~ Reordered: None โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ COMPLETION STATUS: โ โ Previously completed: 15 tasks โ โ Mapped to new tasks: 14 tasks โ โ Lost (task removed): 1 task โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
2. Smart Merge Strategy
- Completed tasks: Preserve completion status where possible
- New tasks: Add as uncompleted
- Removed tasks: Warn if they were completed (work may be lost)
- Reordered tasks: Maintain new order, preserve completion
3. Warn About In-Progress Work
If significant changes affect completed tasks:
โ WARNING: 3 completed tasks would be affected by regeneration.
Completed work that may need review:
- T008 [x] Create User model (task removed)
- T012 [x] Implement auth (description changed)
Proceed anyway? (yes/no)
Next Steps
After generating tasks:
- Recommended: Run
/speckit-06-analyzeto validate cross-artifact consistency - Checks all user stories have corresponding tasks
- Verifies all tasks trace back to requirements
- Detects orphaned artifacts and constitution violations
-
Catches issues before implementation begins
-
Required: Run
/speckit-07-implementto execute the implementation - Note: Requires all checklists to be 100% complete
Suggest to user:
Tasks generated! Next steps:
- /speckit-06-analyze - (Recommended) Validate consistency between spec, plan, and tasks
- /speckit-07-implement - Execute implementation (requires 100% checklist completion)
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.