A Kotlin Multiplatform mobile app template designed for use with autonomous AI coding agents.
This project serves as a real-world test bed with:
- ✅ Strict MVI Architecture
- ✅ Build verification (Gradle + Detekt)
- ✅ Unit tests
- ✅ UI tests (Android instrumented)
- ✅ CI pipeline (GitHub Actions)
- ✅ Branch protection
This template is designed to work with Night Shift Agent—an autonomous coding assistant.
# Clone both repos
git clone https://github.com/chrishonson/night-shift-agent.git
git clone https://github.com/chrishonson/kmp-agentic-ci-template.git
# Setup agent
cd night-shift-agent
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Create tasks in mobile project
echo "Add a logout button to the home screen" > ../kmp-agentic-ci-template/tasks.txt
# Run agent against mobile project
python agent_gemini.py --project-dir ../kmp-agentic-ci-template.
├── composeApp/ # KMP shared code
│ ├── commonMain/ # Shared business logic & UI
│ ├── androidMain/ # Android-specific code
│ └── iosMain/ # iOS-specific code
│
├── iosApp/ # iOS native entry point
│
├── .github/
│ └── workflows/
│ └── pr-gateway.yml # CI pipeline
│
├── docs/
│ ├── ARCHITECTURE.md # MVI pattern documentation
│ └── RUNNER_SETUP.md # Self-hosted runner guide
│
├── tasks.txt # Agent tasks (gitignored)
└── .env # Agent config (gitignored)
This project follows MVI (Model-View-Intent) architecture. See docs/ARCHITECTURE.md for details.
- State: Immutable data class (e.g.,
HomeState) - Intent: Sealed interface for user actions (e.g.,
HomeIntent) - Store: ViewModel that processes intents (e.g.,
HomeStore) - UI: Pure Compose functions
./gradlew :composeApp:assembleDebugOr use Android Studio's run configuration.
Open iosApp/ in Xcode and run.
The GitHub Actions workflow (.github/workflows/pr-gateway.yml) runs two jobs on every PR:
-
quality_gate (GitHub-hosted)
- Detekt static analysis
- Build APK
- Unit tests
-
ui_verification (Self-hosted Mac)
- Android UI tests on emulator
See docs/RUNNER_SETUP.md for self-hosted runner setup.
| Document | Description |
|---|---|
| Architecture | MVI pattern and conventions |
| Runner Setup | Self-hosted GitHub Actions runner |
| Night Shift Agent | Autonomous coding agent |
This template demonstrates agentic CI/CD—using AI agents to:
- Receive high-level tasks
- Autonomously implement code
- Verify through existing guardrails
- Submit PRs for human review
The strict architecture and CI requirements force the agent to write production-quality code or fail trying.
Built with Kotlin Multiplatform.