docs(pm-dispatch): require a positive control and short anchors in Re-check greps - #13106
Queued
os-litant wants to merge 2 commits into
Queued
docs(pm-dispatch): require a positive control and short anchors in Re-check greps#13106os-litant wants to merge 2 commits into
os-litant wants to merge 2 commits into
Conversation
…-check greps A card's `Re-check` grep quotes the author's full remembered sentence, but the same sentence is line-wrapped in the source file, so `git grep` matches nothing and the next reader reads that zero as "already gone, nothing to fix". Measured three times in one lane, plus a fourth defect stacked on the same command: a verbatim quotation whose case did not match the tree. The rule lands on the filing side, in the 落卡与裁决记录细则 section that holds the references detail for the main file's "每条前提行自带一条 re-check 命令": every grep carries a positive control from the same file, and a zero without a passing control is recorded as 没读到 rather than 不存在. The control is the one remedy that covers BOTH defects, because it does not ask the author to predict which mistake they made. Anchors take the shortest non-wrapping fragment. Net-0 against the file's ratchet, paid by three cuts whose content survives at a named source; no re-wrap harvesting. Claude-Session: https://claude.ai/code/session_01MnijPVVDakqK2J335JoJtq Co-authored-by: Claude <noreply@anthropic.com>
…check-anchor-discipline
This was referenced Aug 29, 2026
This was referenced Aug 29, 2026
os-zhuang
approved these changes
Aug 29, 2026
os-zhuang
marked this pull request as ready for review
August 29, 2026 08:18
os-zhuang
added this pull request to the merge queue
Aug 29, 2026
Any commits made after this event will not be 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 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 #12671
A card's
Re-checkgrep quotes the author's full remembered sentence. That same sentenceis line-wrapped in the source file,
git grepmatches line by line, and the commandreturns zero on a tree where the text is entirely present. The next reader takes the zero
as authoritative absence — "already gone, nothing to fix". That is worse than shipping no
command at all: it is a real re-check step carrying a broken instrument, and the zero it
prints looks like a reading.
The three measured instances
Re-checkgrep, quoting a full comment sentence inpackages/rest/src/rest-server.ts:9656-9657, split across a wrap. Positive controlsendErrorin the same file = 7, so the tool was not broken.*.tspackages/rest/src/package-door-declared-code.test.ts:91-92, and simultaneously OVER-counted, because the site had entered the list through an earlier bare-token search. Wrong in both directions at once.Re-checksection never reads it. The defect is the FILING TEMPLATE, not the authors' memories.A fourth defect, measured on the same demo command, is why clause 1 below is the remedy
and clause 2 is only its companion: that verbatim grep also mismatched on CASE. Broken
down over
*.tsby matching files — contiguous1, case-insensitive7, wrap-tolerant13— the two defects contribute roughly half each. A positive control catches both,because it does not ask the author to predict which mistake they made. An anchor rule
alone catches only the wrap.
What landed
One bullet in
.claude/skills/pm-dispatch/references/dispatch-runbook.md, section落卡与裁决记录细则:Re-checkgrep carries a POSITIVE CONTROL from the same file — a word certain toexist, and never a substring of the term under test. A zero whose control did not pass
is recorded as
没读到, never as不存在.The wrap-tolerant multiline form was deliberately NOT prescribed. The card rates it the
costliest and most error-prone of its three candidates, and it treats only the wrap.
Why this file
SKILL.mdstates the parent clause —卡上每条前提行自带一条 re-check 命令— under落卡/升级流程①. Its siblings already have references homes (② points atdecision-analysis.md, ③ at this runbook's落卡与裁决记录细则); ① had none, and thissection is the one a seat has open at the moment it files a card.
decision-analysis.mdwas the other candidate and was rejected on scope: its
适用面bounds it toneeds-user-decisioncards, while all three measured instances are finding and businesscards.
Two files were named as serially occupied by in-flight PRs and neither was touched:
SKILL.mdandreferences/landing-operations.md.Ratchet
Net-0, no ceiling raised, no re-wrap harvesting.
.claude/skills/pm-dispatch/references/dispatch-runbook.mdThe 120-byte line rule caught one intermediate mistake worth recording: the replacement
line for the third cut landed at 160 bytes. Its predecessor had been exempt only because
a
「…」quotation spanned the lines; closing the quotation on a single line dropped theexemption. Tightened to 115 bytes, and the gate is green on the final tree.
Cut ledger
Every cut verified to survive at a named source before removal.
裁决记录四件补遗items ② and ④SKILL.md落卡/升级流程③四件同笔carries all four:状态转换同笔(…换结果态,永不留挂)and条件已判即判(输入已知的就地判掉). The result-state label enumeration is the SKILL.md state table plus the发现分诊轮line. Item ① is genuinely an addendum and was kept.pnpm install --workspace-concurrencytoolchain sentence, stapled to the end of the two-readings bullet.claude/agents/os-dev.mdToolchain traps, which carries it in full — the refusal, the error text, and the point thatinstallis a new worktree's first command. The dev runs that command, not the PM.条件性标准条款.claude/agents/os-dev.mdstandard clause拒收类用例断言信封,不断言 throw 本身—code+status, the ADR-0112 envelope, the baretoThrow()refusal, and the message-first-sentence rule. The one part with no other home, the no-backfill boundary, is retained verbatim in the one-line replacement.Gates
Union derived on the final commit
f6eeae1d6withnode scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack— 7 families, nopaths passed by hand, derived after the merge of
origin/mainso the stale-tree warningfrom the first derivation is cleared. Exits captured by redirect before any pipe.
check:pm-skill-ratchet✓ check-skill-line-ratchet: …/dispatch-runbook.md is 274 lines (ceiling 274; headroom 0).check:pm-skill-id-lint✓ check-skill-id-lint: 23 file(s) clean (pattern /#[0-9]{3,}/g).check:skill-frame-sync✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 filescheck:doc-authoring✓ doc authoring guard: 48 published skill files clean — no internal issue-id references.check:agent-test-spelling--self-testcheck:pm-governed-merges✓ check-governed-merges --self-test: 206 assertionscheck:doc-formula-expressions✓ check:doc-formula-expressions: 22 record-scoped formula example(s) across 425 files / 1453 TS blocks judged cleancheck:nul-bytescheck-nul-bytes: OK (scanned 7285 text file(s) … no raw ASCII control bytes).check:doc-formula-expressionsfirst exited 1 withPREREQUISITE NOT METon two unbuiltworkspace packages. That is not a red gate and nothing was measured by it; both packages
were built under the shared verify lock and the gate then ran and passed.
check:nul-bytesis not in the derived union — it is owed by any edit — and the edited file was also swept
directly for raw control bytes, no hits.
No changeset: the diff is
.claude/**only and publishes nothing.skip-changesetappliedat PR-open by read-union-write plus a comparison read-back.
One question left for the maintainer
The card itself raises it and it is recorded here rather than acted on: it asks whether it
should be merged into the earlier card that already named the wrap-tolerance problem, on
the grounds that its own value is the three measured instances rather than its separate
existence. That other card is
#12454; it remains open, its own three citation sites arestill outstanding, and nothing here touches it. The distinction that argues against
merging is that the other card repairs three citations while this one repairs the tool
habit that turns those citations into false zeros.
Generated by Claude Code
Generated by Claude Code