docs(agents): principles-only AGENTS.md rewrite — lessons distilled in place, no issue-ID citations - #7948
Merged
Merged
Conversation
… no issue-ID citations Rewrite per the same three-way sorting rule as the SKILL.md / os-dev.md rewrites: mechanically-enforced rules shrink to principle + script pointer (the script header is the authority on detail); incident narratives and procedural walkthroughs are distilled in place as self-contained lessons (failure mode + discipline + boundary) with zero issue-ID citations; operational lookups (commands, tables, markers) stay as data. All 15 Prime Directives survive whole; maintainer rulings keep date + verbatim quote; section names, the numbered discipline list and its section anchors, and the RELEASE-OWNED guardrail row that check:docs-audit-scope anchors on are preserved. 1050 -> 818 lines, 84.7KB -> 66.9KB, 123 -> 0 issue-ID citations. CLAUDE.md's mirrored rules updated in the same PR (two ID-carrying passages distilled to match). check:pm-skill-id-lint's scan set extended to AGENTS.md — no waiver needed since the rewrite and the scan-set extension travel together; the dead os-dev.md legacy waiver entry (which would have re-admitted exactly 81 IDs) is deleted and the self-test now exercises the waiver mechanism with a synthetic entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Gg6rMAti8ZaueWb6BRsDn
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
os-zhuang
marked this pull request as ready for review
August 12, 2026 08:33
Contributor
Author
|
同意合并 |
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.
Fixes #7943
ADR-class (repo-wide agent governance): draft PR, human merge — no auto-merge, no queue entry.
What this is
The AGENTS.md principles-only rewrite under the 2026-08-12 rulings (「只需要说原则,不需要写细节」;「保留 issue id没有意义」), applying the same three-way sorting rule as the SKILL.md and os-dev.md rewrites:
Measured: 1,050 → 818 lines; 84,665 → 66,935 chars (−21%); issue-ID citations 123 → 0.
Invariants deliberately preserved
check:docs-audit-scopeanchors on it (assertGuardrailAnchored); the gate and its self-tests run green on this branch.ID-lint scan-set extension (same PR)
scripts/pm/check-skill-id-lint.mjs:AGENTS.mdadded toEXTRA_FILES. No legacy waiver needed — the rewrite and the scan-set extension travel in one PR, so there is no merge-order dependence (with both batch PRs from one dispatch, going straight to zero was preferred over the waiver pattern). Adjacent one-line cleanup blessed by the script's own header: the deados-dev.mdlegacy entry (81) is deleted — it had become worse than dead weight, since it would still have passed a file that re-acquired exactly 81 IDs — and the self-test now exercises the waiver mechanism with a synthetic entry plus a new case asserting the scanned files carry no waiver. Self-test: 10/10 green.Dropped-with-rationale list (for line-by-line review)
Nothing below removes a rule; each entry is narrative/measurement whose normative content survives in distilled form:
objectui#NNNN,cloud#NNN, "today #NNNN") — per the 2026-08-12 ruling; lessons restated self-contained.switch).sys_member.rolereversal → "a reversal of three accepted ADRs… held for a day".merge_groupruns), per-incident timestamps of the eject/re-arm and armed-red cases, the advisory-red incident chain → principles ("full suite vs affected-only", "armed red hides", "advisory rides through") kept with the 2026-08-07 required-set ruling; the unmeasured-405 note kept in one sentence.distgate's design history → "content-hash, never mtime" + the existence-not-freshness caveat.merge=os-regenpath list and the still-single-file list → pointer to.gitattributes+check:merge-driver(which reconcile both directions mechanically) andsharded-artifacts.ts; the 310KB-conflict incident → one clause.check:dual-source-exports/check:exported-any/ react-parity / sdui-manifest cautions all kept, shorter.unfixed-degradation/reviewed-legitimate) summarized as "read the entries and their reasons, never the count" (the kinds are defined in the script)./data-surface names → generalized ("a retired duplicate data surface"); the three re-learned invariants kept.Gates (local, honest readings)
check:pm-skill-id-lint— green, now 9 files incl. AGENTS.md at 0 citations (self-test 10/10)check:pm-skill-ratchet— green (SKILL.md untouched by this PR; 686/686)check:skill-frame-sync— green (4 copies isomorphic)check:doc-authoring— green (375 files)check:nul-bytes— green (7,279 files)check:docs-audit-scope— green (guardrail anchor + 22-case self-test + release-owned routing), run because it anchors on this fileGenerated by Claude Code