-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Review
Ali Sadeghi edited this page May 18, 2026
·
3 revisions
Reviews a feature module against Clean Architecture, the 10 critical rules, the 4 integration points, 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 _uiState.setState { copy() }, never direct assignment |
| 4 | 4 UI States | Screen handles Uninitialized / Loading / Success / Failed |
| 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
|
| 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 UiState 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 10 rules and 4 integration points in parallel.
- 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