Chapter 6: The agent

An agent starts each session knowing nothing about your project. The first part of the harness you own is the file it reads first.

AGENTS.md and CLAUDE.md

Also called Instructions file, Memory file

A plain text file in your repo that the agent loads when it starts: build commands, a map of the code, things not to do. AGENTS.md is the name shared across tools. CLAUDE.md is Claude Code's own.

It goes into the context of every request, and it is only advice. Claude Code's docs say these files are "context, not enforced configuration". So short and specific beats long and thorough, and anything that must always hold belongs in a hook or a deny rule, both coming shortly.

Say it to your agent

“Add to AGENTS.md: "Run bun run typecheck and bun test before saying you are done. All database access goes through src/db/; copy src/db/users.ts." Keep the file under 100 lines, and delete anything you could work out by reading the code.”

The workshop

Name a word, or describe what you mean in everyday language.