ci
FreeRun the local CI sequence for this repo. Use when the user asks to run CI, verify a branch before push, or check code quality with the full local pipeline.
The English summary is being prepared. Showing the original description.
Apply core Ruby on Rails best practices for architecture, naming, RESTful routing, authorisation, safety, and maintainability. Use by default for Rails coding, refactoring, debugging, feature implementation, migrations, controller/model changes, and code review tasks so baseline standards stay consistent.
The English summary is being prepared. Showing the original description.
Run score Not tested
See how to installReview the instructions the agent will receive before you install.
Use this as the default baseline for Rails work. It is distilled from 37signals codebases such as Campfire and Fizzy, plus DHH's review patterns.
dependent: :delete_all when callbacks are not needed.params.expect(...) for strong params in modern Rails.create! and handle exceptions at boundaries. Only use ! when a non-bang counterpart exists.enqueue_after_transaction_commit instead of retry logic for transaction races.Closure record with creator and timestamps over closed: boolean:has_one :closure, dependent: :destroy
scope :closed, -> { joins(:closure) }
scope :open, -> { where.missing(:closure) }
Closeable, Watchable, or Assignable. Keep each concern cohesive, self-contained, and roughly 50-150 lines.Card::Closeable in app/models/card/closeable.rb, for domain slices. Reserve app/models/concerns/ for genuinely cross-model behaviour.app/models/, not app/services/, when they are model-adjacent: presentation objects (Event::Description), complex operations (SystemCommenter), and view-context bundles (User::Filtering).belongs_to :creator, class_name: "User", default: -> { Current.user }.Current attributes for request context (Current.user, Current.account) and cascading setters when one context value resolves another.normalizes, store_accessor, delegated_type, generates_token_for, string enums, after_save_commit, touch: true, and delegate.grant_to or revise on the has_many proxy; use insert_all for bulk creates.to_param with a per-tenant number when that fits better than exposing raw IDs or UUIDs.Closure beats CardClose; Mention beats UserReference.active over not_deleted, visible over not_hidden.belongs_to :creator, class_name: "User", not belongs_to :user.quota.depleted? over quota.over_limit?.:active, :unassigned, and :golden, not SQL-ish names such as :without_pop.source, resource, and container for one concept.resource :closure; publish becomes resource :publication. Avoid custom member actions when resource modelling is clearer.resource for one-per-parent state.scope module: to group nested controllers, such as Cards::ClosuresController.CardScoped, to set parent records through the current ownership boundary.resolve "Comment" when polymorphic URL generation should point to a parent with an anchor.respond_to when possible. Do not create a separate API namespace unless the API has distinct semantics.card.editable_by?(user) and user.can_administer_board?(board).allow_unauthenticated_access and ensure_can_administer.Before adding a gem, ask whether vanilla Rails can do it and whether 50-150 lines in-repo would be simpler than a dependency. Commonly skipped defaults include Devise, Pundit, ViewComponent, RSpec, FactoryBot, Redis when Solid Queue/Cache/Cable can use the database, service objects, form objects, decorators, GraphQL, SPA frameworks, and Tailwind when the app has a different styling convention.
Comment.find(params[:id])..map(&:name) where .pluck(:name) works.fresh_when or ETags), because stale CSRF tokens cause 422s.status == "x") when predicate-style APIs are available.validates :x, uniqueness: true without a backing unique index.html_safe strings. Escape first: "<b>#{h(input)}</b>".html_safe.Ship it or a short prioritised fix list.No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Run the local CI sequence for this repo. Use when the user asks to run CI, verify a branch before push, or check code quality with the full local pipeline.
The English summary is being prepared. Showing the original description.
Review Ruby and Rails code as a principal engineer. Use when the user asks for a code review, PR review, diff review, or wants risks, regressions, security issues, Rails idiom problems, UI state issues, or test gaps identified before merging.
The English summary is being prepared. Showing the original description.
Review UI changes for state, timing, redirects, async behaviour, and browser-level test gaps. Use when the user asks specifically for a UI review or frontend workflow review.
The English summary is being prepared. Showing the original description.