Write down the comment conventions - #396
Conversation
Comments only where the code cannot speak for itself, and never describing how the code used to be -- that belongs in the commit message, where it stays anchored to the change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQ5JV4VntoXmqMjT7CHDVR
|
Warning Review limit reached
Next review available in: 56 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughAGENTS.md adds Code Standards guidance for comments and docstrings. The guidance requires concise explanations of non-obvious rationale or invariants, describes current code, and excludes historical change narratives. ChangesComment and docstring standards
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This documentation-only change adds comment-writing guidance without changing product behavior, and no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQ5JV4VntoXmqMjT7CHDVR
Summary
Adds two comment conventions to
AGENTS.mdunder Code Standards. Neither was written down anywhere — the file had no guidance on comments at all.Why
The second rule is the one with teeth. A comment describing a diff is meaningless to someone reading the file later — they never saw the previous version and cannot act on the information. The commit message is where that belongs, because it stays anchored to the change and
git log -Lretrieves it on demand.A useful test falls out of it: if a comment would be false or pointless in a fresh checkout with no history, it is in the wrong place. "Do not swap this for
Greatest, because a foreign config'sts_rankis not reliably ~0" passes — it describes the code as it stands and stops a future mistake. "Trimmed after review" fails.The first rule exists because review-driven changes accumulate one justification per round and nobody ever removes them, since each was individually earned. What is left narrates the review rather than the code.
Scope
Documentation only — no code, no behaviour change.
CLAUDE.mdandGEMINI.mdare symlinks toAGENTS.md, so editing the one file covers all three.The same change is opened against the sibling repositories so the convention is consistent across the workspace.
🤖 Generated with Claude Code
Summary by CodeRabbit