business-logic-entry-point-repository-interface
Repository Interface for Business Logic Entry Points
Goal
Business-logic entry points must depend on a repository interface — not on the concrete repository implementation.
When the programming language supports interfaces, protocols, traits, abstract classes, or equivalent abstraction mechanisms, the entry point must reference the repository through that abstraction. The concrete implementation is provided from outside the entry point — through dependency injection, constructor parameters, module-level wiring, or the equivalent pattern used by the project.
This rule decouples the business logic from the persistence implementation. The entry point defines what repository operations it needs; the infrastructure layer decides how those operations are fulfilled.
When the language does not support interfaces or equivalent abstraction mechanisms, this skill does not apply.
What Counts as In Scope
Apply this skill to code that does one or more of these things: