Skip to content
Ali Sadeghi edited this page May 28, 2026 · 11 revisions

Agents

Specialized sub-agents spawned by skills or commands to handle focused tasks. Each agent has its own context, allowed-tools list, and prompt — they don't pollute the orchestrator's context.

New to agents? See Getting-Started for an introduction.

Quick Reference

Agent Purpose Invoked By
data-layer-agent Data layer (models, Ktor Resources, DataSource, Repository) creating-kmp-feature
ui-layer-agent UI layer (single UiModel, ViewModel, Screen + ScreenRoot, navigation) creating-kmp-feature
integration-agent DI module + 4 integration points + spec.md generation creating-kmp-feature
test-fixtures Domain + UI fixtures ({Feature}Fixtures and {Feature}UiFixtures) /feature-test
test-datasource MockEngine DataSource tests /feature-test
test-repository Mokkery Repository tests /feature-test
test-viewmodel Turbine ViewModel tests /feature-test
test-ui Compose UI tests (targets ScreenRoot) /feature-test
test-integration E2E MockEngine → ViewModel tests /feature-test
code-reviewer Architecture compliance + spec compliance review /feature-review

All agents share base instructions in .claude/agents/_base/common.md (build validation, error-handling patterns, context-variable contract).

Feature Development Agents

These three agents implement Clean Architecture layers in parallel during Phase 4 (Implementation) of creating-kmp-feature.

data-layer-agent

Builds the data layer.

Generates:

  • @Serializable models in data/model/
  • Ktor Resources in data/remote/
  • {Entity}RemoteDataSource interface + …Impl in data/datasource/
  • {Entity}Repository interface + …Impl in data/repository/
  • Either<T> for all fallible operations
  • feature/{featurename}/build.gradle.kts (from the gradle template)

See: Data-Layer-Agent

ui-layer-agent

Builds the presentation layer.

Generates:

  • {Feature}UiModel.kt — the single state container (plain fields + UiState<DTO> slots; no *UiState.kt, Rule 11)
  • {Feature}ViewModel.kt using setState { copy() }, exposing val uiModel: StateFlow<…>
  • presentation/ui/{Feature}Screen.kt — 5-slot allowlist only (Screen, ScreenRoot, optional state shells)
  • presentation/ui/components/ — one file per @Composable, including {Feature}Content.kt, each with a co-located @Preview
  • presentation/ui/{Feature}Utils.kt — optional non-@Composable helpers
  • presentation/navigation/@Serializable Route + NavGraphBuilder.{featurename}(…) extension

See: UI-Layer-Agent

integration-agent

Wires the feature into the app and writes the living specification.

Completes the 4 Integration Points:

  1. settings.gradle.ktsinclude(":feature:{featurename}")
  2. composeApp/build.gradle.ktsimplementation(project(":feature:{featurename}"))
  3. initKoin.kt{Feature}Modules.initialize()
  4. BaseAppNavHost.kt → call {featurename}(onBackClick = { … })

Also:

  • Creates di/{Feature}Modules.kt (object extending BaseFeature with getKoinModules() + initialize())
  • Generates .claude/docs/{featurename}/spec.md from the spec template, preserving WHY content from the PRD

See: Integration-Agent

Testing Agents

Spawned by Feature-Test (/feature-test {featurename}). The command pre-computes a YAML context once and hands a focused slice to each agent — workers do not re-read source files.

See: Testing-Agents | Feature-Test

Code Quality Agents

code-reviewer

Reviews a feature against the 11 critical rules, 4 integration points, the UI file-organization allowlist, and the feature's spec (if one exists). Produces .claude/docs/{featurename}/review.md and fixes.md.

See: Code-Reviewer | Feature-Review


Back to Home

Clone this wiki locally