What problem does it solve? Business logic often becomes tangled with frameworks, databases, and HTTP handlers, making code untestable and resistant to change. This Skill guides the implementation of hexagonal (ports and adapters) architecture so domain logic stays isolated from infrastructure and adapters can be swapped without touching the core. ## Core Features & Use Cases - Ports and Adapters Design: Define port interfaces in the domain layer and implement driven adapters (repositories, payment gateways) plus thin driving adapters (route handlers, queue consumers). - Testing Strategy: Test use cases with in-memory fakes instead of mocks, complement with domain unit tests, adapter integration tests, and E2E verification. - CQRS-Lite and Cross-Cutting Concerns: Separate read query functions from write repositories, and place auth, logging, transactions, and error formatting in the correct layer. - Use Case: When refactoring a route handler that queries the database, applies business rules, and returns a response all in one function, follow the incremental adoption guide to extract a pure domain function, a repository port, and a thin adapter step by step. ## Quick Start Apply the hexagonal architecture skill to refactor my route handler so business logic moves into the domain layer behind repository ports.