diff --git a/.claude/skills/checklist-test/SKILL.md b/.claude/skills/checklist-test/SKILL.md index 7fc825e59c6..0ffb42a3764 100644 --- a/.claude/skills/checklist-test/SKILL.md +++ b/.claude/skills/checklist-test/SKILL.md @@ -104,7 +104,7 @@ Tier 1 批量清掉,剩下的预算才对得起 Tier 2。 ⛔ 不凭记忆(floor sonnet · default opus · ceiling fable);每个给:该项 JSON、RUNNER.md、dogfood 技 能、自己的端口/DB、结果不进仓规则(§4)。 - **effort 按卡形状定,派发写明,⛔ 不留空。** runner 卡(Tier 1 pin 批、手工 API/CLI 与浏览器 - 组、P0 冒烟、UX 走查)一律 `high`;`xhigh` 只给修安全发现的 `os-dev` 与争议判定的对抗复核。 + 组、P0 冒烟、UX 走查)与争议判定的对抗复核 `high`;`xhigh` 只照 pm-dispatch `execution-duties.md`。 - **按后端传档。** `Agent` 子代理显式传 `effort`(本条即传参的依据)。云卡(`create_session`)不收 effort,卡的会话记录也不带 `effort_level`,跑在哪档读不回(实测):派发记录写「未指定」并附 发起会话 `get_session` 读到的档位;它高于卡形状时照 pm-dispatch `dispatch-runbook.md` diff --git a/.claude/skills/pm-dispatch/SKILL.md b/.claude/skills/pm-dispatch/SKILL.md index 9956cc271b6..34387713d08 100644 --- a/.claude/skills/pm-dispatch/SKILL.md +++ b/.claude/skills/pm-dispatch/SKILL.md @@ -317,7 +317,7 @@ Worktree: `-issue-` Domain: `domain:` Seat: `domain:#` (the seat number this PM sits on; absent = seat 1) File surface: `<预期触碰的目录>` (stop on breach; explain in the report) -Container & model: ``, `mode:subagent | mode:cloud | mode:thread`, `model: <档位词,引当次 --tier 输出;天花板拼 CONTRACT_REVIEW_TIER,同行引其 MANDATORY 路径行或 reason:(逐卡裁决,或常设档位令的 id 与时刻);⛔ 不抄模型 id>`, `effort: ` +Container & model: ``, `mode:subagent | mode:cloud | mode:thread`, `model: <档位词,引当次 --tier 输出;天花板拼 CONTRACT_REVIEW_TIER,同行引其 MANDATORY 路径行或 reason:(逐卡裁决,或常设档位令的 id 与时刻);⛔ 不抄模型 id>`, `effort: ` Clause-②: yes | no Metadata-protocol: added | narrowed | semantic | none (the kind of change to what a metadata author can write; levels: AGENTS.md's Post-Task Checklist step 3; the dev copies it beside `Clause-②:` into the PR body and each changeset body; a kind other than `none` or a `(narrowing)` arm owes the PR body a third line, from the diff: `Skills-docs: updated here | follow-up owed — FILES | follow-up #N | none — REASON`; `updated here` = the diff teaches it in the docs (in `skills/**` only on `domain:skills` PRs, else `follow-up #N`) and its evals exercise it; the seat files the owed card, rewriting `owed — FILES` to `#N` before ACCEPT via `references/seat-post-protocol.md`'s PR-body line) Responsibility: `` (defect cards and cards whose premise is a failing behaviour, else `n/a — not a defect card`; the dispatch prompt's ruling section repeats the three answers) diff --git a/.claude/skills/pm-dispatch/references/area-lease.md b/.claude/skills/pm-dispatch/references/area-lease.md index a0b89a4f035..2207c947017 100644 --- a/.claude/skills/pm-dispatch/references/area-lease.md +++ b/.claude/skills/pm-dispatch/references/area-lease.md @@ -44,7 +44,7 @@ 所落 PR 欠的红检查读日志(`readings-ci.md`)派子代理读,一读兼守本条与该文。 - 每区 dev 位空即补;逐位上张 PR 入合并队列才领下张,此前跑修复轮;Tier H 或待裁 PR 让位。 - 席每轮逐区查;取卡照点名范围次序,p0/p1 插队;p3 留收口或搭同文件 PR 成批(每 PR ≤5 卡)。 -- 同函数互相牵连的卡合一 PR,准入照 `execution-duties.md` 折叠五门,额度墙亦照该文。 +- 认领必答:同区卡过 `execution-duties.md` 折叠五门即默认合一 PR,否则串行;额度墙亦照该文。 - 留道:修法已清的卡碰 `ui/**`、`packages/spec/**` 仍在本道开发、本席 L1/L2;他道席在线只通知; 本条先于条款②行(`execution-duties.md`)、移道的 `lanes/spec.md` 与 `--tier` 提示; 交出闭集:他道在线席已认领、cloud 路由、安全、ADR。 diff --git a/.claude/skills/pm-dispatch/references/execution-duties.md b/.claude/skills/pm-dispatch/references/execution-duties.md index b5d3fb55356..10a07ac6c51 100644 --- a/.claude/skills/pm-dispatch/references/execution-duties.md +++ b/.claude/skills/pm-dispatch/references/execution-duties.md @@ -22,13 +22,15 @@ - 卡记 `Paused-for: #`,⛔ 不丢弃、不回退、不 force-push;p0 落地即复活该 dev,同认领同分支。 - 同区域单照重叠检查排队;延后不是搁置,被延后那一刻就把已知的坑记到该 issue 上。 - 家族派发是范围澄清不是豁免:一个 dev 有意覆盖 N 张同区域已裁卡,可折叠为一次派发。 -- 折叠准入五门全过才可折:① 同缺陷形态同修法(⛔ 不是同关键词/同子系统)。 -- ② 同包/区域(一 worktree、一 changeset、一队列位)。 +- 折叠准入五门全过即默认折(≤5 卡):① 同缺陷形态同修法(⛔ 不是同关键词/同子系统)。 +- ① 另一臂:同文件纯文本卡(`Clause-②: no`)。 +- ② 同包/区域(一 worktree、一 changeset、一队列位),成员同落地档、同 L2 档,有 p1 则 p1 为首。 - ③ 每张成员都已裁/已定级,⛔ 决策箱内一张不许;④ 每成员独立可核(一个具名判据)。 -- ⑤ 派发令点名排除清单:长得像家族而不是的成员及理由。 -- fold-or-serial 必答:≥2 张排队卡共享热文件时,必须以五门为判据显式答折叠与否。 +- ⑤ 派发令点名排除清单:长得像家族而不是的成员及理由;搭同文件 PR 的 p3 免 ①。 +- 成员前提不成立或遗留项一轮未清 ⇒ 摘其 commit 与 `Fixes` 行、释放回队,⛔ 不拖住整组。 +- fold-or-serial 必答:席或区有 ≥2 张可认领卡同机制或共享热文件,以五门显式答折叠与否。 - 答题处是链首认领(排后的卡另记串行队);不折叠则排队与否照 `area-lease.md` 重叠检查。 -- 分诊折叠提议仅是建议,点名各卡皆无 open PR 才有效;否则各卡各自落地,拒折理由记一行。 +- 分诊 `Fold-with: #N` 仅是建议,点名各卡皆无 open PR 才有效;否则各自落地,拒折理由记一行。 - 并行纪律四条(常规,非豁免):① 认领申报文件面到区域级,排队与否照重叠检查。 - ② 开 PR 前合一次 main;③ 兄弟卡落地后再合一次;④ 冲突交合并队列仲裁,⛔ 不手动排序。 - 其间 ⛔ 不追 main,`behind` 非理由:只冲突/main 致红/踢出队列才合;入队前按落地 K 与 A 节。 @@ -119,9 +121,18 @@ - 额度墙只向下(降档或降并发)⛔ 永不向上;临时偏离记座位贴带结束条件,逐次巡检重读。 - effort 按卡难度定,与档位、降档理由写进 Container & model 行与派发令,显式传参,⛔ 不留空。 - S 机械/评审 nit 跟进与返工/同族合并的边角卡/纯文案或 changeset 小改 `medium`;M、L `high`。 -- XL/security/epic 子卡/L2 审核/四轴分析/ADR `xhigh` 压过上行;p1 不升档;`max` 凭点名/常设令。 -- 卡线程按施工档开(开时即定);设计与红线复读起隔离子代理传 `xhigh`。 -- 分诊 suggestion 行是输入不是决定,不采纳给理由;拿不准升一档。 +- `xhigh` 只给预计无人值守逾 30 分钟的施工(多为 XL),或实测记录显示 `xhigh` 有增益的卡型。 +- 此外只有 L2 审核/四轴分析/ADR/红线复读与高危公告修复 diff 复核 `xhigh`;两条压过尺寸行。 +- epic 子卡与 p1 按卡自身难度,类别 ⛔ 不升档;`max` 凭点名/常设令,或为测上限。 +- 安全按后果不按标签:仅高危公告(跨租户或越权读写、提权、认证绕过)的修复得 `xhigh`。 +- 且不整单:`high` 施工,再起一个只读子代理以 `xhigh` 对 diff 做简短对抗复核;中危 `high`。 +- 带 `security` 标签而非公告修复的卡(依赖、UX、文案)按难度定。 +- 每个安全修复带复现其攻击的回归测试(修前红、修后绿);同机制的修复共用一次分析。 +- 卡线程按施工档开(开时即定);设计复读起隔离子代理传 `high`,红线复读传 `xhigh`。 +- ⛔ 会话中途不改 effort;要另一档就起隔离子代理。 +- 分诊 suggestion 行是输入不是决定,不采纳给理由;拿不准 ⇒ `high`,⛔ 不因拿不准给 `xhigh`。 +- 只读查找/取数的辅助子代理下限 `medium`;单发查找可 `low`,长检查链 ⛔ 不 `low`。 +- effort 取值出自本仓同卡多档实测,⛔ 不沿用上代模型的值;档位换代重测,读数记记录卡。 - 派发词只带增量,⛔ 不整段贴卡正文;dev 自读全文与评论、自查完整(`dispatch-runbook.md`)。 - 派发词引卡片的精确断言(schema 臂、判据、原文)一律逐字,⛔ 不释义转述。 - 三分区:裁决(不可重裁)/ PM 机制假设(须实测,鼓励证伪)/ PM 建议的路线(可选,实测优先)。 diff --git a/.claude/skills/pm-dispatch/references/lanes/security.md b/.claude/skills/pm-dispatch/references/lanes/security.md index 31e988097e8..d4deaf30e72 100644 --- a/.claude/skills/pm-dispatch/references/lanes/security.md +++ b/.claude/skills/pm-dispatch/references/lanes/security.md @@ -17,14 +17,21 @@ - 接收 ②:列表比出的无台账编号(外报、无门铃或席空时建):记 `received`,经 `advisory_read` 读。 - 判定:发现 ⇒ 中继 `advisory_state` 置 `draft` 走派修;非发现 ⇒ 置 `closed`,台账记非发现。 - 巡查:每轮中继 `advisory_list` 列 `triage`/`draft`/`closed` 比台账;缺行照接收 ②,状态不符即改。 +- 接收与每轮巡查把 `draft` 公告只按同根因机制(同缺失检查或同门族)归组,限同归属包内。 - 读出的公告明文只印本席进程 stdout(`--reveal`),⛔ 不进文件、日志或后台任务输出。 - 分析经中继 `advisory_note` 追加进公告正文:文件置 git 仓外,首行签名,有裁定即引其记录。 +- 一组一份牵头公告,孤例自成一组;分析一组一份追加进牵头,其余成员各留一行指向它。 - 台账住座位贴,一份一行:不透明编号 · 会话 · 状态;⛔ 无细节;修复的认领只记台账。 +- 台账行加不透明组标(`G1`、`G2`…),⛔ 不用机制词;成员状态只随载其修复的 PR 合入前移。 - 状态词表:`received` → `fixing` → `merged` → `closed`;挑中发布再 `awaiting publish` → `published`。 ## 派修与 L2 审核 -- 修复照第 3 节派发;L/XL、build 重、长跑或浏览器验证走 `mode:cloud`,余 `mode:subagent`。 +- 修复照第 3 节按组派发;L/XL、build 重、长跑或浏览器验证走 `mode:cloud`,余 `mode:subagent`。 +- 一组一令、一分支、一 PR、一次 L2 审核;折叠五门与 effort 照 `../execution-duties.md`。 +- 组 ⛔ 不跨两个归属包的发版线,PR 守常规尺寸上限;过大的组拆成有序 PR。 +- 组内每份公告各带复现其攻击的回归测试(修前红、修后绿),PR 证明每个成员。 +- 含高危或中危的组先修;余组排最后,无前者在等才派,同归属包成批合一令一 PR(免门 ①)。 - 公告修复 PR 的 L2 审核归本席,照第 6 节;要定契约的修复交维护者前照下节。 ## 呈维护者 @@ -33,6 +40,7 @@ - 复核者只拿分析与证据,⛔ 不拿本席结论;核四轴、选项无漏、推荐成立、证据为真。 - 问题随附复核判词与全部异议。 - 每次发版前呈发布与否清单:上次发版后 `closed` 的公告,高危、中危在前;先经上条复核。 +- 清单按组列,成员列在牵头下。 - 修复在版本 X 内,只当其合并提交是 X 打标提交的祖先(`git merge-base --is-ancestor`)。 - ⛔ 合并时刻早于打标时刻不是证据。 - 维护者批准即 `awaiting publish`;本席经中继发布即 `published`,照第 3 节;⛔ 不发清单外的。 diff --git a/.claude/skills/pm-dispatch/references/seat-lifecycle.md b/.claude/skills/pm-dispatch/references/seat-lifecycle.md index 0b12e2d87e7..54246dd7613 100644 --- a/.claude/skills/pm-dispatch/references/seat-lifecycle.md +++ b/.claude/skills/pm-dispatch/references/seat-lifecycle.md @@ -37,6 +37,7 @@ - 收班 = 状态 flush + 在飞 `Release:`+`Resume-from:` 回队待兄弟席、不等落地;简报非继承裁决。 - 坐席同笔:建自绑巡查 routine、开信箱并订阅、存根记 `Patrol:` 与 `Mailbox:`、发 `seat-online`。 - 分诊席与车道席会话 effort 恒 `high`;坐席时低于即登记行注明,请账号主人以 `high` 重开。 +- 席会话 ⛔ 中途不改 effort;要另一档就起隔离子代理(`execution-duties.md`)。 - 收班同笔删 routine、关信箱、发 `seat-offline`;强制接管者代发 `seat-online`(`project-forms.md`)。 - 下班席(`seat-offline`,或两敲 `Request: progress` 无答走接管四件)的在飞归同车道在线兄弟席。 - 兄弟席 `Resume-from:` 引简报或轮次记录认领;待裁先等字;无兄弟席「待席」;公告归安全席。 diff --git a/.claude/skills/pm-dispatch/references/security-findings.md b/.claude/skills/pm-dispatch/references/security-findings.md index 455cfafb5db..dee98b86619 100644 --- a/.claude/skills/pm-dispatch/references/security-findings.md +++ b/.claude/skills/pm-dispatch/references/security-findings.md @@ -24,7 +24,7 @@ - 只发维护者为该版批准的清单:经中继先定版本再发布;运行编号记座位贴,⛔ 无正文。 - 两操作皆被拒 ⇒ 会话专递(选 A):机制只在会话里交维护者,由其建草稿,⛔ 不换账号重发。 - 回退时座位贴只写不透明编号与状态,⛔ 无细节。 -- 公开仓修复只由 `security#1` 席以无卡派发令派 `os-dev`,`xhigh`;机制只进派发令与公告。 +- 公开仓修复只由 `security#1` 席以无卡派发令照章程按组派 `os-dev`;机制只进派发令与公告。 - 用到公告的临时私有 fork ⇒ 修复从该 fork 落地。 - 私有仓私卡 = 该仓带 `security` 标签的普通 issue,经中继 `issue_create` 立,机制写在其中。 - 私有仓卡归该仓车道(cloud 即 cloud 车道),照其规则派修、L1/L2 审核、落地;第 2、6 节照旧。 diff --git a/.claude/skills/pm-dispatch/references/triage-duties.md b/.claude/skills/pm-dispatch/references/triage-duties.md index ac98d317637..50eff28902e 100644 --- a/.claude/skills/pm-dispatch/references/triage-duties.md +++ b/.claude/skills/pm-dispatch/references/triage-duties.md @@ -75,6 +75,7 @@ - 父单已有子结构的:父单挂 `tracking`,分诊逐个展开子卡路由、补 `Blocked-by:` 排序。 - 跨层功能点(≥2 层)的协调父单挂 `area:*`+`tracking`、⛔ 非 `pm:epic`;逐层子单各自定级。 - 每张留一条英文审计评论(`Triage: lands in …; rationale: …`),可选带 `Size/model suggestion:` 行。 +- 审计评论可另带 `Fold-with: #N` 行提议折叠;采纳与否照 `execution-duties.md` 折叠五门。 - 改作者可写面(种类非 `none` 或带 `(narrowing)`)的卡,首触 done-when 写 skills + docs + eval 三项。 - ADR/技能文本携带注记 ⛔ 不挂实施卡,每实施 PR 一 `domain:skills` 卡;ADR 由落地席合并后立。 - 查重/shadow 检查先按文件/机制查本仓与姊妹仓 open 卡(含 `pm:dispatched`),再跟引用与关键词。 diff --git a/scripts/pm/check-skill-line-ratchet.mjs b/scripts/pm/check-skill-line-ratchet.mjs index 9b5f7038705..460b87d8338 100644 --- a/scripts/pm/check-skill-line-ratchet.mjs +++ b/scripts/pm/check-skill-line-ratchet.mjs @@ -1589,7 +1589,17 @@ export const CEILINGS = new Map([ // the filing gate; anything else stays), the close list and the keep list. // One line paid: the cloud fallback now lives only in lanes/cloud.md, which // triage-duties.md's cloud line points to. Measured delta +4; landed count, headroom 0. - ['.claude/skills/pm-dispatch/references/triage-duties.md', 108], + // Raised 108 → 109 by the fold-by-default rules (card #35283, item 10) — an ORDINARY raise, ⛔ not + // a cross-file move. One line under the audit-comment line: the audit comment may also carry a + // `Fold-with: #N` line proposing a fold, taken or declined by the five fold gates of + // execution-duties.md. Ruling of record: the maintainer, 2026-11-19, verbatim and untranslated: + // 「C 收敛版」, chosen after 「其他 area 可以用类似的方案吗?」 and 「是否建议合并开发,技能是怎么约定的, + // 是否需要优化」; quoted in the body of card #35283 (filing gate ③), claim comment 7014764185. + // Authorized under ruling record 6184799323 (letter B). Measured: the audit-comment line stands + // at 117 B and the marker beside `Size/model suggestion:` makes it 132 B against the 120-byte + // cap, so the rule lands as its own line (109 B). Delta +1 (108 → 109); landed count, headroom 0. + // The director.md cross-file move this file is a source of still clears (+10 against 11). + ['.claude/skills/pm-dispatch/references/triage-duties.md', 109], // execution-duties.md, raised 183 → 185 by the split-off-card ruling — an // ORDINARY raise, ⛔ not a cross-file move (card #23579). The text is two rule // lines beside the derived-sub-issue rules in 〈候选与批次〉: a queued card found @@ -1644,7 +1654,38 @@ export const CEILINGS = new Map([ // rule lands as two lines (115 B and 116 B). Delta +1; headroom 0. // Lowered 190 → 189 (#35259, item 5): the line on writing and removing the retired // blocking-cache label left with the label (lowering is always legitimate). Landed count, headroom 0. - ['.claude/skills/pm-dispatch/references/execution-duties.md', 189], + // Raised 189 → 193 by the effort-by-shape rules (card #35270) — an ORDINARY raise, ⛔ not a + // cross-file move. The 〈派发〉 effort lines go from five to fourteen: `xhigh` only for a build + // expected to run unattended for over 30 minutes or a card type a measurement record shows + // gains on; L2 review, four-axis analysis, ADR, the red-line re-read and the diff review of a + // high-severity advisory fix stay `xhigh`, and of the two re-reads a card thread hands to an + // isolated subagent only the design one drops to `high` (that line is rewritten in place); an + // epic child card and a p1 go by the card's own difficulty and a + // category never raises a level; security is graded by consequence, not by label (a `high` + // build plus that `xhigh` diff review for high severity, `high` for medium, a `security` card + // that is no advisory fix by difficulty, a regression test per fix, one analysis per shared + // mechanism); no session changes effort mid-session; unsure ⇒ `high`; the helper-subagent + // floors; effort values come from this repo's own measurements. Ruling of record: the + // maintainer, 2026-11-19, verbatim and untranslated: 「立卡修改skills」 after the effort review, + // with 「安全修复只有高风险的才需要 xhigh 吧」 on security; quoted in the body of card #35270 + // (filing gate ③), claim comment 7014658145. The red-line re-read staying `xhigh` while only the + // design re-read drops is his answer, verbatim and untranslated, 「同意」 (card #35270's project + // thread, 2026-11-19 22:20Z) to the option put to him as 「只降设计自查,红线自查保持最贵档」. + // Authorized under ruling record 6184799323 + // (letter B). Measured against the 184-line file on main: +9 lines (184 → 193); the standing + // headroom of 5 pays 5 of them and the row moves +4. Landed count, headroom 0. + // Raised 193 → 195 by the fold-by-default rules (card #35283, item 8) — an ORDINARY raise, ⛔ not + // a cross-file move. In 〈候选与批次〉 the five fold gates now fold by default when all pass (at + // most five cards); gate ① gains the same-file text-only arm (+1 line: the gate line stands at + // 117 B), gate ② the shared landing tier and L2 tier, a fold that holds a p1 headed by a p1, gate + // ⑤ the exemption of a p3 riding a same-file PR, all three in place; the exit line is new (+1): a + // member whose premise fails, or whose open items are not cleared in one round, loses its commit + // and `Fixes` line and returns to the queue. The fold-or-serial trigger and the `Fold-with: #N` + // spelling are rewritten in place. Ruling of record: the maintainer, 2026-11-19, verbatim and + // untranslated: 「C 收敛版」; quoted in the body of card #35283 (filing gate ③), claim comment + // 7014764185. Authorized under ruling record 6184799323 (letter B). Measured delta +2 + // (193 → 195); landed count, headroom 0. + ['.claude/skills/pm-dispatch/references/execution-duties.md', 195], // New file, landed at its own count (headroom 0, same convention as every // entry above): the filing gate and the grading/reading criteria the triage // seat applies. A new pm-dispatch references file belongs in this map by the @@ -1850,7 +1891,26 @@ export const CEILINGS = new Map([ // 「这些都应该写到你的skills」), and its amendment comment 6595626876 (「目前的修复都关闭」, // 「你处理完的可以都先关闭」, 「哪些高危要发布应该在我版本发布前决策吧」). Measured // delta +19 (34 → 53 lines); landed count, headroom 0. - ['.claude/skills/pm-dispatch/references/lanes/security.md', 53], + // Raised 53 → 61 by the group-by-mechanism rules (card #35283, items 1–7) — an ORDINARY raise, + // ⛔ not a cross-file move. Eight rule lines, one rule each: sort `draft` advisories into groups + // only by shared root mechanism, inside one owning package, on intake and on each patrol; one + // lead per group, one analysis on the lead and a one-line pointer on every other member; an + // opaque group tag on the ledger row, a member moving state only when the PR that carries its + // fix merges; one order, branch, PR and L2 review per group, with the fold + // gates and the effort rule read from execution-duties.md; a group stays inside one owning + // package's release line and the normal PR size limits; a regression test per member; groups + // holding a high- or medium-severity advisory first, the other groups last, dispatched only when + // none of the first kind is waiting and batched by owning package into one order and one PR + // (exempt from fold gate ①); the publish-or-not list by group. The dispatch line gains two + // words in place. Ruling of + // record: the maintainer, 2026-11-19, verbatim and untranslated: 「按机制归组,每组做一次分析、出一个合并修复 PR, 同意,立卡修改skills」; + // quoted in the body of card #35283 (filing gate ③), claim comment 7014764185. The last-and-batched + // rule for the other groups is his answer, verbatim and untranslated, 「同意」 (card #35270's + // project thread, 2026-11-19 22:20Z) to the option put to him as + // 「排在最后;没有高危、中危的组在等的时候再派,并按所属的产品包攒成一批一起修」. Authorized under + // ruling record 6184799323 (letter B). Measured delta +8 (53 → 61 lines); every line the file + // had stays as it was but the dispatch line; landed count, headroom 0. + ['.claude/skills/pm-dispatch/references/lanes/security.md', 61], // Project Director seat charter (maintainer ruling 2026-08-27, verbatim: // 「项目总监 由人工定期指挥,负责处理 contract-review 类别的和需要决裁的。」; the file // carries it as a rule line since the rules-only rewrite, not as this quotation)