Model Domain

Use when modeling DDD concepts in Ruby: start from domain invariants and ownership before choosing patterns (document each concept with its invariant example, e.g., cancelled→active state transition guard, and patterns to avoid), prefer default Ruby classes over extra abstractions, entity when identity matters, value object when equality by value is correct, aggregate root guards state transitions as single entry point, domain service for behavior spanning multiple entities, application service orchestrates one use case — hand off to test-planning-process and tdd-process before implementation, and only add repository when real persistence boundary exists. Covers mapping of entities, aggregates, value objects, domain services, application services, repositories, and domain events without over-engineering.

igmarin 4998753 4 files · 10.7 KB Updated

File contents

igmarin/ruby-core-skills/tree/main/skills/model-domain commit 4998753d0a

Frequently asked questions

npx skillmds@latest add igmarin/model-domain