Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / library / AGENTS.md

AGENTS.md4.0 KiBRenderedCodeRaw
1# AGENTS.md — library/ (':library')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `library/` + allowed shared modules. Do not root-scan.
4
5<!-- last-reviewed: 2026-10-16 -->
6- Gradle: :library / dir: library/
7- Package roots present: intents
8- Entry files: util/Navigation.kt + util/AssistantIntent.kt (no MainActivity/Route — base library)
9- Deps: :sdk:games
10- Metadata: metadata_data/library.md (absent — libraries have none by design)
11- Rust: no / screenshotTest: no
12
13## Overview
14**Purpose:** Base library every module depends on — navigation keys, cross-app `AssistantIntent` + shared IPC DTOs (`intents/<app>`), `RoomRepository` base, messenger, backup/storage helpers, game-hub reporting.
15**How to use:** Routes implement `util/NavKey`; screens navigate via `util/Navigation.kt` (+ bottom-bar/motion/results helpers). Cross-app calls go through `AssistantIntent<In,Out>` with DTOs in `library.intents.<app>`. Room entities subclass `util/RoomViewModel`/`DatabaseHelper` patterns; backups via `BackupAgent`/`BackupHelper`/`BackupFormat`. Games report via `GameHubReporter`/`DailyStreakReporter`.
16**Entry points:** `util/Navigation.kt` → `util/NavKey` (same file) → `util/AssistantIntent.kt` → `intents/notes/` (copy-pattern) → `util/AppMessages.kt`.
17**Gotchas:** `util/` here is grandfathered (this IS the util library) — the no-`util/` rule applies to apps, not this module. DTO changes break every consumer — keep `intents/` backward-compatible.
18
19## Key files
20### intents/ — shared IPC DTOs (one package per app)
21- com/vayunmathur/library/intents/notes/NoteData.kt
22- com/vayunmathur/library/intents/notes/InsertNoteData.kt
23- com/vayunmathur/library/intents/calendar/EventData.kt
24- com/vayunmathur/library/intents/clock/ClockData.kt
25- com/vayunmathur/library/intents/contacts/ContactData.kt
26- com/vayunmathur/library/intents/email/EmailData.kt
27- com/vayunmathur/library/intents/findfamily/FamilyMemberData.kt
28- com/vayunmathur/library/intents/fooddelivery/OrderLookupData.kt
29- com/vayunmathur/library/intents/maps/DirectionsData.kt
30- com/vayunmathur/library/intents/music/MusicData.kt
31- com/vayunmathur/library/intents/taxi/RideEstimateData.kt
32- com/vayunmathur/library/intents/weather/WeatherData.kt
33### util/ — navigation, intents, messenger, storage, games glue
34- com/vayunmathur/library/util/Navigation.kt — `NavKey` + `MainNavigation` + `rememberNavBackStack`
35- com/vayunmathur/library/util/NavigationBottomBar.kt
36- com/vayunmathur/library/util/NavigationMotion.kt
37- com/vayunmathur/library/util/NavigationResults.kt
38- com/vayunmathur/library/util/AssistantIntent.kt
39- com/vayunmathur/library/util/AppMessages.kt — `AppMessages.show()` (never `Toast`)
40- com/vayunmathur/library/util/Notifications.kt
41- com/vayunmathur/library/util/RoomViewModel.kt
42- com/vayunmathur/library/util/DatabaseHelper.kt
43- com/vayunmathur/library/util/BackupAgent.kt
44- com/vayunmathur/library/util/BackupHelper.kt
45- com/vayunmathur/library/util/BackupFormat.kt
46- com/vayunmathur/library/util/DataStoreUtils.kt
47- com/vayunmathur/library/util/AppPreferencesEntry.kt
48- com/vayunmathur/library/util/GameHubReporter.kt
49- com/vayunmathur/library/util/GameHubCompose.kt
50- com/vayunmathur/library/util/DailyStreakReporter.kt
51- com/vayunmathur/library/util/DailyChallengeStore.kt
52- com/vayunmathur/library/util/Achievement.kt
53- com/vayunmathur/library/util/AchievementsManager.kt
54- com/vayunmathur/library/util/LevelStatsRepository.kt
55- com/vayunmathur/library/util/IntentHelper.kt
56- com/vayunmathur/library/util/FileDropModifier.kt — `onFileDrop` (see notes/)
57- com/vayunmathur/library/util/SecureResultReceiver.kt
58- com/vayunmathur/library/util/SharedEditableText.kt
59- com/vayunmathur/library/util/Hkdf.kt
60- com/vayunmathur/library/util/Markdown.kt
61- com/vayunmathur/library/util/Format.kt
62- com/vayunmathur/library/util/LocalizedDateNames.kt
63- com/vayunmathur/library/util/Util.kt
64### sensor/ — shared sensors
65- com/vayunmathur/library/sensor/OrientationManager.kt
66
67## Verify (this module only)
68```
69./gradlew :library:compileDevKotlin
70./gradlew :library:lint
71```