dceoy

speckit-tasks

9
0
# Install this skill:
npx skills add dceoy/speckit-agent-skills --skill "speckit-tasks"

Install specific skill from multi-skill repository

# Description

Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.

# SKILL.md


name: speckit-tasks
description: Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.


Spec Kit Tasks Skill

When to Use

  • The implementation plan is ready and you need a dependency-ordered task list.

Inputs

  • specs/<feature>/plan.md and specs/<feature>/spec.md
  • Optional artifacts: data-model.md, contracts/, research.md, quickstart.md
  • Any user constraints or priorities from the request

If the plan is missing, ask the user to run speckit-plan first.

Workflow

  1. Setup: Run .specify/scripts/bash/check-prerequisites.sh --json from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").

  2. Load design documents: Read from FEATURE_DIR:

  3. Required: plan.md (tech stack, libraries, structure), spec.md (user stories with priorities)
  4. Optional: data-model.md (entities), contracts/ (API endpoints), research.md (decisions), quickstart.md (test scenarios)
  5. Note: Not all projects have all documents. Generate tasks based on what's available.

  6. Execute task generation workflow:

  7. Load plan.md and extract tech stack, libraries, project structure
  8. Load spec.md and extract user stories with their priorities (P1, P2, P3, etc.)
  9. If data-model.md exists: Extract entities and map to user stories
  10. If contracts/ exists: Map endpoints to user stories
  11. If research.md exists: Extract decisions for setup tasks
  12. Generate tasks organized by user story (see Task Generation Rules below)
  13. Generate dependency graph showing user story completion order
  14. Create parallel execution examples per user story
  15. Validate task completeness (each user story has all needed tasks, independently testable)

  16. Generate tasks.md: Use .specify/templates/tasks-template.md as structure, fill with:

  17. Correct feature name from plan.md
  18. Phase 1: Setup tasks (project initialization)
  19. Phase 2: Foundational tasks (blocking prerequisites for all user stories)
  20. Phase 3+: One phase per user story (in priority order from spec.md)
  21. Each phase includes: story goal, independent test criteria, tests (if requested), implementation tasks
  22. Final Phase: Polish & cross-cutting concerns
  23. All tasks must follow the strict checklist format (see Task Generation Rules below)
  24. Clear file paths for each task
  25. Dependencies section showing story completion order
  26. Parallel execution examples per story
  27. Implementation strategy section (MVP first, incremental delivery)

  28. Report: Output path to generated tasks.md and summary:

  29. Total task count
  30. Task count per user story
  31. Parallel opportunities identified
  32. Independent test criteria for each story
  33. Suggested MVP scope (typically just User Story 1)
  34. Format validation: Confirm ALL tasks follow the checklist format (checkbox, ID, labels, file paths)

Context for task generation: the user's request and any stated priorities

The tasks.md should be immediately executable - each task must be specific enough that an LLM can complete it without additional context.

Task Generation Rules

CRITICAL: Tasks MUST be organized by user story to enable independent implementation and testing.

Tests are OPTIONAL: Only generate test tasks if explicitly requested in the feature specification or if user requests TDD approach.

Checklist Format (REQUIRED)

Every task MUST strictly follow this format:

- [ ] [TaskID] [P?] [Story?] Description with file path

Format Components:

  1. Checkbox: ALWAYS start with - [ ] (markdown checkbox)
  2. Task ID: Sequential number (T001, T002, T003...) in execution order
  3. [P] marker: Include ONLY if task is parallelizable (different files, no dependencies on incomplete tasks)
  4. [Story] label: REQUIRED for user story phase tasks only
  5. Format: [US1], [US2], [US3], etc. (maps to user stories from spec.md)
  6. Setup phase: NO story label
  7. Foundational phase: NO story label
  8. User Story phases: MUST have story label
  9. Polish phase: NO story label
  10. 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)
  • ❌ WRONG: - [ ] T001 [US1] Create model (missing file path)

Task Organization

  1. From User Stories (spec.md) - PRIMARY ORGANIZATION:
  2. Each user story (P1, P2, P3...) gets its own phase
  3. Map all related components to their story:
    • Models needed for that story
    • Services needed for that story
    • Endpoints/UI needed for that story
    • If tests requested: Tests specific to that story
  4. Mark story dependencies (most stories should be independent)

  5. From Contracts:

  6. Map each contract/endpoint → to the user story it serves
  7. If tests requested: Each contract → contract test task [P] before implementation in that story's phase

  8. From Data Model:

  9. Map each entity to the user story(ies) that need it
  10. If entity serves multiple stories: Put in earliest story or Setup phase
  11. Relationships → service layer tasks in appropriate story phase

  12. From Setup/Infrastructure:

  13. Shared infrastructure → Setup phase (Phase 1)
  14. Foundational/blocking tasks → Foundational phase (Phase 2)
  15. Story-specific setup → within that story's phase

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 a complete, independently testable increment
  • Final Phase: Polish & Cross-Cutting Concerns

Outputs

  • specs/<feature>/tasks.md

Next Steps

After tasks are generated:

  • Analyze cross-artifact consistency with speckit-analyze.
  • Implement the plan with speckit-implement.

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