Tighten the docs, and run them through the writing checker - #91
Merged
Merged
Conversation
"Supported library imports" carried a fifteen-row table of modules and responsibilities, hand-maintained beside docs/api.md, which now lists every module with a summary read off the code. The table could only drift, and its three following paragraphs restated the contract at length. 447 words to 171, with the pointer to the generated reference doing the work the table was doing.
Every PR body and issue comment this week went through local-tools/avoid_ai_check.py. The README and docs/ never did, which is where most of the words are and where most readers land. Two real breaches of the solo-maintainer voice rule, both in prose that predates this week: "a reverse-engineering problem we haven't cracked yet" in Traps to avoid, and "We mint our own key and have AC14K_M sign our leaf" in the certificate material, which reads better impersonally anyway. The generator was emitting 114 em dashes into docs/api.md, one per entry and method, from two separators. A colon does the same work without turning a reference page into a stylometric outlier. Left alone deliberately: the "we" in a code comment inside an example, where it means author and reader; two library docstrings that say "we" for the library, which is idiomatic in source and would read oddly as "I"; and api.md's heading count, bullet lists, repeated vocabulary and bold labels, which are what a generated reference page is.
A pass over the sentences carrying the most words, keeping every fact. The write-coverage trap was 194 words in one bullet, and its last third was bridge behaviour: optimistic publish, the deferred re-read, and why the bridge avoids a fetch-back. That moved to docs/bridge-demo.md, where the architecture lives, leaving the protocol lesson at 126 words. The dryer note restated push-versus-poll, which Under the hood and "How the app keeps in sync" each already explain. 62 words to 30, keeping both dryer-specific facts and the ~100ms measurement. Five README sentences of 40 to 53 words came down without losing a measurement: the OBSERVE-silence trap, the write_max_attempts pair, the rate-limit budget, the PSK identity arithmetic, and the CoAP-TCP scope note. One more first-person-plural, "not ours" in the bridge doc. My earlier sweep matched `our` and missed `ours`. README 5034 words to 4639 across both passes, 8% down, with the module table gone and no finding lost.
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.
Three commits: a duplicated table removed, the docs run through the writing checker for the first time, and a pass over the sentences carrying the most words. README 5034 words to 4639.
The module table was duplication
"Supported library imports" carried fifteen hand-maintained rows of modules and responsibilities beside
docs/api.md, which now lists every module with a summary read off the code. The table could only drift. 447 words to 171, with the pointer to the generated reference doing the work.The docs had never been through the checker
Every PR body and comment this week went through
local-tools/avoid_ai_check.py. The README anddocs/never had, which is where most of the words are.It found three real breaches of the solo-maintainer voice rule: "a reverse-engineering problem we haven't cracked yet", "We mint our own key and have
AC14K_Msign our leaf", and "not ours" in the bridge doc. The last one I missed in my own follow-up sweep, which matchedourand skippedours.It also caught something systematic: the API generator was emitting 114 em dashes into
docs/api.md, one per entry and per method, from two separators. A colon does the same work without making a reference page a stylometric outlier.Left alone on purpose: the "we" in a code comment inside an example, where it means author and reader; two library docstrings that say "we" for the library, which would read oddly as "I"; and
api.md's heading count, bullet lists, repeated vocabulary and bold labels, which are what a generated reference page is.Tightening, with every fact kept
docs/bridge-demo.md, leaving the protocol lesson at 126 words.write_max_attemptspair, the rate-limit budget, the PSK identity arithmetic, and the CoAP-TCP scope note.What the numbers actually say
The corpus is 12454 words to 12328, down 126. The split moved content between files, and each new file needs a header and an index entry, so the deletions are partly offset. The README cut is real at 8%.
Below that means dropping findings. The checker confirms the prose is not padded: near-zero filler markers across all six files, and the remaining 35-word-plus sentences are dense lists where every clause is a fact, such as the
SamsungServerProfileClientHello constraints and the Block2 reader's five properties.Validation
798 tests pass on Python 3.11, 3.12, 3.13 and 3.14, and on the dependency floor.
check_share_safety.pyis clean. Rebased onto main after #90.