You are an experienced Android developer working on a project template generator.
Android project template generator using Nimble Compass conventions.
| Category | Technology |
|---|---|
| Language | Kotlin |
| UI Framework | Jetpack Compose |
| Architecture | MVVM / Clean Architecture (app → domain ← data) |
| Dependency Injection | Hilt |
| Generator | Kscript |
| Build System | Gradle (Kotlin DSL) |
| Static Analysis | Detekt, Android Lint |
| Coverage | Kover |
/scripts → Generator script (new_project.kts)
/template-compose → Source template (see its AGENTS.md for Android guidance)
/sample-compose → Example output (regenerate, don't edit directly)
/.github → CI workflows and PR templates
- Android Studio (Latest Stable)
- JDK 17+
- Kscript installed (
brew install holgerbrandl/tap/kscript)
cd template-compose && ./gradlew assembleDebugcd template-compose && ./gradlew detekt lintcd template-compose && ./gradlew app:testStagingDebugUnitTest data:testDebugUnitTest domain:testcd template-compose && ./gradlew koverXmlReportCustomcd scripts && kscript new_project.kts package-name=com.example.app app-name="My App" template=composeBefore commit:
cd template-compose && ./gradlew detekt lint assembleDebugBefore PR:
cd template-compose && ./gradlew detekt lint app:testStagingDebugUnitTest data:testDebugUnitTest domain:test koverXmlReportCustomAfter template changes: Verify generator works:
cd scripts && kscript new_project.kts package-name=co.test.app app-name="Test App" template=compose| File | Purpose |
|---|---|
template-compose/detekt-config.yml |
Detekt rules |
.github/workflows/run_detekt_and_unit_tests.yml |
CI pipeline (Detekt + unit tests) |
.github/workflows/review_pull_request.yml |
PR automation and checks |
.github/workflows/verify_newproject_script.yml |
Validate generator script on PRs |
Pipeline: Detekt → Lint → Tests → Coverage → Danger
Workflows defined in .github/workflows/:
run_detekt_and_unit_tests.yml— Main CI (Detekt + unit tests)review_pull_request.yml— PR automation and checksverify_newproject_script.yml— Validate generator script on PRs
The generator replaces these strings — don't modify them:
| Placeholder | Replaced With |
|---|---|
co.nimblehq.template.compose |
Package name |
co/nimblehq/template/compose |
Package path |
Template Compose |
App name |
TemplateCompose |
App name (no spaces) |
Branches:
main— Production (protected, no direct commits)develop— Staging (protected, no direct commits)- Feature branches from
developusingkebab-case:feature/add-login,bug/fix-crash
Commits:
- Format:
[#123] Add feature— capitalize first word, present tense - One logical change per commit
- Include ticket ID for traceability
Pull Requests:
- Title:
[#ticket] Description - 2 approvals required (include Team Lead or senior for large squads)
- Target merge within 2-3 days
- Only Team Lead merges to protected branches
- Template Awareness: Never modify placeholder strings used by the generator
- Regenerate, Don't Edit: Changes to
sample-compose/are overwritten — modifytemplate-compose/instead - Static Analysis: Always run
./gradlew detekt lintbefore committing - Test Generator: After any template change, verify generation still works
- Module Boundaries: Core modules must not depend on feature modules
- Compose Only: All UI must use Jetpack Compose — never suggest XML layouts
✅ Required:
- Run
detekt lintbefore commits - Test generator after template changes
- 2 PR approvals
- Follow Nimble Compass conventions
- Adding modules to template
- Changing generator behavior
- Changing Detekt/coverage thresholds
- Adding CI workflows
🚫 Don't:
- Edit
sample-compose/directly (regenerate it) - Push to
mainordevelop - Skip CI checks
- Commit secrets or credentials
- Merge PRs without Team Lead approval