Skip to content

Feature Review

Ali Sadeghi edited this page May 18, 2026 · 3 revisions

Feature Review

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

What Gets Checked

Architecture rules (10)

# 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

Integration points (4)

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 = …)

Spec compliance (if spec.md exists)

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

How It Works

  1. Validates feature/{name}/ exists.
  2. Spawns the Code-Reviewer agent.
  3. Agent globs feature files and reads spec.md if present.
  4. Greps for the 10 rules and 4 integration points in parallel.
  5. Compares against the spec.
  6. Writes review.md and fixes.md.

Output Files

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

Outcome Statuses

Status Meaning
PASS All rules and integrations valid
PASS WITH WARNINGS Minor issues, non-blocking
FAIL Critical violations found

After Review

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} --compare

Back to Commands

Clone this wiki locally