Repository navigation
feat: ban phrase groups by default - #58
Merged
Merged
Conversation
banned_phrases now has groups, like banned_chars: signposts, insistence, metaphors and precision, each on by default and switched under lints.banned_phrases.groups. Their phrases live in src/lint/banned_phrases.toml, parsed once. Each entry has no human file on the big tier (v2) and llm files in at least 40 repositories. A phrase in ban keeps the advice ban gives it, whatever the groups say. A phrase in allow still suppresses by containment. The report names the group of each phrase it lists. config::Groups becomes CharGroups, beside the new PhraseGroups. The repo's own config and tools/corpus/report.toml turn the lint on.
Case tests cover a group hit, a group switched off, ban beating a group's advice, allow of a group phrase, and an overlap where no token is reported twice. The tree corpus test holds every group at zero human fixtures and at least five llm fixtures. The schema drift test covers both lints' groups, and report.toml must hold the repo's own lint settings.
make test-blobs counts each entry's llm files and repositories on the pinned image and fails on drift or on any human file; make fix-catalog rewrites the counts. tools/corpus/rejected.toml records each refused phrase with its reason, and candidates leaves those and the catalogue's phrases out. docs/design/catalog.md says what gets in and what CI checks.
webern
marked this pull request as ready for review
September 27, 2026 16:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
banned_phrasesuntil now banned nothing by default: an adopter who wanted phrase lints wrote a list from memory, with nothing behind any entry. This PR gives it groups, likebanned_charshas:signposts,insistence,metaphorsandprecision, each on by default and switched under[md.lints.banned_phrases.groups]. The report names the group beside the phrase so a user can switch one off by name.Every entry carries the evidence that put it in. It was measured on the corpus image
measured_onnames: zerohumanfiles out of 11,873 (a rule-of-three upper bound of about 0.03%), andllmfiles in at least 40 repositories. CI no longer takes those numbers on faith:make test-blobsre-derives every count against the pinned image and fails on drift, andmake fix-catalogrewrites the file when the image moves. A phrase whose evidence decays is removed and joins the refused list.The matcher keeps its old semantics: a user's
banbeats the catalogue's advice and never turns a load error,allowof a catalogue phrase stays legal (that is how a human switches one entry off), and no token is reported twice. Group checks apply only where the phrase matcher already applied.Candidates considered and refused are recorded in
tools/corpus/rejected.tomlwith reasons — words people write in 2026, prompt text rather than prose, rare words, and common English that sits at zero only because the corpus's human tier is older prose. Thecandidatestool skips both the catalogue and the refused list.Testing
make ci: exit 0make test-blobs: every recorded count re-derived on the pinned image, exact matchReferences
since, the first piece of not opting an updating user into new checks unknowingly