0.0
A long-lived project that still receives updates
Create and manage rules files for AI tooling
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

RailsRules

This gem provides a set of rules files for use when building Rails apps with AI editor tools.

The rules are intended to be a starting point, corresponding to the Rails defaults for a new application. You should modify the rules as necessary for your application.

Editors have different naming conventions and structure for rules files. Some support multiple files, but others require everything to be in a single file.

Two editors are currently supported: Cursor (rules) and Zed.

The rules files were originally created by Kieran Klaassen and contributed to Jumpstart Pro Rails, and are reproduced with permission.

Installation

Add the gem to the development group in your Gemfile.

Usage

Run the generator corresponding to your editor:

bin/rails generate rails_rules:cursor # generates a collection of rules in .cursor/rules
bin/rails generate rails_rules:zed    # generates a single .rules file

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/andyw8/rails_rules.

License

The gem is available as open source under the terms of the MIT License.