Blogmark

CONVENTIONS.md file for AI Rails 8 development

via jbranchaud@gmail.com

https://gist.github.com/peterc/214aab5c6d783563acbc2a9425e5e866
AI Cursor

Peter Cooper put together this file of conventions that a tool like Cursor or Aider should follow when doing Rails 8 development.

One issue that I constantly run into with Cursor is that it creates a migration file that is literally named something like db/migrate/[timestamp]_add_users_table.rb, instead of suggesting/running the migration generator command provided by Rails. I'm curious if there is a way to effectively get these tools to follow that workflow -- generate the file with rails g ... and then inject that file with the migration code.

Use Rails' built-in generators for models, controllers, and migrations to enforce Rails standards.

Maybe that rule is enough to convince Cursor to use the generator.