Apply Clean Architecture boundaries so business rules stay in the correct layer and dependencies point inward.
Use this skill when the task involves architectural boundaries, use-case orchestration, layer ownership, adapters, controllers, repositories, or framework isolation.
This skill enforces:
Should contain:
Should not contain:
Should contain:
Should contain:
Infrastructure should implement application or domain contracts instead of owning business rules.
Should contain:
Interface code should not contain business rules.
Before changing code:
Prefer dependencies that point inward toward domain and application rules.
Avoid:
When core logic needs external behavior, depend on an abstraction and implement it in infrastructure.
Controllers, routes, handlers, and presenters should translate data, call use cases, and return results. They should not own policy or domain decisions.
Ask:
Verify that:
When using this skill: