From supervibe
Use WHEN implementing or reviewing Android Kotlin features TO deliver lifecycle-safe Compose, ViewModel, coroutine, Flow, Room, WorkManager, permission, navigation, accessibility, offline, and testing changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/supervibe:android-domain-deliveryThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Android Domain Delivery is the production playbook for Kotlin Android changes
Android Domain Delivery is the production playbook for Kotlin Android changes where UI state, lifecycle, async work, persistence, permissions, navigation, offline behavior, and tests all meet. It keeps Compose screens declarative, ViewModels lifecycle-aware, Flow pipelines cancellable, Room migrations reversible, WorkManager jobs constrained, and user-facing behavior accessible before any "done" claim.
The skill assumes modern Android: Kotlin, Jetpack Compose, ViewModel with SavedStateHandle, StateFlow, coroutines, Hilt or the local DI pattern, Room, DataStore where present, WorkManager, Navigation Compose, Material 3, and JUnit/MockK/Turbine/Compose UI or Espresso tests.
Use for Android feature screens, ViewModel changes, repository/data-source work, Flow/coroutine behavior, Room schema changes, WorkManager jobs, navigation routes, runtime permissions, accessibility fixes, offline-first sync, test expansion, or release rollback planning.
Follow <resolved-supervibe-plugin-root>/docs/references/skill-expert-operating-standard.md: read local source
first, preserve evidence, keep scope narrow, use current framework docs for
drift-prone APIs, verify before completion claims, and cap confidence when
instrumented, accessibility, offline, or migration proof is missing.
AGENTS.md, active task item, owned write set, and
any Android project notes in .supervibe/memory/.settings.gradle*, module Gradle files, AndroidManifest.xml,
package layout, DI modules, navigation graph, theme, database, workers,
permissions, and nearest unit/instrumented tests.ViewModel, SavedStateHandle,
StateFlow, collectAsStateWithLifecycle, repository boundaries, Room
migrations, WorkManager constraints, permission flows, and test utilities.Pixel-producing UI? -> stateless Composable + Route wrapper; no repository calls.
Screen state or events? -> ViewModel owns StateFlow, SavedStateHandle, viewModelScope.
Continuous data? -> Flow from repository/DAO; lifecycle-aware collection in UI.
One-shot side effect? -> event channel/state effect consumed once, not mutable global.
Local persistence? -> Room DAO/migration or DataStore; migration and rollback proof.
Deferred/reliable work? -> WorkManager with constraints, idempotency, retry policy.
Needs camera/location/notifications/etc.? -> runtime permission UX + denied/permanent-denied path.
Navigation changes? -> typed route/deep link contract + back-stack/process-death test.
Offline requirement? -> source-of-truth cache, sync conflict policy, stale/error UI.
Accessibility affected? -> semantics, content descriptions, focus order, 48dp targets, font scale.
Define the slice: feature, entry route, user outcome, data source, offline expectation, permission surface, verification command, and rollback path.
Map layers. UI Composables render immutable state and emit events; Route wrappers obtain ViewModels; ViewModels orchestrate use cases; repositories own data composition; DAOs and network clients do I/O only.
Shape state. Model loading, content, empty, validation, transient error,
permission-denied, offline-stale, and retry states explicitly. Persist
user-visible inputs and route args through SavedStateHandle.
Control coroutines. Launch UI work in viewModelScope, avoid GlobalScope,
use structured concurrency, surface cancellation, and test Flow emissions
with Turbine or the local test helper. Use collectAsStateWithLifecycle() in
Compose, not raw collection in a Composable body.
Keep Compose stable. Split large screens into stateless pieces, pass stable
data, provide keys for Lazy lists, avoid expensive work in @Composable
functions, and localize every user-visible string and content description.
Handle persistence deliberately. Room queries returning changing data expose
Flow; migrations are explicit, tested, and schema-exported. Never use
fallbackToDestructiveMigration() in production paths.
Design background work. WorkManager jobs are idempotent, named, constrained for network/battery/charging as appropriate, cancellation-aware, and tested with WorkManager test helpers. Foreground work shows a user-visible notification and rollback path.
Implement permissions as a user journey. Include rationale, denial, permanent denial/settings, background permission constraints, and graceful feature degradation. Never request a permission before the user intent.
Protect navigation. Use existing route style, keep arguments typed and minimal, define deep link compatibility, test back-stack behavior, and prove process-death restoration for routes with form or scroll state.
Add tests first when behavior changes. Cover ViewModel state transitions, Flow success/error/loading, repository cache/network failure, DAO migration, worker retry/failure, permission denial, navigation, and Compose semantics.
Verify with scoped Gradle commands when policy allows. When this worker is told not to run tests, record the exact deferred commands and rely only on source review evidence.
Repair loop: localize failures to UI state, ViewModel, repository, Room, worker, permission, or navigation boundary; fix the smallest cause; rerun the same scoped command when allowed.
Read the source artifact, owned file paths, graph/task scope, and current project convention; record the evidence path, command, receipt, or runtime state that proves the starting point.
If required source, owner, dependency, runtime boundary, or approval is missing, stop and return BLOCKED with the missing field, impacted artifact, and next action instead of guessing.
After edits or reviewer findings, repair the smallest changed slice, rerun the same scoped command, and record command, exit code, pass/fail status, artifact path, confidence, and remaining blocker before completion.
Add an offline-capable order history screen:
OrderHistoryRoute(accountId) and passes the ID through
SavedStateHandle.observeOrders(accountId): Flow<List<OrderEntity>>; repository
exposes domain Flow<OrderHistory> and refreshes from the API on demand.OrderHistoryUiState.Good delivery path: deliver through Navigation, Room DAO, repository Flow, ViewModel state, Compose semantics, and WorkManager unique work. Runtime-specific tests include Room migration tests, coroutine/ViewModel state tests, WorkManager retry and failure tests, Compose semantics, TalkBack labels, and process-death route restore. Rollback removes the navigation entry and unique work, keeps the Room schema compatible, and disables refresh while cached reads still render. Failure boundaries are network outage, stale or empty cache, permission or auth denial, worker exhaustion, migration incompatibility, and duplicate sync.
Bad unsafe path: write Retrofit and Room calls directly in composables, launch unscoped coroutines from buttons, add a one-way migration, and verify only with a screenshot. That path has no runtime-specific tests for the changed stack surface, no concrete rollback beyond hope or manual cleanup, and weak failure boundaries for network outage, stale or empty cache, permission or auth denial, worker exhaustion, migration incompatibility, and duplicate sync.
GlobalScope, raw CoroutineScope(), or runBlocking in production Android
code.status: PASS, BLOCKED, PARTIAL, or DEFERRED.slice: screen, ViewModel, repository, Room, WorkManager, permission,
navigation, offline, or accessibility behavior changed.boundaries: files touched by layer and why each belongs there.stateAndLifecycle: StateFlow, SavedStateHandle, coroutine scope, and Flow
collection decisions.dataAndOffline: Room/DataStore/cache/sync behavior, migration, stale data,
conflict, and rollback notes.permissionsNavigationAccessibility: permission UX, route/back-stack, and
TalkBack/font-scale evidence.tests: focused commands run with exit code or explicit deferral reason.rollback: migration down path, feature flag, work cancellation, route
compatibility, or revert plan.confidence: score with caps from missing instrumented, migration, offline,
accessibility, or runtime proof.Unit: ViewModel/use-case/repository tests with JUnit, MockK or local test doubles, Turbine for Flow, and coroutine test dispatcher control.
Instrumented/UI: Compose UI or Espresso tests for route, interaction, permission, accessibility, and process-death behavior where affected.
Persistence: Room migration tests and exported schema diff when DB version changes.
Background: WorkManager test driver for constraints, retry, failure, and cancellation.
Static/build: scoped ./gradlew test, connectedAndroidTest, lint,
ktlintCheck, detekt, and assemble commands when policy allows.
If any scoped check fails or new evidence appears, repair the smallest changed slice, rerun the same scoped command, and record command, exit code, pass/fail status, blockers, and final-gate deferrals before claiming completion.
supervibe:source-driven-developmentsupervibe:tddsupervibe:test-strategysupervibe:verificationsupervibe:code-reviewsupervibe:stacks/android:android-developersupervibe:stacks/flutter:flutter-developersupervibe:stacks/ios:ios-developerreferences/practice-pack.md - Read when android-domain-delivery needs deeper load rules, local evidence anchors, gotchas, or a final checklist.scripts/self-check.mjs - Run with --check before claiming the android-domain-delivery resource tree is complete; add --json when machine-readable evidence is needed.evals/regression.json - Use when tuning android-domain-delivery trigger boundaries or checking should-trigger and should-not-trigger prompts.examples/workflow.md - Load when a concrete android-domain-delivery workflow example or anti-example would clarify the next action.templates/output-contract.md - Use when emitting agent-output so status, evidence, blockers, confidence, and nextAction stay consistent.npx claudepluginhub vtrka/supervibe --plugin supervibeGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.