# Your agent needs a map, not a manual
Table of Contents
The last three posts covered checking an agent’s work: personas walking the app, independent reviewers, and concrete evidence before marking tasks done. All of that assumes the agent knows its way around the codebase.
It needs to know which module owns what, what terms mean in your product, and what was decided last month. When I wrote the code myself, that lived in my head. Now it lives in a short file that points the agent to everything else.
A short file that points
Every agent reads AGENTS.md at the start of a session. It started at 12 lines on day one and has stayed under 40 lines past 6,000 commits.
It holds three things:
- A map. Where the apps, modules, tests, and open work live.
- Global rules. Modules only talk through public contracts, every string exists in both app languages, and new work ships behind a feature flag.
- One starting instruction. Every code change begins with the
workskill.
It leaves out the how-to. Instructions for writing tests, screens, or modules live elsewhere.
Skills load when the task needs them
A skill is a short Markdown file covering one type of task. Up front, the agent only sees a one-line description for each skill and loads the full file when needed.
I use about ten engineering skills:
- work picks the right playbook (feature, bug, refactor, ship) and defines “done”.
- verify dictates where to check changes and what counts as evidence.
- review runs the two independent reviewers.
- tests, module, and screen hold patterns for writing each component.
The longest skill is 114 lines; most are under 60. This keeps AGENTS.md readable and loads details only when relevant. Since skills live in the repo, they get reviewed and updated just like code.
A glossary with words to avoid
Agents love synonyms. Left unchecked, one concept becomes a booking, an appointment, and a session across your code, screens, and tests.
To prevent this, the repo has a glossary of around 200 terms. Each entry defines the concept and lists words to avoid:
**Appointment**:A client's booked time: a start and a duration. It says nothing about whetherthe appointment actually took place._Avoid_: session (that's what actually happened), booking, consultationThe avoid line does the heavy lifting. It enforces one name per concept across classes, routes, tests, and UI. The glossary also separates languages: code is always English, while user-facing text lives strictly in screen translations.
A decisions log, the part I like least
An agent has no memory of last month. It will spot an unusual choice, “fix” it, and undo an intentional decision from two weeks ago.
My fix is a decisions log. Every questionable choice gets an entry with a date-and-name ID, and AGENTS.md tells the agent to search the log before changing an existing pattern. For example, the journeys-without-model entry explains that test stacks run without an AI key so the assistant uses a local fake. When an agent wonders why test responses are hardcoded, it finds the answer there.
The agent logs its own defaults too, marking them so I can review and overrule them later.
I still dislike this log for three reasons:
- It grows fast. It passed 400 entries in a month, reading more like a diary than a reference.
- It’s a workaround. It only exists because agents reset between sessions.
- Nobody reads it front to back. It only works because agents search it before editing code.
Every alternative was worse. Code comments are banned in this repo. PR descriptions bury long-term choices inside single changes. Architecture decision records (ADRs) are too heavy for minor choices, so I save those for the 30 biggest decisions. Memory tools are tied to single users or apps, whereas a repo file is versioned and visible to everyone.
The log stays, though I plan to fold settled entries into the glossary or ADRs and prune obsolete ones.
Test data with names
The final piece is a single set of seeded test data where key records have fixed names. “Noah” has an appointment today at 16:00 ; “Camille” has an overdue invoice. A short table documents every named item and why it exists.
Tests, screenshots, reviews, and persona walks all share these names:
- An agent can reference “Noah’s appointment” in a test, and anyone reading it understands the setup.
- PR screenshots stay reproducible because the underlying data never changes.
- Nightly personas read this table so they don’t report seeded quirks as bugs.
When a feature needs new data, the agent adds it to the shared seed and table rather than hiding it inside a single test.
Keeping the map short
Writing AGENTS.md is easy; keeping it short is hard. Every bug tempts you to add another rule.
Before adding a line, ask where it really belongs:
- Task instructions go in a skill.
- Enforceable rules become automated checks or hooks.
- Term definitions go in the glossary.
- Historical context goes in the decisions log.
Usually, nothing is left over, and the map stays a map.
Where to start
- Cut your rules file down to pointers. List where files live, a few global rules, and where to find details.
- Move how-tos into skills. Keep one short file per task type.
- Start a glossary with avoid lines. Begin with the five terms your agent confuses most.
- Log decisions with an ID. Tell the agent to search the log before undoing past choices.
- Name your test data. Use one shared seed and table across all tests and screenshots.
If you only do one thing, start the glossary. It is the cheapest step and improves your code, UI, and prompts immediately.
Grab the AGENTS.md template and formats for the glossary, decisions log, and seed table from shipping-with-an-agent/map, copy them into your repo, and make them yours.