Found while implementing #9902 (PR #10506). Filing rather than widening that PR: the remedy is a governed edit, and governed surfaces are human-merge-only and never a rider on a code PR.
The gap
scripts/pm/git-history.mjs shipped for #9878 as the answer to "how many commits landed in this window" — it proves the window is covered, deepens only when the shallow floor intrudes, and otherwise refuses with an empty stdout so a captured number is empty rather than plausible.
Before PR #10506, grep -rn git-history across the whole repo returned only the file itself: no package.json script, no workflow step, no skill, no AGENTS.md entry. Two consequences, one of which is now closed:
The remedy, which needs a human merge
The two natural homes are both governed surfaces (docs/adr/** + .claude/** + skills/** + AGENTS.md + CLAUDE.md, maintainer 2026-08-18):
- AGENTS.md guard index — one line, in the same shape as the other entries.
.claude/skills/pm-dispatch/SKILL.md tool table — it already lists scripts/pm/check-governed-merges.mjs, and the PM seat is the heaviest asker of windowed history questions (round reports quote churn counts).
Per check-governed-merges.mjs's own register this is domain:skills territory (SKILL.md: 「skills 相关的应该都归你管」, maintainer 2026-08-18), not domain:devx.
Suggested wording, so the routing seat has something to accept or reject rather than compose:
scripts/pm/git-history.mjs — answer a "how many commits on <ref> in <window>" question, or REFUSE. A shallow clone answers windowed git log/rev-list questions from truncated history at exit 0 with no warning; this proves the window is covered first. historyHorizon() is the read-only predicate for tools that answer their own question.
Related
#9878 (the helper) · #9902 (the three call sites) · PR #10506
Generated by Claude Code
Found while implementing #9902 (PR #10506). Filing rather than widening that PR: the remedy is a governed edit, and governed surfaces are human-merge-only and never a rider on a code PR.
The gap
scripts/pm/git-history.mjsshipped for #9878 as the answer to "how many commits landed in this window" — it proves the window is covered, deepens only when the shallow floor intrudes, and otherwise refuses with an empty stdout so a captured number is empty rather than plausible.Before PR #10506,
grep -rn git-historyacross the whole repo returned only the file itself: nopackage.jsonscript, no workflow step, no skill, no AGENTS.md entry. Two consequences, one of which is now closed:lint.yml.The remedy, which needs a human merge
The two natural homes are both governed surfaces (
docs/adr/**+.claude/**+skills/**+AGENTS.md+CLAUDE.md, maintainer 2026-08-18):.claude/skills/pm-dispatch/SKILL.mdtool table — it already listsscripts/pm/check-governed-merges.mjs, and the PM seat is the heaviest asker of windowed history questions (round reports quote churn counts).Per
check-governed-merges.mjs's own register this isdomain:skillsterritory (SKILL.md: 「skills 相关的应该都归你管」, maintainer 2026-08-18), notdomain:devx.Suggested wording, so the routing seat has something to accept or reject rather than compose:
Related
#9878 (the helper) · #9902 (the three call sites) · PR #10506
Generated by Claude Code