Give your agent a conventions file
Added Updated Copyable prompt below
Published Last verified
Our verdict
Cheap to write and it pays off every session. In Aider, load the file read-only with /read or put it in .aider.conf.yml so it's always there, and prompt caching can keep the cost down. Other agents use their own files (AGENTS.md, CLAUDE.md, Cursor rules, .clinerules), so keep one short source of truth and point the others at it.
- Who it's for
- Anyone using a coding agent on a long-lived repo
- Leverage
- Consistent output without repeating yourself
- Effort
- Low
- Date added
What Aider's conventions file does
Aider lets you add a small Markdown file of coding rules (which libraries to prefer, whether to use type hints, how to test) to the chat as read-only context, so the model follows your style instead of its defaults. Aider's own example: with a two-line CONVENTIONS.md saying to prefer httpx over requests and use types, the model wrote an httpx function with type hints; without it, it used requests and skipped types. Load it per session with /read or --read, or always via the read option in .aider.conf.yml.
How builders use Aider's conventions file
- Start with five to ten rules the agent keeps getting wrong, not a style guide.
- Load it with aider --read CONVENTIONS.md so it's marked read-only and Aider won't edit it.
- Make it permanent with read: CONVENTIONS.md in .aider.conf.yml at the repo root, so the whole team gets it.
- Borrow a starting point from the community conventions repo, which has files for Go, Next.js with TypeScript, Flutter and more.
- Add a rule whenever you correct the agent twice for the same thing, and delete rules it no longer breaks.
Where each agent looks for rules
Checked on each tool's official docs, 16 Nov 2026.
| Agent | File | How it loads |
|---|---|---|
| Aider | CONVENTIONS.md (any name) | /read, --read, or read: in .aider.conf.yml |
| Codex, Jules, Cursor and others | AGENTS.md | Read automatically; the nearest file in the directory tree wins |
| Claude Code | CLAUDE.md | Loaded every session; @path imports pull in other files |
| Cline | .clinerules/ | Loaded automatically; it also detects AGENTS.md, .cursorrules and .windsurfrules |
Aider config details
- .aider.conf.yml is read from your home directory, the git repo root and the current directory, in that order, and later files take priority.
- read accepts one file or a list, such as read: [CONVENTIONS.md, anotherfile.txt].
- --config <file> loads only that one file and skips the others.
Aider's conventions file: limits and gotchas
- Rules use context on every request; long files cost more and models follow them less closely. Anthropic suggests keeping each CLAUDE.md under 200 lines for that reason.
- It's guidance, not enforcement. Pair it with a linter, formatter and tests, which Aider can run after each edit.
- Contradictory rules confuse the model; review the file when it grows.
- Different agents read different files, so a rule added to one may not reach the others unless you link or import them.
Aider's conventions file compared with other tools here
- Write an AGENTS.md: the cross-agent format that Codex, Jules, Cursor and others read automatically.
- Cursor rules: project rules in .cursor/rules, which can be applied always or only to files matching a glob.
- Aider lint-and-test loop: the enforcement half: Aider runs your linter and tests after each edit and fixes what fails.
- Cline: reads .clinerules plus AGENTS.md and .cursorrules, so one file can serve several tools.
When to pick Aider's conventions file
- Use a CONVENTIONS.md if you use Aider on a long-lived repo and keep repeating the same corrections.
- Write an AGENTS.md if your team uses several agents and wants one shared file.
- Use Cursor rules if everyone works in Cursor and you want rules scoped to certain folders.
- Add a lint-and-test loop if style rules alone aren't stopping mistakes.
Copy this: CONVENTIONS.md starter
# Conventions
- Language: TypeScript strict. No `any`.
- Prefer small pure functions; no classes unless needed.
- Use <library> for HTTP, <library> for validation.
- Tests: <framework>, colocated as *.test.ts. Every bug fix gets a regression test.
- Don't add dependencies without asking.
- Keep diffs minimal. Don't reformat untouched code.Aider's conventions file questions
Do I have to call it CONVENTIONS.md?
No. Aider loads whatever Markdown file you pass to /read or --read; CONVENTIONS.md is just the name its docs use.
How do I make Aider always load it?
Add read: CONVENTIONS.md to .aider.conf.yml in your home directory or repo root.
Why load it with /read instead of /add?
/read marks the file read-only, so Aider won't edit it, and it can be cached if prompt caching is enabled.
Can Aider use my AGENTS.md?
Yes, by loading it the same way, for example aider --read AGENTS.md or read: AGENTS.md in the config.
Related discoveries
See the newest picks →- ToolCoding & Shipping Agents
ai-memory: one shared memory for every coding agent
A self-hosted memory server that lets Claude Code, Codex, Cursor and 20+ other coding agents share one project memory and hand work to each other.
Effort: MediumPrompt#MCP#Open source
- ToolCoding & Shipping Agents
Elephant-Goldfish Model: specs reviewed by fresh agents
Google's Apache-2.0 plugin that makes your coding agent draft a design spec with you, then has fresh zero-context subagents attack it before any code is written.
Effort: MediumPrompt#Plugin / extension#Open source
Get the best new A.I. picks in your inbox
The best new agent workflows and tools we’ve vetted, with a clear verdict on each. Short, occasional, useful.