Context
neomjs/neo-agent-skills#335 decided (shape C, its first two comments) that a consumer's maintainer AGENTS.md is a projection of its installed skills package, generated rather than hand-kept. This leaf is the Engine half: #335's AC-1 to AC-5, plus the Engine's part of AC-6. The Brain's link and devindex (AC-7) land as their own leaves.
Amended 2026-11-11 (operator input): directories and studies look for a root AGENTS.md, and an agent in a fork that never installed should learn that its rules are missing. So git keeps a pointer in AGENTS.md, and the working copy holds the generated rules: the pattern Git LFS uses for its pointer files.
The Problem
The tracked AGENTS.md changes only when someone commits it. Dependabot moved the skills pin on 11-06, 11-08 and 11-10 without it, and #20739 caught it up by hand. The next section release drifts it again: the rule ships, gets pinned and installed, and no session loads it.
The Architectural Reality
Design authority: "Generated copies (AGENTS.md sections, .claude/CLAUDE.md) are never hand-edited; they regenerate from the package." (neomjs/neo-agent-skills#140, the authority #335 cites)
- The set:
package.json:45 declares "generate-agents-md": "neo-agent-skills-agents-md --repo neo,neo-agent-brain --out AGENTS.md" (since #20739).
buildScripts/util/prepare.mjs runs the stages husky and materialize, each a bin resolved from its package's manifest and run through node, never through a PATH shim, so the lifecycle stays portable to cmd.exe. Both run behind the lock-only guard and isDependencyBuild.
buildScripts/helpers/seatStart.mjs runs on every Fleet Start, including one whose lockfile digest matches: READY includes present (neomjs/neo-agent-brain ai/services/fleet/installAgentRepoDependencies.mjs:33). A non-zero exit lands on the start row as seatStart: {state: 'failed'} (:385).
- Harness entries:
.claude/CLAUDE.md is a tracked symlink to ../AGENTS.md, .agents/ANTIGRAVITY_RULES.md:3 links it, and Codex reads the root file. Claude Code reads AGENTS.md itself from v2.1.277 when no CLAUDE.md exists. No script, workflow or hook reads AGENTS.md.
- Git filters: a
clean filter named in .gitattributes decides what git stores for a path. Git trusts a changed file size without reading the file, so a filter-backed path needs git update-index --refresh after the working copy is rewritten.
The Fix
prepare.mjs: a third stage, agents-md, runs the neo-agent-skills-agents-md bin with the arguments of the checkout's own generate-agents-md script, read from package.json (AC-2). Before it writes, the stage registers the neo-agents-md clean filter, and afterwards it refreshes git's stat cache. A checkout that declares no script skips the stage, and a script that is not a plain call of the bin fails it.
seatStart.mjs: runs the same stage on every Start, ahead of the theme check. A failed generation exits non-zero (AC-5), and the theme check still runs.
- The pointer:
AGENTS.md stays tracked, holding a short pointer whose single source is buildScripts/util/agentsMdPointer.mjs. .gitattributes routes the file through the neo-agents-md clean filter, which that module answers.
- Links (AC-6): both blog links point to
agents-md in neomjs/neo-agent-skills. CONTRIBUTING.md:165 says npm install generates the root file from there.
- Specs: the stage order and its script arguments; a missing script skips and a non-plain one is refused; a fixture bump moves the file (AC-3);
seatStart restores a deleted file (AC-4) and exits 1 on a failed generation (AC-5); a real-git round trip keeps git status clean; and the committed file equals the pointer.
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
root AGENTS.md |
neomjs/neo-agent-skills#335 (shape C), #140, and the operator's 11-11 input |
git holds the pointer; the working copy holds the rules written by prepare and every seat:start |
a clone that never installed shows the pointer; a failed generation keeps the previous rules and fails seat:start |
CONTRIBUTING.md:165, agentsMdPointer.mjs |
AC-1, AC-4, the round-trip spec |
npm run prepare (buildScripts/util/prepare.mjs) |
its module JSDoc |
a third stage, agents-md, after materialize, behind the same two guards |
a failed stage fails the install, as its neighbours do |
module JSDoc |
prepare.spec.mjs |
npm run seat:start (buildScripts/helpers/seatStart.mjs) |
neomjs/neo-agent-brain#1480 |
regenerates on every Start; exits 1 on a failed generation, after the theme check |
the Fleet row reads seatStart: failed |
module JSDoc |
seatStart.spec.mjs |
.gitattributes + the neo-agents-md filter |
Git LFS's pointer pattern |
the clean filter answers AGENTS.md with the pointer; registered per clone by the stage |
an unregistered clone shows the generated file as changed until the next install |
agentsMdPointer.mjs |
agentsMdPointer.spec.mjs |
generate-agents-md script |
#20739 |
unchanged; the single declaration both callers read |
none |
package.json |
the AC-2 spec |
Decision Record impact
none. ADR 0007 governs what AGENTS.md says; the loaded content and size do not change.
Acceptance Criteria
Out of Scope
- The Brain's
learn/agentos/IdentityFirewall.md link and devindex (#335's AC-6 and AC-7): their own leaves.
- The Fleet's home projection (neomjs/neo-agent-brain#644): counting
AGENTS.md as Claude's project file, before .claude/CLAUDE.md can go, and reading the pointer as "not supplied". These are its own leaf.
- The content of
AGENTS.md.
Avoided Traps
- Untracking the file. Scanners and an uninstalled fork find nothing, and CI's substrate guard reads the dangling
.claude/CLAUDE.md as a seat without rules.
- Spawning
npm run generate-agents-md. That brings back the PATH shim prepare.mjs exists to avoid, and a nested npm inside the lifecycle.
- A second copy of the repository set (a constant in
prepare.mjs). Two declarations drift; the script is the one #20739 placed.
- Generating only at install. A Start with a matching lockfile digest installs nothing.
Related
- neomjs/neo-agent-skills#335 (source), neomjs/neo-agent-skills#140, neomjs/neo-agent-skills#342 (withdrawn guard exception)
- #20739, neomjs/neo-agent-brain#1480, neomjs/neo-agent-brain#644
Live latest-open + closed sweep: checked the latest 20 open and a closed search ("AGENTS.md generated untracked": #5086 and #17783, neither on this surface) at 2026-11-11T02:43Z, plus open PRs searched for AGENTS.md (none); no equivalent found. Backlog band: 25 open (orange); the owning ticket is neomjs/neo-agent-skills#335, and this leaf is its Engine half.
A2A in-flight claim sweep: the last 30 messages (all read states) carry no claim on AGENTS.md, prepare or seat:start.
Memory Core rationale sweep: #335's design thread (6784477727, 6784580742) and its handover plan (6784985838) hold the decision; the operator's 11-11 input amends delivery, not the decision.
Own-assignment sweep: nothing in neomjs/neo was assigned to me.
Structure map: N/A. The Engine is not Brain-hosted; the owners are buildScripts/util/prepare.mjs and buildScripts/helpers/seatStart.mjs, and the pointer's module sits beside them in buildScripts/util/.
Ownership: self-assigned (Grace); #335's implementer, per its handoff line.
Retrieval Hint: "Engine AGENTS.md pointer clean filter generated at prepare and seat:start"
Origin Session ID: 40a9201b-5e9e-4845-ab9f-dee27312077d
Context
neomjs/neo-agent-skills#335 decided (shape C, its first two comments) that a consumer's maintainer
AGENTS.mdis a projection of its installed skills package, generated rather than hand-kept. This leaf is the Engine half: #335's AC-1 to AC-5, plus the Engine's part of AC-6. The Brain's link anddevindex(AC-7) land as their own leaves.Amended 2026-11-11 (operator input): directories and studies look for a root
AGENTS.md, and an agent in a fork that never installed should learn that its rules are missing. So git keeps a pointer inAGENTS.md, and the working copy holds the generated rules: the pattern Git LFS uses for its pointer files.The Problem
The tracked
AGENTS.mdchanges only when someone commits it. Dependabot moved the skills pin on 11-06, 11-08 and 11-10 without it, and #20739 caught it up by hand. The next section release drifts it again: the rule ships, gets pinned and installed, and no session loads it.The Architectural Reality
Design authority: "Generated copies (
AGENTS.mdsections,.claude/CLAUDE.md) are never hand-edited; they regenerate from the package." (neomjs/neo-agent-skills#140, the authority #335 cites)package.json:45declares"generate-agents-md": "neo-agent-skills-agents-md --repo neo,neo-agent-brain --out AGENTS.md"(since #20739).buildScripts/util/prepare.mjsruns the stageshuskyandmaterialize, each a bin resolved from its package's manifest and run throughnode, never through a PATH shim, so the lifecycle stays portable tocmd.exe. Both run behind the lock-only guard andisDependencyBuild.buildScripts/helpers/seatStart.mjsruns on every Fleet Start, including one whose lockfile digest matches:READYincludespresent(neomjs/neo-agent-brainai/services/fleet/installAgentRepoDependencies.mjs:33). A non-zero exit lands on the start row asseatStart: {state: 'failed'}(:385)..claude/CLAUDE.mdis a tracked symlink to../AGENTS.md,.agents/ANTIGRAVITY_RULES.md:3links it, and Codex reads the root file. Claude Code readsAGENTS.mditself from v2.1.277 when noCLAUDE.mdexists. No script, workflow or hook readsAGENTS.md.cleanfilter named in.gitattributesdecides what git stores for a path. Git trusts a changed file size without reading the file, so a filter-backed path needsgit update-index --refreshafter the working copy is rewritten.The Fix
prepare.mjs: a third stage,agents-md, runs theneo-agent-skills-agents-mdbin with the arguments of the checkout's owngenerate-agents-mdscript, read frompackage.json(AC-2). Before it writes, the stage registers theneo-agents-mdclean filter, and afterwards it refreshes git's stat cache. A checkout that declares no script skips the stage, and a script that is not a plain call of the bin fails it.seatStart.mjs: runs the same stage on every Start, ahead of the theme check. A failed generation exits non-zero (AC-5), and the theme check still runs.AGENTS.mdstays tracked, holding a short pointer whose single source isbuildScripts/util/agentsMdPointer.mjs..gitattributesroutes the file through theneo-agents-mdclean filter, which that module answers.agents-mdin neomjs/neo-agent-skills.CONTRIBUTING.md:165saysnpm installgenerates the root file from there.seatStartrestores a deleted file (AC-4) and exits 1 on a failed generation (AC-5); a real-git round trip keepsgit statusclean; and the committed file equals the pointer.Contract Ledger
AGENTS.mdprepareand everyseat:startseat:startCONTRIBUTING.md:165,agentsMdPointer.mjsnpm run prepare(buildScripts/util/prepare.mjs)agents-md, aftermaterialize, behind the same two guardsprepare.spec.mjsnpm run seat:start(buildScripts/helpers/seatStart.mjs)seatStart: failedseatStart.spec.mjs.gitattributes+ theneo-agents-mdfilterAGENTS.mdwith the pointer; registered per clone by the stageagentsMdPointer.mjsagentsMdPointer.spec.mjsgenerate-agents-mdscriptpackage.jsonDecision Record impact
none. ADR 0007 governs what
AGENTS.mdsays; the loaded content and size do not change.Acceptance Criteria
npm installand afternpm run seat:start,AGENTS.mdequalsnpm run generate-agents-md's output, andgit statusshows no change to it.generate-agents-mdscript; no second copy of it exists.AGENTS.mdis back afterseat:start, with nothing reinstalled.seat:startnon-zero with a named reason, and the theme check still runs.AGENTS.mdis the pointer; the blog links andCONTRIBUTING.mdname the sections in neomjs/neo-agent-skills as the source of the rules.Out of Scope
learn/agentos/IdentityFirewall.mdlink anddevindex(#335's AC-6 and AC-7): their own leaves.AGENTS.mdas Claude's project file, before.claude/CLAUDE.mdcan go, and reading the pointer as "not supplied". These are its own leaf.AGENTS.md.Avoided Traps
.claude/CLAUDE.mdas a seat without rules.npm run generate-agents-md. That brings back the PATH shimprepare.mjsexists to avoid, and a nested npm inside the lifecycle.prepare.mjs). Two declarations drift; the script is the one #20739 placed.Related
Live latest-open + closed sweep: checked the latest 20 open and a closed search ("AGENTS.md generated untracked": #5086 and #17783, neither on this surface) at 2026-11-11T02:43Z, plus open PRs searched for
AGENTS.md(none); no equivalent found. Backlog band: 25 open (orange); the owning ticket is neomjs/neo-agent-skills#335, and this leaf is its Engine half. A2A in-flight claim sweep: the last 30 messages (all read states) carry no claim onAGENTS.md,prepareorseat:start. Memory Core rationale sweep: #335's design thread (6784477727, 6784580742) and its handover plan (6784985838) hold the decision; the operator's 11-11 input amends delivery, not the decision. Own-assignment sweep: nothing in neomjs/neo was assigned to me. Structure map: N/A. The Engine is not Brain-hosted; the owners arebuildScripts/util/prepare.mjsandbuildScripts/helpers/seatStart.mjs, and the pointer's module sits beside them inbuildScripts/util/.Ownership: self-assigned (Grace); #335's implementer, per its handoff line.
Retrieval Hint: "Engine AGENTS.md pointer clean filter generated at prepare and seat:start"
Origin Session ID: 40a9201b-5e9e-4845-ab9f-dee27312077d