docs-agent-overviews-phase-A
- Commit
a2c0b1d6b02a15270c3f68b4970b436c1a499995- Author
- vayun-mathur <[email protected]>
- When
- 2026-10-16 02:52 UTC (1 month ago)
- Parents
df5da27
Diff
AGENTS.md
diff --git a/AGENTS.md b/AGENTS.mdindex 81887abfa5..73d33f3816 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -45,7 +45,8 @@ Monorepo: ~100 Gradle modules + Rust workspace. Do scoped work only. ### Apps (Gradle key → dir) Reference: `backup/` satisfies every rule; `notes/` second + `intents/` demo. `camera` + `games/voxels` hand-commit screenshots.-`appstore→appstore/` `astronomy→astronomy/` `auto→auto/,auto/protocol/` `backup→backup/` `calculator→calculator/` `calendar→calendar/` `camera→camera/` `cast→cast/,cast/protocol/,cast/tv/` `clock→clock/` `code→code/` `communicate→communicate/` `contacts→contacts/` `education→education/` `email→email/` `emergency→emergency/` `euicc→euicc/` `everysync→everysync/` `files→files/` `findfamily→findfamily/` `flashcards→flashcards/` `fooddelivery→fooddelivery/` `health→health/` `keyboard→keyboard/` `launcher→launcher/` `logviewer→logviewer/` `maps→maps/` `measure→measure/` `music→music/` `musicbrainz→musicbrainz/` `networklocation→networklocation/` `notes→notes/` `office→office/` `openassistant→openassistant/` `passwords→passwords/` `pdf→pdf/` `photos→photos/` `parentalcontrols→parentalcontrols/` `screentime→screentime/` `setupwizard→setupwizard/` `share→share/` `speech→speech/` `taxi→taxi/` `things→things/` `translate→translate/` `travel→travel/` `tuner→tuner/` `updater→updater/` `vpn→vpn/` `weather→weather/` `web→web/` `youpipe→youpipe/,youpipe/extractor/` `games-hub→games/hub/` `games-arrows→games/arrows/` `games-chess→games/chess/` `games-logicgate→games/logicgate/` `games-minesweeper→games/minesweeper/` `games-nonogram→games/nonogram/` `games-pipes→games/pipes/` `games-solitaire→games/solitaire/` `games-sudoku→games/sudoku/` `games-unblockjam→games/unblockjam/` `games-voxels→games/voxels/` `games-wordmaker→games/wordmaker/`+Full canonical index (Gradle key → dir + group + notes): `.llms/repo-map.md`.+`appstore→appstore/` `astronomy→astronomy/` `auto→auto/,auto/protocol/` `backup→backup/` `calculator→calculator/` `calendar→calendar/` `camera→camera/` `cast→cast/,cast/protocol/,cast/tv/` `clock→clock/` `code→code/` `communicate→communicate/` `contacts→contacts/` `education→education/` `email→email/` `emergency→emergency/` `euicc→euicc/` `everysync→everysync/` `files→files/` `findfamily→findfamily/` `flashcards→flashcards/` `fooddelivery→fooddelivery/` `health→health/` `keyboard→keyboard/` `launcher→launcher/` `logviewer→logviewer/` `maps→maps/` `measure→measure/` `music→music/` `networklocation→networklocation/` `notes→notes/` `office→office/` `openassistant→openassistant/` `passwords→passwords/` `pdf→pdf/` `photos→photos/` `parentalcontrols→parentalcontrols/` `screentime→screentime/` `setupwizard→setupwizard/` `share→share/` `speech→speech/` `taxi→taxi/` `things→things/` `todo→todo/` `translate→translate/` `travel→travel/` `tuner→tuner/` `updater→updater/` `vpn→vpn/` `weather→weather/` `web→web/` `youpipe→youpipe/,youpipe/extractor/` `games-hub→games/hub/` `games-arrows→games/arrows/` `games-chess→games/chess/` `games-logicgate→games/logicgate/` `games-minesweeper→games/minesweeper/` `games-nonogram→games/nonogram/` `games-pipes→games/pipes/` `games-solitaire→games/solitaire/` `games-sudoku→games/sudoku/` `games-unblockjam→games/unblockjam/` `games-voxels→games/voxels/` `games-wordmaker→games/wordmaker/` Slash == colon for Gradle (`games/voxels` == `games:voxels`). ### Never scan
backup/AGENTS.md
diff --git a/backup/AGENTS.md b/backup/AGENTS.mdindex 8fc7a1e821..73b73e49e0 100644--- a/backup/AGENTS.md+++ b/backup/AGENTS.md@@ -3,7 +3,7 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `backup/` + allowed shared modules. Do not root-scan. _Install: ./install backup (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :backup / dir: backup/ - Package roots present: ui, data, domain, platform, service - Entry files: MainActivity.kt, Route.kt, Navigation.kt@@ -11,28 +11,58 @@ _Install: ./install backup (dev by default)._ - Metadata: metadata_data/backup.md (present) - Rust: no / screenshotTest: yes -## Key files+## Overview+**Purpose:** Privileged encrypted backup app for data, apps, and media. THE reference module — satisfies every repo rule; copy its layout for new apps.+**Key features:**+- AES-256-GCM E2EE keyed by a 12-word BIP-39 recovery code; restore from the code alone, no account+- SAF folder backend (internal/USB/SD) + WebDAV/Nextcloud remote backend behind one `BackupBackend` interface+- Scheduled encrypted photo/video/audio backup; system app-data transport on platform-signed installs+**Architecture / data-flow:** `ui/` onboarding→dashboard → `platform/BackupViewModel` → `data/backend/` (`BackendFactory` picks `SafBackend`/`WebDavBackend`, `BackupRepository` orchestrates) with `domain/crypto/` pure (Bip39/Crypto) and keys in `platform/crypto/KeyManager`; `platform/FileBackupWorker` runs schedules, `service/ConfigurableBackupTransport` exposes the system transport. `Navigation`: start gated on `onboarded` flag; `reset()` not `add()` (no back-navigation to onboarding); SAF folder picker + persistable URI perms owned at `Navigation` level since both screens use it.+**Entry points + reading order:** `Route` (`Onboarding` / `Dashboard`) → `MainActivity.kt` → `Navigation.kt` → `platform/BackupViewModel.kt` → `data/backend/BackendFactory.kt` + `BackupBackend.kt`.+**Gotchas:**+- Onboarding ends when the ViewModel has key + destination, not via navigation — the stack follows the flag+- Media-permission grant funnels straight into `backupFilesNow()`+- Internet is used only for WebDAV remotes; everything else is offline +## Why this is the reference (copy this, not others)+**Copy-this checklist:**+- `data/backend/BackupBackend` interface + `BackendFactory` + one impl per destination (SAF / WebDAV) — new destinations add a file, not a refactor+- Pure `domain/crypto/` (Bip39, Crypto) with zero Android imports; platform key custody isolated in `platform/crypto/KeyManager`+- `platform/` worker + ViewModel split: `FileBackupWorker` schedules/runs, `BackupViewModel` holds UI state — never mixed+- Onboarding-gated `Navigation` with the why-comments intact (`reset()` vs `add()`, picker ownership at `Navigation` level)+- Closed package roots (`ui data domain platform service`), one public `@Composable` per file+**Anti-patterns avoided here (seen elsewhere):**+- No `util/` dumping ground — helpers live in the package they serve+- No backend `when`-branches scattered through UI — all behind the interface+- No navigation back to onboarding; no picker duplicated per screen++## Key files+### Root — entry + navigation - com/vayunmathur/backup/MainActivity.kt-- com/vayunmathur/backup/Navigation.kt+- com/vayunmathur/backup/Navigation.kt — onboarding gate + picker ownership (read the comments) - com/vayunmathur/backup/Route.kt+### data/ — backends, repo, file backup - com/vayunmathur/backup/data/BackupConfig.kt+- com/vayunmathur/backup/data/backend/BackupBackend.kt — the interface to copy - com/vayunmathur/backup/data/backend/BackendFactory.kt-- com/vayunmathur/backup/data/backend/BackupBackend.kt - com/vayunmathur/backup/data/backend/BackupRepository.kt - com/vayunmathur/backup/data/backend/SafBackend.kt - com/vayunmathur/backup/data/backend/WebDavBackend.kt - com/vayunmathur/backup/data/files/FileBackupManager.kt - com/vayunmathur/backup/data/files/FileMetadata.kt+### domain/ — pure crypto (no Android) - com/vayunmathur/backup/domain/crypto/Bip39.kt - com/vayunmathur/backup/domain/crypto/Crypto.kt+### platform/ — ViewModel, worker, key custody - com/vayunmathur/backup/platform/BackupViewModel.kt - com/vayunmathur/backup/platform/FileBackupWorker.kt - com/vayunmathur/backup/platform/crypto/KeyManager.kt+### service/ — system backup transport - com/vayunmathur/backup/service/ConfigurableBackupTransport.kt - com/vayunmathur/backup/service/ConfigurableBackupTransportService.kt-- com/vayunmathur/backup/ui/DashboardScreen.kt+### ui/ — onboarding + dashboard - com/vayunmathur/backup/ui/OnboardingScreen.kt+- com/vayunmathur/backup/ui/DashboardScreen.kt - com/vayunmathur/backup/ui/components/BackendSection.kt ## Verify (this module only)@@ -41,5 +71,3 @@ _Install: ./install backup (dev by default)._ ./gradlew :backup:lint ./gradlew :backup:checkMetadata ```--
everysync/AGENTS.md
diff --git a/everysync/AGENTS.md b/everysync/AGENTS.mdindex 4a592a1fe6..8340bb5224 100644--- a/everysync/AGENTS.md+++ b/everysync/AGENTS.md@@ -3,63 +3,82 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `everysync/` + allowed shared modules. Do not root-scan. _Install: ./install everysync (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :everysync / dir: everysync/ - Package roots present: ui, data, domain, platform, network, provider, auth, sync - Entry files: MainActivity.kt, Route.kt, Navigation.kt, EverySyncApplication.kt-- Deps: :library:network, :library:e2ee-p2p-- Metadata: metadata_data/everysync.md (present)+- Deps: :library:network, :library:e2ee-p2p (verified in build.gradle.kts)+- Metadata: metadata_data/everysync.md (present but stale — omits vaults/E2EE relay) - Rust: no / screenshotTest: yes -## Key files+## Overview+**Purpose:** Universal sync hub — multi-provider account sync (contacts/calendars/health) plus E2EE vault relay syncing notes/passwords/todos between a user's own devices and shared vaults.+**Key features:**+- CardDAV/CalDAV account sync with OAuth2 PKCE via Custom Tabs (no shipped secrets)+- E2EE vaults + `everysync://join/<vaultId>?owner=&type=` sharing links (sealed join requests, public ids only)+- Five sink types: Calendar / Contacts / Note / Password / Todo (incl. IPC sinks into sibling apps)+- WorkManager periodic sync + daily snapshots, rescheduled on boot/update via `BootReceiver`+**Architecture / data-flow:** `auth/` (accounts/tokens) → `provider/` registry + `SyncProvider` impls (incl. `E2eeProvider`) → `sync/` engine/scheduler/worker + relay blob store/merge + vault keys/roster/owner-transfer → `data/sink/` writers + `domain/format/` iCal/VCard. `EverySyncApplication.onCreate`: `NetworkClient.init(FIRST_PARTY)` → schedule periodic + daily snapshot → one-time Keystore key migration. `MainActivity`: join-link parse → `requestToJoin` + snackbar confirm.+**Entry points + reading order:** `EverySyncApplication.kt` → `MainActivity.kt` (`parseJoinLink`/`handleJoinLink`) → `Route` (`Accounts` / `AddAccount` / `AccountDetail` / `Settings`) → `sync/SyncEngine.kt` → `provider/ProviderRegistry.kt`.+**Gotchas:**+- KEEP `EverySyncApplication` — it does real work (network init, scheduler, key migration), not boilerplate; do NOT delete it as a "shared-base" cleanup. Manifest `android:name` must stay.+- `singleTop` warm-start join links arrive via `onNewIntent`, not a fresh `onCreate`+- Creds live in encrypted `TokenStore`/`VaultStore`; `Log.init` comes from the shared `MaInitProvider`, don't re-add it here -- com/vayunmathur/everysync/EverySyncApplication.kt-- com/vayunmathur/everysync/MainActivity.kt+## Key files+### Root — app init, entry, navigation+- com/vayunmathur/everysync/EverySyncApplication.kt — KEEP: sync scheduling + network init + key migration+- com/vayunmathur/everysync/MainActivity.kt — join-link entry - com/vayunmathur/everysync/Navigation.kt - com/vayunmathur/everysync/Route.kt+### auth/ — accounts, OAuth PKCE, token storage - com/vayunmathur/everysync/auth/AccountConfig.kt - com/vayunmathur/everysync/auth/AccountStore.kt - com/vayunmathur/everysync/auth/Authenticator.kt-- com/vayunmathur/everysync/auth/TokenStore.kt-- com/vayunmathur/everysync/data/RemoteModels.kt-- com/vayunmathur/everysync/data/Settings.kt-- com/vayunmathur/everysync/data/VaultStore.kt-- com/vayunmathur/everysync/data/sink/CalendarSink.kt-- com/vayunmathur/everysync/data/sink/ContactsSink.kt-- com/vayunmathur/everysync/data/sink/NoteSink.kt-- com/vayunmathur/everysync/data/sink/PasswordSink.kt-- com/vayunmathur/everysync/data/sink/TodoIpcSink.kt-- com/vayunmathur/everysync/data/sink/TodoSink.kt-- com/vayunmathur/everysync/domain/format/ICalendar.kt-- com/vayunmathur/everysync/domain/format/VCard.kt-- com/vayunmathur/everysync/network/remote/RelayCursorStore.kt-- com/vayunmathur/everysync/network/remote/RelaySync.kt-- com/vayunmathur/everysync/platform/BootReceiver.kt-- com/vayunmathur/everysync/platform/EverySyncUiContract.kt-- com/vayunmathur/everysync/platform/EverySyncVaults.kt-- com/vayunmathur/everysync/platform/EverySyncViewModel.kt-- com/vayunmathur/everysync/provider/DataType.kt+- com/vayunmathur/everysync/auth/TokenStore.kt — encrypted+### provider/ — sync-provider registry + impls - com/vayunmathur/everysync/provider/ProviderRegistry.kt - com/vayunmathur/everysync/provider/SyncProvider.kt - com/vayunmathur/everysync/provider/SyncState.kt+- com/vayunmathur/everysync/provider/DataType.kt - com/vayunmathur/everysync/provider/impl/E2eeProvider.kt-- com/vayunmathur/everysync/sync/OwnerTransfer.kt-- com/vayunmathur/everysync/sync/RelayBlobStore.kt-- com/vayunmathur/everysync/sync/RelayMerge.kt+### sync/ — engine, scheduling, relay merge, vault crypto - com/vayunmathur/everysync/sync/SyncEngine.kt - com/vayunmathur/everysync/sync/SyncScheduler.kt-- com/vayunmathur/everysync/sync/SyncStatus.kt - com/vayunmathur/everysync/sync/SyncWorker.kt+- com/vayunmathur/everysync/sync/SyncStatus.kt+- com/vayunmathur/everysync/sync/RelayBlobStore.kt+- com/vayunmathur/everysync/sync/RelayMerge.kt - com/vayunmathur/everysync/sync/VaultKeys.kt - com/vayunmathur/everysync/sync/VaultRoster.kt+- com/vayunmathur/everysync/sync/OwnerTransfer.kt - com/vayunmathur/everysync/sync/adapters/CalendarKind.kt - com/vayunmathur/everysync/sync/adapters/ContactKind.kt - com/vayunmathur/everysync/sync/adapters/NoteKind.kt - com/vayunmathur/everysync/sync/adapters/PasswordKind.kt - com/vayunmathur/everysync/sync/adapters/TodoKind.kt-- com/vayunmathur/everysync/ui/AccountDetailScreen.kt+### data/ + domain/ — sinks and iCal/VCard formats (pure domain, no Android)+- com/vayunmathur/everysync/data/VaultStore.kt — encrypted, keystore migration+- com/vayunmathur/everysync/data/Settings.kt+- com/vayunmathur/everysync/data/RemoteModels.kt+- com/vayunmathur/everysync/data/sink/CalendarSink.kt+- com/vayunmathur/everysync/data/sink/ContactsSink.kt+- com/vayunmathur/everysync/data/sink/NoteSink.kt+- com/vayunmathur/everysync/data/sink/PasswordSink.kt+- com/vayunmathur/everysync/data/sink/TodoSink.kt+- com/vayunmathur/everysync/data/sink/TodoIpcSink.kt+- com/vayunmathur/everysync/domain/format/ICalendar.kt+- com/vayunmathur/everysync/domain/format/VCard.kt+### network/ + platform/ + ui/ — relay transport, ViewModel, screens+- com/vayunmathur/everysync/network/remote/RelaySync.kt+- com/vayunmathur/everysync/network/remote/RelayCursorStore.kt+- com/vayunmathur/everysync/platform/BootReceiver.kt — reschedule on boot/update+- com/vayunmathur/everysync/platform/EverySyncViewModel.kt+- com/vayunmathur/everysync/platform/EverySyncVaults.kt+- com/vayunmathur/everysync/platform/EverySyncUiContract.kt - com/vayunmathur/everysync/ui/AccountsScreen.kt - com/vayunmathur/everysync/ui/AddAccountScreen.kt+- com/vayunmathur/everysync/ui/AccountDetailScreen.kt - com/vayunmathur/everysync/ui/SettingsScreen.kt - com/vayunmathur/everysync/ui/VaultSharingSection.kt @@ -69,5 +88,3 @@ _Install: ./install everysync (dev by default)._ ./gradlew :everysync:lint ./gradlew :everysync:checkMetadata ```--
library/ui/AGENTS.md
diff --git a/library/ui/AGENTS.md b/library/ui/AGENTS.mdindex 62b80a7eef..b5047ddec0 100644--- a/library/ui/AGENTS.md+++ b/library/ui/AGENTS.md@@ -2,135 +2,166 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `library/ui/` + allowed shared modules. Do not root-scan. +<!-- last-reviewed: 2026-10-16 --> - Gradle: :library:ui / dir: library/ui/ - Package roots present: ui-- Entry files: +- Entry files: MaActivity.kt, AppScaffold.kt, Icons.kt (no app MainActivity/Route — this is the shared shell) - Deps: :library, :library:network-- Metadata: metadata_data/library-ui.md (MISSING)+- Metadata: metadata_data/library-ui.md (absent — libraries have none by design) - Rust: no / screenshotTest: no -## Key files+## Overview+**Purpose:** All shared Compose chrome for every app — activity shells, scaffolds, theme, icons, messenger, editors, motion. If it renders in more than one app, it lives here.+**How to use (must-rules, enforced by lint):**+- Activities extend `MaActivity` (or `MaFragmentActivity` for biometric-gated apps) — override `Content()` + `onCreateBeforeContent()`, never repeat the edge-to-edge/theme shell+- Screens use the `AppScaffold` family (never raw `Scaffold`); icons via `IconXxx()` in `Icons.kt` (never `Icon()`/`painterResource()`/`material.icons.*` in apps); messages via `rememberMessenger()`/`AppMessages` (never `Toast`); motion via the `Motion*` helpers (never raw `animation` at call sites)+**Areas:** activity shells (`MaActivity.kt`) · scaffolds (`AppScaffold`, `Detail`/`LazyList`/`TabbedPager`/`Setup`, `ListPage`) · theme + tokens (`DynamicTheme`, `Material*`, `Spacing`, `Modifier`, `Motion*`) · `Icons.kt` · messenger (`Messages.kt`) · editors (Html/Markdown/Odf + controllers) · pickers + dialogs (`dialog/`) · game chrome (`game/`) · ODF/doc export (`odf/`) · panorama · permissions + special-access · adaptive/wide layouts (`AdaptiveGrid`, `DesktopMaxWidth`, `PaneMargins`) · connectivity banner (`util/ConnectivityCompose.kt`).+**Entry points + reading order:** `MaActivity.kt` → `AppScaffold.kt` → `Icons.kt` → `Messages.kt` → `DynamicTheme.kt`, then the area you need.+**Gotchas:**+- One public `@Composable` per file, named as the file; closed package roots still apply inside this library+- Never `imePadding()`/`navigationBarsPadding()`/`systemBarsPadding()` in this library+- `ConnectivityCompose.kt` lives in this module under the `com.vayunmathur.library.util` package (offline banner used by apps' `OfflineAware`)+- `MaFragmentActivity(autoSetContent=false)` + `showContent()` is the biometric-gate pattern (passwords, photos) -- com/vayunmathur/library/ui/AchievementNotification.kt-- com/vayunmathur/library/ui/AdaptiveGrid.kt-- com/vayunmathur/library/ui/AdaptiveWindow.kt-- com/vayunmathur/library/ui/AddToListDialog.kt+## Key files+### Shell + scaffolds — start here+- com/vayunmathur/library/ui/MaActivity.kt — shared activity shell (incl. `MaFragmentActivity`) - com/vayunmathur/library/ui/AppScaffold.kt-- com/vayunmathur/library/ui/BackupButtons.kt-- com/vayunmathur/library/ui/BannerVisibility.kt-- com/vayunmathur/library/ui/CommonSearchBar.kt-- com/vayunmathur/library/ui/CompassCalibrationBanner.kt-- com/vayunmathur/library/ui/CompassCalibrationHint.kt-- com/vayunmathur/library/ui/ConfirmDialog.kt+- com/vayunmathur/library/ui/DetailScaffold.kt+- com/vayunmathur/library/ui/LazyListScaffold.kt+- com/vayunmathur/library/ui/TabbedPagerScaffold.kt+- com/vayunmathur/library/ui/SetupScaffold.kt+- com/vayunmathur/library/ui/ListPage.kt+### Theme + tokens+- com/vayunmathur/library/ui/DynamicTheme.kt+- com/vayunmathur/library/ui/Icons.kt — ONLY place allowed `Icon()`/`painterResource()`+- com/vayunmathur/library/ui/Messages.kt — messenger + `AppMessages`+- com/vayunmathur/library/ui/MaterialAliases.kt+- com/vayunmathur/library/ui/MaterialComponents.kt+- com/vayunmathur/library/ui/MaterialComponentsExtra.kt+- com/vayunmathur/library/ui/MaterialFunctions.kt+- com/vayunmathur/library/ui/Motion.kt — motion helpers (use these, not raw animation)+- com/vayunmathur/library/ui/MotionValues.kt+- com/vayunmathur/library/ui/Spacing.kt+- com/vayunmathur/library/ui/Modifier.kt - com/vayunmathur/library/ui/ContentColorOn.kt-- com/vayunmathur/library/ui/DailyReminderSettingsSection.kt-- com/vayunmathur/library/ui/DashboardSection.kt+- com/vayunmathur/library/ui/VerticalShape.kt - com/vayunmathur/library/ui/DateString.kt+- com/vayunmathur/library/ui/RememberClock.kt+### Adaptive + wide layouts+- com/vayunmathur/library/ui/AdaptiveGrid.kt+- com/vayunmathur/library/ui/AdaptiveWindow.kt - com/vayunmathur/library/ui/DesktopMaxWidth.kt-- com/vayunmathur/library/ui/DetailScaffold.kt-- com/vayunmathur/library/ui/DynamicTheme.kt-- com/vayunmathur/library/ui/EditorFormatter.kt-- com/vayunmathur/library/ui/EditorLink.kt+- com/vayunmathur/library/ui/PaneMargins.kt+- com/vayunmathur/library/ui/SwappedContent.kt+- com/vayunmathur/library/ui/SwappedTopBar.kt+- com/vayunmathur/library/ui/TopAppBarOverlay.kt+- com/vayunmathur/library/ui/SafeListItemLayout.kt+### Common screens + state+- com/vayunmathur/library/ui/StateScreens.kt+- com/vayunmathur/library/ui/NoPermissionsScreen.kt+- com/vayunmathur/library/ui/DashboardSection.kt+- com/vayunmathur/library/ui/GameCenterScreen.kt+- com/vayunmathur/library/ui/AchievementNotification.kt+- com/vayunmathur/library/ui/HistoryScrubber.kt+- com/vayunmathur/library/ui/SelectionMode.kt+- com/vayunmathur/library/ui/SwipeActionsBox.kt+- com/vayunmathur/library/ui/CommonSearchBar.kt+- com/vayunmathur/library/ui/OverflowMenu.kt+- com/vayunmathur/library/ui/ConfirmDialog.kt+- com/vayunmathur/library/ui/AddToListDialog.kt+- com/vayunmathur/library/ui/BannerVisibility.kt - com/vayunmathur/library/ui/ExpandVisibility.kt-- com/vayunmathur/library/ui/ExternalIntents.kt - com/vayunmathur/library/ui/FadeVisibility.kt-- com/vayunmathur/library/ui/FormComponents.kt-- com/vayunmathur/library/ui/FormSection.kt+- com/vayunmathur/library/ui/PopVisibility.kt - com/vayunmathur/library/ui/FreeHeightBottomSheet.kt - com/vayunmathur/library/ui/FreeHeightSheetState.kt-- com/vayunmathur/library/ui/GameCenterScreen.kt-- com/vayunmathur/library/ui/Haptics.kt-- com/vayunmathur/library/ui/HistoryScrubber.kt+### Forms + settings+- com/vayunmathur/library/ui/FormComponents.kt+- com/vayunmathur/library/ui/FormSection.kt+- com/vayunmathur/library/ui/SettingsComponents.kt+- com/vayunmathur/library/ui/DailyReminderSettingsSection.kt+- com/vayunmathur/library/ui/MultiCategoryPicker.kt+- com/vayunmathur/library/ui/RingtonePicker.kt+- com/vayunmathur/library/ui/BackupButtons.kt — shared backup destination picker buttons+- com/vayunmathur/library/ui/ShareVaultDialog.kt — everysync vault share dialog+### Reorderable grids+- com/vayunmathur/library/ui/ReorderableGrid.kt+- com/vayunmathur/library/ui/ReorderableGridGestures.kt+- com/vayunmathur/library/ui/ReorderableUtil.kt+### Permissions + system access+- com/vayunmathur/library/ui/AppPermissionsGate.kt+- com/vayunmathur/library/ui/PermissionRequest.kt+- com/vayunmathur/library/ui/PermissionRequirement.kt+- com/vayunmathur/library/ui/SpecialAccess.kt+- com/vayunmathur/library/ui/ExternalIntents.kt+- com/vayunmathur/library/ui/AppPullToRefreshBox.kt+### Maps + sensors+- com/vayunmathur/library/ui/MapsPoiVectors.kt+- com/vayunmathur/library/ui/MapUnavailableMessage.kt+- com/vayunmathur/library/ui/CompassCalibrationBanner.kt+- com/vayunmathur/library/ui/CompassCalibrationHint.kt+### Panorama+- com/vayunmathur/library/ui/PanoramaCameraState.kt+- com/vayunmathur/library/ui/PanoramaCrop.kt+- com/vayunmathur/library/ui/PanoramaSphere.kt+- com/vayunmathur/library/ui/PanoramaSphereView.kt+### Editors — Html - com/vayunmathur/library/ui/HtmlEditor.kt - com/vayunmathur/library/ui/HtmlEditorController.kt - com/vayunmathur/library/ui/HtmlEditorControllerCore.kt - com/vayunmathur/library/ui/HtmlEditorSpans.kt - com/vayunmathur/library/ui/HtmlSerialize.kt - com/vayunmathur/library/ui/HtmlText.kt-- com/vayunmathur/library/ui/Icons.kt-- com/vayunmathur/library/ui/LazyListScaffold.kt-- com/vayunmathur/library/ui/ListPage.kt-- com/vayunmathur/library/ui/MapsPoiVectors.kt-- com/vayunmathur/library/ui/MapUnavailableMessage.kt-- com/vayunmathur/library/ui/MarkdownEditOps.kt+- com/vayunmathur/library/ui/RichEmailSpans.kt+- com/vayunmathur/library/ui/EditorFormatter.kt+- com/vayunmathur/library/ui/EditorLink.kt+### Editors — Markdown - com/vayunmathur/library/ui/MarkdownEditor.kt+- com/vayunmathur/library/ui/MarkdownEditOps.kt - com/vayunmathur/library/ui/MarkdownToHtml.kt-- com/vayunmathur/library/ui/MaterialAliases.kt-- com/vayunmathur/library/ui/MaterialComponents.kt-- com/vayunmathur/library/ui/MaterialComponentsExtra.kt-- com/vayunmathur/library/ui/MaterialFunctions.kt-- com/vayunmathur/library/ui/Messages.kt-- com/vayunmathur/library/ui/Modifier.kt-- com/vayunmathur/library/ui/Motion.kt-- com/vayunmathur/library/ui/MotionValues.kt-- com/vayunmathur/library/ui/MultiCategoryPicker.kt-- com/vayunmathur/library/ui/NoPermissionsScreen.kt - com/vayunmathur/library/ui/OdfMarkdownEditor.kt-- com/vayunmathur/library/ui/OverflowMenu.kt-- com/vayunmathur/library/ui/PaneMargins.kt-- com/vayunmathur/library/ui/PanoramaCameraState.kt-- com/vayunmathur/library/ui/PanoramaCrop.kt-- com/vayunmathur/library/ui/PanoramaSphere.kt-- com/vayunmathur/library/ui/PanoramaSphereView.kt-- com/vayunmathur/library/ui/PermissionRequest.kt-- com/vayunmathur/library/ui/PopVisibility.kt-- com/vayunmathur/library/ui/RememberClock.kt-- com/vayunmathur/library/ui/ReorderableGrid.kt-- com/vayunmathur/library/ui/ReorderableGridGestures.kt-- com/vayunmathur/library/ui/ReorderableUtil.kt-- com/vayunmathur/library/ui/RichEmailSpans.kt-- com/vayunmathur/library/ui/RingtonePicker.kt-- com/vayunmathur/library/ui/SafeListItemLayout.kt-- com/vayunmathur/library/ui/SelectionMode.kt-- com/vayunmathur/library/ui/SettingsComponents.kt-- com/vayunmathur/library/ui/SetupScaffold.kt-- com/vayunmathur/library/ui/Spacing.kt-- com/vayunmathur/library/ui/SpecialAccess.kt-- com/vayunmathur/library/ui/StateScreens.kt-- com/vayunmathur/library/ui/SwappedContent.kt-- com/vayunmathur/library/ui/SwappedTopBar.kt-- com/vayunmathur/library/ui/SwipeActionsBox.kt-- com/vayunmathur/library/ui/TabbedPagerScaffold.kt-- com/vayunmathur/library/ui/TopAppBarOverlay.kt-- com/vayunmathur/library/ui/VerticalShape.kt+### dialog/ — date/time pickers - com/vayunmathur/library/ui/dialog/DatePickerDialog.kt - com/vayunmathur/library/ui/dialog/TimePickerDialog.kt-- com/vayunmathur/library/ui/game/DailyChallengeCard.kt-- com/vayunmathur/library/ui/game/DailyStreakText.kt-- com/vayunmathur/library/ui/game/FormatDuration.kt-- com/vayunmathur/library/ui/game/GameInfoBox.kt-- com/vayunmathur/library/ui/game/GameInfoBoxes.kt+### game/ — shared game chrome - com/vayunmathur/library/ui/game/GameModeChooser.kt - com/vayunmathur/library/ui/game/GameResultOverlay.kt - com/vayunmathur/library/ui/game/GameTopBarActions.kt+- com/vayunmathur/library/ui/game/GameInfoBox.kt+- com/vayunmathur/library/ui/game/GameInfoBoxes.kt+- com/vayunmathur/library/ui/game/DailyChallengeCard.kt+- com/vayunmathur/library/ui/game/DailyStreakText.kt - com/vayunmathur/library/ui/game/HeartsRow.kt-- com/vayunmathur/library/ui/odf/EpubExporter.kt-- com/vayunmathur/library/ui/odf/HtmlOdfConverter.kt-- com/vayunmathur/library/ui/odf/HtmlOdfExport.kt-- com/vayunmathur/library/ui/odf/LatexExporter.kt-- com/vayunmathur/library/ui/odf/MarkdownOdfConverter.kt-- com/vayunmathur/library/ui/odf/OdfDocTransform.kt+- com/vayunmathur/library/ui/game/FormatDuration.kt+### odf/ — document model + exporters - com/vayunmathur/library/ui/odf/OdfDocument.kt-- com/vayunmathur/library/ui/odf/OdfListPrefixes.kt-- com/vayunmathur/library/ui/odf/OdfMetadata.kt-- com/vayunmathur/library/ui/odf/OdfParagraphOps.kt-- com/vayunmathur/library/ui/odf/OdfRunEdits.kt-- com/vayunmathur/library/ui/odf/OdfSerializer.kt-- com/vayunmathur/library/ui/odf/OdfSlides.kt-- com/vayunmathur/library/ui/odf/OdfTables.kt - com/vayunmathur/library/ui/odf/OdfText.kt - com/vayunmathur/library/ui/odf/OdfTextEditorState.kt - com/vayunmathur/library/ui/odf/OdfTextEditorView.kt - com/vayunmathur/library/ui/odf/OdfTextHelpers.kt+- com/vayunmathur/library/ui/odf/OdfParagraphOps.kt+- com/vayunmathur/library/ui/odf/OdfRunEdits.kt+- com/vayunmathur/library/ui/odf/OdfDocTransform.kt+- com/vayunmathur/library/ui/odf/OdfListPrefixes.kt+- com/vayunmathur/library/ui/odf/OdfMetadata.kt+- com/vayunmathur/library/ui/odf/OdfTables.kt+- com/vayunmathur/library/ui/odf/OdfSlides.kt+- com/vayunmathur/library/ui/odf/OdfSerializer.kt+- com/vayunmathur/library/ui/odf/HtmlOdfConverter.kt+- com/vayunmathur/library/ui/odf/HtmlOdfExport.kt+- com/vayunmathur/library/ui/odf/MarkdownOdfConverter.kt+- com/vayunmathur/library/ui/odf/RtfOdfConverter.kt+- com/vayunmathur/library/ui/odf/EpubExporter.kt - com/vayunmathur/library/ui/odf/OoxmlExporter.kt - com/vayunmathur/library/ui/odf/PdfExporter.kt-- com/vayunmathur/library/ui/odf/RtfOdfConverter.kt-- com/vayunmathur/library/util/ConnectivityCompose.kt+- com/vayunmathur/library/ui/odf/LatexExporter.kt+### Connectivity+- com/vayunmathur/library/util/ConnectivityCompose.kt — offline banner (`OfflineAware`); `util` package but owned by this module+- com/vayunmathur/library/ui/Haptics.kt ## Verify (this module only) ``` ./gradlew :library:ui:compileDevKotlin ./gradlew :library:ui:lint ```--
notes/AGENTS.md
diff --git a/notes/AGENTS.md b/notes/AGENTS.mdindex 2e6c8fd882..d6583c2bc3 100644--- a/notes/AGENTS.md+++ b/notes/AGENTS.md@@ -3,7 +3,7 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `notes/` + allowed shared modules. Do not root-scan. _Install: ./install notes (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :notes / dir: notes/ - Package roots present: ui, data, platform, intents - Entry files: MainActivity.kt, Route.kt, Navigation.kt@@ -11,29 +11,46 @@ _Install: ./install notes (dev by default)._ - Metadata: metadata_data/notes.md (present) - Rust: no / screenshotTest: yes -## Key files+## Overview+**Purpose:** Offline markdown+ note-taking app (100% offline). Close-second reference impl after `backup/`, and the canonical `intents/` IPC demo.+**Key features:**+- Block-based editor (`Note`/`NoteBlock`) with stylus ink (`:library:ink`) and images (`:library:image`, content-addressed `sha256.jpg`)+- `.md` import/export — opens files shared from other apps, desktop file-drop, shares notes back out+- OpenAssistant read/add via `intents/`; local backup/restore via `AppBackupAgent`+**Architecture / data-flow:** `ui/` Compose list/detail → `platform/NotesViewModel` (+ `NotesUiContract`) → `data/NotesRepository` singleton over Room (`Note`/`NoteBlock`/`NoteDatabase`). `MainActivity.onCreateBeforeContent`: repo init → one-time legacy-notes clear + image `img_<uuid>.jpg → sha256.jpg` migration with block-reference rewrite → `ready` gate before `Navigation`.+**Entry points + reading order:** `Route` (`NotesList` / `Note(id)` / `ExternalNote(uri)`) → `MainActivity.kt` → `Navigation.kt` → `platform/NotesViewModel.kt` → `data/NotesRepository.kt`.+**Gotchas:**+- Migrations must finish before `ready = true` — image references break if skipped+- External/shared URIs enter via the `ExternalNote` route, not the list+- `intents/` DTOs are the copy-pattern for cross-app IPC; keep them thin +## Key files+### Root — entry + navigation - com/vayunmathur/notes/MainActivity.kt - com/vayunmathur/notes/Navigation.kt - com/vayunmathur/notes/Route.kt+### data/ — Room entities + repository - com/vayunmathur/notes/data/Note.kt - com/vayunmathur/notes/data/NoteBlock.kt - com/vayunmathur/notes/data/NoteDatabase.kt - com/vayunmathur/notes/data/NotesRepository.kt-- com/vayunmathur/notes/intents/GetIntent.kt-- com/vayunmathur/notes/intents/InsertIntent.kt-- com/vayunmathur/notes/platform/AppBackupAgent.kt-- com/vayunmathur/notes/platform/NoteImageStore.kt-- com/vayunmathur/notes/platform/NoteMarkdownExporter.kt-- com/vayunmathur/notes/platform/NotesUiContract.kt+### platform/ — ViewModel, contract, stores, export - com/vayunmathur/notes/platform/NotesViewModel.kt-- com/vayunmathur/notes/ui/ExternalNoteScreen.kt-- com/vayunmathur/notes/ui/InkEditorPage.kt-- com/vayunmathur/notes/ui/NotePage.kt-- com/vayunmathur/notes/ui/NoteScreen.kt-- com/vayunmathur/notes/ui/NotesListPage.kt+- com/vayunmathur/notes/platform/NotesUiContract.kt+- com/vayunmathur/notes/platform/NoteImageStore.kt — content-addressed image copy + migration+- com/vayunmathur/notes/platform/NoteMarkdownExporter.kt+- com/vayunmathur/notes/platform/AppBackupAgent.kt+### ui/ — list/detail/ink/external screens - com/vayunmathur/notes/ui/NotesListScreen.kt+- com/vayunmathur/notes/ui/NotesListPage.kt+- com/vayunmathur/notes/ui/NoteScreen.kt+- com/vayunmathur/notes/ui/NotePage.kt+- com/vayunmathur/notes/ui/InkEditorPage.kt+- com/vayunmathur/notes/ui/ExternalNoteScreen.kt - com/vayunmathur/notes/ui/components/NoteEditorComponents.kt+### intents/ — assistant IPC demo (copy this pattern)+- com/vayunmathur/notes/intents/GetIntent.kt+- com/vayunmathur/notes/intents/InsertIntent.kt ## Verify (this module only) ```@@ -41,5 +58,3 @@ _Install: ./install notes (dev by default)._ ./gradlew :notes:lint ./gradlew :notes:checkMetadata ```--