Skip to content

Commit 0a50588

Browse files
committed
governed: a fork PR is a proposal, never a delivery — the FORK predicate beside PATH and SIZE, and the charter's 外部贡献 section
Ruled: batch 207 item 1, letter 是 (maintainer, verbatim: 「fork PR 的处理同意你的意见。」; the director's record on the card carries the four-step intake). A pull request whose head lives in another repository — head.repo.full_name differs from base.repo.full_name, or head.repo is null because the fork was deleted (fail closed) — is a proposal, never a delivery, whatever its paths: no AI seat flips it ready, enqueues it, arms auto-merge on it or approves it; the owning seat adopts the diff onto an internal branch (Co-authored-by: the contributor) and lands that. scripts/pm/check-governed-merges.mjs (+80 net incl. self-tests): a third limb beside PATH and SIZE. `forkVerdict(pull)` reads the pair off the PR object `--pr` already fetches; `testVerdict` carries `fork` and `checks`; `landsByHumanMerge` fires on any limb, so the fork exits on the existing GOVERNED code through the Tier H terminal with its own reason sentence. `--pr` also reads the head's check-run count (one GET on the chosen channel): a head with ZERO check runs prints NOT MEASURED — never green — in the register the size limb already uses; `--test` / `--branch` cannot see a head repo and say NOT MEASURED there too. Self-test battery beside the SIZE cases: fork head; deleted fork repo; same-repo head on ordinary and on governed (H and S) paths unchanged; zero / non-zero / unread check runs; the readings off an injected `--pr` fetch. AGENTS.md (1109 → 1109): one sentence in Prime Directive 14's paragraph; paid by retiring the Skills section's restatement of the register and its tiers, whose home is that directive (lines 259–275). SKILL.md (+1, 815 → 816 / 819): one rule line in 入队与落地. references/core-rules.md (151 → 151): the landing-rule line rewritten in place to carry the twin. New references/external-contributions.md (16 lines, every line ≤ 120 bytes): the ruled 外部贡献 section — card first, the human decides the problem, the seat adopts the diff, a fork's CI is never approved by a seat, and the supply-chain clause deferred. Claude-Session: https://claude.ai/code/session_017ETYWqMQD4qMtZzAGovWNi Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8fc6a5f commit 0a50588

5 files changed

Lines changed: 119 additions & 22 deletions

File tree

‎.claude/skills/pm-dispatch/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
640640
### 入队与落地
641641

642642
- 细则见 `references/landing-operations.md`,落地窗口查阅。
643+
- fork PR = 提案,席位永不放行;采纳 diff 内部落地,见 `references/external-contributions.md`。
643644
- 条款②入队闸门:翻 ready / 入队前先取 PR 实际 diff;diff 是事实,卡片语义是预测。
644645
- `--tier` 嫌疑行是提示非裁定;双肢命中任一 ⇒ 无达档条款②复核 PASS 在案 ⛔ 禁止入队。
645646
- 路径肢 = diff 触及契约面 `packages/spec/src/**`,含 error-code-ledger 与 `*.zod.ts` 契约 schema。

‎.claude/skills/pm-dispatch/references/core-rules.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
- 停摆永不自愈,按梯度复位、三次即判不可靠重派;报告丢失时按草稿 PR 直接验收。
120120
- 复核对 GitHub 核验 ⛔ 不对自述核验,逐项过清单并亲核形态、范围与整包价值密度。
121121
- CI 收敛读数只属于复核侧;判决三种:验收落卡、返工最多两轮、升级走决策通道。
122-
- 验收后取路径面,命中规则层即分叉 ⛔ 不翻正式不入队;Tier S 席内达档复核 PASS 后入队。
122+
- 验收后取路径面:规则层 ⛔ 不翻正式不入队,Tier S 达档 PASS 后入队;fork PR 永不放行。
123123
- 受管面 PR 留 draft 并向两个授权批准账户请审;契约卡无同形复核记录 PASS ⛔ 禁止入队。
124124
- 入队资格是每一个检查全绿 ⛔ 不是必查子集;碰生成物的 PR 入队前先同步再重生成。
125125
- 唯一例外:源码自述 pushed 上按设计而红、不跑 `merge_group`、评论记明门与因,三条全立。
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# 外部贡献:fork PR 是提案,不是交付
2+
3+
见 SKILL.md 〈入队与落地〉的 fork PR 行;本文是 fork PR(head 仓 ≠ base 仓)进场到落地的四步。
4+
席位永不翻 ready、入队、挂 auto-merge 或批准它;席位复审是必需输入,⛔ 永不是放行许可。
5+
6+
- ① 先立卡:分诊 fire 扫 open PR 中 head 仓 ≠ base 仓者;无卡的按 PR 正文立卡,常规定级。
7+
- 无卡的 fork PR 在板上不存在;PR 上只贴一条固定评论,原文:
8+
`this repository works card-first; filed as #N; this PR stays a draft until the card is graded`
9+
- ② 人裁的是问题不是代码:普通可复现缺陷路由到席位,不经维护者。
10+
- 地板项(安全/权限边界、契约、功能)作业务问题进决策箱,与任何卡同批裁。
11+
- ③ 席位采纳 diff,永不落地 fork PR:内部分支 cherry-pick 或重写,`Co-authored-by:` 贡献者。
12+
- 门禁推导、达档复核与队列同内部工作;对贡献者的要求只作 fork PR 上的 review 评论。
13+
- 内部 PR 落地后关闭 fork PR,附致谢与落地链接;席位在 fork PR 上只写这两种评论。
14+
- ④ fork 的 CI 席位永不代批准运行;head 上 0 条 check run 读作 NOT MEASURED,⛔ 永不读作绿。
15+
- 机器面:`check-governed-merges.mjs --pr <n>` 对 head 仓 ≠ base 仓走 H(人合)出口;head.repo 为空同。
16+
- 供应链条款(fork 带来的依赖、lockfile、workflow、scripts)延后:第一张此类 fork PR 出现时再立。

‎AGENTS.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ localStorage / auth gotchas.
261261
`CLAUDE.md` — the file you are reading is one — and a mixed diff is governed whole on a single path hit. The
262262
register is the `GOVERNED_SURFACES` table in `scripts/pm/check-governed-merges.mjs`, each row carrying its tier;
263263
adding a surface is an edit *there*, never here, and `pnpm check:pm-governed-prose` reds per-PR when this
264-
paragraph names fewer surfaces than the register — or more. When it reds, name the surface here.
264+
paragraph names fewer surfaces than the register — or more. When it reds, name the surface here. A fork PR
265+
(head repo ≠ base repo) is a proposal, never a delivery, whatever its paths: no AI seat readies, queues, arms
266+
auto-merge on or approves it; the owning seat adopts the diff onto an internal branch and lands that.
265267

266268
**Authoring stays open to every seat** — drafting, pushing, opening and revising the PR. What is reserved is the
267269
**landing**: on a PR whose diff touches a governed surface ⛔ never merge, ⛔ never queue, ⛔ never arm
@@ -797,8 +799,6 @@ working in its domain — browse the directory, never a hand-written list here:
797799
- `.claude/skills/` — repo-internal agent playbooks; every entry must carry
798800
`metadata.internal: true`.
799801

800-
⛔ **Both roots are governed surfaces** — `skills/` is Tier H, `.claude/skills/` Tier S (**Prime Directive #14**).
801-
802802
---
803803

804804
## Patterns

0 commit comments

Comments
 (0)