Skip to content

Commit 9b8c74c

Browse files
docs(pm-dispatch): a dispatched PR carries its card's assignee — set at pr_create, moved on takeover (#20066)
Fixes #20063 Clause-②: no ## What this lands Rule text only (the ruling: 「同意」 on the seat's recommendation quoted in the card) — no gate, no patrol row, no new tool. - `.claude/skills/pm-dispatch/references/execution-duties.md`, section 认领: the card assignee stays the PM's and the dev never writes it; **the PR assignee equals the card's**; the dev sets it in the same round as `pr_create` with `label-write.mjs --issue PR_NUMBER --assign LOGIN`; a seat's own PR is assigned to the seat; the takeover's step ② moves it in the same stroke; the reader is the filter `is:pr is:open assignee:LOGIN`. - `.claude/agents/os-dev.md`, rule 2: "never write the assignee" narrowed to **the card's** assignee, with the PR spelling beside it; the write-budget line names the PR-assignee write as part of the `label-write` slot it already had. The objectui clause (path labels belong to `labeler.yml`) is unchanged. The measured spelling comes from the card's pilot: objectstack-ai/objectui PRs 10410, 10412 and 10413 carry the cards' assignee, set through the relay's `assign` op on a PR number. ## Line budget (`pnpm check:pm-skill-ratchet`, both files at headroom 0) | file | before | after | paid by | |---|---|---|---| | `execution-duties.md` | 183 | 183 | deleted, not re-wrapped: the clause 「原子对 step 1 设」 (line 60 of the same file states step ①), the clause 「跨账号 assignee 不是你 ⇒ 永不碰」 (SKILL.md's card-state row 「assignee 已设 … 不是你的就永不碰」 states it for every seat), and the line 「dev 每个可编译小步即 push …」 (a dev obligation that os-dev.md already carries as 「每个可编译小步即 commit + push … 接管只认远程分支最后 sha」) | | `os-dev.md` | 402 | 402 | in-place rewrite of three existing lines, no line added | Every changed line is at most 120 bytes (the same gate's width rule). The takeover line (step ②, 118 bytes) had no room for the increment, so the takeover half of the rule is stated on the rewritten assignee line as 「接管 ② 同笔换」. The line 「释放是显式动作 …」 was a first candidate for payment (state-machine.md repeats it) and was deliberately kept: `scripts/pm/check-half-states.mjs` quotes that exact line as the protocol's own words (`RELEASE_ACT_RULE`), so removing its source would make that quotation unanswerable. ## Sweep: `git grep -n assignee -- .claude AGENTS.md` (at 6364f11) | hit | decision | |---|---| | `.claude/agents/os-dev.md` :34, :36 (rule 2), :54 (write budget) | changed | | `execution-duties.md` :56 (assignee owner) | changed, plus one new line after it | | `execution-duties.md` :17, :55, :57, :58, :61, :78, :129 | already consistent: each speaks of the card; :78 (takeover ②) is covered by the new 「接管 ② 同笔换」 clause | | `SKILL.md` :29, :91, :92, :103, :104, :105, :143 | already consistent: card-state table and state channels; :92 lists assignee as a use of the user account, which the PR assignee also is | | `SKILL.md` :294 (`check-half-states.mjs` row) | out of scope: the ruling adds no patrol row, so a PR without an assignee is not a half state | | `dispatch-runbook.md` :50 | out of scope: the seat post's assignee, not a card's | | `dispatch-runbook.md` :155 | already consistent: a continued claim moves nothing, card or PR | | `filing-gate.md` :33, `lanes/director.md` :42, `lanes/hotcrm.md` :50 | already consistent (card claim / scan / filed unassigned) | | `lanes/ui.md` :23 | already consistent: objectui assignee writes go through `label-write.mjs --repo`, which is exactly the PR-assignee route | | `platform-readings.md` :135, :178, :179, :230, :240, :241, :246, :250 | already consistent: platform readings; :250 (assignability is a repo + account property) is the precondition the pilot met | | `rest-channel.md` :30, :45 | already consistent: the channel table (`POST …/issues/{n}/assignees` is the same endpoint on a PR number) | | `seat-lifecycle.md` :27, `seat-post-protocol.md` :11 | out of scope: the seat post's assignee | | `state-machine.md` :41 | already consistent: the release act, card-scoped | | `triage-duties.md` :71, :72, :83, :84 | already consistent: card triage; :84 names `label-write.mjs` as the only assignee writer, which the new rule uses | | `AGENTS.md` :398–:414 | Tier H, not touched here. Its sentence "it ⛔ never writes the assignee" reads, in its paragraph, as the card's; a suggested wording for a separate maintainer-merged edit is in the report on the card | ## Gates (all at head 6364f11) `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran` → `✓ dispatch-gates --ran: 20 derived famil(ies) accounted for — 20 run, 0 NOT-MEASURED (a DERIVED zero — all 20 recorded an exit code and none of them is 3).` All twenty exit 0, among them `check:pm-skill-ratchet` (`✓ check-skill-line-ratchet: declared cross-file moves: 2, total ceilings down 477 lines.`), `check:pm-skill-id-lint` (`✓ check-skill-id-lint: 34 file(s) clean`), `check:skill-frame-sync`, `check:doc-authoring`, `check:agent-model-declared`, `check:pm-governed-merges`, `check:nul-bytes`, `check:commit-card-trailers`. `check:doc-formula-expressions` first exited 3 (a prerequisite not met: `@objectstack/formula` and `@objectstack/lint` were not built, so nothing was measured); it exited 0 after that build. Also run beyond the derivation: `check:pm-settings-deny-roster` and `check:pm-governed-prose`, both 0. `node scripts/pm/check-governed-merges.mjs --test` on the two paths: `GOVERNED — Tier S` (both under `.claude/**`). This PR lands after an in-seat contract review at `CONTRACT_REVIEW_TIER`, then goes through the queue. Nothing here is published (`.claude/**`), so it takes `skip-changeset`. ## Acceptance notes - A **release** of a card that still has an open PR (the card leaves ownership and nobody takes it over) is not covered by the ruling, so the PR assignee is left as it is. Only the takeover moves it. - os-dev.md's objectui clause (「派发词未点名即零写」) is about labels; the PR-assignee write is set by rule 2 and the write-budget line, not by that clause. ## 维护者速读(草稿) - **改了什么**:派发出的 PR 现在带卡的 assignee(派发席的关联用户账号)。dev 开 PR 后同一轮用 label-write 设置;接管卡时 PR 的 assignee 跟卡一起换人;席位自己开的 PR 指派给席位自己。改动只有两个规则文件里的几句话。 - **为什么改**:所有 PR 都由车队 bot 提交,看不出是谁在处理。按 assignee 过滤(`is:pr is:open assignee:LOGIN`)就能看到每个人名下在飞的 PR。维护者已裁决「同意」。 - **风险与代价(含回滚)**:两个文件行数不变。为腾出一行,删掉了三处在别的文件已写过的重复规则。没有新增门禁或巡查,所以漏设 assignee 的 PR 不会被自动发现。回滚方式:revert 本 PR。 - **席位意见**: - **你要做的**:无需操作。本 PR 属 Tier S,由席位做达档复核后自行落地。AGENTS.md(Tier H)里 "never writes the assignee" 那句是否要写明「卡的」,由卡上的报告给出建议措辞,供你决定。 --- _Generated by [Claude Code](https://claude.ai/code/session_01LNRg6FUMXYWgkAbDsfZpC8)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7f1de2e commit 9b8c74c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎.claude/agents/os-dev.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ model: opus
3131
- 探针遇 403 ⇒ 停下报 `blocked`,⛔ 不进重试循环;只有网络错误才退避重试。
3232
- Scratchpad 按 issue 隔离:在 scratchpad 目录下建 `issue-<n>/` 子目录,临时文件全写进去。
3333
- 同批 agents 共用一个 scratchpad 目录,自然命名的文件会被彼此静默覆盖。
34-
2. **assignee 归 PM。** 派发原子对已把它设好;共享身份下该字段答不了是谁。
34+
2. **卡 assignee 归 PM。** 派发原子对已把它设好;共享身份下该字段答不了是谁。
3535
- 你的身份位是认领评论里的分支;仓 CLAUDE.md 的 claim-first 已由 PM 的认领满足。
36-
- 你恒不写 assignee;到手时它为空照常开工,报进 `summary`。
36+
- 恒不写卡的 assignee(空也开工,报 `summary`);PR assignee = 卡的:`--issue PR_NUMBER --assign LOGIN`。
3737
- 发现与他人在途工作重复,停下报 `blocked`。
3838
- PR 上不是你设置的状态属于另一个 actor:⛔ 永不去纠正;疑问进报告,挡住报 blocked。
3939
- 共享身份让所有人的写入都像你写的;被改写的 body 只是关于 body 的证据,不证明别的。
@@ -51,7 +51,7 @@ model: opus
5151
- dev ⛔ 不查重,只附 3–5 个查重词;查询与命中数由立卡席写,⛔ 不扫 open issues、不拉板。
5252
- GitHub 写一律经 `scripts/pm/` 写工具;云容器里经 `fleet-write` 中继落为 `objectstack-fleet[bot]`。
5353
- 归属 = 文本里的 session ID,非 `user.login`;`git push` 不是 REST 写,不走中继。
54-
- 写预算四笔:`git push`、一次 `pr_create`(draft)、`label-write`、`os-dev-report` 评论。
54+
- 写预算四笔:`git push`、一次 `pr_create`(draft)、`label-write`(含 PR assignee)、`os-dev-report` 评论。
5555
- 卡与线程只走 payload 档(公开仓单卡网页内嵌 JSON,拼写住 platform-readings)或单卡 REST 读。
5656
- 三类发现附查重词进报告交席位代立,dev 不 `POST /issues`、⛔ 不静默弃报;预算外零写。
5757
- PR 正文 dev 只写一次,在开 PR 那一笔,⛔ 不 `PATCH`;事后要改的报告点名改法,席位代写。

‎.claude/skills/pm-dispatch/references/execution-duties.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
## 认领(先认领后动工)
5454

5555
- 共享身份下 assignee 只答有无认领;身份只认正文 session ID,⛔ 不认作者字段,接管同此。
56-
- assignee 字段归 PM:原子对 step 1 设,dev 席恒不写它;跨账号 assignee 不是你 ⇒ 永不碰。
56+
- 卡 assignee 归 PM,dev 恒不写;PR assignee = 卡的,接管 ② 同笔换;读者 `is:pr is:open assignee:LOGIN`。
57+
- dev `pr_create` 同轮 `label-write.mjs --issue PR_NUMBER --assign LOGIN`;席位自有 PR 指派自己。
5758
- 释放是显式动作:让卡离手者同笔清 assignee + `Release:` 行(会话/因/去向);下一任重新认领。
5859
- 部分落地(PR 带 `Refs #N (item k)`,⛔ 不 `Fixes`)即释放:合入同笔回 `pm:queue` + 清 assignee。
5960
- 同笔 `Release:` 行点名已落项与余项去向;余项需换道/拆分加 `pm:retriage`,自队列重新认领。
@@ -72,7 +73,6 @@
7273
- ③ 竞态复读:认领评论上墙后重读全线程;认领评论时间戳是唯一仲裁。
7374
- 更早的评论带不同 session ID/分支 ⇒ 你输了,回 `already claimed — yielding` 另选。
7475
- 让行是交接不是退场:连同让行评论交出已诊断的一切与已取的板面读数,赢家不必重扫。
75-
- dev 每个可编译小步即 push:容器随会话回收,未 push 的树救不回,可交接的只有远程分支。
7676
- 认领人不可达(token 耗尽/会话结束/身份退役)⇒ 接管:一条评论四件齐,⛔ 不判死活。
7777
- ① 跨账号 `Release:` 点名被撤认领的 id 与 session ID,带出处三件(谁的指令/原话/在哪说)。
7878
- ② assignee 同笔换人(`--unassign 旧 --assign 新`);③ 新 `Claim:`:新 session、续用分支与远程 sha。

0 commit comments

Comments
 (0)