Before writing code, generate a set of foundation documents. These are AI’s memory — without them, every session starts from zero and every conversation drifts.
The documents should be generated by Claude (in the same brainstorming conversation) and reviewed by you. Takes 1-2 hours including review. Pays back immediately.
| Document | Purpose | Update Frequency |
|---|---|---|
| README.md | What we’re building, current phase, tech stack | Per phase |
| ARCHITECTURE.md | System design, DB schema, components, API design | When structure changes |
| .clinerules / CLAUDE.md | Quality rules, testing standards, prohibited behaviors | Rarely (but enforce strictly) |
| LEARNINGS.md | Running log of solutions and gotchas | During every task |
| SPRINT_RULES.md | How to size sprints, write tasks, handle discovered work | Once (at project start) |
| TASK_TEMPLATE.md | Format for individual task specifications | Never |
| Sprint Plan | Task index, execution order, dependencies | Per sprint |
| Task Specs | Detailed spec per task (one file each) | Never (each is used once) |
AI reads the first four before every task. They provide the context that chat history can’t.
The old version of this methodology had five lightweight docs. Experience showed that’s not enough — you need a proper architecture document with actual schemas, not just descriptions.
## Database Schema
### users
| Column | Type | Constraints |
|--------|------|-------------|
| id | UUID | PK |
| email | VARCHAR(255) | UNIQUE, NOT NULL |
| password_hash | VARCHAR(255) | NOT NULL |
| role | ENUM('user','admin') | DEFAULT 'user' |
| created_at | TIMESTAMP | DEFAULT NOW() |
When AI reads this, it writes correct queries and migrations the first time. Without it, AI guesses at column names and types, and you spend hours debugging schema mismatches.
What ARCHITECTURE.md should contain:
See the VH Conference Toolkit for a real example of what this looks like in practice.
This is your quality contract. It must include:
Mandatory reading list — files AI must read before every task
Quality standards that are non-negotiable:
Development workflow rules:
Architecture rules:
Prohibited behaviors:
When to ask the human — security decisions, architectural changes, ambiguous requirements, anything destructive
The difference between a mediocre AI-built project and a good one is almost entirely in this file.
This is what separates “tell AI to build something” from “give AI a clear spec and let it execute.”
Sprint plan: Index of tasks, execution order, dependencies, definition of done.
Task specs: Individual documents (one per task) with:
When Cline or Claude Code reads a task spec + ARCHITECTURE.md + .clinerules, it has everything it needs. No clarifying questions. Just execution.
Example from a real project (VH Conference Toolkit):
dev-docs/sprints/sprint-01-initial-setup/
├── SPRINT-EH-001-PLAN.md # Sprint plan with 12 tasks
├── BACKLOG-TASK-EH.1.md # Project bootstrap
├── BACKLOG-TASK-EH.2.md # Public layout
├── BACKLOG-TASK-EH.3.md # Auth system
├── ...
└── BACKLOG-TASK-EH.12.md # Polish & smoke tests
After brainstorming (in the same Claude conversation):
Based on everything we've discussed, generate the foundational
documents for this project:
1. README.md
2. ARCHITECTURE.md (with full database schemas)
3. LEARNINGS.md (empty template)
4. .clinerules (iron-clad quality rules)
5. SPRINT_RULES.md
6. TASK_TEMPLATE.md
7. Sprint 1 plan with task index
8. Individual task specs for each Sprint 1 task
Also generate any foundational code files that should exist
from the start (configs, schema files, .env.example, etc.)
Review everything Claude generates. Push back on:
Every new task session:
.clinerules / CLAUDE.md → “These are my rules. Tests are mandatory. Plan first.”ARCHITECTURE.md → “Here’s the schema, here are the patterns, here’s how auth works.”README.md → “We’re building X, currently in MVP phase.”LEARNINGS.md → “Oh, there’s a gotcha about this library.”This is why documentation-first works. You’re building AI’s memory.
Too little (old mistake):
Too much:
Just right:
Next: The Cline Workflow — How to actually execute tasks.