docs-files-api: write comments for the reader, not the conversation

Comments say what the code is and why in the reader's terms: no traces
of the design conversation, and nothing the code already says.

Generated-by: Claude Opus 5.5
This commit is contained in:
dckc committed 2026-10-07 09:46:33 -05:00
1 parent 018339689b
commit 5f9527a8f0
1 file changed
+4
+4
View File
@@ -28,6 +28,10 @@ JSDoc placement rules (from the
no docstrings; a string literal is the honest equivalent) rather than no docstrings; a string literal is the honest equivalent) rather than
copying it or reading the script's own source. Helpers inside still get copying it or reading the script's own source. Helpers inside still get
their own JSDoc. their own JSDoc.
- **Write for the reader, not the conversation:** Comments say what the
code is and why, in the reader's terms. No traces of how it came to be
(design discussions, who asked, "for now", analogies used while
deciding), and nothing the code or its shebang already says.
- **External design constraints:** If a module is constrained by external - **External design constraints:** If a module is constrained by external
contracts, standards, or off-repo design docs, add a short JSDoc note with a contracts, standards, or off-repo design docs, add a short JSDoc note with a
`@see` link to the authoritative source at the relevant entry point(s). `@see` link to the authoritative source at the relevant entry point(s).