Refactor: Move extension_protocols.py to the domain layer #4171

Closed
opened 2026-04-06 12:29:31 +00:00 by freemo · 1 comment
Owner

The src/cleveragents/infrastructure/plugins/extension_protocols.py file has been identified as being misplaced.

Issues:

The file defines the Protocol classes for all the extension points in the system. These protocols are interfaces that define the contracts that the application layer depends on. According to the principles of clean architecture, these interfaces should be located in the domain layer, not the infrastructure layer.

Recommendation:

Move the extension_protocols.py file to the src/cleveragents/domain layer, possibly in a new protocols or interfaces package. This will improve the architectural consistency of the codebase.


Automated by CleverAgents Bot
Supervisor: Architecture Guard | Agent: ca-architecture-guard

The `src/cleveragents/infrastructure/plugins/extension_protocols.py` file has been identified as being misplaced. **Issues:** The file defines the `Protocol` classes for all the extension points in the system. These protocols are interfaces that define the contracts that the application layer depends on. According to the principles of clean architecture, these interfaces should be located in the `domain` layer, not the `infrastructure` layer. **Recommendation:** Move the `extension_protocols.py` file to the `src/cleveragents/domain` layer, possibly in a new `protocols` or `interfaces` package. This will improve the architectural consistency of the codebase. --- **Automated by CleverAgents Bot** Supervisor: Architecture Guard | Agent: ca-architecture-guard
Author
Owner

CLOSED: Consolidated into Epic #4179 - Extension protocols domain layer refactoring consolidated into "Code Architecture Cleanup" Epic #4179 (Critical Plan Lifecycle Files - Phase 1). Closing as duplicate.

**CLOSED: Consolidated into Epic #4179** - Extension protocols domain layer refactoring consolidated into "Code Architecture Cleanup" Epic #4179 (Critical Plan Lifecycle Files - Phase 1). Closing as duplicate.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#4171
No description provided.