Skip to content

docs(agents): state the changeset gate's full population, not src/ alone - #7640

Draft
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-6997-agents-changeset-population
Draft

docs(agents): state the changeset gate's full population, not src/ alone#7640
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-6997-agents-changeset-population

Conversation

@claude

@claude claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #6997

Root AGENTS.md, one sentence under ### Housekeeping. Its two child bullets are unchanged: the first (do not judge by "feature yes, bug-fix no") and the second (the local self-check command) both still hold word for word against the widened rule.

改前 → 改后

the sentence
改前 改完代码提交时:只要改了发版包的 src/(.changeset/config.jsonfixed 组,含 apps/console),就必须新增一个 .changeset/*.md —— 这一条由 …
改后 改完代码提交时:只要改了发版包(.changeset/config.jsonfixed 组,含 apps/console)的已发布可执行源码 —— src/ 下的任何文件、包根的 index.html 构建入口、或该包 package.jsonfiles 列表逐字发布的文件(后两类减去 *.mdLICENSE*,src/ 下不减) —— 或者挪动了该包 package.json 里八个发布契约字段(sideEffectsexportsmainmoduletypesfilespeerDependenciesengines)之一的值(哪怕一个源码文件都没动),就必须新增一个 .changeset/*.md;判据的权威表述是 scripts/check-changeset-presence.mjs 的文件头,这段话与它不一致时以它为准 —— 这一条由 …

The tail after 这一条由 … is byte-identical in both rows: the enforcing workflow, pnpm changeset, the empty-frontmatter form, 要的是"声明一次",不是强制发版.

What the gate tests, clause by clause, and where each clause now appears

Read from the code on origin/main, not from the card. Reviewing this change is checking that every row's right-hand column is a faithful plain-words statement of its left-hand column.

gate, in code where it is now stated
isPublishedSource clause (a): the path is under the package's src/ — answers first and unconditionally src/ 下的任何文件
clause (b): the path is exactly the package-root index.html, the bundler's HTML entry compiled into the published dist/ 包根的 index.html 构建入口
clause (c): the package's own package.json files list publishes the path verbatim (exact entry, or a directory prefix of one) 该包 package.jsonfiles 列表逐字发布的文件
isDocumentation (*.md, LICENSE*) is subtracted from (b) and (c) only; clause (a) keeps its all-of-it reading 后两类减去 *.mdLICENSE*,src/ 下不减
CONTRACT_FIELDS: a value diff of eight named manifest fields, asked of package.json itself and independent of any changed file 挪动了该包 package.json 里八个发布契约字段(…)之一的值(哪怕一个源码文件都没动)
the guarded set is derived from the fixed group of .changeset/config.json unchanged parenthetical, kept as it stood
the script's header is the accurate statement of both halves 判据的权威表述是 scripts/check-changeset-presence.mjs 的文件头,这段话与它不一致时以它为准

The pointer and the plain statement are both there on purpose. The plain statement is what an agent applies before running anything; the pointer is what keeps this prose honest the next time the population moves.

The gate's header and its code agree on every clause and on all eight field names. One cosmetic difference, reported and not acted on: the header's shorthand for the licence exception is LICENSE*, while isDocumentation matches /^LICEN[SC]E/i, i.e. the British spelling too. The prose above follows the header's spelling. No change was made to the script.

Gates run on c20e2a8 (this PR's head)

gate exit its own verdict line
pnpm check:control-bytes 0 check-control-bytes: OK (scanned 6242 tracked text file(s); skipped 85 binary).
node scripts/check-changeset-presence.mjs 0 No source or published contract of a released package changed in this range, so no changeset is owed.
pnpm check:shell-escape-residue 0 check-shell-escape-residue: OK (5/5 root(s) resolved -- AGENTS.md: 1 file(s), 15 fence(s); …)
pnpm check:governed-queue-guard 0 OK check-governed-queue-guard self-test: 132 cases pass
pnpm check:doc-fences 0 check:doc-fences — every TypeScript block in 227 document(s) is fenced ts/tsx/typescript …
node scripts/check-doc-links.mjs 0 Links are valid across 17 scan roots.

No changeset is added, and that is the gate's own answer quoted above rather than a judgement: this repository has no skip-changeset mechanism, so check-changeset-presence.mjs alone decides, and for a root AGENTS.md-only diff it decides nothing is owed.

Not run, with the reason: check-links.yml drives lychee over external URLs and this change adds none; ci.yml and lint.yml start on a markdown-only PR but their in-job "needs a full run" switch excludes **/*.md, so their expensive steps skip; the live leg of governed-surface-guard.yml needs the PR and the API and is CI's to run.

🤖 Generated with Claude Code

https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox


Generated by Claude Code

…alone

The Housekeeping sentence named `src/` as the whole population. The gate reads
wider in two independent ways: `isPublishedSource` has three clauses (the
package's `src/`, the package-root `index.html` build entry, and any path the
package's own `package.json` `files` list publishes verbatim — the latter two
minus `*.md` and `LICENSE*`), and `CONTRACT_FIELDS` asks a second question of
the manifest itself, where a value move in any of eight published-contract
fields owes a declaration even when no source file changed.

A reader who applied the old sentence and concluded "I did not touch `src/`,
nothing is owed" got the opposite answer from CI. The sentence now states the
population in plain words and names the script's own header as the
authoritative statement, so the prose stays honest when the gate moves again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

finding(docs): AGENTS.md states the changeset rule as src/ only — already narrower than the gate since #5733, and narrower again after #6736

1 participant