HOME / SDD HUB / TEMPLATES / CONSTITUTION.MD
OPEN SPEC TEMPLATES · 2026

Project Constitution Templates

Lock Tech Stacks, Coding Standards, and Architectural Boundaries for AI Coding Agents

What is a constitution.md File?

While standard .cursorrules files get diluted as conversation history grows, a formal Project Constitution (constitution.md) serves as the supreme law of your repository. It explicitly commands AI coding agents on what frameworks, dependencies, and patterns are allowed or strictly forbidden.

Downloadable Constitution Templates

1. Next.js 15 / React 19 (App Router + Tailwind v4 + Zod) STACK: TS, Next 15, Drizzle, Shadcn
# Project Constitution: Next.js 15 Full-Stack

## Non-Negotiable Core Rules
1. Framework: Next.js 15 (App Router only, no Pages router).
2. Language: TypeScript with strict mode enabled. Zero `any` types.
3. State & Validation: Server Actions with Zod schema validation.
4. Styling: Tailwind CSS v4 using semantic design tokens. No inline raw hex styles.
5. Database: Drizzle ORM with Postgres (Neon / Supabase).
2. Python FastAPI (Pydantic v2 + SQLAlchemy 2.0 + Asyncpg) STACK: Python 3.12+, FastAPI, AsyncPG
# Project Constitution: FastAPI Microservice

## Non-Negotiable Core Rules
1. Framework: FastAPI with Python 3.12+ async endpoints.
2. Validation: Pydantic v2 BaseModels with strict validation.
3. Database: SQLAlchemy 2.0 AsyncSession + Alembic migrations.
4. Error Handling: Return RFC-7807 Problem Details JSON format.

Generate Custom Constitutions with MySpec

Let MySpec's AI Architect build a tailored constitution.md for your exact tech stack.