Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: improve code comment guidelines for AI agents#20952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 2 commits intomainfromupdate-claude-comments-guide
Nov 26, 2025

Conversation

@mafredri
Copy link
Member

This PR enhances the CLAUDE.md document with comprehensive guidelines for writing better code comments, specifically targeted at AI agents and LLM-generated code.

Changes

  • Proper sentence structure: Comments should end with punctuation
  • Explain why, not what: Focus on rationale rather than describing code
  • Line length and wrapping: 80-character width with natural wrapping

Example

The guidelines include before/after examples showing the difference between well-formatted, meaningful comments and poorly written ones.

Impact

These standards will help ensure AI-generated code includes professional, maintainable comments that align with project conventions.


🤖 This change was written by Claude Sonnet 4.5 Thinking usingmux and reviewed by a human 🏂

Add comprehensive commenting standards to CLAUDE.md focusing on:- Proper sentence structure with punctuation- Explaining rationale rather than describing code- 80-character line width with natural wrappingThese guidelines help AI agents write more professional and maintainablecomments that align with project standards.---🤖 This change was written by Claude Sonnet 4.5 Thinking using [mux](https://github.com/coder/mux) and reviewed by a human 🏂
@mafredrimafredri requested review fromThomasK33 anddeansheather and removed request fordeansheatherNovember 26, 2025 14:15
@mafredrimafredri marked this pull request as ready for reviewNovember 26, 2025 14:15
Replace OAuth2/AsSystemRestricted example with a clearer timeout examplethat better demonstrates the difference between why-focused vs what-focusedcomments and proper formatting vs awkward one-sentence-per-line style.
@mafredrimafredri merged commitbcc74b2 intomainNov 26, 2025
29 checks passed
@mafredrimafredri deleted the update-claude-comments-guide branchNovember 26, 2025 16:46
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 26, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@ThomasK33ThomasK33ThomasK33 approved these changes

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@mafredrimafredri

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@mafredri@ThomasK33

[8]ページ先頭

©2009-2025 Movatter.jp