warisskill-system-design-domain-modeling
Installation
SKILL.md
Domain Modeling
Structural default: full ports & adapters, applied by default
Hexagonal architecture (ports and adapters) on any non-trivial feature — not gated behind "does a second implementation exist yet." Business logic never imports framework/transport/persistence code directly.
- Domain/application layer: business rules, use cases. No framework imports, no direct DB/HTTP calls.
- Ports: interfaces the application layer depends on
(
UserRepositoryPort,BillingGatewayPort) — model capabilities, not technologies. - Adapters: concrete implementations at the edge (Postgres repository, HTTP client, queue consumer). Adapters depend inward on ports; nothing depends outward on adapters.
- Composition root: one place where concrete adapters get wired to use cases — avoid scattering instantiation/service-locator lookups throughout the codebase.