Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
Generates an actionable, dependency-ordered tasks.md file from design artifacts. Use this to create a detailed implementation plan after reviewing specs and design docs, or when you need branch/story-specific task lists for parallel development.
/plugin marketplace add nprbst/speck-market/plugin install nprbst-speck-speck@nprbst/speck-market$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
This command supports the following flags for branch-aware task generation (US4):
--branch <name>: Generate tasks for specific branch (requires stacked PR mode)--stories <US1,US2>: Filter to specific user stories (comma-separated)Examples:
/speck:tasks --branch username/db-layer --stories US1
/speck:tasks --stories US1,US2
/speck:tasks --branch username/api
Parse flags from $ARGUMENTS (T050-T054):
--branch <name> flag and extract branch name--stories <US1,US2> flag and extract comma-separated story IDs--branch provided: Load .speck/branches.json (T052) and validate branch exists (T053)--stories provided: Store story IDs for filtering (will validate against spec.md later) (T054)Setup: Extract prerequisite context from the auto-injected comment in the prompt:
<!-- SPECK_PREREQ_CONTEXT
{"MODE":"multi-repo","FEATURE_DIR":"/path/to/root-repo/specs/010-feature","IMPL_PLAN":"/path/to/child-repo/specs/010-feature/plan.md","TASKS":"/path/to/child-repo/specs/010-feature/tasks.md","REPO_ROOT":"/path/to/child-repo","TEMPLATE_DIR":"/path/to/plugin/templates","AVAILABLE_DOCS":["../../../8-specs/specs/010-feature/spec.md","specs/010-feature/plan.md","specs/010-feature/research.md"]}
-->
Path Usage:
FEATURE_DIR: Directory containing shared artifacts (spec.md, research.md, data-model.md, plan.md in multi-repo mode) - READ ONLYIMPL_PLAN: Full path to plan.md (for reading in multi-repo mode)TASKS: Full path where tasks.md should be written - WRITE HEREREPO_ROOT: Root directory of current repository (for relative path calculations)TEMPLATE_DIR: Directory containing templates (tasks-template.md, spec-template.md, etc.) - USE FOR TEMPLATESMODE: "single-repo" or "multi-repo" (child in multi-repo setup)Multi-repo behavior:
Use the FEATURE_DIR and AVAILABLE_DOCS values from this JSON.
Fallback: If the comment is not present (VSCode hook bug), run:
speck check-prerequisites --json
Parse JSON output to extract FEATURE_DIR, AVAILABLE_DOCS, MODE, and other fields.
IMPORTANT: Do NOT invent or guess CLI paths. Use ONLY the path above.
Load design documents: Use Read tool to load files from the paths in AVAILABLE_DOCS:
Required files: plan.md (tech stack, libraries, structure), spec.md (user stories with priorities) Optional files: data-model.md (entities), contracts/ (API endpoints), research.md (decisions), quickstart.md (test scenarios) Note: Not all projects have all documents. Generate tasks based on what's available.
Execute task generation workflow:
--stories flag provided (T055-T056):
--stories flag NOT provided: Use all user stories from spec.md--stories flag used: Skip Setup/Foundational phases, generate only requested story tasks--stories flag NOT used: Generate all phases (Setup, Foundational, all user stories, Polish)Generate tasks.md (T058): Read tasks template from {TEMPLATE_DIR}/tasks-template.md using Read tool, then fill with:
--branch flag provided: Replace .md extension in TASKS path with -<branch-name>.md--branch flag NOT provided: Use TASKS path as-is (default)Report (T059): Output path to generated tasks.md and summary:
tasks.md or tasks-<branch-name>.md)--branch flag used: Display branch name and spec ID--stories flag used: Display filtered story IDsContext for task generation: $ARGUMENTS
The tasks.md should be immediately executable - each task must be specific enough that an LLM can complete it without additional context.
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.
Every task MUST strictly follow this format:
- [ ] [TaskID] [P?] [Story?] Description with file path
Format Components:
- [ ] (markdown checkbox)Examples:
- [ ] T001 Create project structure per implementation plan- [ ] T005 [P] Implement authentication middleware in src/middleware/auth.py- [ ] T012 [P] [US1] Create User model in src/models/user.py- [ ] T014 [US1] Implement UserService in src/services/user_service.py- [ ] Create User model (missing ID and Story label)T001 [US1] Create model (missing checkbox)- [ ] [US1] Create User model (missing Task ID)- [ ] T001 [US1] Create model (missing file path)From User Stories (spec.md) - PRIMARY ORGANIZATION:
From Contracts:
From Data Model:
From Setup/Infrastructure: