Skip to content

fix(docs-hygiene): audit-noise's negation pairing check misses a positive supplied as a bare imperative #3204

Description

@kyle-sexton

The defect

audit-noise's negation shape decides "is a positive alternative present?" by matching a fixed marker listinstead, rather than, prefer, in place of, in favour of. A positive supplied as a bare imperative after a separator is not recognised, so a correctly-paired sentence is reported as a finding.

Real example from this repo, flagged by the shipped detector:

Never confirm a load-bearing deletion from this context — delegate to a fresh, non-fork subagent that has not seen the doc.

The positive alternative is right there (delegate to a fresh… subagent). It carries none of the marker words, so the pairing check misses it.

This is a false-positive class: it costs reviewer attention, never coverage. It is not a silent withhold.

Why it surfaced now

#3202 moved the imperative gate from per-line to per-sentence (correctly — a line-level gate admits the whole line on its first sentence and then reports a later descriptive one). That took the measured count on an 85-file sample from 31 → 69: 38 genuine imperative prohibitions sit as a later sentence on their line and had been withheld.

Sampling those 38 found both real findings and this residual class. The gap existed at 31 too; the per-sentence gate just exposes more of it.

The fix

Adopt #3180's closed function-word stoplist. Rather than an allow-list of marker words, it tests whether the clause after a separator is an alternative by checking what it is not — a stoplist of function words generalises where a marker list only ever covers the phrasings its author thought of. #3180 also looks through leading adverbs ("Just mark.", "Simply re-run it.") rather than stopping on them.

That PR is closed (superseded by #3194/#3202) but its reasoning and calibration are in its body and worth reading before reimplementing.

Acceptance criteria

  • A positive supplied as a bare imperative after a separator (em-dash, semicolon, colon) suppresses the finding.
  • A leading adverb before that imperative does not defeat the test.
  • Re-measure on the same 85-file sample; the count should fall below 69 and every other shape's count must stay unchanged.
  • Sample the remaining findings and record how many are genuine, rather than reporting only a total.
  • The existing carve-outs (hard guardrail, worked example, marker-list pairing) still hold.
  • skill-quality:check docs-hygiene:audit-noise passes against the source checkout.

Related

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: needs-triageDefault until a priority tier is assigned.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions