Teach the shared-refs family rule at recipe level (worktree isolates tree and HEAD only) - #11137
Merged
Merged
Conversation
…atform-readings git worktree isolates the working tree and HEAD, and nothing else under .git/ — refs (including refs/remotes/*), the stash stack, config and hooks are common to every worktree. os-dev.md now states the family rule once (folding the stash clause into it), records BASE=$(git rev-parse HEAD) at branch time in the worktree recipe, and anchors "where I started" reset/diff/log/rebase to the recorded "$BASE", never to origin/main — a shared pointer another agent's fetch advances, whose soft reset stages their merged files as yours while reporting success. platform-readings gains the measured fact row. Ceilinged files pay by in-file deletion of genuine duplicates and land exactly at their ceilings (399, 134). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsbKEG4LtERSLaDrbehM3e
Contributor
Author
PM 验收 — ACCEPT(终态)复核:席位 session_01MsbKEG4LtERSLaDrbehM3e 全 diff 审毕(+17/−13 两文件)。裁定范围逐项落地:家族规则(worktree 只隔离工作树与 HEAD, 治理面终态:draft 保持,仅维护者合并;已指派。 Generated by Claude Code |
This was referenced Aug 22, 2026
os-zhuang
marked this pull request as ready for review
August 23, 2026 00:37
os-zhuang
pushed a commit
that referenced
this pull request
Aug 23, 2026
…3 maintainer ruling The merge group for this PR went red on check-skill-line-ratchet: os-dev.md composes to 401 lines against main (which #11112 took to 395), and to 405 once the queued #11137 (395→399) lands ahead of it — each PR green alone, over the ceiling only in composition. Maintainer ruling, 2026-08-23, on this PR (option B of the three put to them, verbatim): 「B:提天花板 399→405」 — keep the +6-line cross-repo caveat and raise the ceiling, quoted in the PR body as the ratchet requires. Sized to exactly 405 so headroom returns to zero once both queued PRs land. Gate + 19-case self-test green at this commit. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsbKEG4LtERSLaDrbehM3e
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 #10743
What
Teaches the family rule at recipe level, per the grading scope:
git worktreeisolates the working tree and HEAD, and nothing else under.git/— refs (includingrefs/remotes/*), the stash stack, config, hooks are common to every worktree. A recipe is worktree-safe only if it never names shared state..claude/agents/os-dev.md(395 before, 399 after, ceiling 399):BASE=$(git rev-parse HEAD)before any work.git status) stated once for both instances. It adds the shared-pointer hazard —git reset --soft origin/mainstages other agents' merged files, landed after your branch point, as yours (measured shape: four agents' merged files staged by one soft reset, caught pre-commit) — and the discipline: "where I started" reset/diff/log/rebase anchor the recorded"$BASE"..claude/skills/pm-dispatch/references/platform-readings.md(134 before, 134 after, ceiling 134 — zero headroom):refs/remotes/origin/main, the soft-reset failure shape, and the recorded-base-sha discipline.ls-remotespelling (kept verbatim in the zero-cost-equivalents row, now pointed to) and the positive-hit-sufficient reading (also carried by the enable-verify sequence). The queue-saturation boundary fact is retained; no fact or safe procedure deleted.Conditional surfaces — no carrier spelling found
Grepped
AGENTS.md,CLAUDE.md, pm-dispatchSKILL.mdand the dispatch runbook for recipes anchoringorigin/mainas an implicit "where I started": every hit is either a deliberate read of current main (premise verification,git merge origin/mainin merge-queue context, same-day churn scans) or an already-taught hazard description (the checkout-from-ref clauses). Their stash-alternative recipes anchorHEAD~1/ implicit HEAD, which is worktree-safe. Per the adjudicated scope, no new sections were added to those files.Verification
All 8 derived gate families green at head
194dcb7e9(union re-run after the final commit;node scripts/pm/dispatch-gates.mjswith no hand-fed paths derived the set):check:pm-skill-ratchet— "✓ check-skill-line-ratchet: .claude/agents/os-dev.md is 399 lines (ceiling 399; headroom 0)." and "✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/platform-readings.md is 134 lines (ceiling 134; headroom 0)."check:pm-skill-id-lint— "✓ check-skill-id-lint: 17 file(s) clean (pattern /#[0-9]{3,}/g)."check:doc-authoring— "✓ doc authoring guard: 389 files clean — no bare metadata literals."check:nul-bytes— "check-nul-bytes: OK (scanned 6446 text file(s) ...)" plus the extra-gate control-byte self-scan on both touched files (no hits).check:agent-model-declared,check:pm-governed-merges,check:skill-frame-sync,check:doc-formula-expressions— all self-tests and scans green (verdict lines in the report comment).Docs-only
.claude/change: no changeset;skip-changesetlabel applied via the additive POST with read-back after bots settle.Governed surfaces — draft PR, human merge only.
Generated by Claude Code
Generated by Claude Code