Curated library of atomic skills and personas for Hanami, dry-rb, and ROM Ruby development. Covers actions, slices, repositories, relations, changesets, providers, DI, operations, TDD, CLI, views, routing, validation, and 10 orchestration personas. Shared Ruby process skills have moved to ruby-core-skills. Uses Markdown + Front-matter architecture.
95
95%
Does it follow best practices?
Impact
96%
1.20xAverage score across 45 eval scenarios
Passed
No known issues
Use this workflow when adding a column to an existing table in Hanami 2.x.
Core principle: Schema changes cascade through the data layer. Update the database, then Relations, Entities, Repositories, and tests.
| Step | Skill | What to do | Handoff Condition |
|---|---|---|---|
| 1. Generate migration | write-migration | hanami generate migration add_bio_to_users; write the migration body | Migration file exists and is valid |
| 2. Run migration | manage-database | hanami db migrate; verify schema change in database | Schema updated in database |
| 3. Update Relation | define-relation | If explicit schema, add new column; if infer: true, auto-updated at boot | Relation includes new column |
| 4. Update Entity | define-entity | Add attribute: attribute :bio, Types::String.optional | Entity includes new attribute |
| 5. Update Repository | create-repository | Update query/create/update methods if new column affects filtering or is required | Repository methods handle new column |
| 6. Write Tests | write-request-spec | Update request specs to assert on new column; test persistence and return | All tests pass |
# db/migrate/20240601120000_add_bio_to_users.rb
Rom::SQL::Migration do
change do
alter_table(:users) do
add_column :bio, :text, null: true
end
end
endFor a NOT NULL column on a populated table, use a three-step approach:
# Step 1: Add as nullable with a default
alter_table(:users) do
add_column :bio, :text, null: true, default: ''
end
# Step 2: Backfill existing rows (separate migration or script)
# Step 3: Add NOT NULL constraint after backfill
alter_table(:users) do
set_column_not_null :bio
end| Mistake / Red Flag | Correct Approach |
|---|---|
| Entity updated before migration applied | The migration must be applied before the Entity can reference the new column. |
| Repository not updated for new column | If the new column affects queries or required fields, the Repository must be updated. |
| Tests not updated | Tests must assert on the new column. Update existing specs and add new ones. |
NOT NULL column added without a default on a populated table | Adding NOT NULL without a default fails on existing rows. Add a default or make it nullable first, backfill, then add NOT NULL. |
| Missing backfill strategy for existing data | Plan a backfill step in a separate migration or script before enforcing constraints. |
.tessl-plugin
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
scenario-42
scenario-43
scenario-44
scenario-45
skills
actions
build-json-api
create-action
handle-errors
validate-params
context
load-context
db
create-changeset
create-repository
define-relation
write-migration
dry-monads
handle-result-pattern
dry-rb
create-operation
create-validation-contract
personas
providers
configure-providers
implement-di
review-security
routing
define-routes
slices
configure-slice
create-slice
extract-slice
review-slice-boundaries
test-slice