Skip to content
2 changes: 1 addition & 1 deletion .claude/agents/os-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ model: opus
- 认领的 `Clause-②:`、`Metadata-protocol:` 两行照抄进 PR 正文行首;无则零写,⛔ 不自造。
- 两行同抄进 changeset 正文行首;`Check Changeset` 读 PR 正文:kind 即 `minor`,`none` 即 `patch`。
- 种类非 `none` 或带 `(narrowing)` ⇒ 按 diff 加写 `Skills-docs:` 行;拼法与分工住认领模板。
- diff 触根 `.claude/**` ⇒ PR 正文写行首 `Rule-change:` 行,按 diff 自判。
- diff 触根 `.claude/**` ⇒ PR 正文恰一行首 `Rule-change:`,按 diff 自判。
- `none` 未改车队规则(agent 不经维护者可做什么、做什么与先后、什么须交他);`yes` 改了;`ruled` 照抄已裁条文,写行首 `Ruling-ref:` 引维护者原话、出处、时间。缺行同 `yes`:Tier H。
- ⛔ 永不 `Fixes` 一张还在决策箱的卡:合并会静默关掉它,而收件箱过滤只读 open。
- ⛔ 不写否定式的关单句,它照样关掉点名的卡:解析器无视否定,只匹配关键词 + `#<n>`。
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/pm-dispatch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → L1 审核 →
- `pr_create` 派不请;`pr_ready` 只补交棒漏;非例外 head 移 ⇒ 撤挂回等;脱中继 PR 自读请/派。
- 速读「要你做什么」求批点名 PASS 评论 id+`Head-sha`;无 PASS ⇒ 写 contract review owed 不求批。
- ④ 轮报单列 awaiting a human merge 并现读请审人;⛔ 未请审不在 chat 报「等你批」,先补请。
- skills 车道自有 PR:纯代码面如 `scripts/pm/` 由本席自读(清单不减)后落地,守卫除外。
- skills 车道自有 PR:纯代码面如 `scripts/pm/` 由本席自读(清单不减)后落地,守卫仪器除外。
- Tier S = `Rule-change: none`/`ruled` 记录核过的 `.claude/**`+下行面,余皆 H;达档 PASS 后 ready→入队。
- 本仓 workflows 读 `readWorkflowDiff`(发布面/C2/拒读⇒H),技能与只增 ADR `lowRiskArmVerdict`,未读⇒H。
- 入队资格:每 check 绿或预期 skip,⛔ 非必查子集;名单 check-expected-skips.mjs 只判 objectstack。
Expand Down
49 changes: 37 additions & 12 deletions scripts/pm/check-governed-merges.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,14 @@
* enforces 3 there. `ui/.claude/**` and every other repository's `.claude/**`
* are Tier H as before.
*
* ⛔ Two readers do NOT chain the split and still read the raw row's Tier S:
* the relay's review-request plan (`fleet-write/execute.mjs`) and the
* half-states patrol's landing row, both through `landingTierOf` on the
* matched slice. Neither decides a landing — the queue guard does — so a
* `Rule-change: yes` pull is refused at the queue but is not auto-routed to
* the maintainer by the relay; CODEOWNERS routes the settings and hooks paths.
* The two readers that decide no landing chain the split too, on the same
* reading: the relay's review-request plan (`governedReviewPlan`,
* `fleet-write/execute.mjs`) requests the approvers for a `.claude/**` pull
* the split reads Tier H, and the half-states patrol's landing row H43 lists
* it. The record conjunct holds only where the queue's record leg would
* clear the same comment — it stands at its face's tier and reads a clean
* PASS (`recordLeg`, `ruleChangeRecordReasons`) — so no reader prints Tier S
* over a record the queue refuses.
*
* Published `skills/**` stays a Tier H ROW: the 2026-09-18 seat did not propose
* moving it, and no row moved since. What moved on 2026-11-14 is a READING on
Expand Down Expand Up @@ -1258,7 +1260,9 @@ const SELF_TEST_BATTERIES = Object.freeze({
'⚖️ #33603: the sweep lists a low-risk arm landing APART and judges it on a same-head at-tier PASS record': 71,
'⭐ the weekly audit card: every reading the job files on, both ways (#33814)': 54,
'⚖️ #33539: the ADR leg of the low-risk arm — an add-only note lands Tier S, any other ADR change stays H': 52,
'⚖️ #35321: the guard instruments are Tier H, and `.claude/**` splits by declaration': 40,
// 40 → 44 (#35612, N1 of #35610): a record the queue's record leg refuses — a FAIL, below its tier, or a leg not
// read — keeps the split at Tier H however its `Rule-change-verified:` line reads; one case pins the words.
'⚖️ #35321: the guard instruments are Tier H, and `.claude/**` splits by declaration': 44,
});

// DELETING an entry silences that battery's floor exactly as effectively as
Expand Down Expand Up @@ -3175,11 +3179,13 @@ export const RULE_CHANGE_RECORD_STAGE_PENDING_REASON =
* Why the record keeps the split at Tier H, or [] — the split's last conjunct. Pure.
*
* `record` is the reading the low-risk arm's record stage already takes (`lowRiskRecordStage`, the queue guard),
* with two keys of this split's own: `ruleChangeVerified` (`readRuleChangeVerified` of the located comment) and
* with three keys of this split's own: `ruleChangeVerified` (`readRuleChangeVerified` of the located comment),
* `ruleChangeCarried` (`null`, or `{ from, ok, reason }` for a record carried from an older head — it stands only
* when the hops moved nothing under the split row). The conjunct holds only for a record FOUND on this head whose
* line was READ and reads the value the body `declared`: missing, unreadable, `yes`, or the other seat value are
* each a reason, as is a record that is absent, unsigned or unread.
* when the hops moved nothing under the split row) and `recordLeg` (`{ state, reason }`: the queue's own record leg
* on the same comment, `recordVerdict` then `recordPassVerdict` — `stands` only at its face's tier and on a clean
* PASS). The conjunct holds only for a record FOUND on this head that the record leg clears and whose line was READ
* and reads the value the body `declared`: missing, unreadable, `yes`, or the other seat value are each a reason,
* as is a record that is absent, unsigned, unread, below its tier, not a clean PASS, or whose leg was not read.
*/
export function ruleChangeRecordReasons(record, declared) {
const want = `${RULE_CHANGE_VERIFIED_KEY}: ${declared}`;
Expand All @@ -3195,6 +3201,15 @@ export function ruleChangeRecordReasons(record, declared) {
const which = `its contract-review record (${record.where ?? 'a'} comment ${record.id ?? '(no id)'})`;
const carried = record.ruleChangeCarried;
if (carried && carried.ok !== true) reasons.push(`${which} ${carried.reason ?? 'was carried from an older head over hops that could not be read'}`);
// The queue's record leg on the same comment: ⛔ a caller that hands no leg reading gets no Tier S (N1 of #35610).
const leg = record.recordLeg;
if (leg?.state !== 'stands') {
const said = leg?.reason ? `: ${leg.reason}` : '';
if (!leg) reasons.push(`${which} was not read by the queue's record leg, so whether it stands at its tier and reads a clean PASS is unknown`);
else if (leg.state === 'not-pass') reasons.push(`${which} does not read a clean PASS${said}`);
else if (leg.state === 'below-tier') reasons.push(`${which} does not stand at its face's tier (its \`Served-tier:\` line)${said}`);
else reasons.push(`${which} does not stand on the queue's record leg (${leg.state})${said}`);
}
const line = record.ruleChangeVerified;
if (!line || line.state === 'missing') reasons.push(`${which} carries no \`${RULE_CHANGE_VERIFIED_KEY}:\` line`);
else if (line.state !== 'read') reasons.push(`the \`${RULE_CHANGE_VERIFIED_KEY}:\` line of ${which} is unreadable: ${line.reason ?? 'no reason recorded'}`);
Expand Down Expand Up @@ -7420,7 +7435,7 @@ async function selfTest() {
const REPO = SELF_REPO_ID;
// The reading the `.claude/**` declaration split (2026-11-19) lands Tier S on: the body's one bare line, and a
// record FOUND on this head whose own line verifies it. `ruleReading` moves one half at a time for the controls.
const ruleRecord = (value = 'none', over = {}) => ({ measured: true, reason: null, located: 'found', where: 'PR', id: 7, carried: null, ruleChangeCarried: null, ruleChangeVerified: value === null ? { state: 'missing' } : { state: 'read', value }, ...over });
const ruleRecord = (value = 'none', over = {}) => ({ measured: true, reason: null, located: 'found', where: 'PR', id: 7, carried: null, ruleChangeCarried: null, ruleChangeVerified: value === null ? { state: 'missing' } : { state: 'read', value }, recordLeg: { state: 'stands', reason: null }, ...over });
const ruleReading = (body = 'Rule-change: none', record = ruleRecord()) => ({ measured: true, reason: null, body, ...(record === null ? {} : { record }) });
const RULE_NONE = ruleReading();
// Report fixtures take a REAL window from the real resolver, never a
Expand Down Expand Up @@ -8243,10 +8258,20 @@ async function selfTest() {
'an unsigned record': ruleRecord('none', { located: 'unsigned' }),
'a record that was not read': { measured: false, reason: 'the PR thread answered 502' },
'a record carried over a hop that moved the tree': ruleRecord('none', { ruleChangeCarried: { from: 'a'.repeat(40), ok: false, reason: 'was carried over hops that moved .claude/x.md' } }),
// N1 of #35610: the record leg the queue reads on the same comment — the verified line alone is not enough.
'a record that reads FAIL': ruleRecord('none', { recordLeg: { state: 'not-pass', reason: 'it reads FAIL' } }),
'a record below its tier': ruleRecord('none', { recordLeg: { state: 'below-tier', reason: null } }),
'a record whose leg was not read': ruleRecord('none', { recordLeg: undefined }),
};
for (const [name, record] of Object.entries(unverified)) {
assert(`⛔ unverified-is-Tier-H: ${name}`, tier([WORDING], ruleReading('Rule-change: none', record)) === GOVERNED_TIER_H && split([WORDING], ruleReading('Rule-change: none', record)).reasons.length === 1, why([WORDING], ruleReading('Rule-change: none', record)));
}
assert('⛔ N1: the-record-legs-words-name-why-and-the-same-record-with-a-standing-leg-verifies',
/does not read a clean PASS: it reads FAIL/.test(why([WORDING], ruleReading('Rule-change: none', unverified['a record that reads FAIL']))) &&
/does not stand at its face's tier/.test(why([WORDING], ruleReading('Rule-change: none', unverified['a record below its tier']))) &&
/was not read by the queue's record leg/.test(why([WORDING], ruleReading('Rule-change: none', unverified['a record whose leg was not read']))) &&
tier([WORDING], ruleReading('Rule-change: none', ruleRecord('none'))) === GOVERNED_TIER_S,
why([WORDING], ruleReading('Rule-change: none', unverified['a record that reads FAIL'])));
assert('control-a-carried-record-whose-hops-moved-nothing-under-the-row-still-verifies',
tier([WORDING], ruleReading('Rule-change: none', ruleRecord('none', { ruleChangeCarried: { from: 'a'.repeat(40), ok: true, reason: null } }))) === GOVERNED_TIER_S);
assert('⛔ the-record-not-handed-in-is-PENDING-Tier-H-never-none',
Expand Down
Loading
Loading