An AGENTS.md file can tell a coding agent where to look
and what a repository considers a successful change. It cannot make an
inaccurate map true or guarantee that an agent will follow every
instruction. Start with rules a reviewer can check against a real
task.
A small example
The paths and commands below are examples for a fictional service. Replace them with the ones that exist in your repository; a copied command that fails is worse than no command.
# Repository instructions
- The HTTP service is in `services/api/`; background jobs are in `services/worker/`.
- Before changing an API response, inspect `services/api/contracts/` and its callers.
- Keep domain decisions in `packages/domain/`; the API layer translates requests and responses.
- For an API change, run `npm test --workspace services/api` and report any checks you could not run.
- Do not commit credentials. Use the documented local fixture for tests.
Each line has a job: point to an owner, identify a boundary, name a check, or set a constraint. Verify that the workspace and command are real before committing the file. If the test needs a service that is unavailable, the agent should report that gap; it should not replace the test result with a confident summary.
For Codex, repository instructions can be placed in
AGENTS.md. Its instruction discovery and precedence depend
on the working directory and configuration, so check the current Codex
documentation for your setup. Other agents may require different wiring;
a filename by itself is not a universal loader.
Try a change without touching production
On a disposable branch, ask the agent to explain where it would change an API response, which callers it would inspect, and which test it would run. Compare its answer with the actual tree and command. Then make a small change and review both the diff and the reported check output. If the agent points to a nonexistent contract, correct the map. If it skipped a relevant caller, tighten the instruction and repeat the exercise.
Put checks that can be enforced reliably into the build or test suite as well. Instructions help an agent reason about the work, but they do not replace a compiler, access controls, tests, or a human review. Keep secrets out of the file and review its paths when modules move.
Add doctrine where judgment is needed
AI Lint supplies a checklist, architecture and language doctrine, named rejected patterns, and agent wiring as files for the repository. Its free edition is for personal and evaluation use by individuals only, not company or commercial use. Paid packs allow internal modification, so a team can add its own boundaries. One person, including for company work, can buy a Personal pack once: $49 for the App Pack or $79 for the Bundle. A Company license is also a one-time purchase, $299 for the App Pack or $499 for the Bundle, for unlimited internal users within one legal entity.
AI Lint is read by the agent; it is not a static analyzer and does not prove that instructions were loaded or followed. Run the exercise above in the actual tool and review the result.