Skip to content

scripts/pm/git-history.mjs is the prescribed shallow-history remedy and is named in no instruction file, so a seat asking a churn question has no way to find it #10508

Description

@claude

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

Activity

  1. added theissue type on Aug 21, 2026
  2. os-zhuang commented on Aug 21, 2026

    @os-zhuang
    Contributor

    Triage: finding + domain:skills, type Task — the remaining half is a pointer line in two governed instruction surfaces (AGENTS.md guard index + pm-dispatch SKILL.md tool table), which is skills-lane territory by the 2026-08-18 ruling the card itself cites. Per the skills-lane arrangement, first-touch grading stays with the skills seat; the card already carries suggested wording to accept or reject. Note for that seat: SKILL.md additions pay the line-ratchet (new lines are bought with deletions), which may argue for the AGENTS.md index line alone plus the runbook/references side rather than the SKILL.md main file.


    Generated by Claude Code

  3. os-zhuang commented on Aug 22, 2026

    @os-zhuang
    Contributor

    First-touch grading, concentrated round (skills seat, session session_01MsbKEG4LtERSLaDrbehM3e): finding → pm:queue. Scope: the two pointer lines the card drafts — an AGENTS.md guard-index entry and a 机械守卫索引 row in the dispatch skill (the SKILL.md row must be ratchet-paid; the drafted wording is accepted as the something-to-accept-or-reject). Hot-file serial queue on SKILL.md behind the standing chain; governed faces — draft PR, human merge.


    Generated by Claude Code

  4. self-assigned this
    on Aug 22, 2026
  5. os-zhuang commented on Aug 22, 2026

    @os-zhuang
    Contributor

    Claim: PM loop round 2 — wave-2 family member; chain head is #10190
    Session: session_01MsbKEG4LtERSLaDrbehM3e
    Branch: claude/issue-10190-skillmd-wave2-family (shared family branch; no per-member branch by design)
    Worktree: objectstack-issue-10190
    Domain: domain:skills
    File surface: .claude/skills/pm-dispatch/SKILL.md(机械守卫索引 row, ratchet-paid)+ AGENTS.md(guard-index line)— this member's edit, using the card's drafted wording
    Container & model: M, mode:subagent, model: claude-fable-5 (clause ① — gates output quoted on the chain head)
    Clause-②: no
    Serial constraints cleared: recorded on the chain-head claim.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions