Skip to content

Project Structure

After running specify init, your project contains a .specify/ directory with all Spec Kit artifacts.

Directory Layout

text
.specify/
├── memory/
│   ├── constitution.md              # Project principles (Article I-IX)
│   ├── directives/                  # Team knowledge packets
│   │   ├── index.md                 # Directive index
│   │   └── {slug}.md               # Individual directives
│   └── refinement-suggestions.md    # Auto-generated improvements

├── branding/
│   ├── branding.md                  # Design tokens & style guide
│   └── tokens.json                  # Machine-readable tokens

├── infra/
│   └── infra.md                     # Infrastructure specification

├── specs/
│   └── NNN-feature-name/
│       ├── spec.md                  # Requirements & user stories
│       ├── plan.md                  # Technical implementation plan
│       ├── tasks.md                 # Ordered task breakdown
│       ├── design.md               # UI component & flow specs
│       ├── data-model.md           # Data model definitions
│       ├── research.md             # Technical research notes
│       ├── quickstart.md           # Key validation scenarios
│       └── contracts/              # API specs, event schemas
│           ├── api-spec.json
│           └── ...

├── scripts/
│   ├── bash/                        # Bash scripts
│   │   ├── check-prerequisites.sh
│   │   ├── create-new-feature.sh
│   │   └── ...
│   └── powershell/                  # PowerShell equivalents
│       └── ...

└── templates/
    ├── spec-template.md             # Feature specification template
    ├── plan-template.md             # Implementation plan template
    ├── tasks-template.md            # Task breakdown template
    ├── branding-template.md         # Branding specification template
    ├── ui-component-template.md     # UI component spec template
    ├── user-flow-template.md        # User flow spec template
    ├── infra-template.md            # Infrastructure spec template
    ├── phr-template.md              # Project History Record
    ├── adr-template.md              # Architecture Decision Record
    ├── architecture-template.md     # Architecture overview
    └── trace-template.md            # Execution tracing

Key Files

Constitution (memory/constitution.md)

The foundational document. Defines immutable principles that guide all decisions. Every command reads this file for context.

Principles typically cover:

  • Code quality standards
  • Testing requirements (TDD, integration-first)
  • Architecture constraints (simplicity, modularity)
  • Performance targets
  • Security policies
  • Accessibility standards

Branding (branding/branding.md)

Design tokens for your product. Referenced by /speckit.design when creating component specs. Includes:

  • Color palette (primary, secondary, accent, status) with light/dark variants
  • Typography scale (font families, sizes, weights, line heights)
  • Spacing grid (base unit, scale)
  • Breakpoints, shadows, borders, motion, iconography

Infrastructure (infra/infra.md)

Source of truth for all deployment decisions. Actual config files (docker-compose.yml, Helm charts, .gitlab-ci.yml) should be derived from this spec. Covers development and production environments.

Feature Specs (specs/NNN-feature-name/)

Each feature gets a numbered directory with all its artifacts:

  • spec.md — What to build and why (requirements, user stories, acceptance criteria)
  • plan.md — How to build it (architecture, tech stack, data model)
  • tasks.md — Step-by-step execution plan
  • design.md — UI components, user flows, wireframes

Directives (memory/directives/)

Team knowledge packets captured via /speckit.levelup. Types:

  • Convention — How the team does things (naming, formatting)
  • Pattern — Reusable implementation approaches
  • Lesson — What went wrong and how to avoid it
  • Guideline — Best practices and quality standards

Spec Maturity Tracking

Every spec tracks its maturity level:

text
draft → refined → validated → implemented → evolved
LevelMeaning
draftInitial creation, may have gaps
refinedClarified and reviewed, gaps filled
validatedPassed quality analysis (analyze score 80+)
implementedCode generated and tested
evolvedUpdated based on implementation learnings

Maturity is tracked in spec frontmatter:

markdown
<!-- maturity: draft -->
<!-- last_refined: 2026-02-24 -->
<!-- refinement_count: 0 -->
<!-- knowledge_coverage: 0% -->

Feature Numbering

Features are automatically numbered sequentially: 001-, 002-, 003-, etc. The /speckit.specify command scans existing specs to determine the next number and creates a branch with the feature name.

Released under the MIT License.