Skip to content

Ship in 30 Days · Day 1 of 30 · Set up the system

Day 1
Write the project memory file

Give your AI a CLAUDE.md so it stops forgetting your project between sessions.

Every session with Claude Code starts cold. It does not know what your project is, how you name things, what you already decided, or what broke last week. So you re-explain, it guesses, and half its output is fixing its own guesses.

The fix is one file: CLAUDE.md, in the root of your project. Claude Code reads it at the start of every session, automatically. Whatever is in it, the agent knows before you type a word.

What goes in it

It is not documentation. Documentation explains the code to a new person. CLAUDE.md tells an agent what it would otherwise get wrong. Five sections cover almost every project:

  1. What this is. Two or three sentences: what the project does, who uses it, what matters most.
  2. The stack. Framework, database, hosting, and the exact commands to build, test and run.
  3. The rules. The things you would correct it on. Naming, style, banned patterns, files it must never touch.
  4. Decisions already made. Choices that look arbitrary but are not, each with a one-line reason, so it stops "fixing" them.
  5. Done means. What has to be true before it is allowed to say a task is finished.

A starting template

markdown
# Project name
## What this is
One paragraph. What it does, who it is for, what matters most.
## Stack
- Framework: Next.js (App Router), TypeScript
- Database: Postgres via Prisma
- Hosting: deploys automatically from main
- Commands: npm run dev, npm run build, npm test
## Rules
- Never commit secrets or .env files
- Reuse the components in src/components/ui before writing new ones
- No new dependency without saying why
## Decisions
- Prices live in one file, src/lib/pricing.ts. Every page reads from it.
## Done means
- The type check and the tests pass
- The change is committed and pushed
- You say what you verified and what you did not

Write rules from real corrections

The best rules come from mistakes. Every time you correct the agent on the same thing twice, it goes in the file.

Write the rule and the reason. "Use the date helper in src/lib/dates.ts" is a rule. "Use the date helper in src/lib/dates.ts, because formatting dates by hand broke time zones twice" is a rule the agent can apply to cases you never listed.

Keep it short and true

A memory file that is wrong is worse than none, because the agent follows it confidently. When a decision changes, change the file in the same commit.

Keep it to what every session needs. When one section grows long, move the detail into its own file and point to it from CLAUDE.md, so the agent reads it only when the task calls for it.

Today's task

  • ·Create CLAUDE.md in the root of one real project.
  • ·Fill in the five sections. Ten minutes, not an hour.
  • ·Open a fresh Claude Code session and ask: "What is this project, and what would you get wrong without CLAUDE.md?" A vague answer means a vague file.
  • ·Add one rule from the last thing you had to correct.
  • ·Commit it.

Output: a CLAUDE.md committed to your project.

Go deeper in the Inner Circle

  • Your Stack and Setup
Day 1: Write the project memory file | Ship in 30 Days | Vaylo Studios