templates/commands/tasks.md
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Check for extension hooks (before tasks generation):
.specify/extensions.yml exists in the project root.hooks.before_tasks keyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementationoptional flag:
optional: true):
## Extension Hooks
**Optional Pre-Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
optional: false):
## Extension Hooks
**Automatic Pre-Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
Wait for the result of the hook command before proceeding to the Outline.
.specify/extensions.yml does not exist, skip silentlySetup: Run {SCRIPT} from repo root and parse FEATURE_DIR, TASKS_TEMPLATE, and AVAILABLE_DOCS list. FEATURE_DIR and TASKS_TEMPLATE must be absolute paths when provided. AVAILABLE_DOCS is a list of document names/relative paths available under FEATURE_DIR (for example research.md or contracts/). 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").
Load design documents: Read from FEATURE_DIR:
Execute task generation workflow:
Generate tasks.md: Read the tasks template from TASKS_TEMPLATE (from the JSON output above) and use it as structure. If TASKS_TEMPLATE is empty, fall back to .specify/templates/tasks-template.md. Fill with:
Report: Output path to generated tasks.md and summary:
Check for extension hooks: After tasks.md is generated, check if .specify/extensions.yml exists in the project root.
hooks.after_tasks keyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementationoptional flag:
optional: true):
## Extension Hooks
**Optional Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
optional: false):
## Extension Hooks
**Automatic Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
.specify/extensions.yml does not exist, skip silentlyContext for task generation: {ARGS}
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: