Skip to content

prose_lint: a colon anywhere in a bullet exempts that whole bullet from the semicolon rule #570

Closed

Description

@ptr727

Found while writing #569, where Copilot flagged a clause-joining semicolon in WORKFLOW.md that prose_lint.py had reported clean, before and after, with the semicolon rule enabled and that file in scope.

The exemption

scripts/prose_lint.py exempts a span it reads as a list, so a genuine enumeration keeps its separators:

listish = span.count(';') > 1 or ':' in span.split(';')[0]
if listish and ',' in span:
    continue

The unit is the span, and for a Markdown bullet the span is the whole list item. So a colon anywhere before the first semicolon marks the entire bullet listish, and every semicolon later in it is exempt however plainly it joins two independent clauses. The colon and the semicolon do not have to be near each other, or related at all.

Two bullets differing only by one colon:

EXEMPT   - **A rule.** The evidence is three things, and each matters: the first, the second,
           and the third. The agent reads them back afterwards; it does not fire it.

FLAGGED  - **A rule.** The evidence is three things and each matters. The agent reads them
           back afterwards; it does not fire it.

Same trailing clause, same violation. The first is silently exempt because an unrelated enumeration earlier in the bullet supplied a colon and a comma.

What it costs today

Measured over the 32 Markdown files in the gate's own scope on develop 01507a0:

Exempted spans carrying a semicolon 62
Semicolons inside them the rule never examines 120
Files affected 9
Reported by the rule 0

So the rule is silent across 120 semicolons in the docs it exists to check, and reports success while doing it. It caught the ones outside a bullet with a colon, which is why the count elsewhere looks healthy and nothing seemed wrong.

Why this is a Gate Honesty item

This is the shape GOVERNANCE.md "Verification Discipline" names: a pattern that silently matches less still exits zero, and the not-noticing case is indistinguishable from a clean tree. It is also the shape recorded twice already, in #476/#478 and again in the markdown/Markdown sweep in #566, where a pattern skipping a match followed by - or . swallowed a hyphenated prose compound and every sentence-final use. The exemption, not the rule, decides what the gate does, and this one carries the whole burden of separating an enumeration from prose.

The real case that exposed it: the violation shipped in a pull request, passed the local gate and CI, and was caught by a reviewer reading the sentence. Fixed there in b1015b6; the gate is untouched.

Three things to settle

Where the span boundary belongs. The narrow fix scopes listish to the clause containing the semicolon rather than the whole bullet, so an enumeration keeps its separators while a later independent clause is still examined. That is the smallest change that restores the rule and it needs the sentence boundary defined, since a bullet is one line here.

Whether a colon should confer the exemption at all. count(';') > 1 is direct evidence of a series. A colon is weaker: it introduces a list, a definition, or an explanation, and only the first is a reason to keep semicolons. Dropping the colon arm and keeping the multi-semicolon arm may be both simpler and stricter, and is worth measuring against the 62 spans before choosing.

Fix the exemption before any sweep. The 120 unexamined semicolons are a work list nobody has read, and the lesson from #566 is that a sweep run through a wrong exemption damages correct documents. Fix and test the exemption, diff old against new verdicts on the same tree, and only then look at what it newly reports.

Related: #519 (the prose backlog these files sit in), and the TODO.md "Gate Honesty" entry asking prose_lint to assert a floor on its own scope, which is the same failure from the other direction, a gate proving it read something rather than proving it looked at everything in what it read.

Activity

  1. added a commit that references this issue on Aug 6, 2026
    34c3841
  2. ptr727 commented on Aug 6, 2026

    @ptr727
    OwnerAuthor

    Fixed in 34c3841, merged to develop via #573.

    The span boundary is now the sentence, since that is where a list lives. sentences() splits a span at its sentence boundaries and each is judged on its own, so an enumeration keeps its separators while an independent clause later in the same bullet is still examined. The boundary reuses the run-on rule's guards, and it accepts a terminator closing inside emphasis or a bracket, because reading a bare . left .** and .) joining a bullet's every sentence back into one span, which would have left the defect in place for exactly the bullets it appears in.

    The colon arm was measured before being kept, as this issue asked. Dropping it reported 14 further lines, and reading them, they are genuine colon-introduced lists whose items carry commas, which is the standard use GOVERNANCE.md names, for example Match the heading style: title case with short bind words (a, an, the, of); hyphenated compounds capitalize both parts. So the arm is scoped rather than removed. count(';') > 1 carried the same span-scope defect and is scoped the same way.

    One thing this issue did not name turned up while fixing it: LABEL_COLON matched **Label**: but not **Label:**, the same bullet-opener construct in its other spelling, so the second was still announcing a list it never announced. One line tree-wide was affected and it is a splice. Both spellings are now dropped.

    Verdicts were diffed old against new on the same tree before anything else, per the third point here and the #476/#478 lesson: 20 semicolon findings become 64, nothing previously reported went silent, and every other rule is byte-identical. No prose was swept. The 44 newly reported are the existing backlog, measured and posted to #519, where 28 of the 33 lines sit in verbatim-carried files.

    Six regression cases were added, each proving a decision rather than restating the code: the colon-in-an-earlier-sentence case from this issue, a sentence closing inside emphasis or a bracket, a series not exempting the next sentence, a colon-introduced comma-carrying list staying exempt, both label-colon spellings, and an abbreviation not ending a sentence.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions