Point Gemini CLI at AGENTS.md without breaking the extension - #6
Merged
Conversation
GEMINI.md cannot become a repository guide the way AGENTS.md did. gemini-extension.json names it as the extension's context file, so it is what a Gemini CLI user gets when they run gemini extensions install https://github.com/aaddrick/attention-control Repurposing it would inject "never edit a generated file" and "run scripts/sync_style.py" into their sessions. The old root AGENTS.md carried no such wiring, which is why removing it cost nothing. .gemini/settings.json sets context.fileName to ["AGENTS.md", "GEMINI.md"], so an agent working in this checkout reads the standards and the style, and an extension user reads only the style. Project settings resolve from the workspace, so the file is inert inside an installed extension directory. The rejected alternative: contextFileName does accept a subpath. extension-manager.ts joins it to the extension path behind an isSubpath guard, and it accepts an array, so ".gemini/attention-control.md" would free the root name for a third mirror. That trades a working convention for an unusual layout, and neither gemini nor any CI job here can load a Gemini extension, so the break would ship unverified. Cursor needs nothing. Its rules documentation lists AGENTS.md and CLAUDE.md as project instructions picked up from the root and applied to every conversation, and .cursor/rules/attention-control.mdc already carries the style with alwaysApply. CLAUDE.md gains a table of which file each tool reads, and says plainly that GEMINI.md is the shipped artifact rather than a guide. check_configs.py parses the new settings file: 8 shipped configs now.
The description in gemini-extension.json is displayed on geminicli.com/extensions, so a stranger browsing extensions reads it. It read "Shape Gemini CLI output for an ADHD reader, then write each sentence in controlled English..." - an instruction aimed at a model, in the imperative, at 168 characters for a field the reference calls "a short description". It now matches the framing the marketplace manifest already uses: it describes what the extension is, and it says "a reader with ADHD" rather than "an ADHD reader", which is the phrasing the README and the canonical style file use. .claude-plugin/plugin.json and .codex-plugin/plugin.json still carry the older imperative wording. Those two are not displayed in a public directory the same way, so they stay for now.
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.
GEMINI.md is load-bearing, so it stays the style
gemini-extension.jsonnamesGEMINI.mdas the extension'scontextFileName. It is what a Gemini CLI user gets when they rungemini extensions install https://github.com/aaddrick/attention-control. Repurposing it as a repository guide would inject "never edit a generated file" into their sessions — the opposite of the product. The old rootAGENTS.mdhad no such wiring, which is why removing it cost nothing.The fix
.gemini/settings.json:{ "context": { "fileName": ["AGENTS.md", "GEMINI.md"] } }An agent working in this checkout reads the standards and the style. An extension user reads only the style, because project settings resolve from the workspace, so the file is inert inside an installed extension directory.
The alternative I rejected
contextFileNamedoes accept a subpath —extension-manager.tsjoins it to the extension path behind anisSubpathguard, and it also accepts an array. So".gemini/attention-control.md"would free the root name for a third mirror. That trades a working convention for an unusual layout, and neithergemininor any CI job here can load a Gemini extension, so the break would ship unverified.Cursor needs nothing — verified
Cursor's rules documentation lists
AGENTS.mdandCLAUDE.mdas project instructions picked up from the root and "always applied to every conversation"..cursor/rules/attention-control.mdcalready carries the style withalwaysApply: true. So Cursor gets the standards and the style with no new file.Also
CLAUDE.mdgains a table of which file each tool reads, and says plainly thatGEMINI.mdis the shipped artifact rather than a guide.AGENTS.mdfollows through the generator.check_configs.pyparses the new settings file: 8 shipped configs.