Generate Your PRD Free — No account required
Try PRD Generator →
Back to Templates
TemplateFree Download

Spec-Driven Development Template Pack (Free Download)

Download the complete SDD template pack: PRD, API spec, database schema, architecture doc, and more. Ready-to-use Markdown templates for AI coding projects.

TL;DR: Download 8 ready-to-use templates for Spec-Driven Development. Fill in the blanks, feed to your AI coding tool, and stop hallucinations.

Table of Contents

  1. What's Included
  2. How to Use
  3. Template 1: PRD
  4. Template 2: API Spec
  5. Template 3: Database Schema
  6. Template 4: Architecture Doc
  7. Template 5: Component Inventory
  8. Template 6: Tech Stack Doc
  9. Template 7: Definition of Done
  10. Template 8: AI Rules File
  11. Download All

What's Included

Template Format Purpose
PRD Markdown Scope, user stories, acceptance criteria
API Spec YAML (OpenAPI) Endpoint contracts
Database Schema SQL + Markdown Tables, columns, relationships
Architecture Doc Markdown + Mermaid System components, data flow
Component Inventory Markdown UI components, props, states
Tech Stack Doc Markdown Frameworks, versions, constraints
Definition of Done Markdown Quality gates, checklists
AI Rules File Markdown Cursor/Cline context rules

How to Use

Step 1: Download or Copy

Choose individual templates below or download the full pack.

Step 2: Fill in Your Project Details

Each template has [PLACEHOLDER] markers. Replace with your specifics.

Step 3: Add to Your Repo

Place templates in a /docs folder at your project root:

your-project/
├── docs/
│   ├── prd.md
│   ├── api-spec.yaml
│   ├── schema.md
│   ├── architecture.md
│   └── ...
├── src/
└── ...

Step 4: Configure AI Tool

Cursor: Add to .cursor/rules/ or reference with @docs/

Cline: Reference in .clinerules

v0/Lovable: Paste relevant sections in prompts


Template 1: PRD (Product Requirements Document)

## [PROJECT NAME] — Product Requirements Document

## 1. Overview

### Problem Statement

[What pain are you solving? Who feels it? How big is it?]

### Solution Summary

[One paragraph: what your app does]

### Target Users

- Primary: [WHO]
- Secondary: [WHO]

---

## 2. Scope

### In Scope (MVP)

- [ ] Feature 1: [Description]
- [ ] Feature 2: [Description]
- [ ] Feature 3: [Description]

### Out of Scope (NOT building)

- [ ] [Feature we're explicitly NOT building]
- [ ] [Another non-goal]
- [ ] [Another non-goal]

### Future Considerations (Post-MVP)

- [ ] [Nice-to-have for v2]

---

## 3. User Stories

### [User Type 1]

**US-001:** As a [user type], I want [goal] so that [outcome].

**Acceptance Criteria:**

- [ ] Given [context], when [action], then [result]
- [ ] Given [context], when [action], then [result]

**US-002:** As a [user type], I want [goal] so that [outcome].

**Acceptance Criteria:**

- [ ] Given [context], when [action], then [result]

---

## 4. Success Metrics

| Metric     | Target   | Measurement      |
| ---------- | -------- | ---------------- |
| [Metric 1] | [Target] | [How to measure] |
| [Metric 2] | [Target] | [How to measure] |

---

## 5. Constraints

- **Timeline:** [Deadline]
- **Budget:** [If applicable]
- **Tech Stack:** [Required technologies]
- **Compliance:** [GDPR, SOC2, etc.]

---

## Revision History

| Version | Date   | Author | Changes       |
| ------- | ------ | ------ | ------------- |
| 1.0     | [DATE] | [NAME] | Initial draft |

Download PRD Template Only


Template 2: API Spec (OpenAPI)

openapi: 3.0.3
info:
  title: "[PROJECT NAME] API"
  version: "1.0.0"
  description: "[One-line description]"

servers:
  - url: http://localhost:3000/api
    description: Local development
  - url: https://[YOUR-DOMAIN]/api
    description: Production

paths:
  /health:
    get:
      summary: Health check
      responses:
        200:
          description: API is healthy
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: "ok"

  /[resource]:
    get:
      summary: List [resources]
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            default: 10
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/[Resource]'
                  total:
                    type: integer

    post:
      summary: Create [resource]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/[Resource]Create'
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/[Resource]'
        400:
          $ref: '#/components/responses/BadRequest'

  /[resource]/{id}:
    get:
      summary: Get [resource] by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/[Resource]'
        404:
          $ref: '#/components/responses/NotFound'

components:
  schemas:
    [Resource]:
      type: object
      properties:
        id:
          type: string
          format: uuid
        [field1]:
          type: string
        [field2]:
          type: integer
        created_at:
          type: string
          format: date-time

    [Resource]Create:
      type: object
      required:
        - [field1]
      properties:
        [field1]:
          type: string

  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              message:
                type: string

    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: "not_found"

  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

security:
  - bearerAuth: []

Download API Spec Template Only


Template 3: Database Schema

## [PROJECT NAME] — Database Schema

## Overview

Database: [PostgreSQL / MySQL / SQLite]
ORM: [Prisma / Drizzle / None]

---

## Tables

### users

| Column     | Type        | Constraints                   | Description        |
| ---------- | ----------- | ----------------------------- | ------------------ |
| id         | UUID        | PK, DEFAULT gen_random_uuid() | Primary key        |
| email      | TEXT        | UNIQUE, NOT NULL              | User email         |
| name       | TEXT        | NOT NULL                      | Display name       |
| created_at | TIMESTAMPTZ | DEFAULT now()                 | Creation timestamp |
| updated_at | TIMESTAMPTZ | DEFAULT now()                 | Last update        |

**Indexes:**

- `idx_users_email` on (email)

**RLS Policies:**

- Users can only read/write their own row

---

### [table_name]

| Column     | Type        | Constraints                      | Description        |
| ---------- | ----------- | -------------------------------- | ------------------ |
| id         | UUID        | PK                               | Primary key        |
| [column]   | [TYPE]      | [CONSTRAINTS]                    | [Description]      |
| user_id    | UUID        | FK → users(id) ON DELETE CASCADE | Owner              |
| created_at | TIMESTAMPTZ | DEFAULT now()                    | Creation timestamp |

**Indexes:**

- `idx_[table]_user` on (user_id)

**RLS Policies:**

- [Policy description]

---

## Relationships

```mermaid
erDiagram
    users ||--o{ projects : owns
    projects ||--o{ documents : contains
```

Migrations

All migrations in /supabase/migrations/ or /prisma/migrations/


DDL

-- users
CREATE TABLE users (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    email TEXT UNIQUE NOT NULL,
    name TEXT NOT NULL,
    created_at TIMESTAMPTZ DEFAULT now(),
    updated_at TIMESTAMPTZ DEFAULT now()
);

CREATE INDEX idx_users_email ON users(email);

-- [table_name]
-- [DDL for each table]

---

## Template 4: Architecture Doc 

```markdown
## [PROJECT NAME] — Architecture Document

## System Overview

```mermaid
graph TB
    subgraph Client
        A[Browser / App]
    end

    subgraph Backend
        B[Next.js App]
        C[API Routes]
    end

    subgraph Data
        D[(PostgreSQL)]
        E[File Storage]
    end

    subgraph External
        F[Auth Provider]
        G[LLM API]
    end

    A --> B
    B --> C
    C --> D
    C --> E
    C --> F
    C --> G

Components

Component Technology Purpose
Frontend [Next.js / React] UI + Client logic
API [Next.js API Routes] Business logic
Database [PostgreSQL / Supabase] Data persistence
Auth [Supabase Auth / Clerk] Authentication
Storage [Supabase Storage / S3] File uploads

Data Flow

[Flow Name]

  1. User [action]
  2. Frontend [calls]
  3. API [processes]
  4. Database [operation]
  5. Response [returned]

Deployment

Environment URL Purpose
Local localhost:3000 Development
Preview [vercel preview URL] PR previews
Production [domain] Live

Security

  • Auth: [JWT / Session]
  • API: [Rate limiting, validation]
  • Database: [RLS policies, encryption]

Performance Targets

Metric Target
API response (p95) < 200ms
Page load (LCP) < 2.5s
Database query < 50ms

---

## Template 5-8: Quick Reference 

### Component Inventory Template

Lists all UI components with:
- Name
- Props interface
- States
- Events
- Example usage

### Tech Stack Doc Template

Documents:
- Framework versions
- Package dependencies (pinned)
- Development tools
- CI/CD setup

### Definition of Done Template

Checklists for:
- Feature complete
- Tests passing
- Security reviewed
- Docs updated
- Deployed

### AI Rules File Template

```markdown
## AI Coding Rules

## Context Loading
Load these files before implementing:
- /docs/prd.md
- /docs/api-spec.yaml
- /docs/schema.md

## Implementation Rules
1. Only implement features in the PRD
2. Only use endpoints in the API spec
3. Only query columns in the schema

## When Uncertain
Ask for clarification. Don't invent.

Download All Templates

Option 1: Generate Full Pack

Generate with Context Ark → (60 documents from your brain dump)

Option 2: Download Templates

All templates available individually:


Next Steps

  1. Choose your starter: Pick the templates you need
  2. Fill in placeholders: Replace [PLACEHOLDER] values
  3. Add to repo: Place in /docs folder
  4. Configure AI tool: Reference in prompts
  5. Iterate: Update specs as you learn

Want the full 60-doc pack? Generate from a brain dump →


Last updated: January 2026

Generate All 60+ Documents Automatically

Skip manual template filling. Context Ark generates complete spec packs from a brain dump.

Get Started Free →