skills(pm-dispatch): optimization flight — monorepo-only lore cut, the report JSON printed once, upstream reporting pointed at objectstack-platform, five drifts synced to the dev contract (net −2,982 tokens) - #14444

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14300-skills-pm-dispatch-optimization
Sep 2, 2026

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14300

Member card of the skills catalog optimization program #14292 (maintainer mandate 2026-09-02, verbatim: 「审核所有的 skills,进行全面的优化。」). The audit record (audit/objectstack-pm-dispatch/findings.md) is the second comment on #14300 and is the finding-by-finding spec for this PR. PMD-B-01 (split the template into rules/) and PMD-H-01 (evals) are deferred to #14296 items 1 + 4 and 2, so this PR is Part of and #14300 remains open. Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 — branch claude/issue-14300-skills-pm-dispatch-optimization, base 96b627d1, head ea50dfb5.

Files: skills/objectstack-pm-dispatch/SKILL.md (hand-edited, shrink-only), plus skills/README.md and content/docs/ai/skills-reference.mdx as generator output only (pnpm --filter @objectstack/spec gen:skill-docs, forced by the PMD-A-01 description edit). .claude/skills/pm-dispatch/** and .claude/agents/os-dev.md were read as the comparison oracle and are not touched. No other package. Clause-②: no — no contract surface (0 TypeScript fences, no accept/reject semantics).

Token delta (convention: ceil(utf8 bytes / 4), node scripts/check-skills-token-ratchet.mjs)

filebeforeafterceilingdelta
skills/objectstack-pm-dispatch/SKILL.md14,54911,56714,549 (untouched — the card forbids editing the ratchet script; headroom 2,982 is the gate's own read-out)−2,982 (−20.5%)
whole published bundle (skills/**, shipped tree)187,854184,872−2,982
skills/README.mdgenerator-owned, measured not ratchetedone index-row description shortened
content/docs/ai/skills-reference.mdxgenerator output, outside the bundleone quick-reference row + one card shortened

Lines: 1,086 → 879. No re-wrap counted as payment; every addition below is paid by a deletion in the same file.

Gap vs the card's target (≈ −3,600 after exclusions) — itemised, not smoothed

Delivered −2,982; the card's post-exclusion estimate was ≈ −3,600 (its −4,255 minus deferred PMD-B-01's share, minus PMD-D-04, minus the drift-sync additions). The ≈ 620-token gap, by source:

sourceauditor sizingmeasured heregap
five drift syncs F-01..F-05 (cluster 4, incl. the IF-2 fix and the PM-side both-modes paragraph, the collect-step change and the premise_still_valid note)+190+426+236 — the syncs quote the oracle's substance (mechanism of the stash trap, the probe semantics of the empty push, both channels), not a one-line pointer
PMD-D-01 / D-02 / D-03 / E-04 rewrites (cluster 2)−1,090−924+166 — each rewrite keeps the construct (three-disjunct predicate + scoping caution + age floor; the two check-in rules; the baseline rule; the one-line lock rule)
PMD-B-03 / B-02 / G-01 (cluster 3)−340−270+70 — B-02 keeps a findable Report contract label with the two rules; B-03 keeps the measured one-line evidence
PMD-E-05 Guardrails bullet−580 (76-token bullet)−541 (115-token bullet)+39 — the bullet also keeps how work crosses shards (queue label + Part of, Blocked-by:, follow-up chores)
PMD-C-01 residue≤ 2502450
rounding in the card's estimate≈ +107

Per-item 落点 | before | after (keyed by finding id)

Line numbers: before = origin/main96b627d1 (byte-identical to the audited a59f78d, md5 3948bdb8…), after = head ea50dfb5.

id落点 before → afterbeforeafter
PMD-C-01:916-985:801-818882-token "Upstream reporting" job restating objectstack-platform's boundary doctrine245-token residue pointing at objectstack-platform "The App / Platform Boundary" by heading; keeps only what the loop adds: derive the upstream repo, actionable report, file as a guest, park honestly
PMD-E-05:987-1031:848-853"Multiple PMs — shard by repository" section incl. the shard registry issue (656)one Guardrails bullet One PM per queue (115)
PMD-E-02:416-452 → deleted"One semantics, N independent implementations" (565)— (a platform compiler concern; not an app project's)
PMD-E-03:591-615 → deleted (list now :504-515)the "declaration silently dropped on a new arm" and "two implementations of one operation" bullets (508)four non-escalation classes remain; the frame block below is untouched
PMD-D-01 (+E-01):191-225:189-202; :181:179sweep rationale with cross-seat producers, "steward automation", "lane", "protocol posts", the same-day anecdote (433)three short paragraphs: the disjunction rationale, the scoping caution, the updated_at floor; "lane" dropped from the classification examples
PMD-D-02:509-527:444-451the eight-card baseline sample (357)the rule: a silence threshold is a collection boundary; require a status query, the host's stop signal, or silence past a baseline measured in your own project
PMD-D-03:485-495:427-430the cancelled-timer anecdoteone clause ("a cancelled timer can still deliver"); the two check-in rules intact
PMD-E-04:765-781:674-679four correctness properties of a lock wrapper the customer does not have (290)one rule: build/test go through the host project's ONE container-wide lock; queueing is normal, endless queueing is a finding naming the holder
PMD-B-03:346-357:326-331sanitizer specimens (232)the rule plus one measured clause; the template's own trap paragraph is kept for the dev
PMD-B-02:892-913:791-797the report JSON printed a second time (194)Report contract. paragraph: the template's block is the whole contract; open_questions / out_of_scope_findings rules kept
PMD-G-01:558-559 → deleted (bullet at :481)"the PM's own tooling PRs stay with the maintainer"— (contradicted "The PM writes no files")
PMD-A-01:8-14:8-12description advertised "the upstream-reporting procedure" and the trigger "or to report a platform bug found while building an app"both clauses gone; README + mdx regenerated
PMD-F-01:455-457, :465-469, :474-475, :736-739, :867:390-400, :408-410, :414-417, :634-637, :764-767"a lossless channel … nothing can be lost" (cloud mode only posted a comment)in both modes the report is delivered twice, GitHub first: an issue comment whose first line is the literal plaintext marker dev-report (never an HTML comment), read back, then the final message; collect reads the comment before counting an agent blocked
PMD-F-02template rule list, JSON, note → :665-669, :774, :795-797no premise re-check in the template, no report fieldtemplate rule 6 (verify premises against origin/{default_branch}; a no-PR report with premise_still_valid: false + evidence is first-class); "premise_still_valid": true in the JSON; PM re-triages on false
PMD-F-03template rule 1 → :650-653grep -c stash = 0never git stash — the stack lives in the common .git, shared by every worktree; park work as a wip commit or a patch file
PMD-F-04:334-344:311-324claim shape without a session line; race check on branch onlySession: line in the claim shape; race check reads session ID or branch
PMD-F-05:806-807:648-650, :704"Pushed" was fourth in the definition of donethe empty branch is pushed before any edit (claim landing mark + write-access probe, 403 = blocked); DoD says every commit is on the branch pushed at the start; the PM-side reclaim predicate at :341-350 now matches the template
IF-2:1037-1038:824-825the template "enforces" a container-wide lock"requires" — the mechanism is the host project's

excluded_by_gate: PMD-D-04 — check:skill-frame-sync pins both copies — the gate anchors the PM copy at "every option on the four fixed axes below." (:643:540) and the template copy at "Analyze every option on four fixed axes:" (:832:729), 4 copies / 3 files / 4 axes; D-04's only remedy removes a copy the gate requires. Neither axis block is edited.

premise_false: none — every audited span was found at its stated lines (the file is byte-identical between a59f78d and 96b627d1).

Not in this flight (listed, not smoothed): PMD-A-02 (README routing bullet, +25 unpaid, needs a ruling), PMD-E-06 (LOW-confidence reorder, not in the card's table), PMD-B-01 / PMD-H-01 (deferred to #14296).

Deviations disclosed

  • Marker spelling: the published skill keeps its own dev-report marker (made a fixed literal rather than "such as"); the internal os-dev-report is this repo's instance of it, not a published name.
  • Commit order: cluster 2 (D-01/D-02/D-03/E-04) landed after clusters 3 and 4 because its first run stopped on its own residue-size assertion (261 > 250) before writing anything; no partial write reached the tree (ratchet re-read 12,385 both before and after the aborted run).

Follow-up sync once #14229 merges (⛔ not pre-synced — unmerged text)

  1. the verify-lock non-guarantee clause;
  2. the ratchet funding discipline.

Gates — all at head ea50dfb5

Baseline on the untouched worktree, then after every commit: pnpm check:skill-frame-sync — "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files · 4 axes: business-need → long-term-soundness → ai-authoring-safety → startup-scope-discipline"; pnpm check:skill-frame-freshness — "✓ … the decision frame in this tree is current with origin/main (fetched just now)".

Dispatch-named: node scripts/check-skills-token-ratchet.mjs — "✓ … skills/objectstack-pm-dispatch/SKILL.md is 11567 tokens (ceiling 14549; headroom 2982)"; pnpm check:skill-compatibility — "✓ … 11 SKILL.md file(s) reconciled against 78 workspace packages"; pnpm check:skill-identifier-liveness — "OK — Leg 1: 500 citation(s) over 48 published file(s) … (5 ledgered exemption(s)); Leg 2: 9 registered exhaustive section(s)" (none bound to this file; the three Leg 1 exemptions for this file — backlogRepo, conventionsFile, routingLabelPrefix — still resolve); pnpm --filter @objectstack/spec check:skill-docs — "✅ Skill docs in sync"; pnpm check:nul-bytes — "OK (scanned 7875 text file(s) … no raw ASCII control bytes)".

Re-derived union — node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands from the tree at ea50dfb5 ("gate list derived from the tree of 'objectstack-ai/objectstack' at commit ea50dfb"), 36 commands, each exit code captured by redirect before any pipe: 33 green on the first pass; pnpm --filter @objectstack/lint run check:doc-formula-expressions and … check:doc-security-posture green after building @objectstack/formula / @objectstack/lint (first pass exit 3 = PREREQUISITE NOT MET, not a red); pnpm --filter @objectstack/spec run check:skill-examples — green after building types / client / client-react ("✅ 259 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them"; the first-pass exit 1 was the gate's own prerequisite refusal, packages/client-react/dist unbuilt); node scripts/check-test-completeness.mjs — NOT MEASURED locally by the gate's own design (exit 3: "grades a saved turbo run test log, and no log was named"; CI tees the log). node scripts/check-empty-changeset.mjs --base origin/main — "✓ No empty-frontmatter changeset introduced by this diff".

Heavy steps (@objectstack/spec, types/client/client-react builds, check:skill-examples) ran under scripts/pm/os-verify-lock.sh (OS_VERIFY_LOCK_SLOT=issue-14300).

Changeset

skip-changeset label: nothing is released by any package change — the diff touches skills/** and content/docs/** only, neither is a workspace package; scripts/check-empty-changeset.mjs confirms no changeset is added.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

…, point upstream reporting at objectstack-platform
PMD-C-01: the 882-token upstream-reporting job becomes a residue that points at
objectstack-platform's "The App / Platform Boundary" section by heading and keeps
only what this loop adds (derive the upstream repo, actionable report, file as a
guest, park honestly).
PMD-E-05: "Multiple PMs — shard by repository" collapses to one Guardrails bullet.
PMD-E-02: "One semantics, N independent implementations" retired from the
published surface (a platform compiler concern, not an app project's).
PMD-E-03: the two platform-governance non-escalation bullets deleted; the frame
block below them is untouched (check:skill-frame-sync green).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ort JSON, no PM-authored PRs
PMD-B-03: the sanitizer specimens are gone; the rule and its measured one-line
evidence stay.
PMD-B-02: the report JSON is printed once (in the template); the "Report
contract" section keeps only the two rules the second copy added.
PMD-G-01: "the PM's own tooling PRs" clause deleted — it contradicted
"The PM writes no files".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…tract; "enforces" reads "requires"
F-01: the report is delivered twice in both modes, GitHub first, first line the
literal plaintext marker (never an HTML comment), read back; the "lossless
channel" claim is gone (it was contradicted by the collect step).
F-02: the template re-checks the issue's premises; the report carries
premise_still_valid, and a no-PR report with premise_still_valid: false plus
evidence is a first-class delivery.
F-03: never git stash — the stack lives in the common .git and is shared by
every worktree; park work as a wip commit or a patch file.
F-04: the claim comment carries a Session: line; the race check reads session
ID or branch.
F-05: the empty branch is pushed before any edit (also the write-access probe),
so the stale-claim reclaim can never fire against a live agent.
IF-2: the PM-side resource paragraph says the template "requires" the lock, not
"enforces" it — the mechanism is the host project's.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…the lock design spec as constructs
PMD-D-01 (+E-01): the sweep rationale keeps the three-disjunct predicate, the
scoping caution and the updated_at floor; the cross-seat producers, the
"steward automation" / "lane" / "protocol posts" vocabulary and the anecdote go.
PMD-D-02: the eight-card baseline sample is gone; the rule that the baseline is
measured in your own project stays.
PMD-D-03: the cancelled-timer anecdote is gone; the two check-in rules stay.
PMD-E-04: the four correctness properties of a lock wrapper the customer does
not have collapse to one line; the mechanism stays the host project's.
Also trims the PMD-C-01 residue to <= 250 tokens (the card's ceiling).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ger; regenerate the catalog
The description no longer advertises the upstream-reporting job (the doctrine
lives in objectstack-platform; this file keeps a pointer). skills/README.md and
content/docs/ai/skills-reference.mdx are generator output
(pnpm --filter @objectstack/spec gen:skill-docs), not hand edits.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 08:26
@os-zhuang
os-zhuang added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit a9b2be0Sep 2, 2026
40 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14300-skills-pm-dispatch-optimization branch September 2, 2026 08:57
os-litant pushed a commit that referenced this pull request Sep 2, 2026
…ent template — the verify-lock non-guarantee and the ratchet funding discipline
The follow-up sync PR #14444 recorded, from .claude/agents/os-dev.md on
origin/main: (1) resource rule 1 now states the lock's non-guarantee —
it does not promise an idle machine, only excludes work routed through it,
so wall-clock readings under a hold are shared-box readings; (2) a size
ratchet is paid only by deleting content — a re-wrap is not payment, a
densification that adds nothing is a repair, a ceiling is raised only by
the maintainer, nothing left to delete means "blocked". Additions +108
tokens, funded in the same package: three dispatch-prompt non-negotiables
that restated the template's binding-file paragraph, the "When to STOP"
rule and rule 4 verbatim; the template's top-paragraph restatement of the
final-message rule; the sanitizer trap's HTML-comment clause (stated at
the report block); and rule 4's published-only rationale sentence about
disk exhaustion, which the oracle does not carry. Package 11,556 ->
11,546 (-10 for this commit, -21 against main). Ratchet rows re-pinned at
the landed counts: entry 9,708, rules/dev-template.md 1,838.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

skills(pm-dispatch): optimization flight — monorepo-only lore cut, the report JSON printed once, upstream reporting pointed at objectstack-platform, five drifts synced to the dev contract (net −2,982 tokens) - #14444

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14300-skills-pm-dispatch-optimization
Sep 2, 2026

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14300

Member card of the skills catalog optimization program #14292 (maintainer mandate 2026-09-02, verbatim: 「审核所有的 skills,进行全面的优化。」). The audit record (audit/objectstack-pm-dispatch/findings.md) is the second comment on #14300 and is the finding-by-finding spec for this PR. PMD-B-01 (split the template into rules/) and PMD-H-01 (evals) are deferred to #14296 items 1 + 4 and 2, so this PR is Part of and #14300 remains open. Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 — branch claude/issue-14300-skills-pm-dispatch-optimization, base 96b627d1, head ea50dfb5.

Files: skills/objectstack-pm-dispatch/SKILL.md (hand-edited, shrink-only), plus skills/README.md and content/docs/ai/skills-reference.mdx as generator output only (pnpm --filter @objectstack/spec gen:skill-docs, forced by the PMD-A-01 description edit). .claude/skills/pm-dispatch/** and .claude/agents/os-dev.md were read as the comparison oracle and are not touched. No other package. Clause-②: no — no contract surface (0 TypeScript fences, no accept/reject semantics).

Token delta (convention: ceil(utf8 bytes / 4), node scripts/check-skills-token-ratchet.mjs)

filebeforeafterceilingdelta
skills/objectstack-pm-dispatch/SKILL.md14,54911,56714,549 (untouched — the card forbids editing the ratchet script; headroom 2,982 is the gate's own read-out)−2,982 (−20.5%)
whole published bundle (skills/**, shipped tree)187,854184,872−2,982
skills/README.mdgenerator-owned, measured not ratchetedone index-row description shortened
content/docs/ai/skills-reference.mdxgenerator output, outside the bundleone quick-reference row + one card shortened

Lines: 1,086 → 879. No re-wrap counted as payment; every addition below is paid by a deletion in the same file.

Gap vs the card's target (≈ −3,600 after exclusions) — itemised, not smoothed

Delivered −2,982; the card's post-exclusion estimate was ≈ −3,600 (its −4,255 minus deferred PMD-B-01's share, minus PMD-D-04, minus the drift-sync additions). The ≈ 620-token gap, by source:

sourceauditor sizingmeasured heregap
five drift syncs F-01..F-05 (cluster 4, incl. the IF-2 fix and the PM-side both-modes paragraph, the collect-step change and the premise_still_valid note)+190+426+236 — the syncs quote the oracle's substance (mechanism of the stash trap, the probe semantics of the empty push, both channels), not a one-line pointer
PMD-D-01 / D-02 / D-03 / E-04 rewrites (cluster 2)−1,090−924+166 — each rewrite keeps the construct (three-disjunct predicate + scoping caution + age floor; the two check-in rules; the baseline rule; the one-line lock rule)
PMD-B-03 / B-02 / G-01 (cluster 3)−340−270+70 — B-02 keeps a findable Report contract label with the two rules; B-03 keeps the measured one-line evidence
PMD-E-05 Guardrails bullet−580 (76-token bullet)−541 (115-token bullet)+39 — the bullet also keeps how work crosses shards (queue label + Part of, Blocked-by:, follow-up chores)
PMD-C-01 residue≤ 2502450
rounding in the card's estimate≈ +107

Per-item 落点 | before | after (keyed by finding id)

Line numbers: before = origin/main96b627d1 (byte-identical to the audited a59f78d, md5 3948bdb8…), after = head ea50dfb5.

id落点 before → afterbeforeafter
PMD-C-01:916-985:801-818882-token "Upstream reporting" job restating objectstack-platform's boundary doctrine245-token residue pointing at objectstack-platform "The App / Platform Boundary" by heading; keeps only what the loop adds: derive the upstream repo, actionable report, file as a guest, park honestly
PMD-E-05:987-1031:848-853"Multiple PMs — shard by repository" section incl. the shard registry issue (656)one Guardrails bullet One PM per queue (115)
PMD-E-02:416-452 → deleted"One semantics, N independent implementations" (565)— (a platform compiler concern; not an app project's)
PMD-E-03:591-615 → deleted (list now :504-515)the "declaration silently dropped on a new arm" and "two implementations of one operation" bullets (508)four non-escalation classes remain; the frame block below is untouched
PMD-D-01 (+E-01):191-225:189-202; :181:179sweep rationale with cross-seat producers, "steward automation", "lane", "protocol posts", the same-day anecdote (433)three short paragraphs: the disjunction rationale, the scoping caution, the updated_at floor; "lane" dropped from the classification examples
PMD-D-02:509-527:444-451the eight-card baseline sample (357)the rule: a silence threshold is a collection boundary; require a status query, the host's stop signal, or silence past a baseline measured in your own project
PMD-D-03:485-495:427-430the cancelled-timer anecdoteone clause ("a cancelled timer can still deliver"); the two check-in rules intact
PMD-E-04:765-781:674-679four correctness properties of a lock wrapper the customer does not have (290)one rule: build/test go through the host project's ONE container-wide lock; queueing is normal, endless queueing is a finding naming the holder
PMD-B-03:346-357:326-331sanitizer specimens (232)the rule plus one measured clause; the template's own trap paragraph is kept for the dev
PMD-B-02:892-913:791-797the report JSON printed a second time (194)Report contract. paragraph: the template's block is the whole contract; open_questions / out_of_scope_findings rules kept
PMD-G-01:558-559 → deleted (bullet at :481)"the PM's own tooling PRs stay with the maintainer"— (contradicted "The PM writes no files")
PMD-A-01:8-14:8-12description advertised "the upstream-reporting procedure" and the trigger "or to report a platform bug found while building an app"both clauses gone; README + mdx regenerated
PMD-F-01:455-457, :465-469, :474-475, :736-739, :867:390-400, :408-410, :414-417, :634-637, :764-767"a lossless channel … nothing can be lost" (cloud mode only posted a comment)in both modes the report is delivered twice, GitHub first: an issue comment whose first line is the literal plaintext marker dev-report (never an HTML comment), read back, then the final message; collect reads the comment before counting an agent blocked
PMD-F-02template rule list, JSON, note → :665-669, :774, :795-797no premise re-check in the template, no report fieldtemplate rule 6 (verify premises against origin/{default_branch}; a no-PR report with premise_still_valid: false + evidence is first-class); "premise_still_valid": true in the JSON; PM re-triages on false
PMD-F-03template rule 1 → :650-653grep -c stash = 0never git stash — the stack lives in the common .git, shared by every worktree; park work as a wip commit or a patch file
PMD-F-04:334-344:311-324claim shape without a session line; race check on branch onlySession: line in the claim shape; race check reads session ID or branch
PMD-F-05:806-807:648-650, :704"Pushed" was fourth in the definition of donethe empty branch is pushed before any edit (claim landing mark + write-access probe, 403 = blocked); DoD says every commit is on the branch pushed at the start; the PM-side reclaim predicate at :341-350 now matches the template
IF-2:1037-1038:824-825the template "enforces" a container-wide lock"requires" — the mechanism is the host project's

excluded_by_gate: PMD-D-04 — check:skill-frame-sync pins both copies — the gate anchors the PM copy at "every option on the four fixed axes below." (:643:540) and the template copy at "Analyze every option on four fixed axes:" (:832:729), 4 copies / 3 files / 4 axes; D-04's only remedy removes a copy the gate requires. Neither axis block is edited.

premise_false: none — every audited span was found at its stated lines (the file is byte-identical between a59f78d and 96b627d1).

Not in this flight (listed, not smoothed): PMD-A-02 (README routing bullet, +25 unpaid, needs a ruling), PMD-E-06 (LOW-confidence reorder, not in the card's table), PMD-B-01 / PMD-H-01 (deferred to #14296).

Deviations disclosed

  • Marker spelling: the published skill keeps its own dev-report marker (made a fixed literal rather than "such as"); the internal os-dev-report is this repo's instance of it, not a published name.
  • Commit order: cluster 2 (D-01/D-02/D-03/E-04) landed after clusters 3 and 4 because its first run stopped on its own residue-size assertion (261 > 250) before writing anything; no partial write reached the tree (ratchet re-read 12,385 both before and after the aborted run).

Follow-up sync once #14229 merges (⛔ not pre-synced — unmerged text)

  1. the verify-lock non-guarantee clause;
  2. the ratchet funding discipline.

Gates — all at head ea50dfb5

Baseline on the untouched worktree, then after every commit: pnpm check:skill-frame-sync — "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files · 4 axes: business-need → long-term-soundness → ai-authoring-safety → startup-scope-discipline"; pnpm check:skill-frame-freshness — "✓ … the decision frame in this tree is current with origin/main (fetched just now)".

Dispatch-named: node scripts/check-skills-token-ratchet.mjs — "✓ … skills/objectstack-pm-dispatch/SKILL.md is 11567 tokens (ceiling 14549; headroom 2982)"; pnpm check:skill-compatibility — "✓ … 11 SKILL.md file(s) reconciled against 78 workspace packages"; pnpm check:skill-identifier-liveness — "OK — Leg 1: 500 citation(s) over 48 published file(s) … (5 ledgered exemption(s)); Leg 2: 9 registered exhaustive section(s)" (none bound to this file; the three Leg 1 exemptions for this file — backlogRepo, conventionsFile, routingLabelPrefix — still resolve); pnpm --filter @objectstack/spec check:skill-docs — "✅ Skill docs in sync"; pnpm check:nul-bytes — "OK (scanned 7875 text file(s) … no raw ASCII control bytes)".

Re-derived union — node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands from the tree at ea50dfb5 ("gate list derived from the tree of 'objectstack-ai/objectstack' at commit ea50dfb"), 36 commands, each exit code captured by redirect before any pipe: 33 green on the first pass; pnpm --filter @objectstack/lint run check:doc-formula-expressions and … check:doc-security-posture green after building @objectstack/formula / @objectstack/lint (first pass exit 3 = PREREQUISITE NOT MET, not a red); pnpm --filter @objectstack/spec run check:skill-examples — green after building types / client / client-react ("✅ 259 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them"; the first-pass exit 1 was the gate's own prerequisite refusal, packages/client-react/dist unbuilt); node scripts/check-test-completeness.mjs — NOT MEASURED locally by the gate's own design (exit 3: "grades a saved turbo run test log, and no log was named"; CI tees the log). node scripts/check-empty-changeset.mjs --base origin/main — "✓ No empty-frontmatter changeset introduced by this diff".

Heavy steps (@objectstack/spec, types/client/client-react builds, check:skill-examples) ran under scripts/pm/os-verify-lock.sh (OS_VERIFY_LOCK_SLOT=issue-14300).

Changeset

skip-changeset label: nothing is released by any package change — the diff touches skills/** and content/docs/** only, neither is a workspace package; scripts/check-empty-changeset.mjs confirms no changeset is added.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

…, point upstream reporting at objectstack-platform
PMD-C-01: the 882-token upstream-reporting job becomes a residue that points at
objectstack-platform's "The App / Platform Boundary" section by heading and keeps
only what this loop adds (derive the upstream repo, actionable report, file as a
guest, park honestly).
PMD-E-05: "Multiple PMs — shard by repository" collapses to one Guardrails bullet.
PMD-E-02: "One semantics, N independent implementations" retired from the
published surface (a platform compiler concern, not an app project's).
PMD-E-03: the two platform-governance non-escalation bullets deleted; the frame
block below them is untouched (check:skill-frame-sync green).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ort JSON, no PM-authored PRs
PMD-B-03: the sanitizer specimens are gone; the rule and its measured one-line
evidence stay.
PMD-B-02: the report JSON is printed once (in the template); the "Report
contract" section keeps only the two rules the second copy added.
PMD-G-01: "the PM's own tooling PRs" clause deleted — it contradicted
"The PM writes no files".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…tract; "enforces" reads "requires"
F-01: the report is delivered twice in both modes, GitHub first, first line the
literal plaintext marker (never an HTML comment), read back; the "lossless
channel" claim is gone (it was contradicted by the collect step).
F-02: the template re-checks the issue's premises; the report carries
premise_still_valid, and a no-PR report with premise_still_valid: false plus
evidence is a first-class delivery.
F-03: never git stash — the stack lives in the common .git and is shared by
every worktree; park work as a wip commit or a patch file.
F-04: the claim comment carries a Session: line; the race check reads session
ID or branch.
F-05: the empty branch is pushed before any edit (also the write-access probe),
so the stale-claim reclaim can never fire against a live agent.
IF-2: the PM-side resource paragraph says the template "requires" the lock, not
"enforces" it — the mechanism is the host project's.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…the lock design spec as constructs
PMD-D-01 (+E-01): the sweep rationale keeps the three-disjunct predicate, the
scoping caution and the updated_at floor; the cross-seat producers, the
"steward automation" / "lane" / "protocol posts" vocabulary and the anecdote go.
PMD-D-02: the eight-card baseline sample is gone; the rule that the baseline is
measured in your own project stays.
PMD-D-03: the cancelled-timer anecdote is gone; the two check-in rules stay.
PMD-E-04: the four correctness properties of a lock wrapper the customer does
not have collapse to one line; the mechanism stays the host project's.
Also trims the PMD-C-01 residue to <= 250 tokens (the card's ceiling).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ger; regenerate the catalog
The description no longer advertises the upstream-reporting job (the doctrine
lives in objectstack-platform; this file keeps a pointer). skills/README.md and
content/docs/ai/skills-reference.mdx are generator output
(pnpm --filter @objectstack/spec gen:skill-docs), not hand edits.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 08:26
@os-zhuang
os-zhuang added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit a9b2be0Sep 2, 2026
40 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14300-skills-pm-dispatch-optimization branch September 2, 2026 08:57
os-litant pushed a commit that referenced this pull request Sep 2, 2026
…ent template — the verify-lock non-guarantee and the ratchet funding discipline
The follow-up sync PR #14444 recorded, from .claude/agents/os-dev.md on
origin/main: (1) resource rule 1 now states the lock's non-guarantee —
it does not promise an idle machine, only excludes work routed through it,
so wall-clock readings under a hold are shared-box readings; (2) a size
ratchet is paid only by deleting content — a re-wrap is not payment, a
densification that adds nothing is a repair, a ceiling is raised only by
the maintainer, nothing left to delete means "blocked". Additions +108
tokens, funded in the same package: three dispatch-prompt non-negotiables
that restated the template's binding-file paragraph, the "When to STOP"
rule and rule 4 verbatim; the template's top-paragraph restatement of the
final-message rule; the sanitizer trap's HTML-comment clause (stated at
the report block); and rule 4's published-only rationale sentence about
disk exhaustion, which the oracle does not carry. Package 11,556 ->
11,546 (-10 for this commit, -21 against main). Ratchet rows re-pinned at
the landed counts: entry 9,708, rules/dev-template.md 1,838.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

skills(pm-dispatch): optimization flight — monorepo-only lore cut, the report JSON printed once, upstream reporting pointed at objectstack-platform, five drifts synced to the dev contract (net −2,982 tokens) - #14444

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14300-skills-pm-dispatch-optimization
Sep 2, 2026

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14300

Member card of the skills catalog optimization program #14292 (maintainer mandate 2026-09-02, verbatim: 「审核所有的 skills,进行全面的优化。」). The audit record (audit/objectstack-pm-dispatch/findings.md) is the second comment on #14300 and is the finding-by-finding spec for this PR. PMD-B-01 (split the template into rules/) and PMD-H-01 (evals) are deferred to #14296 items 1 + 4 and 2, so this PR is Part of and #14300 remains open. Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 — branch claude/issue-14300-skills-pm-dispatch-optimization, base 96b627d1, head ea50dfb5.

Files: skills/objectstack-pm-dispatch/SKILL.md (hand-edited, shrink-only), plus skills/README.md and content/docs/ai/skills-reference.mdx as generator output only (pnpm --filter @objectstack/spec gen:skill-docs, forced by the PMD-A-01 description edit). .claude/skills/pm-dispatch/** and .claude/agents/os-dev.md were read as the comparison oracle and are not touched. No other package. Clause-②: no — no contract surface (0 TypeScript fences, no accept/reject semantics).

Token delta (convention: ceil(utf8 bytes / 4), node scripts/check-skills-token-ratchet.mjs)

filebeforeafterceilingdelta
skills/objectstack-pm-dispatch/SKILL.md14,54911,56714,549 (untouched — the card forbids editing the ratchet script; headroom 2,982 is the gate's own read-out)−2,982 (−20.5%)
whole published bundle (skills/**, shipped tree)187,854184,872−2,982
skills/README.mdgenerator-owned, measured not ratchetedone index-row description shortened
content/docs/ai/skills-reference.mdxgenerator output, outside the bundleone quick-reference row + one card shortened

Lines: 1,086 → 879. No re-wrap counted as payment; every addition below is paid by a deletion in the same file.

Gap vs the card's target (≈ −3,600 after exclusions) — itemised, not smoothed

Delivered −2,982; the card's post-exclusion estimate was ≈ −3,600 (its −4,255 minus deferred PMD-B-01's share, minus PMD-D-04, minus the drift-sync additions). The ≈ 620-token gap, by source:

sourceauditor sizingmeasured heregap
five drift syncs F-01..F-05 (cluster 4, incl. the IF-2 fix and the PM-side both-modes paragraph, the collect-step change and the premise_still_valid note)+190+426+236 — the syncs quote the oracle's substance (mechanism of the stash trap, the probe semantics of the empty push, both channels), not a one-line pointer
PMD-D-01 / D-02 / D-03 / E-04 rewrites (cluster 2)−1,090−924+166 — each rewrite keeps the construct (three-disjunct predicate + scoping caution + age floor; the two check-in rules; the baseline rule; the one-line lock rule)
PMD-B-03 / B-02 / G-01 (cluster 3)−340−270+70 — B-02 keeps a findable Report contract label with the two rules; B-03 keeps the measured one-line evidence
PMD-E-05 Guardrails bullet−580 (76-token bullet)−541 (115-token bullet)+39 — the bullet also keeps how work crosses shards (queue label + Part of, Blocked-by:, follow-up chores)
PMD-C-01 residue≤ 2502450
rounding in the card's estimate≈ +107

Per-item 落点 | before | after (keyed by finding id)

Line numbers: before = origin/main96b627d1 (byte-identical to the audited a59f78d, md5 3948bdb8…), after = head ea50dfb5.

id落点 before → afterbeforeafter
PMD-C-01:916-985:801-818882-token "Upstream reporting" job restating objectstack-platform's boundary doctrine245-token residue pointing at objectstack-platform "The App / Platform Boundary" by heading; keeps only what the loop adds: derive the upstream repo, actionable report, file as a guest, park honestly
PMD-E-05:987-1031:848-853"Multiple PMs — shard by repository" section incl. the shard registry issue (656)one Guardrails bullet One PM per queue (115)
PMD-E-02:416-452 → deleted"One semantics, N independent implementations" (565)— (a platform compiler concern; not an app project's)
PMD-E-03:591-615 → deleted (list now :504-515)the "declaration silently dropped on a new arm" and "two implementations of one operation" bullets (508)four non-escalation classes remain; the frame block below is untouched
PMD-D-01 (+E-01):191-225:189-202; :181:179sweep rationale with cross-seat producers, "steward automation", "lane", "protocol posts", the same-day anecdote (433)three short paragraphs: the disjunction rationale, the scoping caution, the updated_at floor; "lane" dropped from the classification examples
PMD-D-02:509-527:444-451the eight-card baseline sample (357)the rule: a silence threshold is a collection boundary; require a status query, the host's stop signal, or silence past a baseline measured in your own project
PMD-D-03:485-495:427-430the cancelled-timer anecdoteone clause ("a cancelled timer can still deliver"); the two check-in rules intact
PMD-E-04:765-781:674-679four correctness properties of a lock wrapper the customer does not have (290)one rule: build/test go through the host project's ONE container-wide lock; queueing is normal, endless queueing is a finding naming the holder
PMD-B-03:346-357:326-331sanitizer specimens (232)the rule plus one measured clause; the template's own trap paragraph is kept for the dev
PMD-B-02:892-913:791-797the report JSON printed a second time (194)Report contract. paragraph: the template's block is the whole contract; open_questions / out_of_scope_findings rules kept
PMD-G-01:558-559 → deleted (bullet at :481)"the PM's own tooling PRs stay with the maintainer"— (contradicted "The PM writes no files")
PMD-A-01:8-14:8-12description advertised "the upstream-reporting procedure" and the trigger "or to report a platform bug found while building an app"both clauses gone; README + mdx regenerated
PMD-F-01:455-457, :465-469, :474-475, :736-739, :867:390-400, :408-410, :414-417, :634-637, :764-767"a lossless channel … nothing can be lost" (cloud mode only posted a comment)in both modes the report is delivered twice, GitHub first: an issue comment whose first line is the literal plaintext marker dev-report (never an HTML comment), read back, then the final message; collect reads the comment before counting an agent blocked
PMD-F-02template rule list, JSON, note → :665-669, :774, :795-797no premise re-check in the template, no report fieldtemplate rule 6 (verify premises against origin/{default_branch}; a no-PR report with premise_still_valid: false + evidence is first-class); "premise_still_valid": true in the JSON; PM re-triages on false
PMD-F-03template rule 1 → :650-653grep -c stash = 0never git stash — the stack lives in the common .git, shared by every worktree; park work as a wip commit or a patch file
PMD-F-04:334-344:311-324claim shape without a session line; race check on branch onlySession: line in the claim shape; race check reads session ID or branch
PMD-F-05:806-807:648-650, :704"Pushed" was fourth in the definition of donethe empty branch is pushed before any edit (claim landing mark + write-access probe, 403 = blocked); DoD says every commit is on the branch pushed at the start; the PM-side reclaim predicate at :341-350 now matches the template
IF-2:1037-1038:824-825the template "enforces" a container-wide lock"requires" — the mechanism is the host project's

excluded_by_gate: PMD-D-04 — check:skill-frame-sync pins both copies — the gate anchors the PM copy at "every option on the four fixed axes below." (:643:540) and the template copy at "Analyze every option on four fixed axes:" (:832:729), 4 copies / 3 files / 4 axes; D-04's only remedy removes a copy the gate requires. Neither axis block is edited.

premise_false: none — every audited span was found at its stated lines (the file is byte-identical between a59f78d and 96b627d1).

Not in this flight (listed, not smoothed): PMD-A-02 (README routing bullet, +25 unpaid, needs a ruling), PMD-E-06 (LOW-confidence reorder, not in the card's table), PMD-B-01 / PMD-H-01 (deferred to #14296).

Deviations disclosed

  • Marker spelling: the published skill keeps its own dev-report marker (made a fixed literal rather than "such as"); the internal os-dev-report is this repo's instance of it, not a published name.
  • Commit order: cluster 2 (D-01/D-02/D-03/E-04) landed after clusters 3 and 4 because its first run stopped on its own residue-size assertion (261 > 250) before writing anything; no partial write reached the tree (ratchet re-read 12,385 both before and after the aborted run).

Follow-up sync once #14229 merges (⛔ not pre-synced — unmerged text)

  1. the verify-lock non-guarantee clause;
  2. the ratchet funding discipline.

Gates — all at head ea50dfb5

Baseline on the untouched worktree, then after every commit: pnpm check:skill-frame-sync — "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files · 4 axes: business-need → long-term-soundness → ai-authoring-safety → startup-scope-discipline"; pnpm check:skill-frame-freshness — "✓ … the decision frame in this tree is current with origin/main (fetched just now)".

Dispatch-named: node scripts/check-skills-token-ratchet.mjs — "✓ … skills/objectstack-pm-dispatch/SKILL.md is 11567 tokens (ceiling 14549; headroom 2982)"; pnpm check:skill-compatibility — "✓ … 11 SKILL.md file(s) reconciled against 78 workspace packages"; pnpm check:skill-identifier-liveness — "OK — Leg 1: 500 citation(s) over 48 published file(s) … (5 ledgered exemption(s)); Leg 2: 9 registered exhaustive section(s)" (none bound to this file; the three Leg 1 exemptions for this file — backlogRepo, conventionsFile, routingLabelPrefix — still resolve); pnpm --filter @objectstack/spec check:skill-docs — "✅ Skill docs in sync"; pnpm check:nul-bytes — "OK (scanned 7875 text file(s) … no raw ASCII control bytes)".

Re-derived union — node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands from the tree at ea50dfb5 ("gate list derived from the tree of 'objectstack-ai/objectstack' at commit ea50dfb"), 36 commands, each exit code captured by redirect before any pipe: 33 green on the first pass; pnpm --filter @objectstack/lint run check:doc-formula-expressions and … check:doc-security-posture green after building @objectstack/formula / @objectstack/lint (first pass exit 3 = PREREQUISITE NOT MET, not a red); pnpm --filter @objectstack/spec run check:skill-examples — green after building types / client / client-react ("✅ 259 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them"; the first-pass exit 1 was the gate's own prerequisite refusal, packages/client-react/dist unbuilt); node scripts/check-test-completeness.mjs — NOT MEASURED locally by the gate's own design (exit 3: "grades a saved turbo run test log, and no log was named"; CI tees the log). node scripts/check-empty-changeset.mjs --base origin/main — "✓ No empty-frontmatter changeset introduced by this diff".

Heavy steps (@objectstack/spec, types/client/client-react builds, check:skill-examples) ran under scripts/pm/os-verify-lock.sh (OS_VERIFY_LOCK_SLOT=issue-14300).

Changeset

skip-changeset label: nothing is released by any package change — the diff touches skills/** and content/docs/** only, neither is a workspace package; scripts/check-empty-changeset.mjs confirms no changeset is added.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

…, point upstream reporting at objectstack-platform
PMD-C-01: the 882-token upstream-reporting job becomes a residue that points at
objectstack-platform's "The App / Platform Boundary" section by heading and keeps
only what this loop adds (derive the upstream repo, actionable report, file as a
guest, park honestly).
PMD-E-05: "Multiple PMs — shard by repository" collapses to one Guardrails bullet.
PMD-E-02: "One semantics, N independent implementations" retired from the
published surface (a platform compiler concern, not an app project's).
PMD-E-03: the two platform-governance non-escalation bullets deleted; the frame
block below them is untouched (check:skill-frame-sync green).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ort JSON, no PM-authored PRs
PMD-B-03: the sanitizer specimens are gone; the rule and its measured one-line
evidence stay.
PMD-B-02: the report JSON is printed once (in the template); the "Report
contract" section keeps only the two rules the second copy added.
PMD-G-01: "the PM's own tooling PRs" clause deleted — it contradicted
"The PM writes no files".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…tract; "enforces" reads "requires"
F-01: the report is delivered twice in both modes, GitHub first, first line the
literal plaintext marker (never an HTML comment), read back; the "lossless
channel" claim is gone (it was contradicted by the collect step).
F-02: the template re-checks the issue's premises; the report carries
premise_still_valid, and a no-PR report with premise_still_valid: false plus
evidence is a first-class delivery.
F-03: never git stash — the stack lives in the common .git and is shared by
every worktree; park work as a wip commit or a patch file.
F-04: the claim comment carries a Session: line; the race check reads session
ID or branch.
F-05: the empty branch is pushed before any edit (also the write-access probe),
so the stale-claim reclaim can never fire against a live agent.
IF-2: the PM-side resource paragraph says the template "requires" the lock, not
"enforces" it — the mechanism is the host project's.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…the lock design spec as constructs
PMD-D-01 (+E-01): the sweep rationale keeps the three-disjunct predicate, the
scoping caution and the updated_at floor; the cross-seat producers, the
"steward automation" / "lane" / "protocol posts" vocabulary and the anecdote go.
PMD-D-02: the eight-card baseline sample is gone; the rule that the baseline is
measured in your own project stays.
PMD-D-03: the cancelled-timer anecdote is gone; the two check-in rules stay.
PMD-E-04: the four correctness properties of a lock wrapper the customer does
not have collapse to one line; the mechanism stays the host project's.
Also trims the PMD-C-01 residue to <= 250 tokens (the card's ceiling).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ger; regenerate the catalog
The description no longer advertises the upstream-reporting job (the doctrine
lives in objectstack-platform; this file keeps a pointer). skills/README.md and
content/docs/ai/skills-reference.mdx are generator output
(pnpm --filter @objectstack/spec gen:skill-docs), not hand edits.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 08:26
@os-zhuang
os-zhuang added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit a9b2be0Sep 2, 2026
40 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14300-skills-pm-dispatch-optimization branch September 2, 2026 08:57
os-litant pushed a commit that referenced this pull request Sep 2, 2026
…ent template — the verify-lock non-guarantee and the ratchet funding discipline
The follow-up sync PR #14444 recorded, from .claude/agents/os-dev.md on
origin/main: (1) resource rule 1 now states the lock's non-guarantee —
it does not promise an idle machine, only excludes work routed through it,
so wall-clock readings under a hold are shared-box readings; (2) a size
ratchet is paid only by deleting content — a re-wrap is not payment, a
densification that adds nothing is a repair, a ceiling is raised only by
the maintainer, nothing left to delete means "blocked". Additions +108
tokens, funded in the same package: three dispatch-prompt non-negotiables
that restated the template's binding-file paragraph, the "When to STOP"
rule and rule 4 verbatim; the template's top-paragraph restatement of the
final-message rule; the sanitizer trap's HTML-comment clause (stated at
the report block); and rule 4's published-only rationale sentence about
disk exhaustion, which the oracle does not carry. Package 11,556 ->
11,546 (-10 for this commit, -21 against main). Ratchet rows re-pinned at
the landed counts: entry 9,708, rules/dev-template.md 1,838.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

skills(pm-dispatch): optimization flight — monorepo-only lore cut, the report JSON printed once, upstream reporting pointed at objectstack-platform, five drifts synced to the dev contract (net −2,982 tokens) - #14444

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14300-skills-pm-dispatch-optimization
Sep 2, 2026

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14300

Member card of the skills catalog optimization program #14292 (maintainer mandate 2026-09-02, verbatim: 「审核所有的 skills,进行全面的优化。」). The audit record (audit/objectstack-pm-dispatch/findings.md) is the second comment on #14300 and is the finding-by-finding spec for this PR. PMD-B-01 (split the template into rules/) and PMD-H-01 (evals) are deferred to #14296 items 1 + 4 and 2, so this PR is Part of and #14300 remains open. Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 — branch claude/issue-14300-skills-pm-dispatch-optimization, base 96b627d1, head ea50dfb5.

Files: skills/objectstack-pm-dispatch/SKILL.md (hand-edited, shrink-only), plus skills/README.md and content/docs/ai/skills-reference.mdx as generator output only (pnpm --filter @objectstack/spec gen:skill-docs, forced by the PMD-A-01 description edit). .claude/skills/pm-dispatch/** and .claude/agents/os-dev.md were read as the comparison oracle and are not touched. No other package. Clause-②: no — no contract surface (0 TypeScript fences, no accept/reject semantics).

Token delta (convention: ceil(utf8 bytes / 4), node scripts/check-skills-token-ratchet.mjs)

filebeforeafterceilingdelta
skills/objectstack-pm-dispatch/SKILL.md14,54911,56714,549 (untouched — the card forbids editing the ratchet script; headroom 2,982 is the gate's own read-out)−2,982 (−20.5%)
whole published bundle (skills/**, shipped tree)187,854184,872−2,982
skills/README.mdgenerator-owned, measured not ratchetedone index-row description shortened
content/docs/ai/skills-reference.mdxgenerator output, outside the bundleone quick-reference row + one card shortened

Lines: 1,086 → 879. No re-wrap counted as payment; every addition below is paid by a deletion in the same file.

Gap vs the card's target (≈ −3,600 after exclusions) — itemised, not smoothed

Delivered −2,982; the card's post-exclusion estimate was ≈ −3,600 (its −4,255 minus deferred PMD-B-01's share, minus PMD-D-04, minus the drift-sync additions). The ≈ 620-token gap, by source:

sourceauditor sizingmeasured heregap
five drift syncs F-01..F-05 (cluster 4, incl. the IF-2 fix and the PM-side both-modes paragraph, the collect-step change and the premise_still_valid note)+190+426+236 — the syncs quote the oracle's substance (mechanism of the stash trap, the probe semantics of the empty push, both channels), not a one-line pointer
PMD-D-01 / D-02 / D-03 / E-04 rewrites (cluster 2)−1,090−924+166 — each rewrite keeps the construct (three-disjunct predicate + scoping caution + age floor; the two check-in rules; the baseline rule; the one-line lock rule)
PMD-B-03 / B-02 / G-01 (cluster 3)−340−270+70 — B-02 keeps a findable Report contract label with the two rules; B-03 keeps the measured one-line evidence
PMD-E-05 Guardrails bullet−580 (76-token bullet)−541 (115-token bullet)+39 — the bullet also keeps how work crosses shards (queue label + Part of, Blocked-by:, follow-up chores)
PMD-C-01 residue≤ 2502450
rounding in the card's estimate≈ +107

Per-item 落点 | before | after (keyed by finding id)

Line numbers: before = origin/main96b627d1 (byte-identical to the audited a59f78d, md5 3948bdb8…), after = head ea50dfb5.

id落点 before → afterbeforeafter
PMD-C-01:916-985:801-818882-token "Upstream reporting" job restating objectstack-platform's boundary doctrine245-token residue pointing at objectstack-platform "The App / Platform Boundary" by heading; keeps only what the loop adds: derive the upstream repo, actionable report, file as a guest, park honestly
PMD-E-05:987-1031:848-853"Multiple PMs — shard by repository" section incl. the shard registry issue (656)one Guardrails bullet One PM per queue (115)
PMD-E-02:416-452 → deleted"One semantics, N independent implementations" (565)— (a platform compiler concern; not an app project's)
PMD-E-03:591-615 → deleted (list now :504-515)the "declaration silently dropped on a new arm" and "two implementations of one operation" bullets (508)four non-escalation classes remain; the frame block below is untouched
PMD-D-01 (+E-01):191-225:189-202; :181:179sweep rationale with cross-seat producers, "steward automation", "lane", "protocol posts", the same-day anecdote (433)three short paragraphs: the disjunction rationale, the scoping caution, the updated_at floor; "lane" dropped from the classification examples
PMD-D-02:509-527:444-451the eight-card baseline sample (357)the rule: a silence threshold is a collection boundary; require a status query, the host's stop signal, or silence past a baseline measured in your own project
PMD-D-03:485-495:427-430the cancelled-timer anecdoteone clause ("a cancelled timer can still deliver"); the two check-in rules intact
PMD-E-04:765-781:674-679four correctness properties of a lock wrapper the customer does not have (290)one rule: build/test go through the host project's ONE container-wide lock; queueing is normal, endless queueing is a finding naming the holder
PMD-B-03:346-357:326-331sanitizer specimens (232)the rule plus one measured clause; the template's own trap paragraph is kept for the dev
PMD-B-02:892-913:791-797the report JSON printed a second time (194)Report contract. paragraph: the template's block is the whole contract; open_questions / out_of_scope_findings rules kept
PMD-G-01:558-559 → deleted (bullet at :481)"the PM's own tooling PRs stay with the maintainer"— (contradicted "The PM writes no files")
PMD-A-01:8-14:8-12description advertised "the upstream-reporting procedure" and the trigger "or to report a platform bug found while building an app"both clauses gone; README + mdx regenerated
PMD-F-01:455-457, :465-469, :474-475, :736-739, :867:390-400, :408-410, :414-417, :634-637, :764-767"a lossless channel … nothing can be lost" (cloud mode only posted a comment)in both modes the report is delivered twice, GitHub first: an issue comment whose first line is the literal plaintext marker dev-report (never an HTML comment), read back, then the final message; collect reads the comment before counting an agent blocked
PMD-F-02template rule list, JSON, note → :665-669, :774, :795-797no premise re-check in the template, no report fieldtemplate rule 6 (verify premises against origin/{default_branch}; a no-PR report with premise_still_valid: false + evidence is first-class); "premise_still_valid": true in the JSON; PM re-triages on false
PMD-F-03template rule 1 → :650-653grep -c stash = 0never git stash — the stack lives in the common .git, shared by every worktree; park work as a wip commit or a patch file
PMD-F-04:334-344:311-324claim shape without a session line; race check on branch onlySession: line in the claim shape; race check reads session ID or branch
PMD-F-05:806-807:648-650, :704"Pushed" was fourth in the definition of donethe empty branch is pushed before any edit (claim landing mark + write-access probe, 403 = blocked); DoD says every commit is on the branch pushed at the start; the PM-side reclaim predicate at :341-350 now matches the template
IF-2:1037-1038:824-825the template "enforces" a container-wide lock"requires" — the mechanism is the host project's

excluded_by_gate: PMD-D-04 — check:skill-frame-sync pins both copies — the gate anchors the PM copy at "every option on the four fixed axes below." (:643:540) and the template copy at "Analyze every option on four fixed axes:" (:832:729), 4 copies / 3 files / 4 axes; D-04's only remedy removes a copy the gate requires. Neither axis block is edited.

premise_false: none — every audited span was found at its stated lines (the file is byte-identical between a59f78d and 96b627d1).

Not in this flight (listed, not smoothed): PMD-A-02 (README routing bullet, +25 unpaid, needs a ruling), PMD-E-06 (LOW-confidence reorder, not in the card's table), PMD-B-01 / PMD-H-01 (deferred to #14296).

Deviations disclosed

  • Marker spelling: the published skill keeps its own dev-report marker (made a fixed literal rather than "such as"); the internal os-dev-report is this repo's instance of it, not a published name.
  • Commit order: cluster 2 (D-01/D-02/D-03/E-04) landed after clusters 3 and 4 because its first run stopped on its own residue-size assertion (261 > 250) before writing anything; no partial write reached the tree (ratchet re-read 12,385 both before and after the aborted run).

Follow-up sync once #14229 merges (⛔ not pre-synced — unmerged text)

  1. the verify-lock non-guarantee clause;
  2. the ratchet funding discipline.

Gates — all at head ea50dfb5

Baseline on the untouched worktree, then after every commit: pnpm check:skill-frame-sync — "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files · 4 axes: business-need → long-term-soundness → ai-authoring-safety → startup-scope-discipline"; pnpm check:skill-frame-freshness — "✓ … the decision frame in this tree is current with origin/main (fetched just now)".

Dispatch-named: node scripts/check-skills-token-ratchet.mjs — "✓ … skills/objectstack-pm-dispatch/SKILL.md is 11567 tokens (ceiling 14549; headroom 2982)"; pnpm check:skill-compatibility — "✓ … 11 SKILL.md file(s) reconciled against 78 workspace packages"; pnpm check:skill-identifier-liveness — "OK — Leg 1: 500 citation(s) over 48 published file(s) … (5 ledgered exemption(s)); Leg 2: 9 registered exhaustive section(s)" (none bound to this file; the three Leg 1 exemptions for this file — backlogRepo, conventionsFile, routingLabelPrefix — still resolve); pnpm --filter @objectstack/spec check:skill-docs — "✅ Skill docs in sync"; pnpm check:nul-bytes — "OK (scanned 7875 text file(s) … no raw ASCII control bytes)".

Re-derived union — node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands from the tree at ea50dfb5 ("gate list derived from the tree of 'objectstack-ai/objectstack' at commit ea50dfb"), 36 commands, each exit code captured by redirect before any pipe: 33 green on the first pass; pnpm --filter @objectstack/lint run check:doc-formula-expressions and … check:doc-security-posture green after building @objectstack/formula / @objectstack/lint (first pass exit 3 = PREREQUISITE NOT MET, not a red); pnpm --filter @objectstack/spec run check:skill-examples — green after building types / client / client-react ("✅ 259 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them"; the first-pass exit 1 was the gate's own prerequisite refusal, packages/client-react/dist unbuilt); node scripts/check-test-completeness.mjs — NOT MEASURED locally by the gate's own design (exit 3: "grades a saved turbo run test log, and no log was named"; CI tees the log). node scripts/check-empty-changeset.mjs --base origin/main — "✓ No empty-frontmatter changeset introduced by this diff".

Heavy steps (@objectstack/spec, types/client/client-react builds, check:skill-examples) ran under scripts/pm/os-verify-lock.sh (OS_VERIFY_LOCK_SLOT=issue-14300).

Changeset

skip-changeset label: nothing is released by any package change — the diff touches skills/** and content/docs/** only, neither is a workspace package; scripts/check-empty-changeset.mjs confirms no changeset is added.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

…, point upstream reporting at objectstack-platform
PMD-C-01: the 882-token upstream-reporting job becomes a residue that points at
objectstack-platform's "The App / Platform Boundary" section by heading and keeps
only what this loop adds (derive the upstream repo, actionable report, file as a
guest, park honestly).
PMD-E-05: "Multiple PMs — shard by repository" collapses to one Guardrails bullet.
PMD-E-02: "One semantics, N independent implementations" retired from the
published surface (a platform compiler concern, not an app project's).
PMD-E-03: the two platform-governance non-escalation bullets deleted; the frame
block below them is untouched (check:skill-frame-sync green).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ort JSON, no PM-authored PRs
PMD-B-03: the sanitizer specimens are gone; the rule and its measured one-line
evidence stay.
PMD-B-02: the report JSON is printed once (in the template); the "Report
contract" section keeps only the two rules the second copy added.
PMD-G-01: "the PM's own tooling PRs" clause deleted — it contradicted
"The PM writes no files".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…tract; "enforces" reads "requires"
F-01: the report is delivered twice in both modes, GitHub first, first line the
literal plaintext marker (never an HTML comment), read back; the "lossless
channel" claim is gone (it was contradicted by the collect step).
F-02: the template re-checks the issue's premises; the report carries
premise_still_valid, and a no-PR report with premise_still_valid: false plus
evidence is a first-class delivery.
F-03: never git stash — the stack lives in the common .git and is shared by
every worktree; park work as a wip commit or a patch file.
F-04: the claim comment carries a Session: line; the race check reads session
ID or branch.
F-05: the empty branch is pushed before any edit (also the write-access probe),
so the stale-claim reclaim can never fire against a live agent.
IF-2: the PM-side resource paragraph says the template "requires" the lock, not
"enforces" it — the mechanism is the host project's.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…the lock design spec as constructs
PMD-D-01 (+E-01): the sweep rationale keeps the three-disjunct predicate, the
scoping caution and the updated_at floor; the cross-seat producers, the
"steward automation" / "lane" / "protocol posts" vocabulary and the anecdote go.
PMD-D-02: the eight-card baseline sample is gone; the rule that the baseline is
measured in your own project stays.
PMD-D-03: the cancelled-timer anecdote is gone; the two check-in rules stay.
PMD-E-04: the four correctness properties of a lock wrapper the customer does
not have collapse to one line; the mechanism stays the host project's.
Also trims the PMD-C-01 residue to <= 250 tokens (the card's ceiling).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ger; regenerate the catalog
The description no longer advertises the upstream-reporting job (the doctrine
lives in objectstack-platform; this file keeps a pointer). skills/README.md and
content/docs/ai/skills-reference.mdx are generator output
(pnpm --filter @objectstack/spec gen:skill-docs), not hand edits.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 08:26
@os-zhuang
os-zhuang added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit a9b2be0Sep 2, 2026
40 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14300-skills-pm-dispatch-optimization branch September 2, 2026 08:57
os-litant pushed a commit that referenced this pull request Sep 2, 2026
…ent template — the verify-lock non-guarantee and the ratchet funding discipline
The follow-up sync PR #14444 recorded, from .claude/agents/os-dev.md on
origin/main: (1) resource rule 1 now states the lock's non-guarantee —
it does not promise an idle machine, only excludes work routed through it,
so wall-clock readings under a hold are shared-box readings; (2) a size
ratchet is paid only by deleting content — a re-wrap is not payment, a
densification that adds nothing is a repair, a ceiling is raised only by
the maintainer, nothing left to delete means "blocked". Additions +108
tokens, funded in the same package: three dispatch-prompt non-negotiables
that restated the template's binding-file paragraph, the "When to STOP"
rule and rule 4 verbatim; the template's top-paragraph restatement of the
final-message rule; the sanitizer trap's HTML-comment clause (stated at
the report block); and rule 4's published-only rationale sentence about
disk exhaustion, which the oracle does not carry. Package 11,556 ->
11,546 (-10 for this commit, -21 against main). Ratchet rows re-pinned at
the landed counts: entry 9,708, rules/dev-template.md 1,838.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

skills(pm-dispatch): optimization flight — monorepo-only lore cut, the report JSON printed once, upstream reporting pointed at objectstack-platform, five drifts synced to the dev contract (net −2,982 tokens) - #14444

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14300-skills-pm-dispatch-optimization
Sep 2, 2026

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14300

Member card of the skills catalog optimization program #14292 (maintainer mandate 2026-09-02, verbatim: 「审核所有的 skills,进行全面的优化。」). The audit record (audit/objectstack-pm-dispatch/findings.md) is the second comment on #14300 and is the finding-by-finding spec for this PR. PMD-B-01 (split the template into rules/) and PMD-H-01 (evals) are deferred to #14296 items 1 + 4 and 2, so this PR is Part of and #14300 remains open. Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 — branch claude/issue-14300-skills-pm-dispatch-optimization, base 96b627d1, head ea50dfb5.

Files: skills/objectstack-pm-dispatch/SKILL.md (hand-edited, shrink-only), plus skills/README.md and content/docs/ai/skills-reference.mdx as generator output only (pnpm --filter @objectstack/spec gen:skill-docs, forced by the PMD-A-01 description edit). .claude/skills/pm-dispatch/** and .claude/agents/os-dev.md were read as the comparison oracle and are not touched. No other package. Clause-②: no — no contract surface (0 TypeScript fences, no accept/reject semantics).

Token delta (convention: ceil(utf8 bytes / 4), node scripts/check-skills-token-ratchet.mjs)

filebeforeafterceilingdelta
skills/objectstack-pm-dispatch/SKILL.md14,54911,56714,549 (untouched — the card forbids editing the ratchet script; headroom 2,982 is the gate's own read-out)−2,982 (−20.5%)
whole published bundle (skills/**, shipped tree)187,854184,872−2,982
skills/README.mdgenerator-owned, measured not ratchetedone index-row description shortened
content/docs/ai/skills-reference.mdxgenerator output, outside the bundleone quick-reference row + one card shortened

Lines: 1,086 → 879. No re-wrap counted as payment; every addition below is paid by a deletion in the same file.

Gap vs the card's target (≈ −3,600 after exclusions) — itemised, not smoothed

Delivered −2,982; the card's post-exclusion estimate was ≈ −3,600 (its −4,255 minus deferred PMD-B-01's share, minus PMD-D-04, minus the drift-sync additions). The ≈ 620-token gap, by source:

sourceauditor sizingmeasured heregap
five drift syncs F-01..F-05 (cluster 4, incl. the IF-2 fix and the PM-side both-modes paragraph, the collect-step change and the premise_still_valid note)+190+426+236 — the syncs quote the oracle's substance (mechanism of the stash trap, the probe semantics of the empty push, both channels), not a one-line pointer
PMD-D-01 / D-02 / D-03 / E-04 rewrites (cluster 2)−1,090−924+166 — each rewrite keeps the construct (three-disjunct predicate + scoping caution + age floor; the two check-in rules; the baseline rule; the one-line lock rule)
PMD-B-03 / B-02 / G-01 (cluster 3)−340−270+70 — B-02 keeps a findable Report contract label with the two rules; B-03 keeps the measured one-line evidence
PMD-E-05 Guardrails bullet−580 (76-token bullet)−541 (115-token bullet)+39 — the bullet also keeps how work crosses shards (queue label + Part of, Blocked-by:, follow-up chores)
PMD-C-01 residue≤ 2502450
rounding in the card's estimate≈ +107

Per-item 落点 | before | after (keyed by finding id)

Line numbers: before = origin/main96b627d1 (byte-identical to the audited a59f78d, md5 3948bdb8…), after = head ea50dfb5.

id落点 before → afterbeforeafter
PMD-C-01:916-985:801-818882-token "Upstream reporting" job restating objectstack-platform's boundary doctrine245-token residue pointing at objectstack-platform "The App / Platform Boundary" by heading; keeps only what the loop adds: derive the upstream repo, actionable report, file as a guest, park honestly
PMD-E-05:987-1031:848-853"Multiple PMs — shard by repository" section incl. the shard registry issue (656)one Guardrails bullet One PM per queue (115)
PMD-E-02:416-452 → deleted"One semantics, N independent implementations" (565)— (a platform compiler concern; not an app project's)
PMD-E-03:591-615 → deleted (list now :504-515)the "declaration silently dropped on a new arm" and "two implementations of one operation" bullets (508)four non-escalation classes remain; the frame block below is untouched
PMD-D-01 (+E-01):191-225:189-202; :181:179sweep rationale with cross-seat producers, "steward automation", "lane", "protocol posts", the same-day anecdote (433)three short paragraphs: the disjunction rationale, the scoping caution, the updated_at floor; "lane" dropped from the classification examples
PMD-D-02:509-527:444-451the eight-card baseline sample (357)the rule: a silence threshold is a collection boundary; require a status query, the host's stop signal, or silence past a baseline measured in your own project
PMD-D-03:485-495:427-430the cancelled-timer anecdoteone clause ("a cancelled timer can still deliver"); the two check-in rules intact
PMD-E-04:765-781:674-679four correctness properties of a lock wrapper the customer does not have (290)one rule: build/test go through the host project's ONE container-wide lock; queueing is normal, endless queueing is a finding naming the holder
PMD-B-03:346-357:326-331sanitizer specimens (232)the rule plus one measured clause; the template's own trap paragraph is kept for the dev
PMD-B-02:892-913:791-797the report JSON printed a second time (194)Report contract. paragraph: the template's block is the whole contract; open_questions / out_of_scope_findings rules kept
PMD-G-01:558-559 → deleted (bullet at :481)"the PM's own tooling PRs stay with the maintainer"— (contradicted "The PM writes no files")
PMD-A-01:8-14:8-12description advertised "the upstream-reporting procedure" and the trigger "or to report a platform bug found while building an app"both clauses gone; README + mdx regenerated
PMD-F-01:455-457, :465-469, :474-475, :736-739, :867:390-400, :408-410, :414-417, :634-637, :764-767"a lossless channel … nothing can be lost" (cloud mode only posted a comment)in both modes the report is delivered twice, GitHub first: an issue comment whose first line is the literal plaintext marker dev-report (never an HTML comment), read back, then the final message; collect reads the comment before counting an agent blocked
PMD-F-02template rule list, JSON, note → :665-669, :774, :795-797no premise re-check in the template, no report fieldtemplate rule 6 (verify premises against origin/{default_branch}; a no-PR report with premise_still_valid: false + evidence is first-class); "premise_still_valid": true in the JSON; PM re-triages on false
PMD-F-03template rule 1 → :650-653grep -c stash = 0never git stash — the stack lives in the common .git, shared by every worktree; park work as a wip commit or a patch file
PMD-F-04:334-344:311-324claim shape without a session line; race check on branch onlySession: line in the claim shape; race check reads session ID or branch
PMD-F-05:806-807:648-650, :704"Pushed" was fourth in the definition of donethe empty branch is pushed before any edit (claim landing mark + write-access probe, 403 = blocked); DoD says every commit is on the branch pushed at the start; the PM-side reclaim predicate at :341-350 now matches the template
IF-2:1037-1038:824-825the template "enforces" a container-wide lock"requires" — the mechanism is the host project's

excluded_by_gate: PMD-D-04 — check:skill-frame-sync pins both copies — the gate anchors the PM copy at "every option on the four fixed axes below." (:643:540) and the template copy at "Analyze every option on four fixed axes:" (:832:729), 4 copies / 3 files / 4 axes; D-04's only remedy removes a copy the gate requires. Neither axis block is edited.

premise_false: none — every audited span was found at its stated lines (the file is byte-identical between a59f78d and 96b627d1).

Not in this flight (listed, not smoothed): PMD-A-02 (README routing bullet, +25 unpaid, needs a ruling), PMD-E-06 (LOW-confidence reorder, not in the card's table), PMD-B-01 / PMD-H-01 (deferred to #14296).

Deviations disclosed

  • Marker spelling: the published skill keeps its own dev-report marker (made a fixed literal rather than "such as"); the internal os-dev-report is this repo's instance of it, not a published name.
  • Commit order: cluster 2 (D-01/D-02/D-03/E-04) landed after clusters 3 and 4 because its first run stopped on its own residue-size assertion (261 > 250) before writing anything; no partial write reached the tree (ratchet re-read 12,385 both before and after the aborted run).

Follow-up sync once #14229 merges (⛔ not pre-synced — unmerged text)

  1. the verify-lock non-guarantee clause;
  2. the ratchet funding discipline.

Gates — all at head ea50dfb5

Baseline on the untouched worktree, then after every commit: pnpm check:skill-frame-sync — "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files · 4 axes: business-need → long-term-soundness → ai-authoring-safety → startup-scope-discipline"; pnpm check:skill-frame-freshness — "✓ … the decision frame in this tree is current with origin/main (fetched just now)".

Dispatch-named: node scripts/check-skills-token-ratchet.mjs — "✓ … skills/objectstack-pm-dispatch/SKILL.md is 11567 tokens (ceiling 14549; headroom 2982)"; pnpm check:skill-compatibility — "✓ … 11 SKILL.md file(s) reconciled against 78 workspace packages"; pnpm check:skill-identifier-liveness — "OK — Leg 1: 500 citation(s) over 48 published file(s) … (5 ledgered exemption(s)); Leg 2: 9 registered exhaustive section(s)" (none bound to this file; the three Leg 1 exemptions for this file — backlogRepo, conventionsFile, routingLabelPrefix — still resolve); pnpm --filter @objectstack/spec check:skill-docs — "✅ Skill docs in sync"; pnpm check:nul-bytes — "OK (scanned 7875 text file(s) … no raw ASCII control bytes)".

Re-derived union — node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands from the tree at ea50dfb5 ("gate list derived from the tree of 'objectstack-ai/objectstack' at commit ea50dfb"), 36 commands, each exit code captured by redirect before any pipe: 33 green on the first pass; pnpm --filter @objectstack/lint run check:doc-formula-expressions and … check:doc-security-posture green after building @objectstack/formula / @objectstack/lint (first pass exit 3 = PREREQUISITE NOT MET, not a red); pnpm --filter @objectstack/spec run check:skill-examples — green after building types / client / client-react ("✅ 259 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them"; the first-pass exit 1 was the gate's own prerequisite refusal, packages/client-react/dist unbuilt); node scripts/check-test-completeness.mjs — NOT MEASURED locally by the gate's own design (exit 3: "grades a saved turbo run test log, and no log was named"; CI tees the log). node scripts/check-empty-changeset.mjs --base origin/main — "✓ No empty-frontmatter changeset introduced by this diff".

Heavy steps (@objectstack/spec, types/client/client-react builds, check:skill-examples) ran under scripts/pm/os-verify-lock.sh (OS_VERIFY_LOCK_SLOT=issue-14300).

Changeset

skip-changeset label: nothing is released by any package change — the diff touches skills/** and content/docs/** only, neither is a workspace package; scripts/check-empty-changeset.mjs confirms no changeset is added.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

…, point upstream reporting at objectstack-platform
PMD-C-01: the 882-token upstream-reporting job becomes a residue that points at
objectstack-platform's "The App / Platform Boundary" section by heading and keeps
only what this loop adds (derive the upstream repo, actionable report, file as a
guest, park honestly).
PMD-E-05: "Multiple PMs — shard by repository" collapses to one Guardrails bullet.
PMD-E-02: "One semantics, N independent implementations" retired from the
published surface (a platform compiler concern, not an app project's).
PMD-E-03: the two platform-governance non-escalation bullets deleted; the frame
block below them is untouched (check:skill-frame-sync green).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ort JSON, no PM-authored PRs
PMD-B-03: the sanitizer specimens are gone; the rule and its measured one-line
evidence stay.
PMD-B-02: the report JSON is printed once (in the template); the "Report
contract" section keeps only the two rules the second copy added.
PMD-G-01: "the PM's own tooling PRs" clause deleted — it contradicted
"The PM writes no files".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…tract; "enforces" reads "requires"
F-01: the report is delivered twice in both modes, GitHub first, first line the
literal plaintext marker (never an HTML comment), read back; the "lossless
channel" claim is gone (it was contradicted by the collect step).
F-02: the template re-checks the issue's premises; the report carries
premise_still_valid, and a no-PR report with premise_still_valid: false plus
evidence is a first-class delivery.
F-03: never git stash — the stack lives in the common .git and is shared by
every worktree; park work as a wip commit or a patch file.
F-04: the claim comment carries a Session: line; the race check reads session
ID or branch.
F-05: the empty branch is pushed before any edit (also the write-access probe),
so the stale-claim reclaim can never fire against a live agent.
IF-2: the PM-side resource paragraph says the template "requires" the lock, not
"enforces" it — the mechanism is the host project's.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…the lock design spec as constructs
PMD-D-01 (+E-01): the sweep rationale keeps the three-disjunct predicate, the
scoping caution and the updated_at floor; the cross-seat producers, the
"steward automation" / "lane" / "protocol posts" vocabulary and the anecdote go.
PMD-D-02: the eight-card baseline sample is gone; the rule that the baseline is
measured in your own project stays.
PMD-D-03: the cancelled-timer anecdote is gone; the two check-in rules stay.
PMD-E-04: the four correctness properties of a lock wrapper the customer does
not have collapse to one line; the mechanism stays the host project's.
Also trims the PMD-C-01 residue to <= 250 tokens (the card's ceiling).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ger; regenerate the catalog
The description no longer advertises the upstream-reporting job (the doctrine
lives in objectstack-platform; this file keeps a pointer). skills/README.md and
content/docs/ai/skills-reference.mdx are generator output
(pnpm --filter @objectstack/spec gen:skill-docs), not hand edits.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 08:26
@os-zhuang
os-zhuang added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit a9b2be0Sep 2, 2026
40 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14300-skills-pm-dispatch-optimization branch September 2, 2026 08:57
os-litant pushed a commit that referenced this pull request Sep 2, 2026
…ent template — the verify-lock non-guarantee and the ratchet funding discipline
The follow-up sync PR #14444 recorded, from .claude/agents/os-dev.md on
origin/main: (1) resource rule 1 now states the lock's non-guarantee —
it does not promise an idle machine, only excludes work routed through it,
so wall-clock readings under a hold are shared-box readings; (2) a size
ratchet is paid only by deleting content — a re-wrap is not payment, a
densification that adds nothing is a repair, a ceiling is raised only by
the maintainer, nothing left to delete means "blocked". Additions +108
tokens, funded in the same package: three dispatch-prompt non-negotiables
that restated the template's binding-file paragraph, the "When to STOP"
rule and rule 4 verbatim; the template's top-paragraph restatement of the
final-message rule; the sanitizer trap's HTML-comment clause (stated at
the report block); and rule 4's published-only rationale sentence about
disk exhaustion, which the oracle does not carry. Package 11,556 ->
11,546 (-10 for this commit, -21 against main). Ratchet rows re-pinned at
the landed counts: entry 9,708, rules/dev-template.md 1,838.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

skills(pm-dispatch): optimization flight — monorepo-only lore cut, the report JSON printed once, upstream reporting pointed at objectstack-platform, five drifts synced to the dev contract (net −2,982 tokens) - #14444

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14300-skills-pm-dispatch-optimization
Sep 2, 2026

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14300

Member card of the skills catalog optimization program #14292 (maintainer mandate 2026-09-02, verbatim: 「审核所有的 skills,进行全面的优化。」). The audit record (audit/objectstack-pm-dispatch/findings.md) is the second comment on #14300 and is the finding-by-finding spec for this PR. PMD-B-01 (split the template into rules/) and PMD-H-01 (evals) are deferred to #14296 items 1 + 4 and 2, so this PR is Part of and #14300 remains open. Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 — branch claude/issue-14300-skills-pm-dispatch-optimization, base 96b627d1, head ea50dfb5.

Files: skills/objectstack-pm-dispatch/SKILL.md (hand-edited, shrink-only), plus skills/README.md and content/docs/ai/skills-reference.mdx as generator output only (pnpm --filter @objectstack/spec gen:skill-docs, forced by the PMD-A-01 description edit). .claude/skills/pm-dispatch/** and .claude/agents/os-dev.md were read as the comparison oracle and are not touched. No other package. Clause-②: no — no contract surface (0 TypeScript fences, no accept/reject semantics).

Token delta (convention: ceil(utf8 bytes / 4), node scripts/check-skills-token-ratchet.mjs)

filebeforeafterceilingdelta
skills/objectstack-pm-dispatch/SKILL.md14,54911,56714,549 (untouched — the card forbids editing the ratchet script; headroom 2,982 is the gate's own read-out)−2,982 (−20.5%)
whole published bundle (skills/**, shipped tree)187,854184,872−2,982
skills/README.mdgenerator-owned, measured not ratchetedone index-row description shortened
content/docs/ai/skills-reference.mdxgenerator output, outside the bundleone quick-reference row + one card shortened

Lines: 1,086 → 879. No re-wrap counted as payment; every addition below is paid by a deletion in the same file.

Gap vs the card's target (≈ −3,600 after exclusions) — itemised, not smoothed

Delivered −2,982; the card's post-exclusion estimate was ≈ −3,600 (its −4,255 minus deferred PMD-B-01's share, minus PMD-D-04, minus the drift-sync additions). The ≈ 620-token gap, by source:

sourceauditor sizingmeasured heregap
five drift syncs F-01..F-05 (cluster 4, incl. the IF-2 fix and the PM-side both-modes paragraph, the collect-step change and the premise_still_valid note)+190+426+236 — the syncs quote the oracle's substance (mechanism of the stash trap, the probe semantics of the empty push, both channels), not a one-line pointer
PMD-D-01 / D-02 / D-03 / E-04 rewrites (cluster 2)−1,090−924+166 — each rewrite keeps the construct (three-disjunct predicate + scoping caution + age floor; the two check-in rules; the baseline rule; the one-line lock rule)
PMD-B-03 / B-02 / G-01 (cluster 3)−340−270+70 — B-02 keeps a findable Report contract label with the two rules; B-03 keeps the measured one-line evidence
PMD-E-05 Guardrails bullet−580 (76-token bullet)−541 (115-token bullet)+39 — the bullet also keeps how work crosses shards (queue label + Part of, Blocked-by:, follow-up chores)
PMD-C-01 residue≤ 2502450
rounding in the card's estimate≈ +107

Per-item 落点 | before | after (keyed by finding id)

Line numbers: before = origin/main96b627d1 (byte-identical to the audited a59f78d, md5 3948bdb8…), after = head ea50dfb5.

id落点 before → afterbeforeafter
PMD-C-01:916-985:801-818882-token "Upstream reporting" job restating objectstack-platform's boundary doctrine245-token residue pointing at objectstack-platform "The App / Platform Boundary" by heading; keeps only what the loop adds: derive the upstream repo, actionable report, file as a guest, park honestly
PMD-E-05:987-1031:848-853"Multiple PMs — shard by repository" section incl. the shard registry issue (656)one Guardrails bullet One PM per queue (115)
PMD-E-02:416-452 → deleted"One semantics, N independent implementations" (565)— (a platform compiler concern; not an app project's)
PMD-E-03:591-615 → deleted (list now :504-515)the "declaration silently dropped on a new arm" and "two implementations of one operation" bullets (508)four non-escalation classes remain; the frame block below is untouched
PMD-D-01 (+E-01):191-225:189-202; :181:179sweep rationale with cross-seat producers, "steward automation", "lane", "protocol posts", the same-day anecdote (433)three short paragraphs: the disjunction rationale, the scoping caution, the updated_at floor; "lane" dropped from the classification examples
PMD-D-02:509-527:444-451the eight-card baseline sample (357)the rule: a silence threshold is a collection boundary; require a status query, the host's stop signal, or silence past a baseline measured in your own project
PMD-D-03:485-495:427-430the cancelled-timer anecdoteone clause ("a cancelled timer can still deliver"); the two check-in rules intact
PMD-E-04:765-781:674-679four correctness properties of a lock wrapper the customer does not have (290)one rule: build/test go through the host project's ONE container-wide lock; queueing is normal, endless queueing is a finding naming the holder
PMD-B-03:346-357:326-331sanitizer specimens (232)the rule plus one measured clause; the template's own trap paragraph is kept for the dev
PMD-B-02:892-913:791-797the report JSON printed a second time (194)Report contract. paragraph: the template's block is the whole contract; open_questions / out_of_scope_findings rules kept
PMD-G-01:558-559 → deleted (bullet at :481)"the PM's own tooling PRs stay with the maintainer"— (contradicted "The PM writes no files")
PMD-A-01:8-14:8-12description advertised "the upstream-reporting procedure" and the trigger "or to report a platform bug found while building an app"both clauses gone; README + mdx regenerated
PMD-F-01:455-457, :465-469, :474-475, :736-739, :867:390-400, :408-410, :414-417, :634-637, :764-767"a lossless channel … nothing can be lost" (cloud mode only posted a comment)in both modes the report is delivered twice, GitHub first: an issue comment whose first line is the literal plaintext marker dev-report (never an HTML comment), read back, then the final message; collect reads the comment before counting an agent blocked
PMD-F-02template rule list, JSON, note → :665-669, :774, :795-797no premise re-check in the template, no report fieldtemplate rule 6 (verify premises against origin/{default_branch}; a no-PR report with premise_still_valid: false + evidence is first-class); "premise_still_valid": true in the JSON; PM re-triages on false
PMD-F-03template rule 1 → :650-653grep -c stash = 0never git stash — the stack lives in the common .git, shared by every worktree; park work as a wip commit or a patch file
PMD-F-04:334-344:311-324claim shape without a session line; race check on branch onlySession: line in the claim shape; race check reads session ID or branch
PMD-F-05:806-807:648-650, :704"Pushed" was fourth in the definition of donethe empty branch is pushed before any edit (claim landing mark + write-access probe, 403 = blocked); DoD says every commit is on the branch pushed at the start; the PM-side reclaim predicate at :341-350 now matches the template
IF-2:1037-1038:824-825the template "enforces" a container-wide lock"requires" — the mechanism is the host project's

excluded_by_gate: PMD-D-04 — check:skill-frame-sync pins both copies — the gate anchors the PM copy at "every option on the four fixed axes below." (:643:540) and the template copy at "Analyze every option on four fixed axes:" (:832:729), 4 copies / 3 files / 4 axes; D-04's only remedy removes a copy the gate requires. Neither axis block is edited.

premise_false: none — every audited span was found at its stated lines (the file is byte-identical between a59f78d and 96b627d1).

Not in this flight (listed, not smoothed): PMD-A-02 (README routing bullet, +25 unpaid, needs a ruling), PMD-E-06 (LOW-confidence reorder, not in the card's table), PMD-B-01 / PMD-H-01 (deferred to #14296).

Deviations disclosed

  • Marker spelling: the published skill keeps its own dev-report marker (made a fixed literal rather than "such as"); the internal os-dev-report is this repo's instance of it, not a published name.
  • Commit order: cluster 2 (D-01/D-02/D-03/E-04) landed after clusters 3 and 4 because its first run stopped on its own residue-size assertion (261 > 250) before writing anything; no partial write reached the tree (ratchet re-read 12,385 both before and after the aborted run).

Follow-up sync once #14229 merges (⛔ not pre-synced — unmerged text)

  1. the verify-lock non-guarantee clause;
  2. the ratchet funding discipline.

Gates — all at head ea50dfb5

Baseline on the untouched worktree, then after every commit: pnpm check:skill-frame-sync — "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files · 4 axes: business-need → long-term-soundness → ai-authoring-safety → startup-scope-discipline"; pnpm check:skill-frame-freshness — "✓ … the decision frame in this tree is current with origin/main (fetched just now)".

Dispatch-named: node scripts/check-skills-token-ratchet.mjs — "✓ … skills/objectstack-pm-dispatch/SKILL.md is 11567 tokens (ceiling 14549; headroom 2982)"; pnpm check:skill-compatibility — "✓ … 11 SKILL.md file(s) reconciled against 78 workspace packages"; pnpm check:skill-identifier-liveness — "OK — Leg 1: 500 citation(s) over 48 published file(s) … (5 ledgered exemption(s)); Leg 2: 9 registered exhaustive section(s)" (none bound to this file; the three Leg 1 exemptions for this file — backlogRepo, conventionsFile, routingLabelPrefix — still resolve); pnpm --filter @objectstack/spec check:skill-docs — "✅ Skill docs in sync"; pnpm check:nul-bytes — "OK (scanned 7875 text file(s) … no raw ASCII control bytes)".

Re-derived union — node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands from the tree at ea50dfb5 ("gate list derived from the tree of 'objectstack-ai/objectstack' at commit ea50dfb"), 36 commands, each exit code captured by redirect before any pipe: 33 green on the first pass; pnpm --filter @objectstack/lint run check:doc-formula-expressions and … check:doc-security-posture green after building @objectstack/formula / @objectstack/lint (first pass exit 3 = PREREQUISITE NOT MET, not a red); pnpm --filter @objectstack/spec run check:skill-examples — green after building types / client / client-react ("✅ 259 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them"; the first-pass exit 1 was the gate's own prerequisite refusal, packages/client-react/dist unbuilt); node scripts/check-test-completeness.mjs — NOT MEASURED locally by the gate's own design (exit 3: "grades a saved turbo run test log, and no log was named"; CI tees the log). node scripts/check-empty-changeset.mjs --base origin/main — "✓ No empty-frontmatter changeset introduced by this diff".

Heavy steps (@objectstack/spec, types/client/client-react builds, check:skill-examples) ran under scripts/pm/os-verify-lock.sh (OS_VERIFY_LOCK_SLOT=issue-14300).

Changeset

skip-changeset label: nothing is released by any package change — the diff touches skills/** and content/docs/** only, neither is a workspace package; scripts/check-empty-changeset.mjs confirms no changeset is added.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

…, point upstream reporting at objectstack-platform
PMD-C-01: the 882-token upstream-reporting job becomes a residue that points at
objectstack-platform's "The App / Platform Boundary" section by heading and keeps
only what this loop adds (derive the upstream repo, actionable report, file as a
guest, park honestly).
PMD-E-05: "Multiple PMs — shard by repository" collapses to one Guardrails bullet.
PMD-E-02: "One semantics, N independent implementations" retired from the
published surface (a platform compiler concern, not an app project's).
PMD-E-03: the two platform-governance non-escalation bullets deleted; the frame
block below them is untouched (check:skill-frame-sync green).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ort JSON, no PM-authored PRs
PMD-B-03: the sanitizer specimens are gone; the rule and its measured one-line
evidence stay.
PMD-B-02: the report JSON is printed once (in the template); the "Report
contract" section keeps only the two rules the second copy added.
PMD-G-01: "the PM's own tooling PRs" clause deleted — it contradicted
"The PM writes no files".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…tract; "enforces" reads "requires"
F-01: the report is delivered twice in both modes, GitHub first, first line the
literal plaintext marker (never an HTML comment), read back; the "lossless
channel" claim is gone (it was contradicted by the collect step).
F-02: the template re-checks the issue's premises; the report carries
premise_still_valid, and a no-PR report with premise_still_valid: false plus
evidence is a first-class delivery.
F-03: never git stash — the stack lives in the common .git and is shared by
every worktree; park work as a wip commit or a patch file.
F-04: the claim comment carries a Session: line; the race check reads session
ID or branch.
F-05: the empty branch is pushed before any edit (also the write-access probe),
so the stale-claim reclaim can never fire against a live agent.
IF-2: the PM-side resource paragraph says the template "requires" the lock, not
"enforces" it — the mechanism is the host project's.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…the lock design spec as constructs
PMD-D-01 (+E-01): the sweep rationale keeps the three-disjunct predicate, the
scoping caution and the updated_at floor; the cross-seat producers, the
"steward automation" / "lane" / "protocol posts" vocabulary and the anecdote go.
PMD-D-02: the eight-card baseline sample is gone; the rule that the baseline is
measured in your own project stays.
PMD-D-03: the cancelled-timer anecdote is gone; the two check-in rules stay.
PMD-E-04: the four correctness properties of a lock wrapper the customer does
not have collapse to one line; the mechanism stays the host project's.
Also trims the PMD-C-01 residue to <= 250 tokens (the card's ceiling).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ger; regenerate the catalog
The description no longer advertises the upstream-reporting job (the doctrine
lives in objectstack-platform; this file keeps a pointer). skills/README.md and
content/docs/ai/skills-reference.mdx are generator output
(pnpm --filter @objectstack/spec gen:skill-docs), not hand edits.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 08:26
@os-zhuang
os-zhuang added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit a9b2be0Sep 2, 2026
40 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14300-skills-pm-dispatch-optimization branch September 2, 2026 08:57
os-litant pushed a commit that referenced this pull request Sep 2, 2026
…ent template — the verify-lock non-guarantee and the ratchet funding discipline
The follow-up sync PR #14444 recorded, from .claude/agents/os-dev.md on
origin/main: (1) resource rule 1 now states the lock's non-guarantee —
it does not promise an idle machine, only excludes work routed through it,
so wall-clock readings under a hold are shared-box readings; (2) a size
ratchet is paid only by deleting content — a re-wrap is not payment, a
densification that adds nothing is a repair, a ceiling is raised only by
the maintainer, nothing left to delete means "blocked". Additions +108
tokens, funded in the same package: three dispatch-prompt non-negotiables
that restated the template's binding-file paragraph, the "When to STOP"
rule and rule 4 verbatim; the template's top-paragraph restatement of the
final-message rule; the sanitizer trap's HTML-comment clause (stated at
the report block); and rule 4's published-only rationale sentence about
disk exhaustion, which the oracle does not carry. Package 11,556 ->
11,546 (-10 for this commit, -21 against main). Ratchet rows re-pinned at
the landed counts: entry 9,708, rules/dev-template.md 1,838.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

skills(pm-dispatch): optimization flight — monorepo-only lore cut, the report JSON printed once, upstream reporting pointed at objectstack-platform, five drifts synced to the dev contract (net −2,982 tokens) - #14444

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14300-skills-pm-dispatch-optimization
Sep 2, 2026

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14300

Member card of the skills catalog optimization program #14292 (maintainer mandate 2026-09-02, verbatim: 「审核所有的 skills,进行全面的优化。」). The audit record (audit/objectstack-pm-dispatch/findings.md) is the second comment on #14300 and is the finding-by-finding spec for this PR. PMD-B-01 (split the template into rules/) and PMD-H-01 (evals) are deferred to #14296 items 1 + 4 and 2, so this PR is Part of and #14300 remains open. Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 — branch claude/issue-14300-skills-pm-dispatch-optimization, base 96b627d1, head ea50dfb5.

Files: skills/objectstack-pm-dispatch/SKILL.md (hand-edited, shrink-only), plus skills/README.md and content/docs/ai/skills-reference.mdx as generator output only (pnpm --filter @objectstack/spec gen:skill-docs, forced by the PMD-A-01 description edit). .claude/skills/pm-dispatch/** and .claude/agents/os-dev.md were read as the comparison oracle and are not touched. No other package. Clause-②: no — no contract surface (0 TypeScript fences, no accept/reject semantics).

Token delta (convention: ceil(utf8 bytes / 4), node scripts/check-skills-token-ratchet.mjs)

filebeforeafterceilingdelta
skills/objectstack-pm-dispatch/SKILL.md14,54911,56714,549 (untouched — the card forbids editing the ratchet script; headroom 2,982 is the gate's own read-out)−2,982 (−20.5%)
whole published bundle (skills/**, shipped tree)187,854184,872−2,982
skills/README.mdgenerator-owned, measured not ratchetedone index-row description shortened
content/docs/ai/skills-reference.mdxgenerator output, outside the bundleone quick-reference row + one card shortened

Lines: 1,086 → 879. No re-wrap counted as payment; every addition below is paid by a deletion in the same file.

Gap vs the card's target (≈ −3,600 after exclusions) — itemised, not smoothed

Delivered −2,982; the card's post-exclusion estimate was ≈ −3,600 (its −4,255 minus deferred PMD-B-01's share, minus PMD-D-04, minus the drift-sync additions). The ≈ 620-token gap, by source:

sourceauditor sizingmeasured heregap
five drift syncs F-01..F-05 (cluster 4, incl. the IF-2 fix and the PM-side both-modes paragraph, the collect-step change and the premise_still_valid note)+190+426+236 — the syncs quote the oracle's substance (mechanism of the stash trap, the probe semantics of the empty push, both channels), not a one-line pointer
PMD-D-01 / D-02 / D-03 / E-04 rewrites (cluster 2)−1,090−924+166 — each rewrite keeps the construct (three-disjunct predicate + scoping caution + age floor; the two check-in rules; the baseline rule; the one-line lock rule)
PMD-B-03 / B-02 / G-01 (cluster 3)−340−270+70 — B-02 keeps a findable Report contract label with the two rules; B-03 keeps the measured one-line evidence
PMD-E-05 Guardrails bullet−580 (76-token bullet)−541 (115-token bullet)+39 — the bullet also keeps how work crosses shards (queue label + Part of, Blocked-by:, follow-up chores)
PMD-C-01 residue≤ 2502450
rounding in the card's estimate≈ +107

Per-item 落点 | before | after (keyed by finding id)

Line numbers: before = origin/main96b627d1 (byte-identical to the audited a59f78d, md5 3948bdb8…), after = head ea50dfb5.

id落点 before → afterbeforeafter
PMD-C-01:916-985:801-818882-token "Upstream reporting" job restating objectstack-platform's boundary doctrine245-token residue pointing at objectstack-platform "The App / Platform Boundary" by heading; keeps only what the loop adds: derive the upstream repo, actionable report, file as a guest, park honestly
PMD-E-05:987-1031:848-853"Multiple PMs — shard by repository" section incl. the shard registry issue (656)one Guardrails bullet One PM per queue (115)
PMD-E-02:416-452 → deleted"One semantics, N independent implementations" (565)— (a platform compiler concern; not an app project's)
PMD-E-03:591-615 → deleted (list now :504-515)the "declaration silently dropped on a new arm" and "two implementations of one operation" bullets (508)four non-escalation classes remain; the frame block below is untouched
PMD-D-01 (+E-01):191-225:189-202; :181:179sweep rationale with cross-seat producers, "steward automation", "lane", "protocol posts", the same-day anecdote (433)three short paragraphs: the disjunction rationale, the scoping caution, the updated_at floor; "lane" dropped from the classification examples
PMD-D-02:509-527:444-451the eight-card baseline sample (357)the rule: a silence threshold is a collection boundary; require a status query, the host's stop signal, or silence past a baseline measured in your own project
PMD-D-03:485-495:427-430the cancelled-timer anecdoteone clause ("a cancelled timer can still deliver"); the two check-in rules intact
PMD-E-04:765-781:674-679four correctness properties of a lock wrapper the customer does not have (290)one rule: build/test go through the host project's ONE container-wide lock; queueing is normal, endless queueing is a finding naming the holder
PMD-B-03:346-357:326-331sanitizer specimens (232)the rule plus one measured clause; the template's own trap paragraph is kept for the dev
PMD-B-02:892-913:791-797the report JSON printed a second time (194)Report contract. paragraph: the template's block is the whole contract; open_questions / out_of_scope_findings rules kept
PMD-G-01:558-559 → deleted (bullet at :481)"the PM's own tooling PRs stay with the maintainer"— (contradicted "The PM writes no files")
PMD-A-01:8-14:8-12description advertised "the upstream-reporting procedure" and the trigger "or to report a platform bug found while building an app"both clauses gone; README + mdx regenerated
PMD-F-01:455-457, :465-469, :474-475, :736-739, :867:390-400, :408-410, :414-417, :634-637, :764-767"a lossless channel … nothing can be lost" (cloud mode only posted a comment)in both modes the report is delivered twice, GitHub first: an issue comment whose first line is the literal plaintext marker dev-report (never an HTML comment), read back, then the final message; collect reads the comment before counting an agent blocked
PMD-F-02template rule list, JSON, note → :665-669, :774, :795-797no premise re-check in the template, no report fieldtemplate rule 6 (verify premises against origin/{default_branch}; a no-PR report with premise_still_valid: false + evidence is first-class); "premise_still_valid": true in the JSON; PM re-triages on false
PMD-F-03template rule 1 → :650-653grep -c stash = 0never git stash — the stack lives in the common .git, shared by every worktree; park work as a wip commit or a patch file
PMD-F-04:334-344:311-324claim shape without a session line; race check on branch onlySession: line in the claim shape; race check reads session ID or branch
PMD-F-05:806-807:648-650, :704"Pushed" was fourth in the definition of donethe empty branch is pushed before any edit (claim landing mark + write-access probe, 403 = blocked); DoD says every commit is on the branch pushed at the start; the PM-side reclaim predicate at :341-350 now matches the template
IF-2:1037-1038:824-825the template "enforces" a container-wide lock"requires" — the mechanism is the host project's

excluded_by_gate: PMD-D-04 — check:skill-frame-sync pins both copies — the gate anchors the PM copy at "every option on the four fixed axes below." (:643:540) and the template copy at "Analyze every option on four fixed axes:" (:832:729), 4 copies / 3 files / 4 axes; D-04's only remedy removes a copy the gate requires. Neither axis block is edited.

premise_false: none — every audited span was found at its stated lines (the file is byte-identical between a59f78d and 96b627d1).

Not in this flight (listed, not smoothed): PMD-A-02 (README routing bullet, +25 unpaid, needs a ruling), PMD-E-06 (LOW-confidence reorder, not in the card's table), PMD-B-01 / PMD-H-01 (deferred to #14296).

Deviations disclosed

  • Marker spelling: the published skill keeps its own dev-report marker (made a fixed literal rather than "such as"); the internal os-dev-report is this repo's instance of it, not a published name.
  • Commit order: cluster 2 (D-01/D-02/D-03/E-04) landed after clusters 3 and 4 because its first run stopped on its own residue-size assertion (261 > 250) before writing anything; no partial write reached the tree (ratchet re-read 12,385 both before and after the aborted run).

Follow-up sync once #14229 merges (⛔ not pre-synced — unmerged text)

  1. the verify-lock non-guarantee clause;
  2. the ratchet funding discipline.

Gates — all at head ea50dfb5

Baseline on the untouched worktree, then after every commit: pnpm check:skill-frame-sync — "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files · 4 axes: business-need → long-term-soundness → ai-authoring-safety → startup-scope-discipline"; pnpm check:skill-frame-freshness — "✓ … the decision frame in this tree is current with origin/main (fetched just now)".

Dispatch-named: node scripts/check-skills-token-ratchet.mjs — "✓ … skills/objectstack-pm-dispatch/SKILL.md is 11567 tokens (ceiling 14549; headroom 2982)"; pnpm check:skill-compatibility — "✓ … 11 SKILL.md file(s) reconciled against 78 workspace packages"; pnpm check:skill-identifier-liveness — "OK — Leg 1: 500 citation(s) over 48 published file(s) … (5 ledgered exemption(s)); Leg 2: 9 registered exhaustive section(s)" (none bound to this file; the three Leg 1 exemptions for this file — backlogRepo, conventionsFile, routingLabelPrefix — still resolve); pnpm --filter @objectstack/spec check:skill-docs — "✅ Skill docs in sync"; pnpm check:nul-bytes — "OK (scanned 7875 text file(s) … no raw ASCII control bytes)".

Re-derived union — node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands from the tree at ea50dfb5 ("gate list derived from the tree of 'objectstack-ai/objectstack' at commit ea50dfb"), 36 commands, each exit code captured by redirect before any pipe: 33 green on the first pass; pnpm --filter @objectstack/lint run check:doc-formula-expressions and … check:doc-security-posture green after building @objectstack/formula / @objectstack/lint (first pass exit 3 = PREREQUISITE NOT MET, not a red); pnpm --filter @objectstack/spec run check:skill-examples — green after building types / client / client-react ("✅ 259 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them"; the first-pass exit 1 was the gate's own prerequisite refusal, packages/client-react/dist unbuilt); node scripts/check-test-completeness.mjs — NOT MEASURED locally by the gate's own design (exit 3: "grades a saved turbo run test log, and no log was named"; CI tees the log). node scripts/check-empty-changeset.mjs --base origin/main — "✓ No empty-frontmatter changeset introduced by this diff".

Heavy steps (@objectstack/spec, types/client/client-react builds, check:skill-examples) ran under scripts/pm/os-verify-lock.sh (OS_VERIFY_LOCK_SLOT=issue-14300).

Changeset

skip-changeset label: nothing is released by any package change — the diff touches skills/** and content/docs/** only, neither is a workspace package; scripts/check-empty-changeset.mjs confirms no changeset is added.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

…, point upstream reporting at objectstack-platform
PMD-C-01: the 882-token upstream-reporting job becomes a residue that points at
objectstack-platform's "The App / Platform Boundary" section by heading and keeps
only what this loop adds (derive the upstream repo, actionable report, file as a
guest, park honestly).
PMD-E-05: "Multiple PMs — shard by repository" collapses to one Guardrails bullet.
PMD-E-02: "One semantics, N independent implementations" retired from the
published surface (a platform compiler concern, not an app project's).
PMD-E-03: the two platform-governance non-escalation bullets deleted; the frame
block below them is untouched (check:skill-frame-sync green).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ort JSON, no PM-authored PRs
PMD-B-03: the sanitizer specimens are gone; the rule and its measured one-line
evidence stay.
PMD-B-02: the report JSON is printed once (in the template); the "Report
contract" section keeps only the two rules the second copy added.
PMD-G-01: "the PM's own tooling PRs" clause deleted — it contradicted
"The PM writes no files".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…tract; "enforces" reads "requires"
F-01: the report is delivered twice in both modes, GitHub first, first line the
literal plaintext marker (never an HTML comment), read back; the "lossless
channel" claim is gone (it was contradicted by the collect step).
F-02: the template re-checks the issue's premises; the report carries
premise_still_valid, and a no-PR report with premise_still_valid: false plus
evidence is a first-class delivery.
F-03: never git stash — the stack lives in the common .git and is shared by
every worktree; park work as a wip commit or a patch file.
F-04: the claim comment carries a Session: line; the race check reads session
ID or branch.
F-05: the empty branch is pushed before any edit (also the write-access probe),
so the stale-claim reclaim can never fire against a live agent.
IF-2: the PM-side resource paragraph says the template "requires" the lock, not
"enforces" it — the mechanism is the host project's.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…the lock design spec as constructs
PMD-D-01 (+E-01): the sweep rationale keeps the three-disjunct predicate, the
scoping caution and the updated_at floor; the cross-seat producers, the
"steward automation" / "lane" / "protocol posts" vocabulary and the anecdote go.
PMD-D-02: the eight-card baseline sample is gone; the rule that the baseline is
measured in your own project stays.
PMD-D-03: the cancelled-timer anecdote is gone; the two check-in rules stay.
PMD-E-04: the four correctness properties of a lock wrapper the customer does
not have collapse to one line; the mechanism stays the host project's.
Also trims the PMD-C-01 residue to <= 250 tokens (the card's ceiling).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ger; regenerate the catalog
The description no longer advertises the upstream-reporting job (the doctrine
lives in objectstack-platform; this file keeps a pointer). skills/README.md and
content/docs/ai/skills-reference.mdx are generator output
(pnpm --filter @objectstack/spec gen:skill-docs), not hand edits.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 08:26
@os-zhuang
os-zhuang added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit a9b2be0Sep 2, 2026
40 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14300-skills-pm-dispatch-optimization branch September 2, 2026 08:57
os-litant pushed a commit that referenced this pull request Sep 2, 2026
…ent template — the verify-lock non-guarantee and the ratchet funding discipline
The follow-up sync PR #14444 recorded, from .claude/agents/os-dev.md on
origin/main: (1) resource rule 1 now states the lock's non-guarantee —
it does not promise an idle machine, only excludes work routed through it,
so wall-clock readings under a hold are shared-box readings; (2) a size
ratchet is paid only by deleting content — a re-wrap is not payment, a
densification that adds nothing is a repair, a ceiling is raised only by
the maintainer, nothing left to delete means "blocked". Additions +108
tokens, funded in the same package: three dispatch-prompt non-negotiables
that restated the template's binding-file paragraph, the "When to STOP"
rule and rule 4 verbatim; the template's top-paragraph restatement of the
final-message rule; the sanitizer trap's HTML-comment clause (stated at
the report block); and rule 4's published-only rationale sentence about
disk exhaustion, which the oracle does not carry. Package 11,556 ->
11,546 (-10 for this commit, -21 against main). Ratchet rows re-pinned at
the landed counts: entry 9,708, rules/dev-template.md 1,838.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

skills(pm-dispatch): optimization flight — monorepo-only lore cut, the report JSON printed once, upstream reporting pointed at objectstack-platform, five drifts synced to the dev contract (net −2,982 tokens) - #14444

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14300-skills-pm-dispatch-optimization
Sep 2, 2026

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14300

Member card of the skills catalog optimization program #14292 (maintainer mandate 2026-09-02, verbatim: 「审核所有的 skills,进行全面的优化。」). The audit record (audit/objectstack-pm-dispatch/findings.md) is the second comment on #14300 and is the finding-by-finding spec for this PR. PMD-B-01 (split the template into rules/) and PMD-H-01 (evals) are deferred to #14296 items 1 + 4 and 2, so this PR is Part of and #14300 remains open. Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 — branch claude/issue-14300-skills-pm-dispatch-optimization, base 96b627d1, head ea50dfb5.

Files: skills/objectstack-pm-dispatch/SKILL.md (hand-edited, shrink-only), plus skills/README.md and content/docs/ai/skills-reference.mdx as generator output only (pnpm --filter @objectstack/spec gen:skill-docs, forced by the PMD-A-01 description edit). .claude/skills/pm-dispatch/** and .claude/agents/os-dev.md were read as the comparison oracle and are not touched. No other package. Clause-②: no — no contract surface (0 TypeScript fences, no accept/reject semantics).

Token delta (convention: ceil(utf8 bytes / 4), node scripts/check-skills-token-ratchet.mjs)

filebeforeafterceilingdelta
skills/objectstack-pm-dispatch/SKILL.md14,54911,56714,549 (untouched — the card forbids editing the ratchet script; headroom 2,982 is the gate's own read-out)−2,982 (−20.5%)
whole published bundle (skills/**, shipped tree)187,854184,872−2,982
skills/README.mdgenerator-owned, measured not ratchetedone index-row description shortened
content/docs/ai/skills-reference.mdxgenerator output, outside the bundleone quick-reference row + one card shortened

Lines: 1,086 → 879. No re-wrap counted as payment; every addition below is paid by a deletion in the same file.

Gap vs the card's target (≈ −3,600 after exclusions) — itemised, not smoothed

Delivered −2,982; the card's post-exclusion estimate was ≈ −3,600 (its −4,255 minus deferred PMD-B-01's share, minus PMD-D-04, minus the drift-sync additions). The ≈ 620-token gap, by source:

sourceauditor sizingmeasured heregap
five drift syncs F-01..F-05 (cluster 4, incl. the IF-2 fix and the PM-side both-modes paragraph, the collect-step change and the premise_still_valid note)+190+426+236 — the syncs quote the oracle's substance (mechanism of the stash trap, the probe semantics of the empty push, both channels), not a one-line pointer
PMD-D-01 / D-02 / D-03 / E-04 rewrites (cluster 2)−1,090−924+166 — each rewrite keeps the construct (three-disjunct predicate + scoping caution + age floor; the two check-in rules; the baseline rule; the one-line lock rule)
PMD-B-03 / B-02 / G-01 (cluster 3)−340−270+70 — B-02 keeps a findable Report contract label with the two rules; B-03 keeps the measured one-line evidence
PMD-E-05 Guardrails bullet−580 (76-token bullet)−541 (115-token bullet)+39 — the bullet also keeps how work crosses shards (queue label + Part of, Blocked-by:, follow-up chores)
PMD-C-01 residue≤ 2502450
rounding in the card's estimate≈ +107

Per-item 落点 | before | after (keyed by finding id)

Line numbers: before = origin/main96b627d1 (byte-identical to the audited a59f78d, md5 3948bdb8…), after = head ea50dfb5.

id落点 before → afterbeforeafter
PMD-C-01:916-985:801-818882-token "Upstream reporting" job restating objectstack-platform's boundary doctrine245-token residue pointing at objectstack-platform "The App / Platform Boundary" by heading; keeps only what the loop adds: derive the upstream repo, actionable report, file as a guest, park honestly
PMD-E-05:987-1031:848-853"Multiple PMs — shard by repository" section incl. the shard registry issue (656)one Guardrails bullet One PM per queue (115)
PMD-E-02:416-452 → deleted"One semantics, N independent implementations" (565)— (a platform compiler concern; not an app project's)
PMD-E-03:591-615 → deleted (list now :504-515)the "declaration silently dropped on a new arm" and "two implementations of one operation" bullets (508)four non-escalation classes remain; the frame block below is untouched
PMD-D-01 (+E-01):191-225:189-202; :181:179sweep rationale with cross-seat producers, "steward automation", "lane", "protocol posts", the same-day anecdote (433)three short paragraphs: the disjunction rationale, the scoping caution, the updated_at floor; "lane" dropped from the classification examples
PMD-D-02:509-527:444-451the eight-card baseline sample (357)the rule: a silence threshold is a collection boundary; require a status query, the host's stop signal, or silence past a baseline measured in your own project
PMD-D-03:485-495:427-430the cancelled-timer anecdoteone clause ("a cancelled timer can still deliver"); the two check-in rules intact
PMD-E-04:765-781:674-679four correctness properties of a lock wrapper the customer does not have (290)one rule: build/test go through the host project's ONE container-wide lock; queueing is normal, endless queueing is a finding naming the holder
PMD-B-03:346-357:326-331sanitizer specimens (232)the rule plus one measured clause; the template's own trap paragraph is kept for the dev
PMD-B-02:892-913:791-797the report JSON printed a second time (194)Report contract. paragraph: the template's block is the whole contract; open_questions / out_of_scope_findings rules kept
PMD-G-01:558-559 → deleted (bullet at :481)"the PM's own tooling PRs stay with the maintainer"— (contradicted "The PM writes no files")
PMD-A-01:8-14:8-12description advertised "the upstream-reporting procedure" and the trigger "or to report a platform bug found while building an app"both clauses gone; README + mdx regenerated
PMD-F-01:455-457, :465-469, :474-475, :736-739, :867:390-400, :408-410, :414-417, :634-637, :764-767"a lossless channel … nothing can be lost" (cloud mode only posted a comment)in both modes the report is delivered twice, GitHub first: an issue comment whose first line is the literal plaintext marker dev-report (never an HTML comment), read back, then the final message; collect reads the comment before counting an agent blocked
PMD-F-02template rule list, JSON, note → :665-669, :774, :795-797no premise re-check in the template, no report fieldtemplate rule 6 (verify premises against origin/{default_branch}; a no-PR report with premise_still_valid: false + evidence is first-class); "premise_still_valid": true in the JSON; PM re-triages on false
PMD-F-03template rule 1 → :650-653grep -c stash = 0never git stash — the stack lives in the common .git, shared by every worktree; park work as a wip commit or a patch file
PMD-F-04:334-344:311-324claim shape without a session line; race check on branch onlySession: line in the claim shape; race check reads session ID or branch
PMD-F-05:806-807:648-650, :704"Pushed" was fourth in the definition of donethe empty branch is pushed before any edit (claim landing mark + write-access probe, 403 = blocked); DoD says every commit is on the branch pushed at the start; the PM-side reclaim predicate at :341-350 now matches the template
IF-2:1037-1038:824-825the template "enforces" a container-wide lock"requires" — the mechanism is the host project's

excluded_by_gate: PMD-D-04 — check:skill-frame-sync pins both copies — the gate anchors the PM copy at "every option on the four fixed axes below." (:643:540) and the template copy at "Analyze every option on four fixed axes:" (:832:729), 4 copies / 3 files / 4 axes; D-04's only remedy removes a copy the gate requires. Neither axis block is edited.

premise_false: none — every audited span was found at its stated lines (the file is byte-identical between a59f78d and 96b627d1).

Not in this flight (listed, not smoothed): PMD-A-02 (README routing bullet, +25 unpaid, needs a ruling), PMD-E-06 (LOW-confidence reorder, not in the card's table), PMD-B-01 / PMD-H-01 (deferred to #14296).

Deviations disclosed

  • Marker spelling: the published skill keeps its own dev-report marker (made a fixed literal rather than "such as"); the internal os-dev-report is this repo's instance of it, not a published name.
  • Commit order: cluster 2 (D-01/D-02/D-03/E-04) landed after clusters 3 and 4 because its first run stopped on its own residue-size assertion (261 > 250) before writing anything; no partial write reached the tree (ratchet re-read 12,385 both before and after the aborted run).

Follow-up sync once #14229 merges (⛔ not pre-synced — unmerged text)

  1. the verify-lock non-guarantee clause;
  2. the ratchet funding discipline.

Gates — all at head ea50dfb5

Baseline on the untouched worktree, then after every commit: pnpm check:skill-frame-sync — "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files · 4 axes: business-need → long-term-soundness → ai-authoring-safety → startup-scope-discipline"; pnpm check:skill-frame-freshness — "✓ … the decision frame in this tree is current with origin/main (fetched just now)".

Dispatch-named: node scripts/check-skills-token-ratchet.mjs — "✓ … skills/objectstack-pm-dispatch/SKILL.md is 11567 tokens (ceiling 14549; headroom 2982)"; pnpm check:skill-compatibility — "✓ … 11 SKILL.md file(s) reconciled against 78 workspace packages"; pnpm check:skill-identifier-liveness — "OK — Leg 1: 500 citation(s) over 48 published file(s) … (5 ledgered exemption(s)); Leg 2: 9 registered exhaustive section(s)" (none bound to this file; the three Leg 1 exemptions for this file — backlogRepo, conventionsFile, routingLabelPrefix — still resolve); pnpm --filter @objectstack/spec check:skill-docs — "✅ Skill docs in sync"; pnpm check:nul-bytes — "OK (scanned 7875 text file(s) … no raw ASCII control bytes)".

Re-derived union — node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands from the tree at ea50dfb5 ("gate list derived from the tree of 'objectstack-ai/objectstack' at commit ea50dfb"), 36 commands, each exit code captured by redirect before any pipe: 33 green on the first pass; pnpm --filter @objectstack/lint run check:doc-formula-expressions and … check:doc-security-posture green after building @objectstack/formula / @objectstack/lint (first pass exit 3 = PREREQUISITE NOT MET, not a red); pnpm --filter @objectstack/spec run check:skill-examples — green after building types / client / client-react ("✅ 259 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them"; the first-pass exit 1 was the gate's own prerequisite refusal, packages/client-react/dist unbuilt); node scripts/check-test-completeness.mjs — NOT MEASURED locally by the gate's own design (exit 3: "grades a saved turbo run test log, and no log was named"; CI tees the log). node scripts/check-empty-changeset.mjs --base origin/main — "✓ No empty-frontmatter changeset introduced by this diff".

Heavy steps (@objectstack/spec, types/client/client-react builds, check:skill-examples) ran under scripts/pm/os-verify-lock.sh (OS_VERIFY_LOCK_SLOT=issue-14300).

Changeset

skip-changeset label: nothing is released by any package change — the diff touches skills/** and content/docs/** only, neither is a workspace package; scripts/check-empty-changeset.mjs confirms no changeset is added.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

…, point upstream reporting at objectstack-platform
PMD-C-01: the 882-token upstream-reporting job becomes a residue that points at
objectstack-platform's "The App / Platform Boundary" section by heading and keeps
only what this loop adds (derive the upstream repo, actionable report, file as a
guest, park honestly).
PMD-E-05: "Multiple PMs — shard by repository" collapses to one Guardrails bullet.
PMD-E-02: "One semantics, N independent implementations" retired from the
published surface (a platform compiler concern, not an app project's).
PMD-E-03: the two platform-governance non-escalation bullets deleted; the frame
block below them is untouched (check:skill-frame-sync green).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ort JSON, no PM-authored PRs
PMD-B-03: the sanitizer specimens are gone; the rule and its measured one-line
evidence stay.
PMD-B-02: the report JSON is printed once (in the template); the "Report
contract" section keeps only the two rules the second copy added.
PMD-G-01: "the PM's own tooling PRs" clause deleted — it contradicted
"The PM writes no files".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…tract; "enforces" reads "requires"
F-01: the report is delivered twice in both modes, GitHub first, first line the
literal plaintext marker (never an HTML comment), read back; the "lossless
channel" claim is gone (it was contradicted by the collect step).
F-02: the template re-checks the issue's premises; the report carries
premise_still_valid, and a no-PR report with premise_still_valid: false plus
evidence is a first-class delivery.
F-03: never git stash — the stack lives in the common .git and is shared by
every worktree; park work as a wip commit or a patch file.
F-04: the claim comment carries a Session: line; the race check reads session
ID or branch.
F-05: the empty branch is pushed before any edit (also the write-access probe),
so the stale-claim reclaim can never fire against a live agent.
IF-2: the PM-side resource paragraph says the template "requires" the lock, not
"enforces" it — the mechanism is the host project's.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…the lock design spec as constructs
PMD-D-01 (+E-01): the sweep rationale keeps the three-disjunct predicate, the
scoping caution and the updated_at floor; the cross-seat producers, the
"steward automation" / "lane" / "protocol posts" vocabulary and the anecdote go.
PMD-D-02: the eight-card baseline sample is gone; the rule that the baseline is
measured in your own project stays.
PMD-D-03: the cancelled-timer anecdote is gone; the two check-in rules stay.
PMD-E-04: the four correctness properties of a lock wrapper the customer does
not have collapse to one line; the mechanism stays the host project's.
Also trims the PMD-C-01 residue to <= 250 tokens (the card's ceiling).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
…ger; regenerate the catalog
The description no longer advertises the upstream-reporting job (the doctrine
lives in objectstack-platform; this file keeps a pointer). skills/README.md and
content/docs/ai/skills-reference.mdx are generator output
(pnpm --filter @objectstack/spec gen:skill-docs), not hand edits.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 08:26
@os-zhuang
os-zhuang added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit a9b2be0Sep 2, 2026
40 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14300-skills-pm-dispatch-optimization branch September 2, 2026 08:57
os-litant pushed a commit that referenced this pull request Sep 2, 2026
…ent template — the verify-lock non-guarantee and the ratchet funding discipline
The follow-up sync PR #14444 recorded, from .claude/agents/os-dev.md on
origin/main: (1) resource rule 1 now states the lock's non-guarantee —
it does not promise an idle machine, only excludes work routed through it,
so wall-clock readings under a hold are shared-box readings; (2) a size
ratchet is paid only by deleting content — a re-wrap is not payment, a
densification that adds nothing is a repair, a ceiling is raised only by
the maintainer, nothing left to delete means "blocked". Additions +108
tokens, funded in the same package: three dispatch-prompt non-negotiables
that restated the template's binding-file paragraph, the "When to STOP"
rule and rule 4 verbatim; the template's top-paragraph restatement of the
final-message rule; the sanitizer trap's HTML-comment clause (stated at
the report block); and rule 4's published-only rationale sentence about
disk exhaustion, which the oracle does not carry. Package 11,556 ->
11,546 (-10 for this commit, -21 against main). Ratchet rows re-pinned at
the landed counts: entry 9,708, rules/dev-template.md 1,838.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude