Found while implementing #6736 (widening scripts/check-changeset-presence.mjs to read published-contract fields of a package manifest). Filed, not fixed there: AGENTS.md was outside that card's declared file surface, and the correct fix covers two separate widenings at once, so it is better taken deliberately than ridden in.
What is stated
AGENTS.md line 161 states the rule the gate enforces:
改完代码提交时:只要改了发版包的 src/(.changeset/config.json 的 fixed 组,含 apps/console),就必须新增一个 .changeset/*.md
src/ is the whole population that sentence names.
What the gate actually guards
The gate's population has been wider than that for two landings now, and this sentence tracked neither:
- objectui#5733 added the published-executable clauses. A changed file counts when it is under
src/, OR it is the package-root index.html build entry, OR the package's own files list publishes it verbatim (minus documentation and licences). On this tree that is three real files outside src/ — apps/console/index.html, apps/console/plugin.ts, packages/runner/index.html. - objectui#6736 added a second question asked of the manifest itself: eight named fields (
sideEffects; exports, main, module, types; files; peerDependencies, engines) are compared by value across the diff, and a move in any of them owes a declaration even when no file under src/ changed.
So an author who reads AGENTS.md and reasons "I did not touch src/, nothing is owed" gets the opposite answer from CI in two distinct ways.
Why it is worth a card and not a silent patch
This is agent-facing text. AGENTS.md is an input to every seat, every session, so a rule stated too narrowly is not paid once — it is paid by every reader, and it is paid in the direction that produces a red CI run the author believes is a false positive. That is the same amplifier scripts/check-shell-escape-residue.mjs's header records for its own class of bad agent-facing example.
The gate's own docblock is the accurate statement of the rule in both respects; the fix is to make line 161 agree with it (and to keep pointing at node scripts/check-changeset-presence.mjs as the local self-check, which line 163 already does correctly).
Not asserted here
Whether AGENTS.md should restate the population in full or compress to "run the gate; its header is the rule" is a judgement about how much of a moving surface belongs in agent-facing text. Both were considered and neither is recommended from here — it is the kind of choice worth taking once rather than inheriting from a rider on an unrelated PR.
Found while implementing #6736 (widening
scripts/check-changeset-presence.mjsto read published-contract fields of a package manifest). Filed, not fixed there: AGENTS.md was outside that card's declared file surface, and the correct fix covers two separate widenings at once, so it is better taken deliberately than ridden in.What is stated
AGENTS.md line 161 states the rule the gate enforces:
src/is the whole population that sentence names.What the gate actually guards
The gate's population has been wider than that for two landings now, and this sentence tracked neither:
src/, OR it is the package-rootindex.htmlbuild entry, OR the package's ownfileslist publishes it verbatim (minus documentation and licences). On this tree that is three real files outsidesrc/—apps/console/index.html,apps/console/plugin.ts,packages/runner/index.html.sideEffects;exports,main,module,types;files;peerDependencies,engines) are compared by value across the diff, and a move in any of them owes a declaration even when no file undersrc/changed.So an author who reads AGENTS.md and reasons "I did not touch
src/, nothing is owed" gets the opposite answer from CI in two distinct ways.Why it is worth a card and not a silent patch
This is agent-facing text. AGENTS.md is an input to every seat, every session, so a rule stated too narrowly is not paid once — it is paid by every reader, and it is paid in the direction that produces a red CI run the author believes is a false positive. That is the same amplifier
scripts/check-shell-escape-residue.mjs's header records for its own class of bad agent-facing example.The gate's own docblock is the accurate statement of the rule in both respects; the fix is to make line 161 agree with it (and to keep pointing at
node scripts/check-changeset-presence.mjsas the local self-check, which line 163 already does correctly).Not asserted here
Whether AGENTS.md should restate the population in full or compress to "run the gate; its header is the rule" is a judgement about how much of a moving surface belongs in agent-facing text. Both were considered and neither is recommended from here — it is the kind of choice worth taking once rather than inheriting from a rider on an unrelated PR.