Skip to content

Add code comment rules to Rails' AI rules - #805

Merged
jaredlt merged 1 commit into
mainfrom
add-comment-rules-to-rails-ai
Aug 21, 2026
Merged

Add code comment rules to Rails' AI rules#805
jaredlt merged 1 commit into
mainfrom
add-comment-rules-to-rails-ai

Conversation

@jaredlt

@jaredlt jaredlt commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

I find most of the AI models to be quite comment-happy. I'm constantly telling them to not use comments and often re-teaching them that a comment is often a smell indicating eg. a missing method that could tell the story better in the code.

This change introduces code comment rules for AI agents. Leading them away from comments but at the same time explaining how they can better tell the story in code, tests and commit messages.

After a bunch of testing across a number of my projects to good results, it felt like time to suggest adding this into our guides.

I find most of the AI models to be quite comment-happy. I'm constantly
telling them to not use comments and often reteaching it that a comment
is often a smell indicating eg. a missing method that could tell the
story better in the code.

This change introduces code comment rules for AI agents. Leading them
away from comments but at the same time explaining how they can better
tell the story in code, tests and commit messages.

After a bunch of testing across a number of my projects to good results,
it felt like time to suggest adding this into our guides.

@rakeshpetit rakeshpetit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@iftheshoefritz

Copy link
Copy Markdown
Contributor

This is my first time seeing ai-rules ... do we have a space for this outside of rails? Because it seems like this is bigger than one framework.

@jaredlt

jaredlt commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@iftheshoefritz I don't believe we have AI rules outside of Rails yet. All the other rules have been specific to Rails, so this is the first exception. I think I would rather get this in to improve the existing guides first (these rules are imported by every suspenders new). Later we can look to extract it / generalize it if we find other rules that also need a more "global" home.

@jaredlt
jaredlt merged commit e176db8 into main Aug 21, 2026
2 checks passed
@jaredlt
jaredlt deleted the add-comment-rules-to-rails-ai branch August 21, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants