ddd-repository-placement

Installation
SKILL.md

DDD Repository Placement

Repository placement should prevent domain models from reaching outward for data.

Placement Rules

  • Aggregate code: no repository dependencies.

  • Application/use-case layer: depends on repository interfaces and orchestrates loading/saving.

  • Domain layer: may define repository abstractions only when the project convention treats them as domain contracts, but aggregates still must not call them.

  • Infrastructure/interface adapters: implement repositories using databases, APIs, or files.

Workflow

  1. Find repository interfaces, implementations, and all call sites.

  2. Move calls from domain objects into use cases or domain services invoked by use cases.

Installs
14
Repository
j5ik2o/ai-tools
GitHub Stars
27
First Seen
May 3, 2026
ddd-repository-placement — j5ik2o/ai-tools