What AGENTS.md is

The format’s site, agents.md, calls it a README for agents: a place for the build steps, test commands and conventions that would clutter a README written for people.

  • Format. Standard Markdown. There are no required fields and no schema; you use whatever headings you like.
  • Location. A file named AGENTS.md at the repository root. In a monorepo, each package can have its own, and the site says the nearest file in the directory tree takes precedence. Instructions you type in the chat override the file.
  • Stewardship. The format is stewarded by the Agentic AI Foundation under the Linux Foundation. It came out of work by teams including OpenAI Codex, Amp, Google’s Jules, Cursor and Factory.
  • Readers. The site lists Codex, Jules, Gemini CLI, Cursor, Aider, Zed, Warp, VS Code, Devin, GitHub Copilot’s coding agent and JetBrains Junie among the tools that read it, and counts more than 60,000 open-source projects using it (the site’s own figure).

Each agent loads the file its own way. Two examples from vendor documentation:

  • Codex (OpenAI) reads a global file from ~/.codex, then at most one file per directory from the project root down to the working directory. It joins them in that order, so files nearer the working directory come later and override earlier guidance. An AGENTS.override.md in a directory replaces that directory’s AGENTS.md, and Codex stops adding files once the total reaches 32 KiB by default (Codex AGENTS.md guide).
  • Claude Code by default reads AGENTS.md as its project instructions when the repository has no CLAUDE.md or CLAUDE.local.md. When both exist, it reads only CLAUDE.md by default, unless that file imports the other with an @AGENTS.md line or a setting loads both (Claude Code memory docs). The CLAUDE.md comparison covers that file.

What belongs in AGENTS.md

The sections agents.md suggests are a project overview, build and test commands, code style, testing instructions and security considerations, plus commit and pull request conventions and deployment steps where they apply. Write each instruction so a reviewer could check it: “run pnpm test before every commit” works, “test your changes” does not. A short example (illustrative):

# AGENTS.md

## Setup
- Install: `pnpm install`
- Dev server: `pnpm dev`

## Tests
- Run `pnpm test` before every commit; all tests must pass
- Add or update tests for any code you change

## Code style
- TypeScript strict mode
- Single quotes, no semicolons

## Architecture
- Request handlers call services in `src/services/`
- Handlers never import the database client directly

## Pull requests
- Title format: `[package] Short description`
- Run `pnpm lint` and `pnpm test` before opening one

Treat the file like code that needs upkeep. In the study described next, 73.8% of committed AI configuration artifacts were committed once and never changed again.

Does a committed instructions file help? What one study found

The clearest evidence so far is observational. A Few Pages of Markdown: Committed AI Configuration and Lower Quality Cost after Coding-Agent Adoption, by Yegor Denisov-Blanch, Shyam Agarwal and colleagues at Stanford University, Carnegie Mellon University and Grid Dynamics, appears in the proceedings of the 2026 IEEE/ACM International Conference on Automated Software Engineering (ASE 2026). It introduces RAMP (Repository AI Maturity Profile), a four-level model that grades a repository by the AI configuration it commits, and follows 509 repositories that adopted coding agents.

Among repositories that adopted an autonomous coding agent first (rather than an AI editor), those with no committed configuration saw cognitive complexity rise 52.7% after adoption, against 26.7% for repositories that had committed configuration such as instructions, rules or architecture notes. Static-analysis warnings rose 24.1% against 14.0%.

The paper adds two cautions. Repositories were observed, not assigned to a level, so teams that write configuration may be more careful in other ways too; the authors call their results hypothesis-generating. And repositories with configuration still became more complex, so the files reduced the quality cost without removing it. The study counts AGENTS.md alongside tool-specific files such as CLAUDE.md and .cursorrules, so the result is about instruction files in general.

Where an instructions file stops

An AGENTS.md shapes what the agent knows. Five things are outside what a Markdown file can do:

  • It is advisory. The agent reads the file as context and can still write code that breaks it. Anthropic says this plainly about Claude Code’s own instruction files: they are context, not enforced configuration.
  • Conflicts are left to the model. Nesting decides which file is read last. Two lines that contradict each other, or an organization rule and a team exception, are weighed by the model each time.
  • Rules have no status or history. You can’t tell whether a line is current, who owns it, or what it replaced. When a decision changes, someone edits the prose and hopes every copy was found.
  • There is no evidence. Nothing records which rule applied to which change, or that a change was checked at all. The most anyone can say is that the agent had the file.
  • Each tool reads it differently. Size caps, override files, fallback names, or no reading at all when a CLAUDE.md is present. The same file can give two agents different context.

An instructions file is guidance. A rule that must hold needs a check that runs on the change itself, the same way for every agent that makes one.

How Mneme HQ differs

Mneme HQ checks something else: architecture decision records, not AGENTS.md. It is an open-source tool that checks code changes against those records before supported agent writes and in CI. An architecture decision record (ADR) is a short written record of one design decision. Mneme reads ADRs that carry a typed rule (forbid a string in given paths, forbid a dependency, or cap a number) and checks each proposed change against them. Everything below describes the released version, mneme-hq 0.11.0, which does not read or write AGENTS.md.

Dimension AGENTS.md Mneme HQ
Format Free-form Markdown ADR in Markdown, with YAML frontmatter and a ## Constraints section
What happens to a rule It goes into the agent’s context A change is checked against it: PASS, WARN or FAIL (exit codes 0, 1, 2)
Rule kinds Any sentence FORBID_LITERAL, FORBID_DEPENDENCY, and FORBID_NUMERIC_ABOVE (Python, decided by a whole-file mneme check --source-file audit)
Where a rule applies Applies to the folder the file sits in Optional path globs on literal rules (include_paths); dependency rules apply to the whole repository
Lifecycle Git history of prose ADR status and supersedes; only ADRs accepted at import are checked, and a decision is retired by a new ADR that supersedes it
Before the write Nothing runs Claude Code hook on Edit, Write and MultiEdit; Codex CLI hook on apply_patch
In CI Nothing runs mneme check as a pipeline step
Evidence None A violation names the decision it broke; mneme check --json records the rule ID and decision version

Two limits apply. The pre-write check covers each agent’s native write tools: Edit, Write and MultiEdit in Claude Code, apply_patch in Codex CLI. Most shell-command writes reach disk first and are checked when the agent ends its turn. And a check only catches what it is told to look for, such as a banned string in certain folders or a banned dependency. It cannot tell whether code matches the intent of a decision.

How they coexist

  1. Keep AGENTS.md for what agents should know: commands, layout, style, workflow.
  2. Find the lines where a violation would be a bug rather than a style nit. “Handlers never import the database client” in the example above is one.
  3. Write each of those as an ADR with a ## Constraints section and import it. Turn an ADR into an enforceable decision walks through that exact rule with recorded output.
  4. Run mneme check in CI, and enable the hook for the agent you use (Claude Code or Codex CLI) so the check runs before native file edits and at the end of each turn.
  5. Leave the sentence in AGENTS.md as well, with a pointer to the ADR. The agent learns the rule before it starts, and the check catches the change if it breaks the rule anyway.

Decision matrix

If most of these are true, AGENTS.md alone is enough:

  • A small team, and one agent or editor.
  • A missed rule costs a review comment, not an incident.
  • A person reviews every agent change before it merges.
  • The file is short and current.

If any of these are true, add Mneme HQ under the file:

  • At least one rule must block a change, whoever or whatever wrote it.
  • Agents open pull requests without a person watching each edit.
  • Several agents read different instruction files, and you want one set of checks for all of them.
  • You need a record of which decision a change was checked against.

FAQ

What is AGENTS.md?
A plain Markdown file at the root of a repository that gives coding agents project instructions: setup and test commands, code style, conventions. It has no required fields. The format is stewarded by the Agentic AI Foundation under the Linux Foundation and is read by tools including Codex, Cursor, Jules, Gemini CLI, Aider and GitHub Copilot’s coding agent.
Is it AGENTS.md or agent.md?
The format’s name is AGENTS.md, plural and upper case, and tools look for that name. Codex, for example, reads other file names only if you list them in its project_doc_fallback_filenames setting.
Does Claude Code read AGENTS.md?
Yes, by default when the repository has no CLAUDE.md or CLAUDE.local.md. If both files exist, Claude Code reads CLAUDE.md only unless you change its Project instructions setting, so teams that want one source add an @AGENTS.md import line to their CLAUDE.md.
Does AGENTS.md enforce anything?
No. The agent reads it as context and can still produce a change that breaks it. To make a rule hold, you need a check that runs on the change, before the write or in CI.
Does Mneme HQ read my AGENTS.md?
Not in the current release. Mneme reads architecture decision records that carry a typed constraint and checks changes against them. Keep your AGENTS.md for guidance, and move the rules that must hold into ADRs.