Keep them as files in each repo, next to the code they describe: AGENTS.md at the root for Codex, Cursor and most agents, and a CLAUDE.md that points to it for Claude Code. Personal preferences go in your home folder. Almanac lets teammates who do not use git comment on and edit the same files.
Instructions for AI agents are plain files, and agents read them from disk before they start work. That is why the files belong in the repo, in the same commit history as the code they describe. A new teammate, a new machine and a new agent all get the same rules with one clone.
Three places cover almost every case: the repo root, a user-level file in your home folder, and, for big repos, a file inside a folder with its own rules.
Put AGENTS.md at the root of each repo. Codex, Cursor, GitHub Copilot and most coding agents read it on their own. Claude Code reads CLAUDE.md, so add a short CLAUDE.md that sends it to AGENTS.md. That way there is one copy of the rules, not two that drift apart.
Write the rules a new engineer would need on day one: how to set up, which checks to run before a commit, the code style, and what an agent must ask first. Almanac has a ready AGENTS.md template and a CLAUDE.md template you can copy.
Each tool also reads a file from your own home folder, which applies to every project on your machine and is never committed. Use it for how you like to work, not for what the team requires.
These are the usual locations for the three terminal agents Almanac connects to.
A product lead knows what the agent should never ship without asking. A designer knows the naming rules. A founder knows what the company will not say in public. Often none of them work in a repo, so the rules get written by whoever does, and the rest of the team never sees them.
A markdown file in GitHub is also hard to review for someone who does not use pull requests. The result is a rules file that only the engineer who wrote it understands.
Almanac reads the markdown docs in a team's GitHub repos and shows them as a wiki. Every CLAUDE.md, AGENTS.md and GEMINI.md it finds is listed under Key docs, so people and agents can find the rules first. Teammates can open them, comment on a line and suggest edits without a GitHub account.
The files stay in the repo, so every agent keeps reading the same copy. With saving back turned on for a repo, edits made in Almanac go back to GitHub as a pull request that changes only the paragraphs that were edited, so an engineer still reviews each change.
An AI agent never rewrites its own rules. When an agent changes a key doc through Almanac, the change always arrives as a suggested edit for a person to accept, even if an admin lets that agent edit other docs directly.
Connect Claude Code, Codex, Claude or ChatGPT to Almanac and they can search and read the docs as you, with history that names the agent, for example Claude Code for Adam.
To have agents link the doc when they mention it, add a line to the repo's AGENTS.md or CLAUDE.md saying so. Links check access like any page in Almanac, so someone who cannot open the doc gets a request access page.
Keep one set of rules, in AGENTS.md, and make CLAUDE.md a short file that points to it. Codex, Cursor and most agents read AGENTS.md directly and Claude Code reads CLAUDE.md.
In the file in your home folder: ~/.claude/CLAUDE.md for Claude Code, ~/.codex/AGENTS.md for Codex, ~/.gemini/GEMINI.md for Gemini CLI. They apply to every project and are not committed.
Yes, in Almanac. They open the file as a doc, comment on it or suggest edits, with no GitHub account. With saving back on, their edits reach the repo as a pull request.
Not in Almanac. A change an agent makes to a key doc such as these files always becomes a suggested edit that a person accepts or discards.