Skip to content

ai-style/throat-clearing never fires: rule matches nsubj but the expletive 'it' parses as expl #58

Description

@NikhilVerma

Summary

ai-style/throat-clearing never fires. It is silent on the exact phrasing its own docstring gives as the canonical example.

The rule's docstring reads:

Chatbot throat-clearing — expletive-"it" + copula + [importance adj] + to + [cognition verb]: "It is important to note that …".

It does not match that sentence, or any variant of it.

Reproduction

All four of these produce zero throat-clearing findings under strict:

It is important to note that the release removed the flag.
It is worth noting that the release removed the flag.
It is crucial to remember that the release removed the flag.
It is essential to understand that the release removed the flag.

Probed with new Linter(await loadParser()) and resolveConfig(strict) against packages/rulepack-ai-style/src, so this is not a stale published build. The installed 0.8.2 CLI behaves the same way.

Cause

The parser labels the expletive subject expl, but the rule looks for nsubj.

Parse of It is important to note that the release removed the flag.:

 1 It           PRON   head= 3 expl
 2 is           AUX    head= 3 cop
 3 important    ADJ    head= 0 root
 4 to           PART   head= 5 mark
 5 note         VERB   head= 3 csubj
 6 that         SCONJ  head= 9 mark
 7 the          DET    head= 8 det
 8 release      NOUN   head= 9 nsubj
 9 removed      VERB   head= 5 ccomp
10 the          DET    head=11 det
11 flag         NOUN   head= 9 obj
12 .            PUNCT  head= 3 punct

Every other condition holds. important is ADJ and in IMPORTANCE_ADJ; is is a cop child of it; note is a VERB in COGNITION_VERB attached as csubj, which is already in the accepted deprel set.

The rule bails at packages/rulepack-ai-style/src/rules/throat-clearing.ts:

const subj = child(s, adj.id, 'nsubj');
if (!subj || lower(subj) !== 'it') continue;

child(s, adj.id, 'nsubj') returns nothing, because the token is expl. The docstring says "expletive-it", so the intent was always to match this; the deprel lookup just doesn't ask for it.

Suggested fix

Accept expl alongside nsubj when looking for the it subject.

Why it went unnoticed

throat-clearing has no test fixture anywhere in the repo. It is registered at packages/rulepack-ai-style/src/index.ts:73 and included in the default rulepack, so it looks live from the outside. AGENTS.md asks for a triggering fixture plus a nearby legitimate case for every rule; this rule has neither.

How it surfaced

Found while measuring rulepack coverage over a corpus of deliberately badly-written prose. throat-clearing was one of a handful of rules that stayed silent even when a generator was explicitly told to produce it. The others in that set turned out to be narrow by design and fire correctly on their documented surface forms — significance-idioms, rhetorical-scaffolding, modal-redundancy and false-agency were each verified firing. throat-clearing was the only genuine failure.

Worth a sweep for other registered rules with no positive fixture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions