How can we maintain one set of project instructions when developers use different AI coding tools?

Mira discusses an open book between Ivo and Noor as they work at separate laptops around one office table.

TL;DR

When a team mixes Claude Code, Cursor, Codex and Copilot, conventions get copied into each tool's file until the copies disagree. Put the project's instructions in one AGENTS.md, which most current agents read directly and Claude Code can import. Keep each tool's own file to a few tool-specific lines, and record separately what each tool enforces, since hooks and permissions do not travel with the instructions. A convention change then means editing one reviewed file.

Agent rules have become team configuration

In July 2025 a developer asked on Hacker News how a team should collaborate on its AI agent tooling. Editors had always been personal choices, they pointed out, but agent rules are shared configuration: if one person uses Cursor and another Claude Code, which file holds the rules, and how does the team review a rule change that affects every task?

In March 2026 someone running Cursor beside VS Code with Copilot asked on the Cursor forum whether Cursor could read Copilot's instruction files, to avoid writing the rules twice. A Cursor staff reply said it could not, suggested AGENTS.md in the project root as a shared entry point, and warned that symlinks were currently unreliable for Cursor's rule discovery.

Separate what describes the project from what configures a tool

Most drift starts because two kinds of content share the same files. Some instructions describe the project and are true whatever tool reads them; others only make sense to one tool. Sorting them usually shrinks the tool-specific files to a few lines.

ContentBelongs inWhy
Build, test and lint commandsShared instructionsEvery agent needs the same commands
Architecture, module boundaries, naming, where files goShared instructionsDescribes the codebase, not the tool
Things the agent must not do in this repositoryShared instructions, and a check where possibleThe rule is shared; enforcement is per tool
Hooks, permission rules, sandbox settingsThat tool's own configEach tool has its own format and events
MCP servers and tool connectionsThat tool's own configFormats differ; secrets must not live in instructions
Notes about one tool's modes or commandsThat tool's file, kept shortOther tools cannot act on them

A useful test: if a line would still be correct after you switched tools, it belongs in the shared file.

Illustration of Mira, Ivo and Noor comparing one open project guide across three laptops at a shared table.
A shared guide gives a team one place to maintain project instructions across coding tools.

Make AGENTS.md the shared file, and check how each tool reads it

AGENTS.md is plain Markdown with no required fields, and most current coding agents read it, though not in the same way. From each vendor's documentation as of 30 September 2026:

  • Codex reads one AGENTS.md per directory from the project root down to where you started it, joined in that order, up to a combined 32 KiB by default (Codex AGENTS.md guide). It also honors AGENTS.override.md, which Claude Code's documentation says it does not read, so an override there quietly becomes a Codex-only rule.
  • Claude Code reads AGENTS.md itself from version 2.1.277, but by default only when there is no CLAUDE.md or CLAUDE.local.md in the working directory or above it (Claude Code memory documentation). If you keep a CLAUDE.md, the documented bridge is an @AGENTS.md line at its top. A developer who adds a CLAUDE.local.md for personal notes silently stops Claude Code reading AGENTS.md unless they change the Project instructions setting, which cannot be committed in project settings files.
  • Cursor reads AGENTS.md in the project root and in subdirectories, combining nested files with their parents (Cursor rules documentation). It also reads CLAUDE.md and applies it to every conversation, so a Claude-only note there reaches Cursor's agent too.
  • GitHub Copilot differs by feature (Copilot support matrix). Its cloud agent and CLI read AGENTS.md, CLAUDE.md or GEMINI.md alongside .github/copilot-instructions.md, with the nearest AGENTS.md taking precedence. Code review on GitHub.com reads AGENTS.md but not CLAUDE.md or GEMINI.md, and Copilot Chat on GitHub.com uses only .github/copilot-instructions.md.
  • Gemini CLI looks for GEMINI.md unless you set context.fileName to include AGENTS.md (Gemini CLI context files). Since 18 June 2026, Gemini CLI no longer serves Google AI Pro, Ultra or free-tier users, who were moved to Antigravity CLI; enterprise, Google Cloud and paid API-key access continue, so check which your team runs.

Symlinking one file to another looks like the shortest route. Claude Code's documentation warns that a committed symlink becomes a one-line text file on a Windows clone without core.symlinks enabled, and Cursor's staff called symlinks unreliable for its rule discovery. An import line or a documented setting avoids both problems.

Keep the tool files thin, and review the shared file like code

With AGENTS.md carrying the project, each tool file should contain almost nothing:

@AGENTS.md

## Claude Code only

Use plan mode for changes under src/billing/.

That CLAUDE.md imports the shared file and adds one line. Cursor reads it too, so the "Claude Code only" heading labels the section for people without keeping other tools out. If a line would confuse another agent, move it into Claude Code's own settings or drop it.

Two habits stop the copies coming back. Treat a change to AGENTS.md as a code change: it goes through a pull request, someone who knows the affected area reviews it, and the description says what behavior the rule should change. Then add a small check that fails when a tool file starts restating shared rules, for example a CI step that allows CLAUDE.md to contain only the import line and a short tool section. That check is a suggestion to adapt, not a standard tool.

The same rule is not enforced the same way

A shared instruction file gives every agent the same text, not the same guardrails. Claude Code, Codex, Cursor, Copilot and Gemini CLI all document hooks that can deny an action, but each keeps that configuration in its own files with its own event names, and none reads it from AGENTS.md. There are two documented crossovers: Cursor can load Claude Code's hooks when its third-party setting is enabled, as it is by default, and Copilot CLI also reads hooks from a repository's .claude/settings.json. So in a repository configured for Claude Code, those tools may run the same hooks; test it rather than assume either way.

Paqad's source shows the difference concretely. In the published 1.93.0 code at commit 29548baf, one shared list of twelve hooks is rendered per host.

For your own team, keep a short table in the repository with one row per tool: which checks block an edit, which run when the agent finishes, which exist only in CI, and which tools have no local checks. Code that goes through your required CI and merge path meets the same checks whichever tool wrote it, so rules that must hold for everyone belong there. Paqad can generate those thin entry files for your repository, and its adapters overview shows which coverage tier each of your team's hosts would get.

Illustration of Mira handing a review sheet to Noor, who compares it with a checklist between two workstations.
Shared instructions still require a review of what each developer's tool actually checks.

Check each developer's setup before calling it consistent

Consistency is a property of each machine, not of the repository. Check these on at least one setup per tool:

  • Version: Claude Code is 2.1.277 or later if it should read AGENTS.md without an import.
  • What actually loaded: Claude Code's /memory lists an AGENTS.md it read directly (v2.1.280 or later), and /context lists loaded memory files. Codex documents running with -c log_dir=./.codex-log and reading the log to audit loaded instruction files. For Cursor, start with each rule's type, as its own troubleshooting does.
  • Local files that change the answer: no unexpected CLAUDE.local.md, Codex AGENTS.override.md or personal rule in a tool's user settings.
  • Hooks that really block: one edit that should be stopped is stopped. A hook script that is missing or errors usually lets the action through.
  • CI parity: the checks that matter most also run in CI, so an incomplete local setup still cannot merge a violation.

When one developer's agent still breaks a shared rule, a diagnosis of why coding agents ignore project rules helps you tell a rule that never loaded from one that loaded and was ignored. To confirm loading before any edit happens, see how to check that an agent loaded the project instructions.

Frequently Asked Questions

One reviewed AGENTS.md at the repository root, thin per-tool files, and a written list of what each tool enforces. Add nested AGENTS.md files only where a subdirectory genuinely needs different guidance; every extra file is another place for the rules to diverge.

Apply the switching test to each line. "Run pnpm test before finishing" survives a change of tool, so it is project instruction. "Use plan mode for billing changes" names a Claude Code feature, so it belongs in that tool's file. A line naming a hook event, permission rule or MCP server is configuration, even when it enforces a project rule.

Change only the shared file and let the imports carry the change. Avoid one-time migration commands for ongoing sharing: Claude Code documents its /import command as appending a one-time copy, which starts drifting as soon as the original changes.

Decide which expectations must hold for every contributor and make those required CI checks. Local hooks then speed up feedback for the tools that support them, and a developer on an advisory-only tool loses that speed, not the rule.

Run the five checks above once per tool, and again after a tool upgrade, since loading behavior is version-specific. The quickest single test is a deliberate violation: if one developer's setup lets it through locally, CI must catch it.