Thank you for helping build NU:TONIC. This guide summarizes what maintainers expect; authoritative product and engineering constraints live under rules/ and docs/.
Start here: rules/README.md — reading order, how rules/ ties to docs/, refs/stitch/, and the Kotlin app under nutonic/.
Before UI or gameplay work:
| Order | Document | Why |
|---|---|---|
| 1 | rules/00-product-intent.md |
Solo-first async play, client vs server authority (non-ranked vs ranked), PRO vs SCAN, marketplace posture |
| 2 | rules/01-navigation-architecture.md |
Canonical tabs (SCAN / INTEL / RANK / SETUP / PRO), route IDs vs labels, depth limits, auth/session expectations |
| 3 | rules/07-screens-checklist.md |
Ship list for screens, BGM + header music toggle, stitch folder pairing |
| 4 | plans/2026-04-21-publishable-ui-stitch-parity-and-ship-criteria.md, docs/VENDORED-UI-CONTRACT-PACK.md, docs/PUBLISHABLE-UI-EXIT-CRITERIA.md, rules/15-publishable-ui-and-release-readiness.md |
Converged SCAN hub, design-system completion, no debug copy in release, vendored parity contracts (IMP-140) |
Stitch reference assets: refs/stitch/ is optional local reference only and may be gitignored. Do not block implementation/review on submodule wiring; use vendored first-party contracts in docs/ + rules/ (see publishable plan §P0).
When sources disagree: rules/README.md § “Order of authority” — 00 / 01 and docs/DESIGN.md override older stitch naming; rules/02-design-system.md is how design lands in Compose (tokens, fonts, glass).
Topic pointers: structure 03, maps/gameplay 04, APIs and leaderboards 05, ML/VLM 06, UX footguns 08, HTML/WebView 09, TerraMesh 10, tooling/CI/PM2 11, Python/Gradio 12, cache/data plane 13.
nutonic/— Gradle root for the Kotlin Multiplatform + Compose client (open this folder for VS Code / Android Studio when working on the app).rules/— Implementation constraints (treat as non-negotiable unless product explicitly changes scope).docs/— Long-form specs (game engine, ranked mode, design, APIs, etc.).inference/,data/scripts/— Inference services and hydration scripts perrules/README.mdanddocs/SERVER-AND-INFERENCE-ARCHITECTURE.md.
- JDK: 17+ for the project; CI uses Temurin 21. Set
JAVA_HOME(or user~/.gradle/gradle.propertieswithorg.gradle.java.home) — do not commit machine-specific JDK paths. Details:rules/11-vscode-testing-linting-and-ci.md§7 andnutonic/gradle.properties.PERSONAL.example. - Android:
nutonic/local.propertiesis gitignored — create it locally withsdk.dir=...(and keys as documented); CI uses a stubMAPS_API_KEYfor builds. - Node (repo root):
npm installwhenpackage.json/ lockfile changes — used for PM2 scripts that run Gradle with log capture.
From nutonic/ (see rules/11 §3–§4):
./gradlew test
./gradlew quality # ktlintCheck + detekt
./gradlew formatKotlin # if ktlint reports style-only issuesKMP rule of thumb: game rules, non-ranked scoring, and shared UI belong in shared/src/commonMain; platform folders stay thin (rules/03).
Kotlin/JS: if you change JS dependencies or the lockfile, follow rules/11 §7 on nutonic/kotlin-js-store/ and lockfile hygiene.
Per rules/11 §9 and the broader PM2-first testing policy in rules/14, PRs that touch the KMP client must include local verification via PM2 so stdout/stderr land under logs/ (gitignored). Always read logs and fix failures before treating work as complete. At minimum:
- From repo root:
npm installif needed. - Run
nutonic-ci-local(quality + test in one Gradle invocation), wait until it stops, and confirmBUILD SUCCESSFULinlogs/nutonic-ci-local.out.log(and scan.err.log). - When §9.2 step B applies (changes to
webApp,androidApp,desktopApp,shared,kotlin-js-store, or cross-cutting Gradle that affects those), also runnutonic-build-verifyand assess its logs.
State in the PR that §9.2 was run (and which logs you checked). Do not commit logs/. If PM2/Node is impossible, use the documented exception in §9.4: same Gradle commands, capture output locally, paste evidence in the PR.
Full command reference: docs/PM2_LOCAL_VERIFICATION.md.
- Client CI:
.github/workflows/nutonic-ci.yml— quality, tests, Android APK, desktop.deb, web bundles, iOS Simulator framework (path-filtered tonutonic/**,rules/**, and that workflow). - CodeQL + secret scanning:
.github/workflows/security-codeql-and-secrets.yml.
Green CI does not replace §9.2 local evidence for nutonic/** work.
.pre-commit-config.yaml— Gitleaks on commit. Install:pip install pre-committhenpre-commit installfrom the repo root.- Never commit secrets, API keys, or personal
local.properties..envand similar belong in.gitignore(see existing patterns).
- Scope: Prefer focused PRs with a clear description of behavior change vs spec alignment.
- Linked intent: If the change touches ranked play, leaderboards, PRO, or server contracts, cite the relevant
docs/orrules/section so reviewers can verify parity. - Design: Follow
docs/DESIGN.md+rules/02-design-system.md(bundled fonts, semantic colors, header music where the screen checklist requires it).
Questions about intent are best resolved against rules/00-product-intent.md and rules/README.md before large refactors.