Skip to content

docs(adr): ADR 0003's corpus rule does not scope the sweep to a hook's actual deployment surface #1438

Description

@kyle-sexton

Observation

ADR 0003 (merged in #1357) requires a guard to measure firing rate and precision "on the real corpus, at real scale" before shipping default-on. It never says whose corpus.

For a PostToolUse guard shipped inside a plugin, that omission matters. The guard does not execute here — it executes in arbitrary consuming repositories, whose document, path, and command distributions can differ substantially from this marketplace's. A sweep across this repo's 975 tracked markdown files establishes precision for this repo. A guard can clear that bar here and then over-fire for every consumer.

The evidence the ADR itself cites illustrates the gap: asserted-path-verify's dominant failure class was consumer-project config paths (.claude/**) that a doc describes for a consuming repo and that a marketplace correctly lacks. That is precisely a deployment-scope mismatch, and the rule as written would not have caught it in the general case.

Direction (no open decision)

Amend decision rule 1 so the corpus requirement names the guard's deployment scope rather than the authoring repo. Two readings satisfy it and the ADR should say which:

  • A guard whose matcher explicitly confines it to this marketplace may measure here.
  • A guard that ships default-on into consumer projects measures against corpora representative of that deployment scope — and states which corpora, since a single-repo sweep is not evidence about them.

Acceptance

  • Rule 1 distinguishes "the authoring repo's corpus" from "the guard's deployment surface"
  • The asserted-path-verify consumer-config finding is cited as the motivating case
  • No restatement of docs/conventions/hook-precision/README.md

Related

Raised as review feedback on #1364 (closed as superseded by #1357). Refs #1352, #1270, #1314, #1319.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.status: needs-decisionAwaiting a human or maintainer judgment call.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions