| Duration | ~35 min in the lesson + ~20 min homework |
| Prerequisites | Lesson 1.1; the project repository from 0.4. |
| Checkpoint | none (the lesson ends with an ordinary commit, no tag) |
What you will have
The project has a short CLAUDE.md file at its root, committed to Git, and the student has proved that a brand-new session answers from it without being told anything.
Video
The video for this lesson is not recorded yet.
Prompts used in this lesson
Part 1 — Why Claude forgets
What is the name of the business this project is for, and where do I keep practice files?
Do along
Work on your own project and pause the video where the steps say.
- Pause after Part 1. In your project folder, start
claudeand ask the Part 1 question. Note how Claude answers without a memory file. - Pause after Part 2. Run
/init. Approve creatingCLAUDE.mdif asked. Open the file in your editor and read what was generated. Pause after Part 4. Edit the file by hand so it has the five sections: Purpose, Stack, Commands, Conventions, Rules. You may start from the lesson's version. Adapt:
- Purpose: if you already know your own business, you may write it here. Otherwise keep Brightside Cleaning; you will revise this in lesson 2.1.
- Rules: keep the three rules from the lesson and add one of your own that could be checked. For example: "Write all page text in British English."
- Keep the "checkpoint please" rule exactly; later lessons use it.
- Save the file. Check its length: it should fit on one screen.
- After Part 5. Exit Claude Code and start a new session. Run
/contextand findCLAUDE.mdunder "Memory files". - Ask the Part 5 question. Then test the rule you added with a question only that rule can answer.
- Type
checkpoint please. Claude should rungit status, describe the changes (the newCLAUDE.md), and wait. Reply:
OK. Commit with the message "Lesson 1.2: add CLAUDE.md" and push.
Check your work
- Run
ls(macOS) ordir(Windows) in the project folder. Expected:CLAUDE.mdis listed at the top level, spelled in capitals. - Start a new session and run
/context. Expected:CLAUDE.mdappears under "Memory files". - In that new session, before anything else, ask:
Where do practice files go, and what happens when I say "checkpoint please"?Expected: the correct answer, with no file searching first. - Run
git log --oneline -3. Expected: the top commit is "Lesson 1.2: add CLAUDE.md". - Open the repository on GitHub. Expected:
CLAUDE.mdis visible there.
Common problems
- The new session does not know the rules. → The file is misnamed (
claude.md,Claude.md.txt), in the wrong folder, or you startedclaudefrom a different folder. → Run/contextand look under "Memory files". Rename or move the file to the project's top level and start a new session from that folder. - You edited the file but Claude still uses the old version. → The session started before your edit. → Start a new session.
/initwrote a long file full of obvious things. → It describes what it found. → Delete what Claude could work out by reading the files, and keep what only you know./initasks a series of setup questions instead of writing a file. → The interactive flow is switched on in your setup. → Choose the CLAUDE.md option and continue, or write the file by hand from the lesson's version. Both give the same result.- Claude follows a rule sometimes and ignores it other times. → The rule is vague, or the file is too long. → Rewrite the rule so it can be checked, and cut lines that do not prevent mistakes.
- Two rules contradict each other. → Claude may pick either. → Remove one. Check your personal
~/.claude/CLAUDE.mdas well, if you have one. - You put a password or key in the file. → Remove it, commit, and change that password or key at its provider, because Git keeps history.
Homework
About 20 minutes, after the lesson. Nothing later depends on it. Notes go in practice/homework/1.2/; at the end, commit with checkpoint please and the message "Homework 1.2" (no tag).
- Vague to checkable. In
rules.md, rewrite these four vague rules so each could be checked on a finished page: "Be careful with content." "Make it look professional." "Keep it short." "Use good English." Then add two rules your own business would need. Leave them out ofCLAUDE.mdfor now; your business is settled in lesson 2.1. Done when: for all six, a stranger could look at a page and say "followed" or "broken". - The delete test. Go through your
CLAUDE.mdline by line. Indelete-test.md, write "keep" or "cut" for each line, and why. Then cut only what/initgenerated and Claude could work out from the files. Keep the Conventions and the Rules, above all "checkpoint please". Done when: every line has a verdict, and step 3 of Check your work still passes in a new session. - A personal file. Ask Claude to create
~/.claude/CLAUDE.mdwith two or three preferences about how it talks to you, for example "Explain in plain language and define each technical term." Nothing about the project, and nothing that contradicts the project file. It lives outside the project, so there is nothing to commit. Done when: a new session, asked "Which personal preferences of mine do you know?", lists them.