What problem does it solve? Business logic often becomes entangled with frameworks, ORM models, and HTTP concerns, making codebases untestable and hard to refactor. This Skill provides concrete patterns and code examples for separating domain logic from infrastructure so services stay maintainable and testable. ## Core Features & Use Cases - Layered Architecture Guidance: Apply Clean Architecture, Hexagonal Architecture (ports and adapters), and Onion Architecture with clear dependency rules pointing inward. - DDD Tactical Patterns: Implement entities, value objects, aggregates, repositories, and domain events with validated invariants and consistency boundaries. - Testable Design: Write use-case tests with in-memory adapters that require no database, Docker, or network. - Use Case: When refactoring a monolith where controllers contain business logic, use this Skill to extract use cases, define repository ports, and wire implementations through a DI container. ## Quick Start Ask the agent to design a new backend service using Clean Architecture with a user registration use case and an in-memory repository test.