Skip to content

Point Gemini CLI at AGENTS.md without breaking the extension - #6

Merged
aaddrick merged 2 commits into
mainfrom
gemini-context-list
Aug 3, 2026
Merged

Point Gemini CLI at AGENTS.md without breaking the extension#6
aaddrick merged 2 commits into
mainfrom
gemini-context-list

Conversation

@aaddrick

@aaddrick aaddrick commented Aug 3, 2026

Copy link
Copy Markdown
Owner

GEMINI.md is load-bearing, so it stays the style

gemini-extension.json names GEMINI.md as the extension's contextFileName. It is what a Gemini CLI user gets when they run gemini 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 root AGENTS.md had 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

contextFileName does accept a subpath — extension-manager.ts joins it to the extension path behind an isSubpath guard, 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 neither gemini nor 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.md and CLAUDE.md as project instructions picked up from the root and "always applied to every conversation". .cursor/rules/attention-control.mdc already carries the style with alwaysApply: true. So Cursor gets the standards and the style with no new file.

Also

  • 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. AGENTS.md follows through the generator.
  • check_configs.py parses the new settings file: 8 shipped configs.

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.
@aaddrick
aaddrick merged commit 344e813 into main Aug 3, 2026
3 checks passed
@aaddrick
aaddrick deleted the gemini-context-list branch August 3, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant