Skip to content

docs(skills): triage debrief index template, minimal tail-page mutex read, long-thread status-read outsourcing - #10118

Merged
os-warren merged 1 commit into
mainfrom
claude/issue-10108-triage-debrief-index
Aug 20, 2026
Merged

docs(skills): triage debrief index template, minimal tail-page mutex read, long-thread status-read outsourcing#10118
os-warren merged 1 commit into
mainfrom
claude/issue-10108-triage-debrief-index

Conversation

@os-warren

Copy link
Copy Markdown
Collaborator

Fixes#10108

What

One new section, 「分诊席读数成本三则(维护者 2026-08-20)」, added to .claude/skills/pm-dispatch/references/dispatch-runbook.md (governed surface, human-merge-only), placed with the other triage-seat sections (after 座位贴活性巡查). It lands the three conventions the card mandates:

  1. 收班简报索引化 — fixed four-part template: first-line machine predicate (the 「分诊轮收尾」 opening marker, byte-stable / 逐字不动 — the mutex guard greps it), index table (card | one-line verdict), health metrics, handoff list (the last two reuse the SKILL.md round-report definitions, including naming decision cards with open downstream dependents). Details must not be restated — the per-card reasoning already lives as audit comments on the cards; the debrief points, never copies. Hard budget: body at or under 3000 chars, self-reported at close; two consecutive over-budget debriefs = patrol-visible drift.
  2. 互斥最小尾页读法 — the mutex read needs only two timestamps (latest debrief, latest round-open marker): issue_read get for the comment count, compute the last page with a small perPage (~15), read the tail only; back up one page iff the two readings are not in the tail. Never read the whole thread.
  3. 长线程状态读外包 — threads over ~15 comments: STATUS-extraction reads (latest transition comment, Restart-when: lines, claim/report presence) go to a low-tier read-only subagent (sonnet), returning structured excerpts, tail-first. Verbatim boundary as the card requires: 裁决级阅读(契约复审、放行判定、代裁)不可外包 —— 省这部分是拿放行质量换 token,禁止。

The section cross-references (without expanding) the two-layer durable fix in prose form — patrol instruments reading comment-level edges (landed, frozen) and seats restoring a read-body-once current-state line (blocked by the sanitizer escaping trap, separate line of work) — with no issue-ID citations, per the id-lint rule.

Where it landed, and why not a lane file

The dispatch note guessed a triage lane file under references/lanes/; none exists — the six lane files are the domain lanes (cli/devx/engine/services/skills/spec) and the triage seat's job description lives in the SKILL.md 分诊座位职责 section, whose 细则 already live in dispatch-runbook.md (发现分诊轮细则, 座位贴活性巡查, 紧急卡直接分诊). The runbook is therefore the actual triage runbook file the card's scope names (「分诊席 runbook/references」), and the card itself says convention ② is 「写进 runbook 一句话」. The six lane files and their 读锚 first bullets are untouched. SKILL.md is untouched (its 1 remaining headroom line is claimed by PR #10105, which is unmerged and edits only SKILL.md — no file overlap with this PR).

Line-budget: ceiling raise 223 → 244, with the ruling quoted

dispatch-runbook.md sat at 223/223 (headroom 0). The section adds 21 lines; the ratchet's documented raise path requires a maintainer ruling quoted in the raising PR's body. The ruling is the card itself — maintainer-approved scope (2026-08-20, 「维护者拍板立卡 …『立卡』」), verbatim:

范围 —— .claude/skills/pm-dispatch/** 分诊席 runbook/references,三段约定

⛔ 不动 SKILL.md 主文,除非必要;若须动,682/682 顶格,行预算以等量去重支付。优先落分诊席 runbook/references。

The card mandates ~15 lines of new convention text into this file family, caps SKILL.md explicitly, and is silent on a references dedup requirement; the runbook is post-compression (one-time pass) and cutting 21 lines of other seats' rules to pay would drop rules with no other home. scripts/pm/check-skill-line-ratchet.mjs gets the new ceiling at the landed count (headroom 0, same convention as every other row) with a provenance comment. If the reviewer prefers a separate new references file with its own ceiling row instead of this raise, that is a mechanical rework — say the word.

Gates (union derived by node scripts/pm/dispatch-gates.mjs, no args: "2 path(s) vs merge base 1800ffa", 8 families; all run at head b8847cba8, exit codes captured before any pipe via redirect-then-capture)

  • check:pm-skill-ratchet — "✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/dispatch-runbook.md is 244 lines (ceiling 244; headroom 0)." (exit 0); script self-test after the CEILINGS edit: "✓ check-skill-line-ratchet self-test: 19 cases pass." (exit 0)
  • check:pm-skill-id-lint — "✓ check-skill-id-lint: 15 file(s) clean (pattern /#[0-9]{3,}/g)." (exit 0)
  • check:pm-governed-merges — "✓ check-governed-merges --self-test: 81 assertions" (exit 0)
  • check:pm-governed-prose — "✓ check-governed-prose: 2 instruction surface(s) name all 5 registered governed surfaces (docs/adr/** · .claude/** · skills/** · AGENTS.md · CLAUDE.md) and claim no others." (exit 0; prompt-named, run although the derivation did not place it)
  • check:skill-frame-sync — "✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files" (exit 0)
  • check:doc-authoring — "✓ doc authoring guard: 379 files clean — no bare metadata literals." (exit 0)
  • check:cross-package-test-inputs — "OK: 12 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob." (exit 0; both the pnpm and the raw-node spellings the derivation listed run this same script)
  • check:doc-formula-expressions — "✓ check:doc-formula-expressions: 22 record-scoped formula example(s) across 404 files / 1414 TS blocks judged clean by @objectstack/formula." (exit 0, after building the lint dependency closure)

NUL/control-byte self-scan on both edited files: no match (clean).

Reverse verification (directions predicted in writing before running)

  1. Ratchet ablation — predicted: one extra line (245 over ceiling 244) turns the gate red naming the file. Observed: "✗ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/dispatch-runbook.md is 245 lines; the ratchet ceiling is 244." (exit 1). Restored byte-identical: git diff --exit-code returned 0 against the committed head.
  2. id-lint positive control — predicted: a bare #9999 injected into the new section turns the gate red naming the file. Observed: "✗ check-skill-id-lint: .claude/skills/pm-dispatch/references/dispatch-runbook.md: 1 issue-ID citation(s)" at line 80 (exit 1). Restored byte-identical (git status --porcelain empty), re-run green: "✓ check-skill-id-lint: 15 file(s) clean" (exit 0).

Changeset

None — .claude/ internal agent tooling plus its gate script, nothing user-visible; skip-changeset applied.

Governance: this edits a governed surface (.claude/**) — draft PR, review requested from os-zhuang, human merge only; this PR stays draft.


Generated by Claude Code

…read, long-thread status-read outsourcing
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeA3nU1B5Q2pgxqxgUrexd
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

2 participants

@os-warren@claude