docs(agents): require concise comments and docstrings - #907
Merged
Conversation
Comments in this tree have been drifting toward essays: multi-paragraph re-derivations of a decision, whole sentences in capitals, and running commentary on which earlier revision got what wrong. That is expensive to read and it goes stale, because it describes a process rather than the code. The rule keeps what comments are actually for -- a constraint, a measurement, a trap someone already paid for -- and cuts the prose around it. Rough ceilings (~8 lines for a block, ~6 for a docstring) rather than hard limits, because the occasional long note is worth it and the point is to make the author justify it to themselves. Applied to a ~5,400-line example under review, it removed ~500 lines with no loss of any measured number, file reference or documented trap. Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAGENTS.md adds guidance for concise comments and docstrings. The guidance covers source comments, docstrings, configuration comments, and scene XML. It recommends documenting constraints and measured facts, avoiding historical narration and repetition, and moving long explanations to external documentation. Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
yanziz-nvidia
approved these changes
Aug 5, 2026
nv-jakob
approved these changes
Aug 5, 2026
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.
Description
Comments in this tree have been drifting toward essays: multi-paragraph re-derivations of a decision, whole sentences in capitals, and running commentary on which earlier revision got what wrong. That is expensive to read and it goes stale, because it describes a process rather than the code.
The rule keeps what comments are actually for — a constraint, a measurement, a trap someone already paid for — and cuts the prose around it. The ceilings (~8 lines for a block, ~6 for a docstring) are rough rather than hard, because the occasional long note is worth it and the point is to make the author justify it to themselves. Longer explanations belong in a
README.mdor design doc a reader can skip, not inline where they cannot.Applied to a ~5,400-line example currently under review (#900) it removed ~500 lines with no loss of any measured number, file reference or documented trap —
app.py1008 → 756 lines, one scene XML 234 → 128.Split out of #900, where it was bundled by mistake: it is a repo-wide policy change and should not wait behind an example, nor land inside one.
Type of change
Testing
Documentation only; no code paths touched.
SKIP=check-copyright-year pre-commit run --all-filesclean.Checklist
SKIP=check-copyright-year pre-commit run --all-filesgit commit -s) per the DCOSummary by CodeRabbit