AGENTS.md Template
A repository-root instruction file any agent runtime can read: setup, conventions, map, and constraints. Copy it below, fill the bracketed fields, delete what you don't need.
# AGENTS.md
## Project overview
[Two sentences: what this project is and what matters most when changing it.]
## Setup and commands
- Install: `[command]`
- Build: `[command]`
- Test: `[command]` (run before every commit)
- Lint: `[command]`
- Dev server: `[command]` on port [PORT]
## Conventions
- [Language/framework version constraints]
- [Code style rules that a linter does not already enforce]
- [Naming, error-handling, or logging conventions]
## Directory map
- `src/[area]/` - [what lives here]
- `tests/` - [test layout and how to add one]
## Do not touch
- `[path]` - [why: generated, vendored, owned by another team]
## Environment facts
- [Ports, required env vars, service dependencies]
## Pull request rules
- [Branch naming, review requirements, CI gates]
Field notes
| Field | Why it matters |
|---|---|
| Setup and commands | The highest-value section: exact commands, verified by running them. A wrong test command here breaks every agent session. |
| Do not touch | The cheapest governance you can buy. List generated files, vendored code, and anything with an owner. |
| Environment facts | Everything an agent would otherwise guess: ports, env vars, service addresses. Guesses are where sessions go sideways. |