- MVI with Circuit: Each feature is composed of
Screen,Presenter, andUiState. - DI: Dependency injection is managed via
Metro. - Stability: All major state classes must comply with
compose-stability-analyzerforSTABLEstatus.
feature/*: Independent UI feature modules (Centered around Circuit Screen/Presenter).domain/*: Business logic, use cases, and domain entities (Pure Kotlin).data/*: Local (Room) and remote (Retrofit) data sources (Data mapping and repository).core/*: Shared components, design system, and utilities.
-
Dependency Rule (Code Dependency Direction):
- Communication must occur via
domaininterfaces orcoremodules. - All modules may depend on
core. featureanddatamodules may depend ondomain.domainmust not depend onfeatureordatalayers (Pure Kotlin logic).- Direct circular or peer dependencies between
featureanddataare strictly prohibited.
- Communication must occur via
-
Data Flow (Data Transfer Path):
- Data propagates from the
datalayer, through thedomainlayer, and ultimately to thefeaturelayer. - Use Domain Models to decouple layers during data transfer; never leak DTOs outside the
datalayer.
- Data propagates from the
-
Domain Isolation:
domainmodules must only contain pure Kotlin logic, with no dependencies on Android or Compose frameworks.
-
Stability:
- If
compose-stability-analyzerreports stale data, use the--rerun-tasksoption to force a baseline update.
- If
-
Compose:
- All UI must be written in a
Declarativemanner, and state transitions must be handled viaCircuitEvent.
- All UI must be written in a
-
Code Generation:
- Every generated file must end with a trailing newline.
- No wildcard imports (
import foo.*is banned). - Trailing comma required on both call site and declaration site.
- Blank line required between
packagedeclaration andimportblock.