# Project memory

Agents forget everything between sessions, except a memory file in your project. Write it once, keep it short, and update it when you catch yourself repeating an instruction.

- **Claude Code** reads `CLAUDE.md`.
- **Codex** and many others read `AGENTS.md`.
- Using both? Keep one, and have the other say "Read AGENTS.md" (or copy it across).

Fill in the template below, delete what doesn't apply, and save it in your project's top folder.

```markdown
# [PROJECT NAME]

[One sentence: what it is and who it's for.]

## Stack
- [e.g. Plain HTML, CSS and JavaScript / Eleventy / Next.js / React + Vite]
- Hosted on [Vercel / Netlify / GitHub Pages / not yet]
- Data lives in [the browser (localStorage) / Supabase / nowhere]

## Commands
- `[npm run dev]` - run it locally at [http://localhost:3000]
- `[npm run build]` - build it
- `[npm test]` - run the tests

## How it's organised
- `[src/]` - [what's in here]
- `[public/]` - [images and static files]

## Rules
- One change at a time, clean commit after each
- Don't touch unrelated files
- Ask before adding a new package or dependency
- Never commit API keys or passwords. They go in environment variables
- [Anything you've had to say twice, e.g. "British spelling", "keep it mobile-first"]

## Don't
- [Things it keeps doing that you don't want]
```

## What makes a good memory file

- **Short.** A page or less. It's read every session, so every line has to earn its place.
- **Specific.** "Use the colours in `style.css`" beats "keep the design consistent".
- **Rules from real mistakes.** Every time the agent does something you have to undo, ask yourself whether one line here would have stopped it.
- **Updated.** Say "Add that to CLAUDE.md" (or AGENTS.md) at the end of a session when you've learned something.

Lines I've added after a mistake:

-
-
