hexagonal-architecture

Installation
SKILL.md

Hexagonal Architecture

Hexagonal architecture (Alistair Cockburn, 2005) isolates domain logic from infrastructure concerns through explicit boundaries called ports (interfaces the domain exposes or requires) and adapters (implementations that connect ports to the outside world).

Core Invariants

These rules must hold throughout the codebase:

  1. Dependency rule: All dependencies point inward. Domain knows nothing of adapters.
  2. Port ownership: The domain defines port interfaces. Adapters implement them.
  3. Domain purity: No framework imports, I/O operations, or infrastructure types in domain code.
  4. Adapter isolation: Adapters never call each other directly; coordination happens through the domain.
Installs
2
GitHub Stars
2
First Seen
Aug 8, 2026