Duet: verifiable iOS and Android twins

Duet is a framework for building iOS and Android apps as verifiable twins: shared pure logic, platform-native UI, and a recorded fixture corpus that both platforms must replay byte-identically. Record a feature's behavior on one platform, verify it on the other — parity is a CI gate, not a code-review aspiration.
One score, two performers.
Duet is open source under the MIT license, and the Duet repository family builds and gates an app with no other dependency (the open boundary). Modaal.dev supports these repositories and also makes code and design authoring tools for Duet apps: the tools give an agent the project's context and the commands to build, check and run the app, and let a person design the screens and edit the code beside the agent.
Status: pre-release, current line 0.7.0. Both flavors, the contracts and the toolchain have landed. The Swift packages resolve by URL at a tag; the Kotlin artifacts resolve from the family's static Maven repository (https://modaal-agent.github.io/maven — the repository block is in kotlin/README.md). Pre-1.0 minors are breaking by family convention, so pin exactly. CHANGELOG.md states what each release carries and which flavor it touches — several releases are Swift-only in effect, and say so.
The CI matrix (each job writes its toolchain and verdict to the run's job summary):
| lane | toolchain | proves |
|---|
swift · macos-26 | Xcode 26.6 (Swift 6.3.3) | the GA floor — the adopter toolchain |
swift · xcode-27 | Xcode 27 beta (Swift 6.4) | the newest proven line |
kotlin | Temurin 25 · Gradle 9.7.1 · Kotlin 2.4.10 | the KMP flavor suites (pure KMP — no Android SDK) |
flavor-lockstep | python3 | one contract surface across the two flavors, ledger fresh |
A release tag additionally runs publish.yml: the Kotlin artifacts are built with the version derived from the tag and landed on the Maven host as one commit; an existing version is never overwritten.
Agent skill
skills/duet/ is an agent skill for working in a Duet tree: the three shapes (KMP flavor, Swift flavor, twins), the feature loop and its commands, composition, the Kotlin core on the iPhone, duet-services, the duet CLI, and the action for each diagnostic. It runs the CLI at the tree's pin, through the tree's tools/duet or the release binary of that pin, checks the tree's pins with tools/duet pins, and names no version: it reads the tree's pins.
| Agent | Install |
|---|
| Claude Code | /plugin marketplace add modaal-agent/duet, then /plugin install duet-ios-android@modaal-duet |
Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and the other agents the skills CLI supports | npx skills add modaal-agent/duet |
| an agent that reads a skills directory | copy skills/duet/ into it, e.g. ~/.claude/skills/duet/ |
| claude.ai, the Claude API | upload a zip of skills/duet/ in the Skills settings, or create it with POST /v1/skills |
In Claude Code, /plugin update duet-ios-android@modaal-duet installs a new version of the plugin. The test-double skills install the same way: npx skills add modaal-agent/kotlin-ksp-mocks and npx skills add modaal-agent/swift-sourcery-templates.
A prompt to try in a Duet tree:
Add a Favorites feature: a star on the item screen adds or removes the item, and a Favorites tab lists the starred items. Write the reducer and its scenario, record the fixtures, mount the store in the SwiftUI and Compose shells, and run duet verify on both platforms.
Why
Teams shipping the same product on iOS and Android pay twice for every feature — and then keep paying, because nothing proves the two implementations agree. Screenshot tests diff pixels; shared-UI frameworks trade away native look and feel; hand-discipline drifts.
Duet takes a different position:
- Logic is shared and pure. Features are reducers over typed state, with effects as data — deterministic by construction, serialized through one canonical dialect.
- UI is native and thin. SwiftUI on Apple platforms, Compose on Android. Navigation is state; shells render it. There is no cross-platform UI layer to fight.
- Parity is measured, not promised. Feature behavior is recorded as fixtures — scenario in, canonical state/output trace out. Both platforms replay the same fixtures; the gate is byte equality. A drift on either side is a red build, not a bug report from a user.
The loop, end to end: