Use a more general `.md` file to guide agents
Description of the feature request:
We support GEMINI.md, but the guidance in this file can be used by any agent, not only Gemini.
So I suggest using a more generic AGENTS.md filename instead.
Potentially, both could be supported, and we should then decide if it's an override or a complement.
If an override, the order of selection could be:
GEMINI.mdAGENTS.md
I.e. GEMINI.md could take precedence if present
If it's a complement, then GEMINI.md can just be appended to AGENTS.md when using Gemini CLI
What problem are you trying to solve with this feature?
No response
Any other information you'd like to share?
No response
CC @ptone
I do like the override aspect you detail here
i'd probably start with override-only, because complement brings up questions around ordering, and another more general way to achieve that is to introduce some basic include/import syntax so one could include AGENTS.md in GEMINI.md wherever they like, or have both include a common base, etc
We're going to introduce a setting to allow the user to name the file they want to use. We'll still use GEMINI.md by default, but if the user specifies AGENTS.md in their settings we'll use that instead.
I'm still not convinced that all models need the same instructions. We have some cases where we've added instructions in our own project files that are really unique to the way Gemini works. I don't know what quirks people have tried to work around in their other config files, nor do I know how those workarounds will be interpreted by Gemini.
Because of this, and because we are entering a market where there are other tools out there already I assume that we will be operating in environments that already have 1 or 2 instruction files available. I'd like our users to get the best impression of the tool and Gemini on our first run experience and I think slurping in a bunch of instructions for other models can detract from that experience.
In addition to this, we auto-write to the GEMINI.md file when the model wants to remember something specific about you. I'm less comfortable auto-writing to another file that is used by other models.
So rather than auto-detect and merge, or strictly prioritize we are going to use GEMINI.md by default. If the user wishes to use a different file they can set that in .gemini/settings.json and we'll use that filename instead. That new name will be used throughout the entire scope of the settings.json.
AGENTS.md is seeing some standardization / community alignment.
I suggest we re-open this issue.
Gemini CLI should look by default for any of AGENTS.md or GEMINI.md
We now have the ability to set the context file in settings (contextFileName), so if you want AGENTS.md you can make that the default for your installation. We also support @ imports in agent files so your GEMINI.md can import your AGENTS.md if you prefer. I think that puts us in a pretty good spot.
Further, the AGENTS.md standard that you point at, doesn't seem to support all of the features that we support in GEMINI.md (in particular @ imports) so tying ourselves to this syntax would limit our ability to continue to iterate in this space.
https://github.com/google-gemini/gemini-cli/blob/main/docs/core/memport.md
https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md#available-settings-in-settingsjson
Personally, I feel like the feature request described here (AGENTS.md is ignored/overridden if GEMINI.md is present) is preferable to the settings approach you have now.
Currently there is just additional friction for me to use Gemini.
Same, Gemini in Android Studio will be respecting AGENTS.md - https://issuetracker.google.com/issues/441820185
https://github.com/google-gemini/gemini-cli/issues/12345 is discussing adding AGENTS.md as a second default option.
+1 for @steren suggestion. AGENTS.md should be automatic! :-)
Gemini CLI now supports Agent Skills. Can we now have it also support AGENTS.md by default?
Closing as duplicate of https://github.com/google-gemini/gemini-cli/issues/12345