# Keep Repositories To One Entity

Keeps a repository to persistence for a single entity, with errors left for the service to translate.

Follow these project instructions.
# Keep Repositories To One Entity

Keeps a repository to persistence for a single entity, with errors left for the service to translate.

Version: `1.0.0`

A repository stores and queries one entity. It does not call other repositories, it does not call services, and it does not decide anything about permissions or business rules.

When a repository needs data another repository owns, the composition belongs one layer up: the service reads from both and decides what to do. A repository that calls another one puts a rule somewhere nobody looks for rules, and makes both entities impossible to test apart.

Let errors bubble. A repository should not catch a storage failure and turn it into a domain outcome - the service is where a failure becomes a translated error the caller can act on, and it can only do that if the original failure reaches it.

Keep provider-specific detail inside the provider package. The entity types a storage provider uses are its own; they should not appear in a service signature or an API contract.

#### Constraints
- Do not call another repository, a service, or an API from inside a repository.
- Do not swallow a storage error - let the service translate it.
- Never put a permission check or business rule in a repository method.

#### Verification
- A storage failure reaches the service rather than being converted in place
- No rule or permission decision appears in a repository method
- The repository touches exactly one entity
