Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / games / chess / AGENTS.md
| 1 | # AGENTS.md — games/chess/ (':games:chess') |
| 2 | |
| 3 | > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `games/chess/` + allowed shared modules. Do not root-scan. |
| 4 | |
| 5 | _Install: ./install games/chess (dev by default)._ |
| 6 | <!-- last-reviewed: 2026-10-16 --> |
| 7 | - Gradle: :games:chess / dir: games/chess/ |
| 8 | - Package roots present: data |
| 9 | - Entry files: MainActivity.kt, Route.kt (screens live at module root, not ui/) |
| 10 | - Deps: :sdk:games, :library:ml |
| 11 | - Metadata: metadata_data/games-chess.md (present) |
| 12 | - Rust: no / screenshotTest: yes |
| 13 | |
| 14 | ## Overview |
| 15 | **Purpose:** Offline chess — local 2-player, human-like Maia AI (4 levels, `:library:ml`), ~50k Lichess puzzles by rating, staged Learn mode. 20 languages. |
| 16 | **Game shape:** Root-level screens (`ChessGameScreens`, `ChessPuzzleScreens`, `ChessLearnScreens`) → `util/*ViewModel` → `data/` models/lessons/puzzles; achievements → `:sdk:games` → hub. |
| 17 | **Entry points:** `Route` → `MainActivity.kt` → `ChessGameScreens.kt` → `util/ChessViewModel.kt` → `data/ChessModel.kt` → `util/MaiaEngine.kt`. |
| 18 | **Gotchas:** |
| 19 | - `util/` is NOT a closed package root — pending migration; don't add more files there |
| 20 | - Screens at module root (not `ui/`) is this game's historical layout — follow it here, don't "fix" it |
| 21 | |
| 22 | ## Key files |
| 23 | ### Root — entry + screens (flat layout, no ui/) |
| 24 | - com/vayunmathur/games/chess/MainActivity.kt |
| 25 | - com/vayunmathur/games/chess/Route.kt |
| 26 | - com/vayunmathur/games/chess/ChessGameScreens.kt |
| 27 | - com/vayunmathur/games/chess/ChessLearnScreens.kt |
| 28 | - com/vayunmathur/games/chess/ChessPuzzleScreens.kt |
| 29 | ### data/ — models, lessons, puzzles |
| 30 | - com/vayunmathur/games/chess/data/ChessModel.kt |
| 31 | - com/vayunmathur/games/chess/data/Learn.kt |
| 32 | - com/vayunmathur/games/chess/data/Puzzle.kt |
| 33 | ### util/ — ViewModels + Maia AI (pending migration to closed roots) |
| 34 | - com/vayunmathur/games/chess/util/ChessViewModel.kt |
| 35 | - com/vayunmathur/games/chess/util/LearnViewModel.kt |
| 36 | - com/vayunmathur/games/chess/util/PuzzleViewModel.kt |
| 37 | - com/vayunmathur/games/chess/util/ChessUiContract.kt |
| 38 | - com/vayunmathur/games/chess/util/MaiaEngine.kt — bundled human-like AI |
| 39 | - com/vayunmathur/games/chess/util/ChessApi.kt |
| 40 | - com/vayunmathur/games/chess/util/ChessAchievementsManager.kt |
| 41 | - com/vayunmathur/games/chess/util/AppBackupAgent.kt |
| 42 | |
| 43 | ## Verify (this module only) |
| 44 | ``` |
| 45 | ./gradlew :games:chess:compileDevKotlin |
| 46 | ./gradlew :games:chess:lint |
| 47 | ./gradlew :games:chess:checkMetadata |
| 48 | ``` |