"""Domain Repository Protocols — clean architecture ports for data access.

This package defines the repository *interfaces* (ports) for the domain
layer.  Infrastructure adapters provide the concrete implementations.

Following the dependency inversion principle, application services depend
on these protocols rather than on the infrastructure implementations
directly.  This keeps the domain layer free of persistence concerns and
allows persistence backends to be swapped without touching application code.

## Protocols

- ``LifecyclePlanRepositoryProtocol`` → ``Plan``
  via ``LifecyclePlanRepository``
- ``ActionRepositoryProtocol`` → ``Action``
  via ``ActionRepository``
- ``DecisionRepositoryProtocol`` → ``Decision``
  via ``DecisionRepository``
- ``ProjectRepositoryProtocol`` → ``NamespacedProject``
  via ``NamespacedProjectRepository``

## Usage

```python
from cleveragents.domain.repositories import (
    ActionRepositoryProtocol,
    DecisionRepositoryProtocol,
    LifecyclePlanRepositoryProtocol,
    ProjectRepositoryProtocol,
)

class MyApplicationService:
    def __init__(
        self,
        plans: LifecyclePlanRepositoryProtocol,
        actions: ActionRepositoryProtocol,
    ) -> None:
        self._plans = plans
        self._actions = actions
```

All protocols are decorated with ``@runtime_checkable`` so that
``isinstance`` checks work at runtime (e.g. in tests and dependency
injection containers).
"""

from cleveragents.domain.repositories.action_repository import (
    ActionRepositoryProtocol,
)
from cleveragents.domain.repositories.decision_repository import (
    DecisionRepositoryProtocol,
)
from cleveragents.domain.repositories.plan_repository import (
    LifecyclePlanRepositoryProtocol,
)
from cleveragents.domain.repositories.project_repository import (
    ProjectRepositoryProtocol,
)

__all__ = [
    "ActionRepositoryProtocol",
    "DecisionRepositoryProtocol",
    "LifecyclePlanRepositoryProtocol",
    "ProjectRepositoryProtocol",
]
