What problem does it solve? Codebases drift as business logic leaks into framework code, database layers, and third-party SDK calls, making the domain untestable and infrastructure expensive to swap. This Skill defines where every piece of code belongs—domain, use-case, adapter, or infrastructure—and enforces a one-way dependency direction so the domain never depends on the outside world. ## Core Features & Use Cases - Ports and adapters placement rules: Domain owns behavior-named port interfaces, thin adapters translate to concrete technologies (Drizzle, Stripe, Resend) at the edge, and use-cases orchestrate ports with no I/O of their own. - Function-parameter injection: Dependencies are passed as a typed deps parameter instead of DI containers, keeping the call graph visible with zero runtime magic. - In-memory adapter testing pattern: Every port ships an in-memory adapter so use-case tests run without mocking frameworks or real infrastructure. - Use Case: When adding a checkout flow, place the orchestration in services/checkout.ts taking OrdersPort, PaymentPort, and ClockPort as injected deps, implement Drizzle and Stripe adapters at the edge, and test with in-memory adapters—while the companion hook blocks any domain-to-infrastructure import. ## Quick Start Ask the agent to add a new use-case such as "add a checkout flow with payment and order persistence" and it will place the domain logic, ports, and adapters according to the hexagonal rules.