Skip to content

docs(agents): point the push step at the pre-push card-trailer refusal - #17752

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-17727-os-dev-pointer
Sep 12, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/issue-17727-os-dev-pointer

Conversation

@claude

@claude claude Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #17727

One clause added to .claude/agents/os-dev.md, on the push step, pointing at the pre-push card-trailer refusal that PR #17745 adds. The file already carries the rule (「卡片关系只在 PR 正文声明一次:commit ⛔ 不带卡片 trailer,其 trailer pair 一律 model-free。」); what it did not carry is that a hook now refuses the push over it.

The line, before and after:

- 用 `git push -u origin claude/issue-<n>-<slug>` 推上去,网络失败退避重试。
- 用 `git push -u origin claude/issue-<n>-<slug>` 推上去,网络失败退避重试;pre-push 拒卡片 trailer。

Line budget. The file is at 403/403 with zero headroom (pnpm check:pm-skill-ratchet), and the ratchet's ceiling is maintainer-only. The clause therefore costs NO line: it rides the existing push line, which grows 88 → 115 bytes, under the file's 120-byte widest-line convention. Nothing was deleted to pay for it, and no line was re-wrapped to free one. After the edit: .claude/agents/os-dev.md is 403 lines (ceiling 403; headroom 0) — green.

This is deliberately a separate PR from the code half: .claude/** is a governed surface, so this one waits for a human merge while #17745 lands through the queue. node scripts/pm/check-governed-merges.mjs --test .claude/agents/os-dev.md⛔ GOVERNED — a human merge is the review record for this PR.

Gates run locally on this diff (derived with node scripts/pm/dispatch-gates.mjs --commands, 17 commands, all exit 0): check:pm-skill-ratchet, check:pm-skill-id-lint, check:agent-model-declared, check:agent-test-spelling, check:doc-authoring, check:nul-bytes, check:partof-closing-keyword, check:pm-governed-merges, check:skill-frame-sync, check:watch-hint-literal, check:refd-timer-probe, check:driver-memory-census, check-closing-keyword-parity (+ self-test), check-comment-mask-corpus, check-governed-queue-guard --self-test, and check:doc-formula-expressions (exit 3 PREREQUISITE NOT MET until @objectstack/formula and @objectstack/lint were built, then exit 0).

维护者速读(草稿)

改了什么.claude/agents/os-dev.md 的推送那一行加了半句:pre-push 拒卡片 trailer。仅此一处,不增行。

为什么改 — 裁决 A(#17606 决策批次 #116)把 commit 卡片 trailer 的检查从 PR 时移到推送前。规则本来就写在这个文件里,但执行它的机制没有写:dev 读到「commit 不带卡片 trailer」,不知道推送会被钩子拦下,也就不知道此刻的修法是便宜的(改写未推送的 message),而不是推完之后无解的那种。这一句把规则和它的执行点连起来。

风险与代价(含回滚) — 风险极低:纯说明文字,不改任何行为;真正的机制在 #17745。行数账本未动(403/403),未删任何既有内容,未靠折行腾行。回滚就是回退这一个 commit;若 #17745 未落地而本 PR 先合,这半句会指向一个尚不存在的钩子 —— 因此建议在 #17745 落地后再合本 PR。

席位意见

你要做的 — 读这半句是否值得占那 27 字节;确认它指向的机制(#17745)已落地或即将落地;人工合并本 PR(受管面,任何 AI 席位都不得合并、入队或武装自动合并)。


Generated by Claude Code

The rule that a commit carries no card trailer is stated in this file; what it
did not say is that a hook now refuses the push over it. One clause, on the
push line where a dev meets it, at no line cost: the file stays at its 403-line
ceiling and no existing content was dropped to pay for it.

Claude-Session: https://claude.ai/code/session_01MCLBsUgfykL74aU716rzVK
Co-authored-by: Claude <noreply@anthropic.com>
@claude

claude Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

维护者速读(终稿)

改了什么 — 在 os-dev 开发代理契约(.claude/agents/os-dev.md)的「推送」那一行末尾加一句「;pre-push 拒卡片 trailer。」——告诉 dev:本仓的 pre-push 钩子现在会拒绝 commit message 里带卡片关系(Fixes #N / Part of #N / Refs #N,以及 trailer 位置的裸 #N)的推送。规则本身该文件早就有(「卡片关系只在 PR 正文声明一次:commit ⛔ 不带卡片 trailer」),缺的只是「有钩子会拦」这一句。文件 403/403 行,零行成本:这句挂在原有推送行上(88 → 115 字节,120 字节以内),没删内容、没重排。

为什么改 — 你在 #17606 + #15913 批 A 裁了:squash 提交信息改取 PR 正文,commit 不再承载卡片关系。代码半边(PR #17745:pre-push 钩子 + Part-of: 冒号漏网修补 + PR 时门禁去掉读 commit 列表的 RULE 2)由本席按纯代码走队列落地;.claude/** 是受管面,这一句单独成 PR 交你人工合并。

风险与代价(含回滚) — 一行一句,棘轮门 403/403 绿,id-lint 绿,受管面判定 GOVERNED 是预期。唯一耦合:代码半边的自检把该文件里那句「卡片关系只在 PR 正文声明一次…」逐字钉住,今后改那句话会让 lint 变红——这是有意的引用钉,不是这一 PR 改的那行。回滚 = revert 本 PR。

席位意见 — 席内按契约复审档复核通过,建议合并;先后无所谓,与 PR #17745 不冲突。

你要做的 — 受管面:请人工合并 PR #17752(本席不翻 ready、不入队、不挂 auto-merge)。


Generated by Claude Code

@claude
claude Bot requested review from hotlong and os-zhuang September 12, 2026 02:36
@os-zhuang
os-zhuang marked this pull request as ready for review September 12, 2026 02:44
@os-zhuang
os-zhuang enabled auto-merge September 12, 2026 02:45
@os-zhuang
os-zhuang added this pull request to the merge queue Sep 12, 2026
Merged via the queue into main with commit 813f8e9 Sep 12, 2026
35 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-17727-os-dev-pointer branch September 12, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs-user-decision size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants