Uh oh!
There was an error while loading. Please reload this page.
docs(agents): state commit-then-revert as the required order for reverse verification (#4301) - #4339
Merged
Conversation
) Reverse verification (remove the fix, watch the predicted pins go red, restore) is standard in this repo's dev loop, but AGENTS.md never said when to commit. Twice on 2026-08-11 an agent ran the removal step against UNCOMMITTED work — #4278 (PR #4293) and #4243 (PR #4299) — and the edits were gone, recoverable only by replaying the session transcript. The restore only works against a commit that exists, and `git stash` is banned here for the shared-stack reasons CLAUDE.md documents, so the working tree is the only copy. State the order explicitly. 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
marked this pull request as ready for review
August 11, 2026 17:40
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 11, 2026
Merged
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.
Closes#4301
One bullet added to
AGENTS.md. No code, no other files.Where it landed, and why not where the card pointed
The card asked for "the verification/reverse-verification section of AGENTS.md (and/or the worktree section, wherever the revert idiom
git checkout origin/main --is shown)". Measured againstorigin/mainfirst: AGENTS.md contains no such section and does not show the revert idiom at all — it has no occurrence ofcheckout origin/main,stash,revert, or a reverse-verification ladder. Repo-wide, that idiom and the stash ban live in exactly three places, none of them AGENTS.md:CLAUDE.md— the stash ban plus the three sanctioned substitutes.claude/hooks/guard-shared-stash.shand its selftestSo the paragraph went to the card's own stated fallback, the worktree section: §9 Operational Rules → 多 agent 协作纪律, immediately after the shared-file commit-hygiene bullet (
编辑→git add→commit 一气呵成) and before the merge-queue bullet. That is the same family — the bullets around it are the ones about not losing your own in-flight work — and it is where the mandatory-worktree rule already sits, which is the rule an agent is following when it reaches for a rawcheckout.Language
The target section is Chinese throughout, and Commandment #-1 explicitly exempts this instruction file's operational sections from the English-only rule ("this rule governs the codebase; this instruction file may use Chinese in operational sections"). The paragraph is therefore written in Chinese to match the surrounding bullets, with the git commands verbatim in English as every neighbouring bullet spells them. Citation form follows the file's existing style (
#3193,objectui#3430,先例 PR #3458).The added text
Placeholders are shown spaced below (
< path >) only because GitHub's body sanitizer eats a<followed by a letter — the issue body itself lost its placeholders that way. The file carries the normal unspaced form; see the diff for the exact bytes.The stash clause points at CLAUDE.md rather than restating the ban, since that is where it is documented and duplicating it would create a second copy to drift.
The two incidents were verified, not copied
Both cited PRs were read at their merged state rather than taken from the card:
type: 'form'action fired from a record opens an empty CREATE form —/forms/:nameignores the?recordId=ActionRunner forwards #4278, merged 11:50Z) — its own body records the reverse verification againstFormPage.tsx, 11 red / 2 green.git checkout origin/main -- ListView.tsx", 6 red / 3 green. This is the run that was redone after committing, which is the detail the last sentence of the paragraph preserves.Verification
Docs-only, so the gates that touch this surface — not a whole-repo sweep:
Plus a self-scan beyond the gate for control bytes in the edited file (
grep -naPover the C0 range plus0x7f) — no match.No changeset, on the gate's own verdict quoted above: the guarded surface is the
src/of packages in thefixedgroup of.changeset/config.json, and a repo-root markdown file is not in it. Nothing is released by this PR, so there is nothing to declare.Diff is one line:
1 file changed, 1 insertion(+).Generated by Claude Code