Analyze code changes for hexagonal architecture violations in Kaiord:
Dependency Rules
- •domain/ → CANNOT import from application, ports, adapters, or external libs
- •application/ → Can only import from domain and ports, NEVER from adapters
- •ports/ → Pure interfaces/types only
- •adapters/ → Implements ports, can use external libs (@garmin/fitsdk, fast-xml-parser)
Verification Checklist
- •Search for illegal imports between layers
- •Verify no external libs in domain/application
- •Check that adapters implement port interfaces
- •Verify use cases use DI via providers.ts
Useful Commands
bash
# Search for adapter imports in application grep -r "from.*adapters" packages/core/src/application/ # Search for external lib imports in domain grep -r "from.*@garmin\|fast-xml-parser" packages/core/src/domain/
Report violations with file paths and specific imports.