Spec Kit uses templates to structure your specifications, plans, and task breakdowns. These templates guide you through the Spec-Driven Development workflow and ensure consistency across projects.
File: spec-template.mdPurpose: Define what you want to build (requirements and user stories)
Structure
# Feature Specification: [FEATURE NAME]**Feature Branch**: `[###-feature-name]`**Created**: [DATE]**Status**: Draft**Input**: User description: "$ARGUMENTS"## User Scenarios & Testing### User Story 1 - [Brief Title] (Priority: P1)[Describe this user journey in plain language]**Why this priority**: [Explain the value and priority level]**Independent Test**: [How this can be tested independently]**Acceptance Scenarios**:1. **Given** [initial state], **When** [action], **Then** [expected outcome]2. **Given** [initial state], **When** [action], **Then** [expected outcome]---### User Story 2 - [Brief Title] (Priority: P2)[Continue for each user story...]## Requirements### Functional Requirements- **FR-001**: System MUST [specific capability]- **FR-002**: System MUST [specific capability]### Key Entities- **[Entity 1]**: [What it represents, key attributes]- **[Entity 2]**: [What it represents, relationships]## Success Criteria### Measurable Outcomes- **SC-001**: [Measurable metric]- **SC-002**: [Measurable metric]
Key Principles:
User stories should be PRIORITIZED (P1, P2, P3) by importance
Each story must be INDEPENDENTLY TESTABLE
Focus on what and why, not implementation details
Mark unclear requirements with [NEEDS CLARIFICATION: ...]
Fill ONLY if Constitution Check has violations that must be justified
Violation
Why Needed
Simpler Alternative Rejected Because
</Accordion><Tip>**Key Principles:**- Replace ALL placeholders with concrete technical choices- Document structure decision and reference real directories- Fill complexity tracking ONLY for constitution violations- Mark unclear items with `[NEEDS CLARIFICATION: ...]`</Tip>### Tasks Template**File**: `tasks-template.md`**Purpose**: Break down implementation plan into actionable tasks<Accordion title="Structure">```markdown# Tasks: [FEATURE NAME]**Input**: Design documents from `/specs/[###-feature-name]/`**Prerequisites**: plan.md (required), spec.md (required)## Format: `[ID] [P?] [Story] Description`- **[P]**: Can run in parallel (different files, no dependencies)- **[Story]**: Which user story (e.g., US1, US2, US3)- Include exact file paths in descriptions## Phase 1: Setup (Shared Infrastructure)- [ ] T001 Create project structure per implementation plan- [ ] T002 Initialize [language] project with dependencies- [ ] T003 [P] Configure linting and formatting tools---## Phase 2: Foundational (Blocking Prerequisites)**⚠️ CRITICAL**: No user story work can begin until complete- [ ] T004 Setup database schema and migrations framework- [ ] T005 [P] Implement authentication/authorization framework- [ ] T006 [P] Setup API routing and middleware structure**Checkpoint**: Foundation ready - user stories can begin---## Phase 3: User Story 1 - [Title] (Priority: P1) 🎯 MVP**Goal**: [Brief description]**Independent Test**: [How to verify independently]### Tests for User Story 1 (OPTIONAL)- [ ] T010 [P] [US1] Contract test for [endpoint]- [ ] T011 [P] [US1] Integration test for [user journey]### Implementation for User Story 1- [ ] T012 [P] [US1] Create [Entity1] model in src/models/[entity1].py- [ ] T013 [P] [US1] Create [Entity2] model in src/models/[entity2].py- [ ] T014 [US1] Implement [Service] in src/services/[service].py**Checkpoint**: User Story 1 fully functional and testable---[Continue for each user story...]## Dependencies & Execution Order### Phase Dependencies- **Setup (Phase 1)**: No dependencies- **Foundational (Phase 2)**: Depends on Setup - BLOCKS all stories- **User Stories (Phase 3+)**: All depend on Foundational phase- **Polish (Final Phase)**: Depends on all desired user stories### Parallel Opportunities- All Setup tasks marked [P] can run in parallel- Once Foundational completes, user stories can run in parallel- Models within a story marked [P] can run in parallel
Key Principles:
Tasks organized by user story for independent implementation
Mark parallel tasks with [P] (different files, no dependencies)
Include exact file paths for each task
Tests are OPTIONAL - only include if requested
Each user story should have a checkpoint for validation
### Functional Requirements- **FR-001**: System MUST [specific capability, e.g., "allow users to create accounts"]- **FR-002**: System MUST [specific capability, e.g., "validate email addresses"]
<!-- IMPORTANT: User stories should be PRIORITIZED as user journeys ordered by importance. Each user story/journey must be INDEPENDENTLY TESTABLE - meaning if you implement just ONE of them, you should still have a viable MVP that delivers value.-->