You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
prose_lint's sentence-length Check Skips Code Comments Although the 25-Word Cap Covers Them #2430
The comment-and-doc-style Skill's "Sentence structure" section applies the 25-word cap to agent-authored prose. prose_lint.py's sentence-length check, though, only reads .md files (if "sentence-length" in rules and path.suffix == ".md"). So a code or workflow comment sentence over the cap passes --check sentence-length --diff <base>. The first thing to measure it is a PR reviewer.
Repro on hub main (62f0b33), in a scratch repository whose working tree holds the two files below, staged:
printf'#!/bin/bash\n# This sentence in a shell comment runs on well past the twenty-five word cap that the house style sets for every sentence an agent writes in any file.\necho ok\n'> demo.sh
printf'This sentence in a Markdown file runs on well past the twenty-five word cap that the house style sets for every sentence an agent writes in any file.\n'> demo.md
git add demo.sh demo.md
python3 <hub>/.github/actions/prose-gate/prose_lint.py --allow-comments --check sentence-length --diff HEAD -- .# demo.md:1: sentence-length: 28 words in one sentence -> sentences of 25 words or fewer# exit 1, and nothing for demo.sh, whose comment holds the same 28-word sentence
Seen downstream on ptr727/HomeAutomation-Config. Five comment sentences of 26 to 62 words passed the local strict review's --check sentence-length run. Copilot then raised them on a develop -> main promotion PR, which cost a feature -> develop fix PR and another promotion round.
Possible fix: run sentence_length_findings over the comment text that comment-added and comment-wrap already extract, scoped to changed lines like the Markdown case. Alternatively, if the cap is meant to cover Markdown only, say so in the Skill and in GOVERNANCE.md "Documentation Style Conventions", so a reviewer has no rule to cite against a comment.
Recurred on #2742: a 27-word workflow comment line in .github/workflows/merge-bot-task.yml passed prose_lint.py --diff ... --check sentence-length locally and in CI. Two local strict-review passes missed it too, before the reviewer was told to count comment sentences by hand. Copilot caught it on promotion #2743, and fixing it took a separate feature PR (#2744) and a second promotion round. The cost of this gap is one extra feature -> develop -> promotion cycle per instance.
Activity
ptr727 commentedon Oct 10, 2026
Recurred on #2742: a 27-word workflow comment line in
.github/workflows/merge-bot-task.ymlpassedprose_lint.py --diff ... --check sentence-lengthlocally and in CI. Two local strict-review passes missed it too, before the reviewer was told to count comment sentences by hand. Copilot caught it on promotion #2743, and fixing it took a separate feature PR (#2744) and a second promotion round. The cost of this gap is one extra feature -> develop -> promotion cycle per instance.Extend the Sentence-Length Check to Comments and Docstrings (#2836)
Promote the Comment and Docstring Sentence-Length Check and the Attes…