## Extension Hooks
**Automatic Pre-Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
Wait for the result of the hook command before proceeding to the Outline.
After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal {command} id shown above, e.g. a skills-mode agent runs it as /skill:speckit-... or $speckit-...). Emitting the block alone does not run the hook.
If no hooks are registered or .specify/extensions.yml does not exist, skip silently
Outline
Setup: Run .specify/scripts/powershell/setup-tasks.ps1 -Json 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").
IF EXISTS: Load .specify/memory/constitution.md for project principles and governance constraints
Note: Not all projects have all documents. Generate tasks based on what's available.
Execute task generation workflow:
Load plan.md and extract tech stack, libraries, project structure
Load spec.md and extract user stories with their priorities (P1, P2, P3, etc.)
If data-model.md exists: Extract entities and map to user stories
If contracts/ exists: Map interface contracts to user stories
If research.md exists: Extract decisions for setup tasks
Generate tasks organized by user story (see Task Generation Rules below)
Generate dependency graph showing user story completion order
Create parallel execution examples per user story
Validate task completeness (each user story has all needed tasks, independently testable)
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:
Correct feature name from plan.md
Phase 1: Setup tasks (project initialization)
Phase 2: Foundational tasks (blocking prerequisites for all user stories)
Phase 3+: One phase per user story (in priority order from spec.md)
Each phase includes: story goal, independent test criteria, tests (if requested), implementation tasks
Final Phase: Polish & cross-cutting concerns
All tasks must follow the strict checklist format (see Task Generation Rules below)
Clear file paths for each task
Dependencies section showing story completion order
After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal {command} id shown above, e.g. a skills-mode agent runs it as /skill:speckit-... or $speckit-...). Emitting the block alone does not run the hook.