agentsclimarketplace

Ddd repository placement

Skill amadeus-dlc/amadeus/amadeus/spaces/default/knowledge/amadeus-shared/software-design/ddd-repository-placement

Use when deciding where repository interfaces and implementations belong in layered, Clean Architecture, or DDD projects. Emphasizes that aggregates should not depend on repositories and that application/use-case layers own repository orchestration. Trigger for repository-in-domain questions, repository package placement, or aggregates calling repositories.From its SKILL.md

Install
npx -y skills add amadeus-dlc/amadeus --skill ddd-repository-placement

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.5 KB, 213 tokens by cl100k_base, as published. Nobody here has run it

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.

  3. Keep persistence mapping outside aggregates.

  4. Align package placement with the project's architecture style.

Detailed Reference

For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.

Output

Return a placement map, violations, corrected dependencies, and file moves.

What ships with it: 1 file

1.0 KB alongside SKILL.md

references/

Keep looking

Skills are one crate of 326,059. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.