Skip to content

check:docs-audit-scope forces every page-adding docs PR across the .claude/** governed fence — 4 for 4, and 3 merged unnoticed #9866

Description

@claude

The gate that forces every docs PR across the governed fence

scripts/pm/check-governed-merges.mjs:274-280 fences five surfaces as human-merge-only. One of them is .claude/**.

check:docs-audit-scope (run at .github/workflows/lint.yml:516, inside the lint: job = the Lint & Repo Gates required context) holds a generated page-scope block that lives at .claude/workflows/docs-accuracy-audit.js. Adding a page to content/docs/ makes that gate red; the gate's own --write regenerates the block; the block is inside the fence.

Adding a documentation page cannot be done without crossing a governed surface. Not "usually", not "if you are careless" — the two rules are jointly unsatisfiable for the whole class.

Measurement, not inference

Four page-adding docs PRs, each a +1/-0 edit to that exact file:

commitPRfile diff
ece873001#6891.claude/workflows/docs-accuracy-audit.js+1/-0
f049f7fd4#8964same, +1/-0
e2b3c831e#9449same, +1/-0
ae67ad006#9860same, +1/-0

Three of the four merged with no one recording that the fence had been crossed. That is the defect worth fixing: a fence that fires on routine traffic trains every seat to read past it. The signal is not "an agent touched the instruction tree" any more — it is mostly "an agent ran a required gate's --write", and nothing downstream can tell the two apart.

What is NOT being proposed

  • ⛔ Not "drop .claude/ from the fence." The fence is right about the instruction tree.
  • ⛔ Not "let agents merge governed PRs." The human-merge rule is the point.
  • ⛔ Not "hand-edit the block." The gate rejects hand-edits; that is why --write exists.

Candidate shapes (pick one, or reject all three)

  1. Move the generated artifact out of the fence. The scope block is data the gate owns, not instruction-tree prose. Somewhere like scripts/generated/docs-audit-scope.json puts it under normal review while .claude/workflows/docs-accuracy-audit.js keeps the logic. Cost: one path change + the gate's reader.
  2. Carve a generated-artifact exception into check-governed-merges.mjs — a per-surface generatedPaths list, so exactly this file (and any future --write target) is fenced against hand edits but not against its own generator's output. Cost: the checker must be able to tell "matches the generator's output" from "hand-edited", which means running the generator — real work, and the honest version of the rule.
  3. Accept it and make the crossing visible — the fence stays, but check-governed-merges labels this class governed:generated instead of failing it into the same bucket as an AGENTS.md rewrite. Cheapest; keeps the human click; stops the class from diluting the signal.

My read: 2 is the correct rule and 1 is the cheap one that buys most of it. 3 alone leaves a human clicking merge on traffic no human judgement improves.

Open question for the maintainer

Was ruling 5 (.claude/** off-limits to dispatched devs) meant to cover generated artifacts under that prefix at all? Every answer here follows from that. I ruled on #9860 that it was not — the dev's regeneration stands — but that ruling is mine, made under a forced choice, and it should be confirmed or overturned rather than left as precedent-by-accident.

Prior art

Same family as #9747: a gate whose recognizer is narrower than the repo's real shapes, reporting the shortfall as a verdict instead of as "unrecognised". Here the fence's recognizer is path prefix, and the shape it cannot see is provenance.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions