Rename CLAUDE.md to AGENTS.md - #4166
Merged
Merged
Conversation
AGENTS.md is the vendor-neutral name other coding agents already read, and Claude Code now loads it through its built-in agents-md plugin whenever a project has no CLAUDE.md of its own. One set of instructions then serves every agent instead of only Claude. The plugin stands down as soon as any CLAUDE.md remains in the project, so both files move together rather than one at a time. Assisted-by: Claude:claude-fable-5-1:Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames the repo's agent instruction files from
CLAUDE.mdtoAGENTS.md, the vendor-neutral name that other coding agents already read. Claude Code picks them up through its built-inagents-mdplugin:https://github.com/anthropics/claude-code/tree/main/mods/agents-md
In the plugin's default mode (
claude-md-or-agents-md), a project with noCLAUDE.mdof its own gets itsAGENTS.mdfiles loaded exactly where and howCLAUDE.mdwould be, including nested ones.What changed
CLAUDE.md->AGENTS.mdICSharpCode.Decompiler.Tests/CLAUDE.md->ICSharpCode.Decompiler.Tests/AGENTS.mdCLAUDE.mdupdated: bothAGENTS.mdfiles,.github/CODE_REVIEW.md,doc/DecompilerArchitecture.html,ICSharpCode.Decompiler/CSharp/Syntax/README.md.Action required for every developer using Claude Code
/.claude/is gitignored, so this PR cannot touch anything in it. If you have a local.claude/CLAUDE.mdor aCLAUDE.local.mdin your checkout, you have to deal with it by hand, because in the default mode anyCLAUDE.md,.claude/CLAUDE.mdorCLAUDE.local.mdbetween the repo root and the working directory makes the plugin stand down completely. Claude then loads only that local file and silently skips the repo'sAGENTS.mdfiles. Pick one:rename it:
.claude/CLAUDE.md->.claude/AGENTS.md(the plugin reads that path too), orkeep it and switch the plugin to load both, in user settings (
~/.claude/settings.json; a project's.claude/settings.jsonis not read for plugin options):{ "pluginConfigs": { "agents-md@builtin": { "options": { "instructionFiles": "claude-md-and-agents-md" } } } }The same option is the "Project instructions" row in
/config.The second option is the more robust one if a tool regenerates
.claude/CLAUDE.mdfor you (the CodeGraph setup appears to be one such tool): a recreated file would otherwise hand the project back toCLAUDE.mdonly, again without any warning.How to check it worked: start a new session (or
/clear); the transcript shows one line naming the loadedAGENTS.mdfiles./memoryand the#shortcut do not knowAGENTS.mdand will not list them.Caveats
CLAUDE.mdcontaining@AGENTS.mdmakes the engine itself load the file through the import on any version - at the price of keeping aCLAUDE.mdaround. This PR deliberately does not add that stub./plugin; with it off, the engine readsCLAUDE.mdalone, which now means nothing.AGENTS.md, never.claude/AGENTS.md. Anything that every agent should see belongs in the checked-in files.Readonly.ICSharpCode.Decompiler.Tests/AGENTS.mdis attached when a text file under that directory is read with theReadtool. Unlike a nestedCLAUDE.md, it is not attached for a file@-mentioned in the prompt, the IDE's opened file or selection, or notebook/image/PDF reads.AGENTS.mdis not restored among the recently read files; it is attached again at the nextReadunder that directory. A mid-session change to it is not re-announced.AGENTS.mdagain at their own firstReadunder that directory, even if the parent already had it (slightly more context used than withCLAUDE.md).--add-dirdirectories contribute noAGENTS.md, where the engine would load theirCLAUDE.md.substdrive or junction) is not resolved the way the engine resolves it forCLAUDE.md.@imports pointing outside the working directory inside anAGENTS.mdare honoured only once the external-import approval has been given, and the approval dialog is raised forCLAUDE.mdimports alone. The files in this repo use no such imports.The full list of differences is in the "Where it still differs from CLAUDE.md" section of the linked README.
Assisted-by: Claude:claude-fable-5-1:Claude Code