Skip to content

docs(pm-dispatch): governing-text step and protocol-baseline rule in the decision frame - #15946

Queued
os-steve wants to merge 2 commits into
mainfrom
claude/issue-15929-governing-text-step
Queued

docs(pm-dispatch): governing-text step and protocol-baseline rule in the decision frame#15946
os-steve wants to merge 2 commits into
mainfrom
claude/issue-15929-governing-text-step

Conversation

@os-steve

@os-steve os-steve commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #15929

Session: session_019RfFHiRCSs3JXLK4cwcfox · branch claude/issue-15929-governing-text-step · worktree objectstack-issue-15929.

What changed

Two rules enter the decision-card frame, each written once per carrier in that carrier's register — rules only; the two misses and the case stay on the card, and the maintainer's verbatim quote stays there too.

Rule A — Governing text. A decision card (落卡) and a director presentation (呈报) carry a Governing text: item: the repo AGENTS.md section / ADR / spec docblock / lint rule that already constrains the option space, quoted with the grep that found it, or none found with the searches run. A card whose options contradict that text is not a decision card. Leaving the decision box cites the item alongside the ruling id (the 鲜度门 comment re-read stays — this adds the missing carrier search, it does not replace anything).

Rule B — the protocol is the baseline. When a card measures "the spec declares X, the code does Y", the default direction is code → spec; a protocol change is its own card, never a side option inside a defect card. The presenter's first two lines on such a card are what the protocol declares (quoted, with the file) and whether the card asks to change it — yes ⇒ re-file as a protocol card; no ⇒ the option space is how the code conforms.

carrier register what it now says
SKILL.md 〈升级与决策〉 the rule, one line each 落卡与呈报必带 Governing text: (carriers enumerated; conflicting option space ⇒ not a decision card) · 协议为基准 (default code → spec; protocol change is its own card, ⛔ not a defect-card option) · 出决策箱 now cites the ruling id and the Governing text: item
references/decision-analysis.md 落卡分析模板 the template skeleton 段落骨架 gains Governing text(引文 + grep,或 none found + 检索式) and 协议声明、是否改协议 as segments; the six body items are untouched
references/lanes/director.md 职责二 the presenter's duty re-run the grep per card per repo before presenting (git grep -n -iE 'TERMS' origin/main -- AGENTS.md docs/adr packages/spec/src); on a spec-vs-code card the first two lines are the protocol's text (with file) and whether the card asks to change it — 改 ⇒ 重立协议卡,否则只议对齐

core-rules.md is not touched, as ruled. The four-axis frame block (SKILL.md 733–751) is byte-identical and still at the same line numbers; check:skill-frame-sync confirms 2 copies isomorphic. No model identifier appears in the commits, this body, or the files.

Merge with origin/main, and the proof

PR #15908 landed on main at 97afcb5cc while this flight was open, and so did the rules-only rewrite of the lane job descriptions; origin/main (a2051fa4e9) was merged into the branch as merge commit 3ba4752b31 (a merge, never a rebase of the pushed branch; no stash). SKILL.md auto-merged — main's removal of the old 四棱 must-carry line sits below this hunk. director.md conflicted on the rewrite and was resolved on main's rewritten content: the two lines were re-applied under 职责二, and the file's new 72-line ceiling is honoured (see the accounting). Proof on the pushed head:

git merge-tree --write-tree --name-only origin/main HEAD
3fc609b6cddfa5b7fbd810f820cb1ae3cb98fffe
exit=0

Exit 0, only the merged tree oid printed, no conflicting path named. (The pre-merge proof against PR #15908's own branch head 3b86d07a7b, taken on 2a149b3165, was also exit 0 with tree 3f8ea1a66d and no conflicting path — the later conflict came from the lane rewrite, not from that PR.)

Line accounting (ratchet, measured with LC_ALL=C awk)

  • SKILL.md: 811/811 — line-neutral. Two new rule lines are paid by two compressions inside 升级与决策, each keeping both facts on one ≤120-byte line: 711+712 (the second escalation threshold + PM discretion) → one line, 117 bytes; 727+728 (③ 到手 + the four same-stroke items) → one line, 116 bytes. Measured first: 723+724 (102+117), 730+731 (118+69), 715–717 (80/96/102) cannot fold under 120 bytes without dropping a rule, so they were not chosen. The compression is the ratchet header's own sanctioned payment ("compressing in place"), not a re-wrap.
  • decision-analysis.md: 50/50 — line-neutral. The eight-segment skeleton does not fit one 120-byte line in any spelling (measured 125–156 bytes), so it spans two lines (112 + 95 bytes); the pay-fold is 适用面 8+9 → one line (113 bytes), chosen because no pair among the 正文六项 (27–33: 108/108/82/103/83/93/88 bytes) fits 120 without dropping a clause — a stated deviation from the brief's suggested fold location, same line count.
  • director.md: 72/72 — line-neutral on main's rewritten file. The brief's "+2 within 77" no longer exists: the lane rewrite took the file to 72 lines with a 72-line ceiling, so the two presenter lines (110 and 112 bytes) are paid by two in-place compressions: 61+62 (INCOMPLETE 照实报 + 清单并入决裁批次) → one line, 101 bytes, nothing dropped; 69+70 (the skills-seat / director-seat boundary) → one line, 110 bytes, dropping only the two grammatical fillers 的工作 / 的勤务. Stated as the brief asked.
  • Widest line written: 119 bytes (the SKILL.md Governing-text line); every other written line is at most 117.

Gates run on 3ba4752b31 (every exit captured before any pipe)

  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 16 commands from the merged tree (3 paths vs merge base a2051fa4e); all 16 run, all exit 0; --ran reconcile: ✓ dispatch-gates --ran: 16 derived famil(ies) accounted for — 16 run, 0 NOT-MEASURED. (The same 16 had been run on 2a149b3165 before the merge; one, check:doc-formula-expressions, first exited 3 PREREQUISITE NOT MET — formula/lint unbuilt — read as NOT MEASURED, built through the verify lock, then green: ✓ check:doc-formula-expressions self-test: 58 cases passed and the three sweeps clean.)
  • check-skill-line-ratchet (the version now on main): --self-test 155 cases pass; live: SKILL.md 811 (ceiling 811), decision-analysis.md 50 (ceiling 50), director.md 72 (ceiling 72); pin 342 unchanged; every line within 120 bytes.
  • check-skill-id-lint: ✓ 24 file(s) clean. check-skill-frame-sync: ✓ 2 copies of the decision frame are structurally isomorphic across 2 files. check-governed-prose: ✓ 2 instruction surface(s) name all 5 registered governed surfaces … and claim no others.
  • Whole-repo pnpm lint through bash scripts/pm/os-verify-lock.sh (slot issue-15929), on the merged tree: VERDICT command-exit 0 · held the lock 91s · waited 0s (shared-box seconds, not idle-box figures).
  • Control-character scan over the three files: none.

Report-only, not done here

维护者速读(草稿)

改了什么:给决策卡和总监呈报加了两条规则,写进 PM 技能的三个文件:①每张决策卡先写明「已有的规则文本」(仓库规则、架构决策记录、协议注释、lint 规则里已经定过这件事的那一段),找不到就写明搜过哪里;②「协议为基准」——协议和代码不一致时默认改代码,想改协议要单独立卡,不能混在缺陷卡的选项里。不改任何产品功能和代码行为。

为什么改:同一天两张卡的推荐都和您已经定过的规矩相反,而那些规矩就写在仓库的规则文件和协议注释里——现有流程只在卡片评论里找旧裁决,所以两个席位都没看见,最后靠您凭记忆纠正。加上这一步,呈到您面前的卡不再和已定规则打架;协议问题也有了正确的入口(单独立卡改协议),而不是被当成缺陷卡里的一个选项绕过去。

风险与代价(含回滚):每张卡多一次 grep,几乎零成本。三个技能文件行数都不增:每处新增都靠把两条相邻规则压成一行付账,压缩后的措辞更紧,读者需要结合上下文。回滚 = revert 这两个提交(一个改动、一个合并 main),不涉及数据、接口或客户可见行为。

席位意见:

你要做的(一个动作):受管面 PR,请您人工合并;或否决。


Generated by Claude Code

…the decision frame

The decision-card frame searched only card comments and the director ledger
for prior rulings, so rulings codified in a repo AGENTS.md section, an ADR, a
spec docblock or a lint rule were invisible to both the filing seat and the
director. Two rules, each written once per carrier in its register:

- Governing text: every 落卡 and 呈报 carries a `Governing text:` item (the
  AGENTS.md section / ADR / spec docblock / lint rule that already constrains
  the option space, quoted with the grep that found it, or `none found` with
  the searches run); a card whose options contradict it is not a decision
  card; leaving the decision box cites it alongside the ruling id.
- Protocol baseline: when the spec declares X and the code does Y, the
  default is code → spec; a protocol change is its own card, never a side
  option in a defect card. The presenter's first two lines on such a card
  are what the protocol declares and whether the card asks to change it.

Line-neutral on SKILL.md (811) and decision-analysis.md (50) by compressing
two adjacent rule pairs into one 120-byte line each; director.md +2 (74/77).
Every written line is at most 119 bytes.

Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
Co-authored-by: Claude <noreply@anthropic.com>
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 5, 2026
main now carries the maintainer-brief change to the same SKILL.md section
(auto-merged; one line removed below this branch's hunk) and the rules-only
rewrite of the lane job descriptions, which conflicted with this branch's two
director.md lines. Resolved on main's rewritten director.md: the two lines are
re-applied under 职责二 and paid by two in-place compressions (61+62, 69+70)
so the file stays at its new 72-line ceiling.

Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Sep 5, 2026

os-steve commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

ACCEPT — lands #15929 as ruled (the maintainer's 插队), rules A and B in the three carriers. Governed (.claude/skills/**, predicate exit 3), so this PR stays draft at the governed terminal: both approvers requested; needs-user-decision goes on the PR with the final 「维护者速读」 posted beneath this verdict.

What the seat verified, at head 3ba4752b31, in its own compare worktree (merge base a2051fa4e9, origin/main at 46803fa69e)

  • Three files, +12/−12, every ceiling held: SKILL.md 811/811 (pin 342), decision-analysis.md 50/50, lanes/director.md 72/72 — the seat's own ratchet run exits 0 with those three lines.
  • Rule A in SKILL.md names the four carriers and the "conflicting option space is not a decision card" consequence; the 出决策箱 line now requires the Governing text: item beside the ruling id; the template skeleton carries the item's shape (quote + grep, or none found + the searches) and the protocol question; director.md carries the per-card, per-repo grep re-run before presenting. Rule B in SKILL.md (code → spec by default; a protocol change is its own card, ⛔ never a defect-card option) and its presenter form in director.md (first two lines: the protocol's text with file, whether the card asks to change it).
  • The four folds were read for lost content: 711+712 keep both escalation facts and the PM-discretion clause; 727+728 keep ③ and all four same-stroke items; 适用面 8+9 keep both scope rules; director.md 61+62 keep both, 69+70 drop only two grammatical fillers. No rule lost.
  • The four-axis frame block is byte-identical to origin/main (it sits at 734–752 on both after PR pm-dispatch: a governed PR at ACCEPT gets needs-user-decision + a Chinese 「维护者速读」 brief (dev draft, seat final) #15908's +1 shift above it; the seat's line-by-line diff against main differs only at the PR's own 出决策箱 line). check-skill-id-lint 24 files clean; check-governed-prose green; no issue number in the three files; widest written line 119 bytes.
  • Merge state: the branch carries origin/main at a2051fa4e9 as a merge commit (PR pm-dispatch: a governed PR at ACCEPT gets needs-user-decision + a Chinese 「维护者速读」 brief (dev draft, seat final) #15908 and the lane rewrite included); the dev's merge-tree proof on the pushed head reads exit 0 with no conflicting path, and the seat's diff against origin/main shows no other SKILL.md movement since.
  • CI, seat's read 16:2xZ: 28 check runs — 17 success, 9 skipped, 2 cancelled (concurrency duplicates of Part-of PR must not also close its card and No other open PR may claim the same single-writer path, each with a same-named success twin on this head), none failing, none pending.
  • Body line 1 Fixes #15929; skip-changeset present; the body carries the 草稿 section.

Open questions answered: A and A. Keep the director.md folds — the lane rewrite moved that file's ceiling to 72 under this flight, and in-place compression with no rule lost is the ratchet's sanctioned payment. Accept the 适用面 fold for the skeleton — the measured 正文六项 pairs do not fit 120 bytes without dropping a clause.

Report-only items taken by the seat: references/core-rules.md owes one digest line for the two rules — filed as a lane card; the fresh-PR no-runs observation goes to the readings ledger only if reproduced.

Implemented-by: os-dev executor, flight #15929, branch claude/issue-15929-governing-text-step
Reviewed-by: pm-dispatch skills seat, https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox


Generated by Claude Code

@claude
claude Bot requested review from hotlong and os-zhuang September 5, 2026 16:22

os-steve commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

维护者速读

改了什么:决策卡与总监呈报的框架加两条规则,写进 PM 技能的三个文件(手册的「升级与决策」、决策分析模板、总监章程),三个文件行数都不变。①「Governing text」:每张决策卡、每次呈报必带一项「已经约束这个选项空间的规则文本」——仓库 AGENTS.md 章节、ADR、引用裁决的协议注释、lint 规则——引原文并附找到它的 grep,找不到就写 none found 并附搜过的检索式;选项与既有文本冲突的卡不是决策卡。②「协议为基准」:协议声明与代码不一致默认改代码对齐;要改协议必须单独立卡,不能混进缺陷卡的选项里;协议之争呈报前两行 = 协议原文(带文件)、卡是否要改协议。

为什么改:今天一批里两个推荐都和你早已定下的规矩相反——规矩就写在 hotcrm 的 AGENTS.md 和 spec 的注释里,可现有流程只在卡评论和总监台账里找旧裁决,两个席位都没看见,最后靠你凭记忆推翻。这是检索缺环,不是权衡出错:读到规则文本后两个推荐都自动翻转。第二条是你在 #15828 上的原话「本项目以协议为基准……协议有问题应该立卡修改协议」。

风险与代价(含回滚):每张卡多一次 grep,近零成本;不碰产品代码。三处新增靠把相邻两条规则各压成一行付账,席位逐句核过无规则丢失(总监章程里只删了两个虚词)。四轴框架块逐字节不变。flight 期间 main 上落了两个同文件 PR,dev 以合并提交并入并给出 merge-tree 无冲突证明;席位复跑棘轮、编号 lint、受管面判定全绿;CI 17 成功 / 9 跳过 / 2 个并发重复被取消(同名成功孪生在)。回滚 = revert 两个提交。

席位意见:建议批准。四轴:业务——两次误裁是实测的,规则文本三种载体也是实测的;长远——把「先读已有规则」变成框架的一步,而不是靠人记;防 AI 错——正是防 agent 在已裁问题上重新提案的那道门,协议为基准更把「放宽协议迁就代码」这类最危险的选项从缺陷卡里拿掉;创业阶段——零新增行、零新面。附带:核心条款摘要(core-rules.md)欠一行同步,席位另立小卡。

你要做的:批准并入队,或人工直合。一字:是/否。


Generated by Claude Code

@os-zhuang
os-zhuang marked this pull request as ready for review September 5, 2026 22:37
@os-zhuang
os-zhuang enabled auto-merge September 5, 2026 22:37
@os-zhuang
os-zhuang added this pull request to the merge queue Sep 5, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs-user-decision size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants