Many architectural styles (Clean Architecture, Hexagonal, DDD) use hierarchical layers, not flat ones.
Example:
- Application
- Infrastructure
Currently, layers are treated as a flat list, which limits expressiveness and forces workarounds.
This issue proposes allowing layers inside layers, forming a tree instead of a flat structure.
Why this matters
- Better alignment with real-world architectures
- More precise dependency rules
- Cleaner and more readable architecture definitions
Acceptance Criteria
- Layers can contain sub-layers
- Dependency rules can target parent or child layers
- Violations clearly report the full layer path (e.g. application.usecases -> infrastructure.persistence)
- No breaking changes for existing flat layer definitions
Out of scope
- Visual layer editors
- Runtime dependency analysis
Many architectural styles (Clean Architecture, Hexagonal, DDD) use hierarchical layers, not flat ones.
Example:
Currently, layers are treated as a flat list, which limits expressiveness and forces workarounds.
This issue proposes allowing layers inside layers, forming a tree instead of a flat structure.
Why this matters
Acceptance Criteria
Out of scope