Skip to content

Code Quality Agents

Ali Sadeghi edited this page Jan 27, 2026 · 6 revisions

Code Quality Agents

Specialized agents for validating and reviewing code quality.

Overview

Code Quality Agents ensure implementations follow architectural guidelines and best practices.

Agent

Reviews feature implementations against Clean Architecture rules.

Invocation: Use the /feature-review command:

/feature-review login

Validation Checklist

10 Critical Rules

  1. Interface + Impl Pairs - DataSource and Repository must have interface and implementation
  2. Either Error Handling - All fallible operations use Either<Success/Failure>
  3. setState { } Updates - State changes via setState { } (never direct assignment)
  4. 4-State UI Pattern - Uninitialized/Loading/Success/Failed states
  5. X-Components Only - Use X-components (not Material3)
  6. ImmutableList Collections - All lists are kotlinx.collections.immutable.ImmutableList
  7. Callback Navigation - Navigation parameters are callbacks, not sealed routes
  8. Lowercase Packages - Package names lowercase, no hyphens or underscores
  9. @Serializable Models - All data models have @Serializable
  10. Type-Safe Routes - Navigation routes are @Serializable data classes

4 Integration Points

  1. settings.gradle.kts - Feature module is included
  2. composeApp/build.gradle.kts - Feature is a dependency
  3. initKoin.kt - DI module is registered
  4. BaseAppNavHost.kt - Navigation routes are wired

Review Output

Reviewing feature: login

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

✓ UI Layer
  ✓ LoginUiState: All 4 states present
  ✓ LoginViewModel: Uses setState { }
  ✓ LoginScreen: Uses X-components
  ✓ Navigation: Type-safe routes with callbacks

✓ Integration
  ✓ settings.gradle.kts: Module included
  ✓ composeApp/build.gradle.kts: Dependency added
  ✓ initKoin.kt: DI module registered
  ✓ BaseAppNavHost.kt: Navigation wired

✅ Review Passed: All rules and integration points validated

Back to Agents

Clone this wiki locally