-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Review
Ali Sadeghi edited this page May 28, 2026
·
3 revisions
Reviews a feature module against Clean Architecture, the 11 critical rules, the 4 integration points, the UI file-organization allowlist, and spec compliance (if a spec exists).
Usage:
/feature-review login
/feature-review dashboard
/feature-review productcatalog| # | Rule | Check |
|---|---|---|
| 1 | Interface + Impl | DataSource and Repository have both interface and Impl |
| 2 | Either | All fallible operations return Either<T>
|
| 3 | setState | ViewModel uses _uiModel.setState { copy() }, never direct assignment |
| 4 | 4 UI States | Screen handles Uninitialized / Loading / Success / Failed (generic UiState<DTO>) |
| 5 | X-Components | Uses X-components from :core:designsystem, not Material3 |
| 6 | ImmutableList | Collections use .toImmutableList()
|
| 7 | Lowercase packages | Package names lowercase, no hyphens / camelCase / underscores |
| 8 | DI Binding |
singleOf(::Impl).bind<Interface>() + object … : BaseFeature
|
| 9 | No UseCases | ViewModels invoke repositories directly |
| 10 | Callback params | Screens take callbacks, not navController
|
| 11 | Single UiModel + DTO-wrapped UiState | No *UiState.kt; UiState<T> wraps DTOs from data/model/; data/ has no presentation imports |
-
{Feature}Screen.ktallowlist:Screen,ScreenRoot, optionalLoadingContent/FailedContent/EmptyContent— nothing else (any other top-level@Composable funis a Warning,@Previewexempt) -
{Feature}Contentand all sub-components live one-per-file underpresentation/ui/components/ - Non-composable helpers go in
presentation/ui/{Feature}Utils.kt, never undercomponents/ - Preview import must be
androidx.compose.ui.tooling.preview.Preview(CMP 1.11.0+)
| Point | File | Pattern |
|---|---|---|
| 1 | settings.gradle.kts |
include(":feature:{featurename}") |
| 2 | composeApp/build.gradle.kts |
implementation(project(":feature:{featurename}")) |
| 3 | initKoin.kt |
{Feature}Modules.initialize() |
| 4 | BaseAppNavHost.kt |
{featurename}(onBackClick = …) |
| Section | Validation |
|---|---|
| Data Models | Spec vs model/*.kt
|
| Interfaces | Spec method signatures vs actual |
| State Management | Spec UiModel (fields + UiState<DTO> slots) vs actual |
| Navigation | Spec callbacks vs actual |
- Validates
feature/{name}/exists. - Spawns the Code-Reviewer agent.
- Agent globs feature files and reads
spec.mdif present. - Greps for the 11 rules and 4 integration points in parallel (Rule 11 runs first as a cheap grep gate).
- Compares against the spec.
- Writes
review.mdandfixes.md.
| File | Content |
|---|---|
.claude/docs/{featurename}/review.md |
Pass/Warning/Fail summary, spec-compliance table, per-rule findings, ranked recommendations |
.claude/docs/{featurename}/fixes.md |
Concrete file:line fixes — current vs fixed code blocks, paste-ready |
| Status | Meaning |
|---|---|
| PASS | All rules and integrations valid |
| PASS WITH WARNINGS | Minor issues, non-blocking |
| FAIL | Critical violations found |
cat .claude/docs/{featurename}/review.md
cat .claude/docs/{featurename}/fixes.md
# Re-review after applying fixes
/feature-review {featurename}
# Detect spec drift
/audit-spec {featurename} --compareBack to Commands