A comprehensive CLAUDE.md template system designed for fullstack projects using Progressive Disclosure to keep Claude Code sessions focused and efficient.
This template system implements Spec-Driven Development with Claude Code, organizing documentation into a hierarchy that:
- Keeps CLAUDE.md concise (~70 lines) as an entry point
- Uses progressive disclosure - Claude reads detailed docs only when needed
- Separates concerns - Product specs, engineering docs, and guidelines are distinct
- Enables efficient AI collaboration - Claude knows where to find information
your-project/
βββ CLAUDE.md # π― Entry point (keep concise!)
β
βββ docs/
β βββ product/ # π¦ PRODUCT PACK
β β βββ PRODUCT_OVERVIEW.md # Vision, goals, roadmap
β β βββ specs/ # Detailed feature specifications
β β β βββ SPEC_TEMPLATE.md
β β β βββ SPEC_001_[feature].md
β β β βββ SPEC_002_[feature].md
β β βββ stories/ # User stories for each spec
β β βββ STORY_TEMPLATE.md
β β βββ STORY_001.md
β β βββ STORY_002.md
β β
β βββ engineering/ # π§ ENGINEERING PACK
β β βββ ARCHITECTURE.md # System design, tech stack
β β βββ API_DESIGN.md # REST API guidelines
β β βββ DATABASE.md # Schema, migrations, queries
β β
β βββ guidelines/ # π CODING STANDARDS
β β βββ FRONTEND.md # React/TypeScript conventions
β β βββ BACKEND.md # Node.js/Express conventions
β β βββ UI_UX.md # Design system, accessibility
β β βββ TESTING.md # Test patterns, coverage
β β
β βββ project/ # π PROJECT MANAGEMENT
β βββ GITHUB_WORKFLOW.md # Branching, PRs, CI/CD
β βββ CONSTRAINTS.md # Policies, security, SLAs
β βββ COMMANDS.md # Frequently used commands
β βββ milestones/
β β βββ MILESTONE_TEMPLATE.md
β β βββ MILESTONE_001.md
β βββ decisions/
β βββ ADR_TEMPLATE.md # Architecture Decision Records
β
βββ apps/
β βββ web/ # Frontend application
β βββ api/ # Backend application
β
βββ packages/
βββ shared/ # Shared types, utilities
- Project overview and quick start
- Map of documentation structure
- Key conventions and constraints
- Links to detailed docs
PRODUCT_OVERVIEW.md- When discussing featuresARCHITECTURE.md- When making design decisionsAPI_DESIGN.md- When working on APIs- Coding guidelines - When writing code
- Individual spec files for features
- User story details
- Milestone tracking
- Copy the template structure to your project root
- Customize CLAUDE.md with your project details
- Fill in PRODUCT_OVERVIEW.md with your vision
- Define your tech stack in ARCHITECTURE.md
- Create your first milestone and specs
When you start a session, Claude will:
- Read
CLAUDE.mdto understand the project - Before implementing features, read the relevant spec from
docs/product/specs/ - Before writing code, read the appropriate guideline from
docs/guidelines/ - Reference
API_DESIGN.mdandDATABASE.mdfor backend work
PRODUCT_OVERVIEW.md
β
βΌ
SPEC_XXX.md βββββββΊ MILESTONE_XXX.md
β β
βΌ β
STORY_XXX.md ββββββββββββββ
β
βΌ
Implementation
(guided by guidelines)
| File | Purpose | When to Use |
|---|---|---|
PRODUCT_OVERVIEW.md |
High-level product vision | Starting a project, onboarding |
SPEC_TEMPLATE.md |
Feature specification | Planning new features |
STORY_TEMPLATE.md |
User story with acceptance criteria | Sprint planning |
| File | Purpose | When to Use |
|---|---|---|
ARCHITECTURE.md |
System design, tech stack, data flow | Design decisions |
API_DESIGN.md |
REST conventions, endpoints, errors | API development |
DATABASE.md |
Schema patterns, migrations, queries | Database work |
| File | Purpose | When to Use |
|---|---|---|
FRONTEND.md |
React/TypeScript conventions | Frontend development |
BACKEND.md |
Node.js patterns, structure | Backend development |
UI_UX.md |
Design system, accessibility | UI implementation |
TESTING.md |
Test patterns, coverage | Writing tests |
| File | Purpose | When to Use |
|---|---|---|
GITHUB_WORKFLOW.md |
Branching, PRs, CI/CD | Git operations |
CONSTRAINTS.md |
Policies, SLAs, security | Compliance checks |
COMMANDS.md |
Common CLI commands | Daily development |
MILESTONE_TEMPLATE.md |
Sprint/release planning | Project management |
ADR_TEMPLATE.md |
Architecture decisions | Major tech choices |
β
DO:
- Keep under 100 lines
- Include project map
- List key conventions
- Link to detailed docs
- Update current sprint focus
β DON'T:
- Embed full specifications
- Include all API endpoints
- List every command
- Duplicate content from other docsβ
DO:
- Clear problem statement
- Measurable acceptance criteria
- Link to related stories
- Define what's out of scope
- Include error scenarios
β DON'T:
- Implementation details
- Vague requirements
- Missing edge cases
- Undefined success metrics- Review quarterly: Update constraints and policies
- Update per sprint: Milestone progress, current focus
- Update per feature: Specs, stories, API docs
- Update as needed: Commands, guidelines
βββ CLAUDE.md # Root entry point
βββ apps/
β βββ web/
β β βββ CLAUDE.md # Frontend-specific (optional)
β βββ api/
β βββ CLAUDE.md # Backend-specific (optional)
βββ docs/ # Shared documentation
βββ CLAUDE.md # Service overview
βββ docs/
β βββ engineering/
β β βββ API_DESIGN.md # This service's API
β β βββ INTEGRATION.md # Inter-service communication
You might simplify to:
βββ CLAUDE.md
βββ docs/
β βββ SPECS.md # All specs in one file
β βββ GUIDELINES.md # Combined guidelines
- Session Start: Claude reads CLAUDE.md
- Feature Request: Claude reads relevant spec
- Implementation: Claude follows guidelines
- PR Creation: Claude follows GitHub workflow
- Testing: Claude follows testing guidelines
@CLAUDE.md I need to implement the user authentication feature.
Before coding:
1. Read docs/product/specs/SPEC_001_authentication.md
2. Read docs/guidelines/BACKEND.md
3. Check docs/engineering/API_DESIGN.md for auth patterns
When adding new documentation:
- Follow the existing template structure
- Keep files focused on single topics
- Cross-reference related documents
- Update CLAUDE.md if adding new categories
MIT - Feel free to use and modify for your projects.