2.4 KiB
2.4 KiB
Agent Notes
Project Shape
- Rails 8.1 app (
CarTracker) on Ruby4.0.6;.ruby-versionincludes theruby-prefix, while the Dockerfile usesARG RUBY_VERSION=4.0.6. - The app is still mostly generated Rails skeleton. Treat
DESIGN.mdas product direction, not proof of implemented models/routes. - Database is SQLite under
storage/. Production is configured with separate SQLite databases for primary, Solid Cache, Solid Queue, and Solid Cable. - JavaScript uses importmap + Turbo + Stimulus; there is no
package.jsonor npm install step. Pin JS dependencies withbin/importmap, not npm/yarn.
Commands
- Setup/update dependencies and DB:
bin/setup --skip-server. Omit--skip-serveronly when you want it to startbin/devafterward. - Run the app:
bin/dev(it just execsbin/rails server). - Repo CI script:
bin/ciruns setup, RSpec, RuboCop, bundler-audit, importmap audit, and strict Brakeman. - GitHub CI also runs the repo CI script; do not assume tests ran unless
bin/cicompleted successfully. - Style check:
bin/rubocop(rubocop-rails-omakasevia.rubocop.yml). - Security checks:
bin/bundler-audit,bin/importmap audit,bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error.
Tests
- RSpec is installed; run specs with
bundle exec rspec, notbin/rails test. - Run a focused spec with
bundle exec rspec spec/path/to/file_spec.rb:LINE. .rspeconly requiresspec_helper; Rails specs needrequire "rails_helper"explicitly.DESIGN.mdsays to develop features test-first. Add specs for new behavior even though current CI does not run them.
Rails/Runtime Gotchas
config/application.rbdisables Rails system test generation and does not loadrails/test_unit/railtie.ApplicationControllerrejects non-modern browsers withallow_browser versions: :modernand usesstale_when_importmap_changes.- Solid Queue jobs can run with
bin/jobs; Kamal production config currently runs Solid Queue inside Puma viaSOLID_QUEUE_IN_PUMA: true. - Production Docker is intended for Kamal/production, not local development; the entrypoint runs
bin/rails db:preparebefore starting the server.
Instructions
If you are implimenting a phase eg phaseXXX ensure that while you are modifying files you write a file in teh executions/ folder matching using executionXXX.md for the filename. This is all replacing the XXX with the phase number you are on.