<!-- @template-name: Users/samhenry/tailwind-ai-workspace/roadcrew/templates/spec-example.md @version: 1.0.0 @release-date: 2025-10-25 -->
---
type: spec
feature: {{FEATURE_NAME}}
feature_id: {{FEATURE_ID}}
status: {{STATUS}}              # Draft | Review | Approved | Implemented
version: {{VERSION}}
related_prd: ../memory-bank/requirements/prds/{{FEATURE_ID}}-prd.md
epic: {{EPIC_LINK}}
created: {{CREATED_DATE}}
updated: {{UPDATED_DATE}}
---

# ⚙️ {{FEATURE_NAME}} – Technical Specification {#spec-{{FEATURE_ID}}}

> This document defines **how** to implement the feature. All “what/why” lives in PRD.

## 1. Mapping: PRD → Spec

| PRD Requirement  | Satisfied In Spec Section |
| ---------------- | ------------------------ |
| R1: {{PRD_REQ_1}}| See: 2.1.1               |
| R2: {{PRD_REQ_2}}| See: 3.2                 |
| ...              | ...                      |

## 2. Technical Requirements

### 2.1 Functional Requirements (max 6 bullets—must map PRD 1:1)
- {{REQUIREMENT_1}}
- {{REQUIREMENT_2}}
- ...

### 2.2 Non-Functional Requirements (≤20 words each)
- **Performance:** {{PERFORMANCE_NFR}}
- **Security:** {{SECURITY_NFR}}
- **Reliability:** {{RELIABILITY_NFR}}
- **Scalability:** {{SCALABILITY_NFR}}

### 2.3 Out of Scope (3 bullets max, ≤12 words each)
- {{OUT_OF_SCOPE_1}}
- {{OUT_OF_SCOPE_2}}

## 3. Design Overview (≤100 words)
> Concise paragraph describing the core technical solution and major system changes—no rationale.

## 4. Architecture & Implementation

### 4.1 New/Modified Services (bullets, each ≤20 words)
- **Service:** {{SERVICE_NAME}} – {{SUMMARY_OF_CHANGE}}

### 4.2 Data Model Changes (table: field, type, description, notes; optional YAML block if schema)
| Field | Type | Description | Notes |
|-------|------|-------------|-------|
|       |      |             |       |

### 4.3 API Changes (table: method, endpoint, purpose, affected systems)
| Method | Endpoint | Purpose | Notes          |
|--------|----------|---------|----------------|

### 4.4 Env/Config (table: var, default, description, required)
| Variable        | Default | Description           | Required |
| --------------- | ------- | --------------------- | -------- |

## 5. Execution Plan & Issues

### 5.1 Implementation Plan (≤60 words each phase)
- **Step 1:** {{DESC}}
- **Step 2:** {{DESC}}

### 5.2 Issues (reference anchors)
- [Issue {{EPIC}}.1](#issue-{{EPIC}}-1): {{SUMMARY}}  
- ...

### 5.3 Risks & Mitigations (simple table)
| Risk           | Mitigation         |
|----------------|-------------------|
| Example Risk   | Example Solution   |

## 6. Testing & Validation

### 6.1 Acceptance Criteria (1 line per acceptance, pass/fail)
- {{ACCEPTANCE_CRITERION_1}}
- {{ACCEPTANCE_CRITERION_2}}

### 6.2 Test Plan (≤100 words OR checklist bullets)
- [ ] {{TEST_STEP}}
- [ ] {{TEST_STEP}}

## 7. Dependencies & Links

- **Depends On:** {{DEPENDENCIES}}
- **Blocks:** {{BLOCKS}}
- **Related:** {{RELATED_LINKS}}

## 8. Issue Breakdown

### Issue {{EPIC}}.1: {{ISSUE_TITLE}} {#issue-{{EPIC}}-1}
- **Overview:** {{OVERVIEW}} (≤40 words)
- **Accepts:** [list, ≤3, pass/fail, ≤12 words]
- **Tech Approach:** [≤80 words OR bullets]
- **Files/Components:** {{FILES}}
- **Dependencies:** {{DEPENDENCIES}}


---

## Editor Instructions:
- Write as atomic, non-narrative items wherever possible.
- Never exceed field length limits.
- All mapping tables must match PRD keys exactly.
- Any deviation, ambiguity, or overrun invalidates this doc for automation.

```_
