business-logic-entry-point-repository-domain-types
Installation
SKILL.md
Repository Domain Types for Business Logic Entry Points
Goal
The types exchanged between business-logic entry points and repositories must be domain-entity types and domain value types.
Repository method signatures — parameters and return types — must use the domain model directly. They must not expose types that depend on or are generated by the concrete persistence technology in use.
This rule keeps the business-logic layer decoupled from persistence-technology details. The entry point works with domain entities and domain values; the repository handles the translation to and from the persistence representation internally.
What Counts as In Scope
Apply this skill to code that does one or more of these things:
- defines a repository interface or repository method signatures
- defines repository method parameters or return types
- passes persistence-technology types between a business-logic entry point and a repository
- returns ORM entities, database records, row objects, document models, or persistence-generated types from a repository to a business-logic entry point
- accepts persistence-technology types as input from a business-logic entry point into a repository