Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / astronomy / AGENTS.md
| 1 | # AGENTS.md — astronomy/ (':astronomy') |
| 2 | |
| 3 | > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `astronomy/` + allowed shared modules. Do not root-scan. |
| 4 | |
| 5 | _Install: ./install astronomy (dev by default)._ |
| 6 | <!-- last-reviewed: 2026-10-16 --> |
| 7 | - Gradle: :astronomy / dir: astronomy/ |
| 8 | - Package roots present: ui, data, domain, platform |
| 9 | - Entry files: MainActivity.kt, Route.kt, Navigation.kt |
| 10 | - Deps: (none declared — bundled catalogs, Rust ephemeris) |
| 11 | - Metadata: metadata_data/astronomy.md (present) |
| 12 | - Rust: yes / screenshotTest: yes |
| 13 | |
| 14 | ## Overview |
| 15 | **Purpose:** Offline AR night-sky viewer — sensor-tracked sky map, camera passthrough, time scrubber, bundled star/planet catalogs, rise/set search. 100% offline. |
| 16 | **Key features:** `ui/SkyCanvas` + grid/art layers over `domain/projection/` (stereographic) fed by `domain/engine/` calculators (solar/lunar/planetary/rise-set/time) with a Rust core (`domain/AstronomyNative`); catalogs in `data/` validated at build time by `scripts/` generators. |
| 17 | **Entry points:** `Route` → `MainActivity.kt` → `Navigation.kt` → `ui/SkyMapPage.kt` → `platform/AstronomyViewModel.kt` → `domain/engine/TimeEngine.kt`. |
| 18 | **Gotchas:** Catalog data is generated (`scripts/` DB generators) — never hand-edit; sensor + location drive the sky, test with movement, not static. |
| 19 | |
| 20 | ## Key files |
| 21 | ### Root — entry + navigation |
| 22 | - com/vayunmathur/astronomy/MainActivity.kt |
| 23 | - com/vayunmathur/astronomy/Navigation.kt |
| 24 | - com/vayunmathur/astronomy/Route.kt |
| 25 | ### data/ — bundled catalogs |
| 26 | - com/vayunmathur/astronomy/data/CatalogRepository.kt |
| 27 | - com/vayunmathur/astronomy/data/model/Models.kt |
| 28 | ### domain/ — ephemeris + projection (Rust core + Kotlin math) |
| 29 | - com/vayunmathur/astronomy/domain/AstronomyNative.kt — Rust bridge |
| 30 | - com/vayunmathur/astronomy/domain/engine/TimeEngine.kt |
| 31 | - com/vayunmathur/astronomy/domain/engine/CoordinateTransforms.kt |
| 32 | - com/vayunmathur/astronomy/domain/engine/SolarCalculator.kt |
| 33 | - com/vayunmathur/astronomy/domain/engine/LunarCalculator.kt |
| 34 | - com/vayunmathur/astronomy/domain/engine/PlanetaryCalculator.kt |
| 35 | - com/vayunmathur/astronomy/domain/engine/RiseSetCalculator.kt |
| 36 | - com/vayunmathur/astronomy/domain/projection/SkyProjection.kt |
| 37 | - com/vayunmathur/astronomy/domain/projection/StereographicProjection.kt |
| 38 | - com/vayunmathur/astronomy/domain/projection/ViewState.kt |
| 39 | ### platform/ — ViewModel + location |
| 40 | - com/vayunmathur/astronomy/platform/AstronomyViewModel.kt |
| 41 | - com/vayunmathur/astronomy/platform/AstronomyUiContract.kt |
| 42 | - com/vayunmathur/astronomy/platform/sensor/LocationProvider.kt |
| 43 | ### ui/ — sky map + detail + search |
| 44 | - com/vayunmathur/astronomy/ui/SkyMapPage.kt |
| 45 | - com/vayunmathur/astronomy/ui/SkyCanvas.kt |
| 46 | - com/vayunmathur/astronomy/ui/SkyGrid.kt |
| 47 | - com/vayunmathur/astronomy/ui/SkyArt.kt |
| 48 | - com/vayunmathur/astronomy/ui/ObjectDetailPage.kt |
| 49 | - com/vayunmathur/astronomy/ui/SearchPage.kt |
| 50 | - com/vayunmathur/astronomy/ui/SettingsPage.kt |
| 51 | - com/vayunmathur/astronomy/ui/components/CameraBackground.kt |
| 52 | |
| 53 | ## Verify (this module only) |
| 54 | ``` |
| 55 | ./gradlew :astronomy:compileDevKotlin |
| 56 | ./gradlew :astronomy:lint |
| 57 | ./gradlew :astronomy:checkMetadata |
| 58 | ``` |