Skip to content

Code Reviewer

Ali Sadeghi edited this page Feb 5, 2026 · 8 revisions

Code Reviewer Agent

Reviews feature implementations against architecture rules and spec compliance.

Invoked via: /feature-review {featurename} command

/feature-review login

What It Validates

Spec Compliance (if spec.md exists)

  • Data models match spec definitions
  • Interfaces match spec contracts
  • State management matches spec structure
  • Navigation matches spec routes/callbacks
  • Reports drift between spec and implementation

10 Critical Rules

# Rule Check
1 Interface + Impl DataSource and Repository have interface + implementation pairs
2 Either All fallible operations return Either<T>
3 setState Uses setState { } for state updates (never direct assignment)
4 4 UI States Handles Uninitialized/Loading/Success/Failed states
5 X-Components Uses X-components from :core:designsystem (NOT Material3)
6 ImmutableList Collections use .toImmutableList()
7 Lowercase packages Package names lowercase, no hyphens or underscores
8 @Serializable All data models have @Serializable annotation
9 Type-Safe Routes Navigation routes are @Serializable data classes
10 Callback params Screens take callback parameters, not navController

4 Integration Points

# Point File
1 Module include settings.gradle.kts
2 Dependency composeApp/build.gradle.kts
3 DI init initKoin.kt
4 Navigation BaseAppNavHost.kt

Output Files

  • .claude/docs/{feature}/review.md - Detailed findings
  • .claude/docs/{feature}/fixes.md - Specific code fixes

Example Output

Reviewing feature: login

✓ Data Layer
  ✓ LoginRemoteDataSource: Interface + Impl found
  ✓ LoginRepository: Interface + Impl found
  ✓ Either<T> used for all suspend functions

✓ UI Layer
  ✓ LoginUiState: All 4 states present
  ✓ LoginViewModel: Uses setState { }
  ✓ LoginScreen: Uses X-components

✓ Integration
  ✓ settings.gradle.kts: Module included
  ✓ initKoin.kt: DI module registered
  ✓ BaseAppNavHost.kt: Navigation wired

⚠ Issues Found:
  ⚠ LoginScreen.kt:45 - Using Material3 Button instead of XButton

Status: PASS WITH WARNINGS

See also: Feature-Review

Back to Agents

Clone this wiki locally