Repository navigation
Commit af2221d
docs(agents): port objectstack's model-free commit-trailer rule into the multi-agent section (objectui#9441) (#10922)
Fixes #9441
Clause-②: no — `AGENTS.md` is an agent-facing convention, not a
published contract, accept set or public surface
## What
objectui's root `AGENTS.md` gains objectstack's model-free
commit-trailer rule, as ruled on the card (ruling A, comment 5724938982,
text only, no hook). One new bullet in `### 多 agent 协作纪律(并行修改本仓库,务必遵守)`,
placed right after the bullet that begins 「每次 commit/push 前先确认当前分支」,
which is that section's commit-hygiene neighbour.
- The two sentences of objectstack `AGENTS.md`'s paragraph beginning
`**Commit message:**` are quoted verbatim, with exactly one clause
removed: `, and the pre-push hook refuses a model identifier in that
pair`. objectui has no such hook and the ruling adds none (option B was
declined).
- A short warning says, per commandment #9, that nothing in this
repository enforces the rule, that it works through the harness's own
precedence sentence (the ruling's words are quoted), and that squash
landing keeps `Co-authored-by` (pointing at objectui#9666).
objectui#9666 remains open: its ruling-C sentence (the cross-repo
force-push line) is a separate card, serialised after this one by the
claim.
## Premise checks (on `origin/main` 733fd5a, before editing)
- **H1, objectui carries none of the rule.** `git grep -n -iE
'Claude-Session|model-free|Co-authored-by' BASE -- AGENTS.md CLAUDE.md`
exit 1, zero lines. Control: `git grep -c AGENTS BASE -- AGENTS.md`
answers 5, exit 0.
- **H2, the source text.** objectstack `origin/main` df3ba164, the
paragraph anchored by `**Commit message:**`. The port was compared
mechanically: source paragraph whitespace-flattened, the one clause
removed (it occurs exactly once), result byte-equal to the new quote
line: `MATCH`.
- **H3, no hook in objectui.** No `.githooks/`, no `core.hooksPath`, no
husky / lefthook / simple-git-hooks key in `package.json`, and no file
under `.github`, `scripts` or `.claude` names `Co-authored-by` or
`Claude-Session` (git grep exit 1). Control leg: objectstack's
`.githooks/pre-push` pipes the pushed refs into
`scripts/check-commit-card-trailers.mjs`, whose header names "a model
identifier in the trailer pair" as its second finding class.
- **H4, placement.** The multi-agent discipline section exists under the
heading above; the bullet sits with the other commit/push bullets.
- **The squash claim.** The last 40 commits on `main` are all
single-parent squash landings: 40 carry a `Co-authored-by` line, 0 carry
`Claude-Session`, and none names a model. That count is today's reading
and is deliberately NOT written into the file (commandment #9); the file
points at objectui#9666 instead.
## Verification, at `4259546d`
| check | exit | verdict line |
|:--|--:|:--|
| `node scripts/check-control-bytes.mjs` | 0 | `check-control-bytes: OK
(scanned 9180 tracked text file(s); skipped 85 binary).` |
| `node scripts/check-new-cross-file-line-citations.mjs` | 0 | `VERDICT
new-cross-file-line-citations: 0 new citation(s), enforcement
report-only -> exit 0` |
| `node scripts/check-shell-escape-residue.mjs` | 0 | `OK (5/5 root(s)
resolved -- AGENTS.md: 1 file(s), 15 fence(s); ...)` |
| `node scripts/check-doc-links.mjs` | 0 | `Links are valid across 17
scan roots.` |
| `node scripts/check-changeset-presence.mjs` | 0 | `No source or
published contract of a released package changed in this range, so no
changeset is owed.` |
| `node scripts/check-governed-queue-guard.mjs --test AGENTS.md` | 3 |
`GOVERNED — 1 of 1 path(s) are on a governed surface` (so: draft,
waiting for an authorized approval) |
- **Tests that read `AGENTS.md`**, derived from the ledger rather than
recalled: `markdownTestInputsAmong(['AGENTS.md'])` in
`scripts/markdown-test-inputs.mjs` names five readers (entries `./*` and
`AGENTS.md`). All five ran in one call, `pnpm exec vitest run
--maxWorkers=2` over `check-doc-links`,
`check-installed-spec-pin-claims`, `check-required-check-set`,
`check-shell-escape-residue` and `dollar-dialect-alias-census` (all
under `scripts/__tests__/`): `Test Files 5 passed (5)`, `Tests 260
passed (260)`, verify-lock `VERDICT command-exit 0`.
- **Control-byte self-scan** over the diff: `grep -naP` for C0/DEL bytes
exit 1 (no hits); control leg on a constructed byte, 1 hit.
- **Not run locally, owned by CI:** `pnpm lint` (repo-wide; this diff
touches no linted source) and the full `pnpm test`.
- No changeset: the gate above says none is owed, and `AGENTS.md` ships
in no package.
## Acceptance notes
- This branch's only commit ends with the model-free pair it describes
(`Claude-Session` + `Co-authored-by: Claude`). The harness's attribution
reminder in this session asked for a model-named co-author line; the
commit followed the rule instead. That is the precedence the ruling
relies on, used once.
- Observation, not filed: once this lands, its squash commit is a free
reading for the question objectui#9666 left open (does the squash
composer drop `Claude-Session`, or did those seats never write one?).
The branch commit carries both lines. Carrier: the seat that lands this
PR.
Session: `https://claude.ai/code/session_01EBx9rvB7dufCz4at53x35U`
## 维护者速读(草稿)
**改了什么**:在 objectui 根目录 `AGENTS.md` 的「多 agent 协作纪律」一节里加了一条:agent
的提交信息结尾统一用两行不带模型名的署名(会话链接 + 通用的 Claude
共同作者),PR、评论、changeset、文档和代码注释里也不写模型名。正文直接照抄 objectstack 仓已有的同一条规则,只删掉了「由
pre-push 钩子拦截」那半句,因为本仓没有、也不加这个钩子。
**为什么改**:objectstack 仓早已写明这条规则,objectui 的 `AGENTS.md` 却一个字没提,在本仓干活的
agent 就可能照着工具的默认提示写上模型名;而合并时这行署名会原样进入 `main` 的历史,事后不改写。您 9 月 18
日在本卡上裁定方案 A:只补文字,不加门禁。
**风险与代价(含回滚)**:只改给 agent 读的说明文字,不影响任何代码、测试或发版。代价是本仓仍然没有机械拦截,效果取决于 agent
读到并照做;另外两个仓各存一份同文规则,以后改一边要记得同步另一边。回滚:revert 本 PR 唯一的那个 commit(5 行)即可。
**席位意见**:
**你要做的**:看一眼这 5 行 diff,同意就在本 PR 上点 Approve;之后翻 ready、入队由席位完成。
---
_Generated by [Claude
Code](https://claude.ai/code/session_01EBx9rvB7dufCz4at53x35U)_
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: 黄怡 <huangyi@hotoa.com>1 parent dd3f7e1 commit af2221d
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
325 | 330 | | |
326 | 331 | | |
327 | 332 | | |
| |||
0 commit comments