Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,18 @@ bundle exec rubocop # lint (rails-omakase)

rubocop-rails-omakase; conventional commits; controller tests in
`test/controllers/api/v1/` assert contract shapes — update them with any envelope change.

## AI agents (Claude Code and friends)

These commands need **cliuno 2.2 or newer** (`npx cliuno@^2.2` fetches it).

- **Check the CLIuno skills first**: `npx cliuno@^2.2 skills status` — if any is
`missing`/`outdated`, run `npx cliuno@^2.2 skills install` (adds `.claude/skills/cliuno-*`:
the generator workflow, the scaffold guide, and the shared REST contract).
- **Generate resources, don't hand-write them**:
`npx cliuno@^2.2 make:resource Product --fields name:string,price:number,inStock:boolean`
creates `app/models/product.rb`, `db/migrate/<timestamp>_create_products.rb`, `app/controllers/api/v1/products_controller.rb`, `test/fixtures/products.yml`, `test/controllers/api/v1/products_controller_test.rb`, `test/models/product_test.rb` and registers it in `config/routes.rb`, `app/models/user.rb`, following this
template's conventions and the `{status, message, data}` contract. `--dry-run` previews,
re-running never duplicates registrations, `--force` overwrites.
- Single pieces: `make:model` (→ `bin/rails generate model`), `make:controller` (→ `bin/rails generate controller`), `make:migration` (→ `bin/rails generate migration`), `make:test`. `npx cliuno@^2.2 make` lists them.
- Then edit fields/business logic only, and run the gates above.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 8.1.3"
gem "rails", "~> 8.1.4"
# Use sqlite3 as the database for Active Record
gem "sqlite3", ">= 2.1"
# Use the Puma web server [https://github.com/puma/puma]
Expand All @@ -11,7 +11,7 @@ gem "puma", ">= 5.0"
gem "bcrypt", "~> 3.1.7"

# JWT for API token authentication
gem "jwt", "~> 2.10"
gem "jwt", "~> 3.3"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[windows jruby]
Expand Down
Loading
Loading