ddd-rails-modeling
Installation
SKILL.md
DDD Rails Modeling
Use this skill when the domain concepts are clear enough that the next question is how to model them in Rails.
Core principle: Model real domain pressure, not textbook DDD vocabulary.
Quick Reference
| Concept | Rails-first default |
|---|---|
| Entity | ActiveRecord model when persisted identity matters |
| Value object | Plain Ruby object near the domain it supports |
| Aggregate root | The main entry point that guards invariants |
| Domain service | PORO for business behavior that does not belong to one entity |
| Application service | Orchestrator in app/services coordinating a use case |
| Repository | Use only for a real boundary beyond normal ActiveRecord usage |
| Domain event | Explicit object only when multiple downstream consumers justify it |
HARD-GATE
Related skills