Project Spec — Living Documentation for AI Coding Agents
A template for maintaining a "living spec" that AI coding agents can reference when working in your codebase. Keeps agents aligned with your team's conventions, architecture, and data flow — without repeating yourself every conversation.
How It Works
- Fill in the reference files below with your project's specifics
- Point your AI tool to this directory (see Integration Guide)
- The agent reads the spec before writing code, ensuring consistency
Quick Navigation
| I want to know... | Reference |
|---|---|
| Where data comes from (APIs, services) | references/common-data.md |
| Where to put new code | references/architecture.md |
| Frontend ↔ Backend API mapping | references/frontend-backend-map.md |
| Naming and coding conventions | references/conventions.md |
| Frontend utilities, hooks, contexts | references/frontend-toolkit.md |
| Database schema and conventions | references/database.md |
| Auth, infra, external services | references/infrastructure.md |
Output Format
When the agent finds an answer in the spec, it should:
- Answer directly: file paths, function names, code examples
- Cite the source: "Per conventions.md..." so the human can verify
- Show compliant code: if code is involved, follow the spec
Keeping It Alive
When to update the spec:
- New migration added → check
database.md - New domain model → check
common-data.mdandfrontend-backend-map.md - New API client → check
frontend-backend-map.md - New endpoint/service → check relevant references
- New hooks/contexts/utils → check
frontend-toolkit.md - New external integration → check
infrastructure.md
The agent should proactively ask: "Should I update the project spec for this change?"
This is a living document. Update the references as your team makes new decisions.