cyberneticlibrary

Refactor toward hexagonal architecture

hexagonal-architectureskillsetup L20
Sheshiyer/skill-clusters
What it does

Design domain-driven ports and adapters architecture

Best for

Refactor tightly coupled code or build systems where persistence and transport must be swapped without rewriting business logic.

Inputs
  • · use-case description
  • · domain rules
  • · persistence/external dependencies
Outputs
  • · TS/Java/Kotlin/Go codebase with ports and adapters
  • · composition root wiring
Requires
  • · TypeScript/Java/Kotlin/Go compiler
Preconditions

Understanding of domain model vs application layer; team buy-in on decoupling

Failure modes
  • · Domain logic leaks into adapters
  • · Over-abstraction of simple use cases
  • · Composition root becomes service locator
Trust signals
  • · Clear dependency direction always inward
  • · Example TS layout with unit/integration/E2E test boundaries
  • · Feature-first module organization documented