docs(rules): add comment-content rule + fix stale rules index in CLAUDE.md#1302
Conversation
📝 WalkthroughWalkthroughThis PR adds a new ChangesComment Rules Documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
There was a problem hiding this comment.
Code Review
This pull request introduces a new markdown rule file .claude/rules/comments.md that defines guidelines for writing code comments, and updates CLAUDE.md to reference it. The review feedback recommends linking other existing guidelines (architecture, codestyle, and terminology) in CLAUDE.md to their respective files for better consistency and navigation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
ad2bcf6 to
c3cd763
Compare
Add `.claude/rules/comments.md`: a code comment states a non-obvious fact about the code as it currently stands (invariant, contract, constraint), never the rationale for a change, its history, or an epitaph for deleted code. Rationale/context belong in the commit message, PR, or docs/investigations. Sharpens codestyle.md §1 and reconciles doc-consistency §5 terminology. Also fix the CLAUDE.md rules index, which was stale: it listed `architecture` and `terminology` (no such files — architecture content is in ascend.md, terminology has no file) and omitted five real rules (ascend, known-issues-tracking, project-layout, running-onboard, venv-isolation). The list now links every existing `.claude/rules/*.md` and nothing that doesn't exist. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two docs-only changes:
1. New rule
.claude/rules/comments.md— a code comment states anon-obvious present-tense fact about the code as it stands (invariant,
contract, constraint). It never justifies a change, narrates the
modification/history, or acts as an epitaph for a deletion. Rationale and
change-context go in the commit message, PR description, or
docs/investigations/. Litmus test: would the comment still make sense to areader who never saw the diff? Sharpens
codestyle.md§1 and reconcilesdoc-consistency.md§5 terminology.2. Fix the stale rules index in
CLAUDE.md(surfaced by review). The listreferenced
architectureandterminology, which are not files —architecture content lives in
ascend.md, and there is no terminology rule —and it omitted five real rules (
ascend,known-issues-tracking,project-layout,running-onboard,venv-isolation). The index now linksevery existing
.claude/rules/*.mdand references nothing that doesn't exist.Docs-only; no code changes.
🤖 Generated with Claude Code