KMP Code One Task
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Carry out a single task’s implementation, tests, and checkbox update in a Kotlin Multiplatform (Android + iOS) app —
nothing else. This is the narrowest execution unit for a kmp task in the iru-code pipeline:
iru-kmp-code-one-task-group calls it once per task in a bucket (potentially many at once, in parallel agents via
iru-isolated-skill-executor).
Purpose
iru-kmp-code-one-task is the Kotlin Multiplatform counterpart of iru-android-code-one-task and
iru-swift-code-one-task. It detects the project shape at runtime (the iru-setup-kmp-app layout of shared/
androidApp/ + XcodeGen-generated iosApp/, or the JetBrains wizard’s single composeApp/ module; which Android
plugin the shared module uses; shared Compose Multiplatform UI vs native UI per platform; iOS host capability),
decides which module and source set(s) the task belongs to (commonMain first), and loads only the matching files
from its own reference/ directory — mandatory rules, code style, and project structure always; testing, KDoc,
shared logic, Compose Multiplatform or native UI, iOS interop, and security as the task requires.
It then re-checks the current code state (reading every actual of an expect, and the Swift callers of any
public declaration), implements exactly what the task specifies, writes or updates tests in the matching test
source set, and compile-checks every target the touched source sets feed. Two things set it apart from the
Android and Swift equivalents: a commonMain change must compile for both Android and iOS, and Swift is a
first-class consumer of the shared module’s public API. If the task did not stop on a blocker it immediately checks
off its own checkbox (and its sub-tasks') in implementation_plan.md with a "group validation pending" note. For a task
that adds or changes a screen, component or list it applies the catalog’s UI contract mapped onto KMP (see Building user interfaces): it first writes the Screen › Region › Component tree (inputs, events, visual states, reuse) and reports it back, builds leaves first with stateless components over the shared view model’s immutable state, uses Lazy* containers with key/contentType (and SwiftUI List/lazy stacks) for every collection, and keeps navigation in the one graph. It also writes the UI tests: runComposeUiTest tests on the Android host (Robolectric) and the iOS simulator for shared Compose UI, or Robolectric Compose / ImageRenderer tests for native UI, capturing .ui-screenshots/ across the .ui-quality.yml directions × themes with an --android/--ios variant through the module’s screenshot helper, plus the accessibility check. It never adds Robolectric, a test dependency or a test target to make a UI test fit; missing wiring is a blocker to report. It
does not capture a quality baseline, add license headers, run tests, coverage or linters, run Dokka, link the iOS
framework, or boot a simulator — all of that happens once per bucket in iru-kmp-code-one-task-group.
Plugin
Shipped by the iru-kmp plugin of the ai-catalog marketplace (install with /plugin install iru-kmp@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
Task description |
Yes |
The task’s own text, including its exact |
None — always invoked with a specific task’s text, normally by |
Outputs
-
Production code in the right module and source set (
commonMainfirst, thenandroidMain,iosMain,androidApp, or Swift iniosApp), withactual`s for every target of any new `expect, KDoc on every public/internal declaration, and updated Swift callers when a public signature they use changed. -
New or updated tests in the matching source set:
commonTest, the Android host-test set,iosTest,androidApp/src/test, oriosAppXCTest — written but not run. -
For a UI task: UI tests and screenshot-capture calls (component/screen/flow, states, platforms) in
commonTest,androidApp/src/testoriosApp/iosAppTests, written but not run, and theScreen › Region › Componentdecomposition. -
A regenerated Xcode project (
xcodegen generate) wheniosApp/project.ymlchanged; the generated framework, header, and.xcodeprojare never edited by hand. -
implementation_plan.mdwith this task’s checkbox (and its sub-tasks') checked and a "group validation pending" note naming the module(s), source sets, and files touched; left untouched if the task stopped on a blocker. -
A short summary back to the caller: layout, Android plugin and UI mode detected; module(s)/source sets touched and reference files read; files touched and tests added/updated per source set; compile-check result per target (passed, failed and fixed, failed outside scope, or unavailable); public API changes visible to Swift; any deviation from
reference/and pre-existing mandatory-rule violations noticed; for a UI task, the decomposition and the UI tests and captures added; and whether the task stopped on a blocker.
Execution flow
Dependencies
Invokes
None. iru-kmp-code-one-task does not invoke any other catalog skill or spawn any agent — it only reads its
reference/ files, edits the code, test, and plan files the task names, and runs the Gradle wrapper (and, on
macOS, xcodegen/xcodebuild) directly for compile-checks.
Invoked by
-
KMP Code One Task Group — Step 2, once per task in a bucket (concurrently, in a single batch of
Agentcalls, when the group is marked parallelizable; one at a time otherwise), via theiru-isolated-skill-executoragent, passing that task’s full text including its exact checkbox line(s). That caller re-readsimplementation_plan.mdafterward to confirm the checkbox this skill already flipped landed, then replaces the "pending" note with the final validation outcome.
Related agents
None spawned by this skill itself; it is run inside an
iru-isolated-skill-executor agent by its caller.
Source
SKILL.md on GitHub — the file this page was generated from.