Uh oh!
There was an error while loading. Please reload this page.
docs(agents): state the git stash ban in AGENTS.md §9 as a rule of its own - #4448
Merged
Merged
Conversation
…s own AGENTS.md declares itself the single source of truth read natively by non-Claude agents, yet the shared-stash ban lived only in CLAUDE.md — the excerpt file — and AGENTS.md's reverse-verification paragraph pointed out to it. Promote the ban into §9 beside the worktree rule (the ban, the shared refs/stash rationale, the objectui#3430 incident, the sanctioned substitutes, the hook), turn the parenthetical into an in-file pointer, and make CLAUDE.md's closing pointer resolve. Fixes#4340 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
commented
Aug 12, 2026
CollaboratorAuthor
ACCEPT — PM 复核 (session
Flipping ready + arming auto-merge. Generated by Claude Code |
yinlianghui
marked this pull request as ready for review
August 12, 2026 08:59
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 12, 2026
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 freeto 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#4340
Docs-only. The shared-stash ban lived only in
CLAUDE.md— the excerpt file — whileAGENTS.md, which declares itself the single source of truth "read natively by Claude Code, GitHub Copilot, and other agents", never stated it. The pointer between the two did not resolve in either direction:CLAUDE.mdclosed with "See AGENTS.md for the full playbook", and the canonical file's own reverse-verification rule deferred back out with 见 CLAUDE.md. So the full playbook was the file that did not have the rule, and the non-Claude readers named on line 3 metguard-shared-stash.shas an unexplained Bash block.Pointer topology
AGENTS.md§9git stash一律禁用(共享 stash 栈,见 CLAUDE.md)refs/stashrationale, objectui#3430, the sanctioned substitutes, the hook and its escape hatchAGENTS.mdreverse-verification ruleCLAUDE.mdCLAUDE.mdOne canonical statement plus an in-file pointer — no second drift-capable copy.
CLAUDE.mdkeeps its stated purpose ("the one rule that must never be missed is inlined here"); only its last line moved, to make the pointer honest.objectstack#7800 avoidance
That card is the content defect in the same doc family: the first substitute recipe in objectstack's copy overwrites the working tree from a ref, which silently destroys uncommitted work in exactly the reverse-verification situation it is offered for. It was deliberately not imported here. The promoted block:
git commit -am wip, restore withgit reset --soft HEAD~1);CLAUDE.mdnever had the hazardous line, so promotion needed no filtering, only ordering;The one surviving occurrence of that overwrite form in
AGENTS.mdis the pre-existing reverse-verification rule, where it appears as the hazard being warned against, not as a recipe. Unchanged.Not touched
.claude/hooks/guard-shared-stash.shand its selftest — the behavior already lives there; this card was the missing prose. No code, no hook, no workflow: the diff is prose in two markdown files.Verification
node scripts/check-doc-links.mjs—Links are valid across 13 scan roots.node scripts/check-skills-paths.mjs—OK (84/85 stated path(s) resolve across 18 guide file(s); 1 baselined)— no regression in AGENTS.md path claims.node scripts/check-control-bytes.mjs—OK (scanned 4152 tracked text file(s); skipped 85 binary); plus a targeted control-byte self-scan of both edited files (no hits).node scripts/check-changeset-presence.mjs—No source of a released package changed in this range, so no changeset is owed.The presence gate self-determines; none added.pnpm exec vitest run --maxWorkers=2over the five suites that read these two files (check-doc-links,check-skills-paths,check-control-bytes,check-changeset-presence,site-next-agent-files-4160) —Test Files 5 passed (5) / Tests 193 passed (193). No suite pins the old pointer shape, so zero pins moved.AGENTS.mdas one rule; the reverse-verification parenthetical points in-file;CLAUDE.md's pointer names §9; and the hazard guard for #7800 confirmed the overwrite-from-ref form appears nowhere as a recommendation.Generated by Claude Code