Check documentation and docstrings for grammar, punctuation, and style errors. Use when the user asks to verify, review, or fix grammar/style in docs, or before committing documentation changes.
Check documentation files for grammar, punctuation, and style errors. Minimize changes: only fix actual errors. Do not rewrite or restructure text, do not add content, do not remove blocks of text.
$ARGUMENTS): check only the specified files or glob patterns..rst and .py files changed on the current branch vs main. Run:
git diff main...HEAD --name-only -- '*.rst' '*.py'
If there are no changes vs main (e.g., on main itself), ask the user which files to check.Only check prose text: skip code blocks, directive parameters, RST markup syntax, and inline code literals. For files, only check docstrings (triple-quoted strings), not comments or code.
.pyFind and expand all contractions. Common ones:
| Wrong | Correct |
|---|---|
| don't | do not |
| doesn't | does not |
| didn't | did not |
| can't | cannot |
| won't | will not |
| shouldn't | should not |
| wouldn't | would not |
| couldn't | could not |
| isn't | is not |
| aren't | are not |
| wasn't | was not |
| weren't | were not |
| haven't | have not |
| hasn't | has not |
| hadn't | had not |
| it's (it is) | it is |
| let's | let us |
| that's | that is |
| there's | there is |
| we're | we are |
| they're | they are |
| you're | you are |
| I'm | I am |
| we've | we have |
| they've | they have |
| Wrong | Correct |
|---|---|
| authentification | authentication |
| ceritificate, certifcate | certificate |
| supplimentary | supplementary |
| temporaily | temporarily |
| withing | within |
| exessive | excessive |
| unexistent | nonexistent |
| outcoming | outgoing |
| inbetween | in between |
| loose (meaning fail) | lose |
| Persistant | Persistent |
| Datenshutz | Datenschutz |
| namepsace | namespace |
| resouce | resource |
| occured | occurred |
| succeded | succeeded |
| seperate | separate |
| neccessary | necessary |
| dependancy | dependency |
| compatability | compatibility |
| Wrong | Correct |
|---|---|
| so as (meaning "as well as") | as well as |
| allows to <verb> | allows <verb>ing |
| might be not | might not be |
| can be also | can also be |
| diverts from (meaning deviates) | diverges from |
| more on that | moreover |
| not only it is | not only is it |
| does not do any attempts | does not make any attempts |
| cleanup (as a verb) | clean up (verb is two words) |
Convert passive to active where it reads more naturally. Use appropriate subjects:
Examples:
Do not force active voice when passive reads more naturally or when the actor is genuinely unknown.
Use --- (triple-minus) for em dashes in RST files. Replace any unicode em dash (—, U+2014) or double-minus (--) used as an em dash with ---.
| Wrong | Correct |
|---|---|
— (unicode U+2014) | --- |
-- (used as em dash) | --- |
.rst files: [text](url) should be `text <url>`_Use American English spelling when the file already uses it:
| British | American |
|---|---|
| behaviour | behavior |
| colour | color |
| synchronised | synchronized |
| capitalised | capitalized |
| organisation | organization |
| favour | favor |
| honour | honor |