Skip to content

Share one prose matcher between both gates - #1

Merged
simoncorry merged 1 commit into
mainfrom
voice-overhaul-shared-matcher
Jul 31, 2026
Merged

Share one prose matcher between both gates#1
simoncorry merged 1 commit into
mainfrom
voice-overhaul-shared-matcher

Conversation

@simoncorry

Copy link
Copy Markdown
Owner

Summary

  • One shared matcher (scripts/prose-matcher.js) now owns matching semantics for both the advisory voice gate and the blocking jargon gate, so the two can't drift: case-insensitive, word-boundary aware (punctuation-edged entries keep substring behavior on that side), markdown code excluded, hits carry original line numbers.
  • The one deliberate markdown exception: a whole-document ```markdown fence is a handoff copy wrapper, and its contents are still scanned as prose.
  • List loading is strict and throws; the blocking gate exits 1 on a broken list, the advisory gate reports it loudly and refuses to claim a clean draft.
  • New wiki page engineering/clear-technical-writing.md: six principles informed by ASD-STE100 and W3C/DfE plain-language guidance, with the no-reproduction, no-compliance-claim boundary stated plainly, listed in the enforced index.

Test plan

  • npm run check green (tests, command shapes, links, jargon gate)
  • New matcher unit tests: case, boundaries, punctuation edges, Unicode neighbours, regex-special phrases, fences, inline spans, outer handoff fence, line numbers, strict loading
  • Both gate test files extended for boundary and wrapper behavior

…aries

The advisory voice gate and the blocking jargon gate each carried their
own matching logic, and both were naive substring scans: case-sensitive
in one, boundary-blind in both, so a listed phrase hiding inside a longer
word tripped the gate and a capitalized one sailed past it. One shared
matcher now owns the semantics for both: case folding, word-edge
boundaries (punctuation-edged entries like the em dash keep substring
behavior on that side), markdown code exclusion, and the one deliberate
exception where a whole-document markdown fence is a handoff copy
wrapper whose contents are still prose. Hits carry original line numbers.

Also adds the clear-technical-writing wiki page: six principles informed
by ASD-STE100 and the W3C/DfE plain-language guidance, with the scope
boundary stated (no reproduction, no compliance claim, conversation is
not a maintenance manual) and the index route phrased for the question a
future agent will actually ask.
@simoncorry
simoncorry merged commit 673668f into main Jul 31, 2026
@simoncorry
simoncorry deleted the voice-overhaul-shared-matcher branch July 31, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant