How stelint works
One doc comment, from the source file to a comment that passes.
src/lib.rsthe input/// Retries `req` on transient failures, e.g. if the response isn't [`Ok`]. pub fn send(req: Request) -> Result<Response, SendError> { … }
From the comment to the report.
step 1
Find the prose
stelint reads Rust comments and Markdown. Code in backticks stays code.
the prose of the comment
Retries `req` on transient failures, e.g. if the response isn't [`Ok`].
step 2
Find the part of speech
Stanza, a part-of-speech model, runs on your computer. The same sentence always gets the same result.
part of speech
RetriesNOUN`req`codeonADPtransientADJfailuresNOUN,PUNCTe.g.ADVifSCONJtheDETresponseNOUNisn'tAUX[`Ok`]code.PUNCT
step 3
Check the words and the sentences
Each word must be in a word list or in a dictionary of the file, with that part of speech.
words
Retriesstelint:softwaretransientnot in a listfailuresnot approvede.g.abbreviationresponsestelint:softwareisn'tcontraction
sentence
✓ 13 words, limit 25
step 4
Report
Each diagnostic has a help text for the agent.
$ stelint src/lib.rs
the agent
Write it again
The agent reads the help texts and the code.
Claude Code reads the writing guides before it writes.
stelint init writes them in .claude/rules/, with a link to the dictionaries.
.claude/rules/writing guidesstelint-prose.md # the rules of the prose, each with its rule id stelint-names.md # names of the code from the dictionaries stelint-rust.md # rustdoc links, # Errors, # Panics stelint-check.md # when to run stelint, how to correct stelint-project.md # your guide: the reader, the sections stelint-dictionaries -> ../../.stelint/dictionaries
stelint-prose.mda part17. Write a descriptive sentence with a maximum of 25
words. Write an instruction with a maximum of 20
words (`sentence-length`).
18. Write one fact or one instruction in each sentence.
19. Use the active voice. Identify the actor: "The parser
gives the tokens", not "The tokens are given".