Repository navigation
hooks: lint the prose git never sees - #29
Merged
Merged
Conversation
aberoham
added a commit
that referenced
this pull request
Aug 30, 2026
The prose mode shipped in #29 missed two habits a reviewer named the same day. Work pushed out of the change, and telling the reader what they already know. Both are now hard failures. ``` $ python3 hooks/check.py --prose draft.md line 1: 'is a separate decision'; do the work or say nothing line 2: 'Obviously'; the reader already knows line 3: 'worth noting'; do the work or say nothing line 4: 'left as future work'; do the work or say nothing exit: 1 ``` A plain statement of fact still passes. `The api is the only consumer of these schemas` is clean. 85 tests pass.
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.
The hook checks diffs and commit messages. Git never sees a PR or issue body, so nothing checked the writing that gets read the most. That is how
One wart, kept on purposereached a review draft.--prose FILEruns the same script over a draft before it is posted:Hard failures are figurative filler, a semicolon, a sign-off or generated-by trailer, the word list, and any sentence over thirty words. Everything else is a note and never fails the run.
The semicolon rule is not a style preference. Matt's own prose does not use one. Across 937 lines of his commit messages and both corpus files in
local/, every semicolon is either pasted code or a;-)wink. The rule allows the wink.Hedges and modals are never flagged. A linter that squeezed them out would rewrite claims. That idea and two others come from danyuchn/asd-ste100-skill#5. The others are splitting hard failures from advisory notes, and stripping fenced and inline code before matching.
Run against the six PR bodies drafted this week, it failed one that was already posted. It flagged the same trailing-clause habit in four of the others.
82 tests pass.
uvx ruff check .is clean.