Skip to content

KMP template with Clean Architecture and AI-powered Specification-Driven Development for Android & iOS using Compose Multiplatform

License

Notifications You must be signed in to change notification settings

ThisIsSadeghi/KMPilot

Repository files navigation

KMPilot

Your specs become your code.

A Kotlin Multiplatform template where AI agents turn plain English into production-ready features — with architecture that stays clean and documentation that never drifts.


Kotlin Compose Multiplatform Android iOS License


Built for Claude Code


v1-compressed.mp4

Documentation · Report Bug · Request Feature


Why KMPilot?

Every KMP project starts the same way. Create a feature module. Write the repository. Wire up the ViewModel. Add navigation. Configure DI. Promise yourself you'll document it later.

KMPilot inverts this. You describe what you want. Specialized agents build it — same patterns, every time. When they're done, you have working code and a living spec that updates when the code changes.

The tradeoff is intentional: consistency over flexibility.


Quick Start

Prerequisites: JDK 21+ · Android Studio · Xcode 15+ (iOS) · Claude Code

git clone https://github.com/ThisIsSadeghi/KMPilot.git
cd KMPilot

Sync Gradle, then:

claude
> Create a login feature with email and password authentication

How It Works

KMPilot follows Specification-Driven Development. You approve each phase before moving forward.

flowchart LR
    subgraph Input
        A["✏️ Your Prompt"]
    end

    subgraph SDD ["Specification-Driven Development"]
        B["📋 PRD"]
        C["📝 Tasks"]
        D["🤖 Agents"]
    end

    subgraph Output
        E["📄 Living Spec"]
    end

    A --> B
    B --> C
    C --> D
    D --> E

    B -.- B1["Requirements<br/>you approve"]
    C -.- C1["Work broken<br/>into steps"]
    D -.- D1["Data · UI<br/>Integration"]
    E -.- E1["Syncs with<br/>code changes"]
Loading

Every feature follows this flow. The spec becomes the source of truth.


What Gets Generated

Layer Output
Data Models, DataSource (interface + impl), Repository (interface + impl)
Presentation UiState, ViewModel, Screen composables, Navigation routes
Integration Koin module, app navigation wiring, living spec
Generated Feature Structure

Example: Complete feature module structure


Skills & Agents

Auto-Activated

These trigger based on context — no manual invocation needed:

Skill When It Activates
Feature Creation "Create X feature..." → Full SDD workflow
Feature Modification "Add X to Y feature..." → Spec-first changes with changelog
Design System Any screen/UI work → Enforces X-components over Material3
Swift-Kotlin Bridge iOS SDK integration → Guides interface injection patterns

Commands

/feature-test login     # Generate comprehensive tests for a feature
/feature-review login   # Review feature against architecture rules
/features-health        # Show health status for all features
/audit-spec login       # Audit or regenerate a feature's spec
/coverage               # Generate test coverage report

Project Structure

KMPilot/
├── composeApp/                 # App entry point
│   ├── BaseAppNavHost          # Feature routes registered here
│   └── initKoin                # Feature modules registered here
│
├── core/
│   ├── common/                 # Either, UiState, BaseViewModel
│   ├── data/                   # ApiClient, network config
│   └── designsystem/           # X-components (XButton, XTextField, XScaffold...)
│
├── feature/{name}/             # AI-generated feature modules
│   ├── data/                   # Models, DataSource, Repository
│   ├── presentation/           # ViewModel, Screens, Navigation
│   └── di/                     # Koin module
│
└── .claude/
    ├── agents/                 # Specialized AI agents
    ├── skills/                 # Auto-activated workflows
    └── docs/{feature}/         # Living specifications (spec.md)

Tech Stack

Category Technologies
Core Kotlin 2.2 · Compose Multiplatform 1.9 · Coroutines & Flow
Network Ktor 3.3 · Kotlinx Serialization
Persistence Room 2.8 · DataStore
DI Koin 4.1
Navigation Navigation Compose 2.9 (type-safe)
Testing Turbine · Mokkery · Kover

Documentation

Resource Description
Wiki Complete reference for agents, skills, and architecture patterns
CLAUDE.md Rules and conventions that AI agents follow

Contributing

Contributions welcome. See CONTRIBUTING.md for guidelines.



MIT License

Created by @ThisIsSadeghi

Built for developers who'd rather describe features than scaffold them.

About

KMP template with Clean Architecture and AI-powered Specification-Driven Development for Android & iOS using Compose Multiplatform

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages