Repository navigation
Commit 40a9265
docs(pm-dispatch): the order's Ruling section carries the rulings its file surface cites; spec prose restating a carried ruling is not a fork (#30736)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DRf3cTSmrg9QgJXx76Rc2Na)_
Fixes #30273
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:派发令的「裁决区」不再只抄本卡裁决:写令前要 grep
文件面代码里引用的裁决并逐字带上,零命中才能写「无裁决」;建议路线不得与带上的裁决相反。dev 的停手规则把「契约」拆成形状(Zod
形状、错误码台账、可编写键、已发布导出,仍要停手报决策)和散文(只复述已载裁决的 jsdoc / describe / 文档,同 PR
直接改)。
- **为什么改**:落实你在「决定百分比和货币字段怎么校验字符串」那条线程里的「skills 立卡」:那张卡的派发令漏带了代码里写着的裁决
A′,建议路线还和它相反,dev 卡了 80 分钟才等到一个记录里早有答案的决定。
- **风险与回滚**:只改 PM / dev 的规则文本(`.claude/**`,Tier
S),无运行时与发布物改动;四个文件行数不变,新增内容靠删掉同文件里只讲理由或重复的行来付;回滚即 revert 本 PR。
- **先看**:① `.claude/agents/os-dev.md`〈何时停手不写码〉新增三行(形状与散文的分界,dev
依此决定停不停);② `.claude/skills/pm-dispatch/references/execution-duties.md`
L12–13 与 L128–130(grep 义务、路线不得反裁决、栅栏);③ `dispatch-runbook.md` L217–219
的样例。
- **两分钟验证**:`pnpm check:pm-skill-ratchet && pnpm check:pm-skill-id-lint
&& pnpm check:pm-governed-prose`,预期三条全绿、四个文件行数与上限都不动。
- **需要你做的**:无,席位落地。
## What changes
- `.claude/skills/pm-dispatch/references/execution-duties.md`
- L12 is replaced by two lines: before writing the Ruling section the
seat greps the declared file surface (sources and tests) for `ruling`,
`Ruling-ref`, `maintainer` and `⛔`. The card's own rulings and every
ruling a hit cites enter the section verbatim (id + sentence) as
constraints. "No ruling" may be written only on a zero-hit grep; hits
that cite no ruling are recorded as a hit count.
- The third zone (suggested route) must not contradict a carried ruling.
A ruling the seat thinks should move is written into the order and sent
to a review thread before dispatch, never routed through the dev.
- New fence line: when a carried ruling has to be restated in spec
prose, the fence names `packages/spec/src/**` prose as in scope instead
of a blanket ⛔.
- `.claude/skills/pm-dispatch/SKILL.md` 〈升级与决策〉: the non-escalation
class now forks on a contract **shape** touch (`契约形状`), edited in place
on the same line. The `domain:spec` lane row is unchanged.
- `.claude/agents/os-dev.md`
- Stop rule (〈何时停手不写码〉), three lines: contract shape = Zod shape,
error-code ledger, authorable key add/remove/tombstone, published
export, and a change to it is still `needs_decision`. Spec prose (jsdoc,
`.describe`, `content/docs/**`, regenerated mirrors) that only restates
a ruling the Ruling section carries is not a fork: same PR, ruling id in
the PR body, the landing owes the contract-review-tier record. ⛔ A dev
never reverses a ruling; a fix that contradicts one still stops.
- Rule 5 (Contract-first) points its "fix at the spec" arm at that
boundary.
- `.claude/skills/pm-dispatch/references/dispatch-runbook.md` 〈派发词构造细则〉:
the worked example, three lines. The numeric screen field order
rewritten with the grep's output: the hit on `screen-input-contract.ts`
puts `A′ · 5651909056` and its sentence ("a non-number for a numeric
field is refused, never silently passed") into the Ruling section. The
route becomes refuse (A′). The original route (coerce a finite numeric
string) contradicts it and goes to a review thread first. The fence
names A′'s spec prose in scope.
## Why
The maintainer asked in the numeric-string validation decision thread
whether this kind of stall carries risk and whether the skills should
let the dev judge it, then answered 「skills 立卡」. The measured case: the
order's Ruling section said "no maintainer ruling on this card" while
its declared file surface cited ruling A′ throughout, and its suggested
route reversed A′. The dev stopped on a blanket `packages/spec/src/**`
fence even though no arm changed a Zod shape. This change closes both
gaps. What it does not change (binding, from the card): a dev never
reverses a ruling on its own; `needs_decision` still goes to a review
thread; lane pauses and Tier H surfaces are untouched.
## Tests
Rule text only. No package, test or script changes.
## Acceptance notes
- **Paid inside the ratchet, no ceiling moved.** All four files sit at
headroom 0 and keep their line counts: os-dev.md 405 → 405, SKILL.md 319
→ 319, dispatch-runbook.md 245 → 245, execution-duties.md 188 → 188
(bytes 38,304 → 38,422, 31,950 → 31,956, 19,397 → 19,504, 18,609 →
18,683). Every added line is paid by deleting a line in the same file
whose content is rationale for the rule on the line above it, or a
duplicate of a rule stated in full elsewhere. No line is paid by merging
two lines (no re-wrap).
- execution-duties.md: the `--tier` resolution-order pointer (the os-dev
frontmatter comment says where that order lives); "the named gate list
is a hint, the dev re-derives" (os-dev's local-verification section
carries the dev half, and the next lines already require re-measuring
every relayed count); the notification-replay summary
(`dispatch-runbook.md` 〈通知重放去重〉 carries the full rule).
- os-dev.md: three why-sentences, each following the rule it explains:
"forcing a PR onto a dead premise is the failure", "SIGTERM can land
mid-mutation", "an eaten marker is invisible to the PM scan".
- dispatch-runbook.md: "a label change refreshes `updated_at`", "the
title is set by the action config", "the middle state is the most
valuable". Each explains the line next to it.
- **SKILL.md L223 is unchanged.** Its fork is triggered by a failed
premise on a conditional ruling, not by a contract touch, so the
shape/prose split does not reach it. The split's definition lives once,
in os-dev's stop rule; SKILL.md L217 carries the word `契约形状` and the
order fence points at the same boundary.
- **The card's own ruling grep, run over this card's file surface**
(`git grep -n -E "ruling|Ruling-ref|maintainer|⛔"` on the four files,
origin/main `ab44ec94`): 4 non-⛔ hits, none of which cites a ruling (a
`maintainer` placeholder in the os-dev report schema, the
`needs-user-decision` sentence and the `pm:awaiting-maintainer` row in
SKILL.md, the `Ruling-ref:` format rule in the runbook), plus 254 `⛔`
prohibition lines (os-dev 70, SKILL.md 75, runbook 52, execution-duties
57), which are rule text, not rulings. So no cited ruling constrains
this edit beyond the card's own: 「skills 立卡」.
- **Example facts were read off `origin/main`.**
`packages/services/service-automation/src/screen-input-contract.ts` and
its test cite "ruling A′" in the docstring and the inverted pin, and
ruling comment `5651909056` is headed "a non-number for a numeric field
is refused, never silently passed". The example carries no tracker
number because `check:pm-skill-id-lint` scans this file.
- **Lane.** `.claude/**` only, Tier S. No changeset: no published
package moves, and `check-empty-changeset.mjs` is green on this diff.
The PR carries `skip-changeset`.
## Verification
<details><summary>Derived gate families (22 of 22, head
6d1f83c)</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`, each run with its exit code captured before
any pipe:
```
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
node scripts/pm/check-harness-current.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:agent-model-declared :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:commit-card-trailers :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-expected-skips :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-governed-prose :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:pm-skill-ratchet :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:watch-hint-literal :: exit 0
```
`dispatch-gates --ran`: 22 derived, 22 run, 0 NOT-MEASURED, 0 UNRUN. The
first ratchet run went red on three lines over the 120-byte budget; they
were shortened in the second commit and every family was re-run on the
final head.
</details>
<details><summary>Repo-wide and tier checks</summary>
- `pnpm lint`: exit 0 (head 6d1f83c).
- `node scripts/check-empty-changeset.mjs`: exit 0.
- `node scripts/pm/check-governed-merges.mjs --test` on the four paths
with `--additions 13 --deletions 13`: GOVERNED, Tier S (席内达档复核落地); the
seat lands it on a contract-review-tier PASS record with every check
green.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_016WV4cwJoqq6N33vzn39HTP)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent c6c7830 commit 40a9265
4 files changed
Lines changed: 13 additions & 13 deletions
File tree
- .claude
- agents
- skills/pm-dispatch
- references
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
260 | 259 | | |
261 | 260 | | |
262 | 261 | | |
263 | | - | |
264 | 262 | | |
265 | 263 | | |
266 | 264 | | |
| |||
319 | 317 | | |
320 | 318 | | |
321 | 319 | | |
322 | | - | |
323 | 320 | | |
324 | 321 | | |
325 | 322 | | |
| |||
350 | 347 | | |
351 | 348 | | |
352 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | 88 | | |
91 | 89 | | |
92 | 90 | | |
| |||
163 | 161 | | |
164 | 162 | | |
165 | 163 | | |
166 | | - | |
167 | 164 | | |
168 | 165 | | |
169 | 166 | | |
| |||
217 | 214 | | |
218 | 215 | | |
219 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | | - | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
0 commit comments