# Dependency Rules Status: Mandatory Date: 2026-07-03 ## Rule Set 1. One-way dependency direction only. 2. No circular dependencies. 3. No feature imports another feature directly. 4. Shared is dependency-minimal and feature-agnostic. 5. Core is platform base and does not consume feature modules. 6. UI Library is pure presentation and cannot depend on facades/services with business behavior. 7. Widgets depend on UI Library and contracts, not on feature internals. 8. Pages compose layouts/widgets via contracts and facades. 9. Facades depend on services/contracts, never on UI components. 10. Integrations isolate external systems and expose stable interfaces. ## Dependency Injection Rules - Depend on interfaces/tokens where replacement is expected. - Avoid direct concrete service references across bounded contexts. - Use adapter pattern for legacy stable modules. ## Cross-Domain Communication - Allowed through contracts, events, and facade APIs. - Forbidden through direct state mutation across domains. ## Forbidden Patterns - Component to HttpClient direct calls in reusable visual components. - Direct environment import in visual components. - Direct localStorage/sessionStorage usage in UI components. - Route navigation logic in UI library components.