Repository navigation
spec(cli-surface): agent docs reach every agent from the project's own files - #7539
Merged
Merged
Conversation
…n files INV31 records which files hold the agent-docs block, how init finds the project root, and where it writes no agent docs. DEC-2 records why every agent gets at least one copy and a second copy is accepted.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
4 tasks done
Contributor
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Visual Regression40 of 486 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 20 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
--remove-agents removes the block at the project root and in the working folder, and changes nothing when a file it would change resolves outside its folder. The change-coupling line and the INV31 verification row name removal too.
This was referenced Oct 15, 2026
Merged
approved_by: josephfarina, approved_at: 2026-10-20.
josephfarina
marked this pull request as ready for review
October 20, 2026 16:24
Contributor
Author
|
/approve-spec cd19a6d |
github-actions
Bot
deleted the
josephfarina/cli-surface-agent-docs-spec
branch
October 21, 2026 06:22
This branch was successfully deployed
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.
Exact decision needed
Which files
astryx initwrites its agent-docs block to, how it finds the project root, where it writes no agent docs, and where--remove-agentsremoves the block, so that every agent CLI reads the block and removal finds every copy init wrote.Existing authority searched
architecture:cli-surfacelistsfoundation/agent-docsas owning code and states INV10 (every write is confined) and INV13 (the block has one rendered source of truth). Neither says which files hold the block. This record is the canonical owner, so the rules extend it as INV31, with DEC-2 for the reasoning behind them.spec:AST-040owns how an operation edits existing consumer files.spec:AST-042,spec:AST-048andspec:AST-050own parts of what the block says. None of them decides where the block goes.docs/: agent docs,AGENTS.md,CLAUDE.md,GEMINI.md,init, the setup check, andfoundation/agent-docs.verified_by, the change-coupling list and the verification table, so whichever of the two lands second needs a rebase there.Decision
INV31: by default, every agent CLI reads at least one copy of the block, from files the project commits, whether it starts at the project root or in a folder below it.
--agentand--agent-docs-pathname the files instead, and a preset never leaves a copy in both Claude Code files.AGENTS.mdat the project root holds the block, andinitcreates it when it is missing.CLAUDE.md, else.claude/CLAUDE.md. It holds the copy even when it importsAGENTS.md, because Claude Code does not follow an import of a file above the folder it starts in. While rootCLAUDE.mdholds a copy,.claude/CLAUDE.mdholds none.initcreates no Claude Code file.GEMINI.mdholds a one-line managed import ofAGENTS.md, unless it already importsAGENTS.md. Settings that point Gemini CLI atAGENTS.mddo not replace the import, because Gemini CLI reads project settings only when it starts at the project root.AGENTS.md. A project whose agent files import other agent files, or share one file, keeps its own layout.AGENTS.mdholds the block;doctorfails otherwise.initwrites at the project root: the nearest folder whosepackage.jsondeclares an@astryxdesignpackage, else the nearest folder with apackage.json, else the working folder. The search stops at a repository root and never counts the home folder.package.json.upgraderefreshes every copy where it is.init --remove-agentsremoves the block at the project root and in the working folder. Every file it would change resolves inside its own folder, or it changes nothing.DEC-2 records the principle: no placement gives every agent exactly one copy in every project, so each agent gets at least one, and extra copies are accepted where agents share files.
Rejected alternatives
AGENTS.mdin the Claude Code file instead of a copy: Claude Code does not follow it in a session started in a subfolder..claude/CLAUDE.md: many projects keep.claude/out of version control, so a fresh clone would have none. This one is recorded in DEC-2.GEMINI.mdimport when settings point Gemini CLI atAGENTS.md: a session started in a subfolder would have none.Claim scope and non-goals
initlayout, how the project root is found, the foldersinitrefuses, and where--remove-agentsremoves the block.--agentpresets, beyond the single Claude Code copy;--agent-docs-path;Evidence and implementation relationship
Writing rubric results
Scope
Validation
pnpm check:knowledge: passes.main, and the added row follows it.git diff --check: clean.