Which rules file does each AI coding tool read?

Every coding agent looks for instructions in a different place, and they disagree on scoping. This table is checked against each vendor's own documentation rather than repeated from other blog posts.

Last checked 2026-10-30. Tools change quickly; follow the source links for the current behaviour.

Tool Native files Reads AGENTS.md? Scoping Source
Claude Code CLAUDE.md or .claude/CLAUDE.md, CLAUDE.local.md, .claude/rules/**/*.md, ~/.claude/CLAUDE.md Yes, v2.1.277+, but only when no CLAUDE.md exists in the working directory or above. With a CLAUDE.md, add @AGENTS.md to load both. .claude/rules files take a paths field (YAML list or comma-separated globs). @path imports, up to four hops deep. Claude Code docs
Cursor .cursor/rules/**/*.mdc; legacy .cursorrules Yes, in the project root and nested directories. Frontmatter alwaysApply, globs (comma-separated) and description give four types: Always Apply, Apply to Specific Files, Apply Intelligently, Apply Manually. Plain .md files in the rules folder are ignored. Cursor docs
GitHub Copilot .github/copilot-instructions.md, .github/instructions/**/*.instructions.md Depends on the surface: the cloud agent, Copilot CLI and code review on GitHub.com read agent files; VS Code chat reads AGENTS.md; Visual Studio and JetBrains chat do not. Path-specific files use applyTo with comma-separated globs; optional excludeAgent (code-review or cloud-agent). GitHub support matrix
Windsurf / Devin Desktop .devin/rules/*.md, .devin/global_rules.md; legacy .windsurf/rules/*.md and .windsurfrules (still imported) Yes (also AGENTS.local.md and AGENT.md), at the root and in each directory down to the working directory. trigger: always_on, glob (with globs), model_decision or manual. Devin Desktop docs
Gemini CLI GEMINI.md in the workspace and parent directories, ~/.gemini/GEMINI.md If configured: set context.fileName in settings.json, e.g. ["AGENTS.md", "GEMINI.md"]. No per-file scoping; files are concatenated by directory. @file.md imports. The Gemini CLI docs site says it was replaced by Antigravity CLI on June 18, 2026; check that tool's docs if you have moved. Gemini CLI docs

The short version

  • AGENTS.md is the closest thing to a shared file. Cursor, Copilot's agents and Devin Desktop read it directly; Claude Code and Gemini CLI can be pointed at it.
  • Claude Code is the main exception. As soon as a CLAUDE.md exists, it stops reading AGENTS.md unless CLAUDE.md imports it with @AGENTS.md.
  • Scoping does not travel. Cursor's globs, Claude's paths, Copilot's applyTo and Windsurf's trigger each work only in their own tool. AGENTS.md can only scope by directory, through nested files.
  • Legacy files still linger. Cursor calls .cursorrules legacy; Devin Desktop lists .windsurfrules and .windsurf/rules as legacy imports.

A layout that works for mixed teams

  1. Put shared rules (commands, conventions, boundaries) in AGENTS.md.
  2. Add a CLAUDE.md containing @AGENTS.md, plus any Claude-specific notes.
  3. Keep genuinely file-specific rules in the scoped format of the tools your team uses most, for example .cursor/rules/*.mdc or .claude/rules/*.md.
  4. Don't duplicate always-on rules across formats; tools that read several files will see them twice.

The converter can produce this layout: convert to AGENTS.md with bridge files on. To compare the formats in more depth, read AGENTS.md vs CLAUDE.md vs Cursor rules.

Not covered yet

Cline, Kiro and other tools have their own rule folders. Third-party write-ups disagree about whether they read AGENTS.md, so they are left out until they can be checked against official documentation.