AGENTS.md — education/ (':education')
Scoped supplement. Global rules in root AGENTS.md apply. Stay inside education/ + allowed shared modules. Do not root-scan.
Install: ./install education (dev by default).
- Gradle: :education / dir: education/
- Package roots present: ui, data, intents
- Entry files: MainActivity.kt + Route.kt + Navigation.kt (catalog → course/unit/lesson/quiz flow; dialogs are routes)
- Deps: :library:room, :youpipe:extractor, :library:network
- Metadata: metadata_data/education.md (present)
- Rust: no / screenshotTest: yes
Overview
Purpose: Kids' learning app — age-banded K2 + explorer curriculum (lessons, quizzes, tracing, drag-match) with badges/streaks, parent gate, offline progress; video lessons stream via :youpipe:extractor. Key features: Bundled curriculum (content/ model + validator) → course/unit/lesson/quiz pages; learner progress + deadlines in Room; video player pages stream Khan/YouTube; narrator + downloader helpers. Entry points: MainActivity.kt → Navigation.kt (Route entries, incl. DeadlineDatePickerDialog as a DialogPage()) → ui/HomePage.kt → platform/EducationViewModel.kt → data/EducationRepository.kt. Screens push dialog routes instead of holding pending-target state (ParentPage pushes Route.DeadlineDatePickerDialog(unitId)); each page has a stateless …Content/…ScreenContent slice that src/screenshotTest MetadataPreviews captures per route (<n>-<route-kebab>), except VideoPlayer (streaming ExoPlayer surface, exempted in Route.kt). Gotchas:
content/andutil/are NOT closed package roots — don't add more files there- Curriculum content is validated (
ContentValidator) — content edits must pass validation, not just compile - Video is the only network use — everything else must work fully offline (classroom mode)
Key files
Root — app init + entry
- com/vayunmathur/education/MainActivity.kt
- com/vayunmathur/education/Route.kt — sealed
Routedestinations + screenshot exemption forVideoPlayer - com/vayunmathur/education/Navigation.kt —
MainNavigationentries for every route
content/ — curriculum model
- com/vayunmathur/education/content/ContentModel.kt
- com/vayunmathur/education/content/ContentRepository.kt
- com/vayunmathur/education/content/ContentValidator.kt
- com/vayunmathur/education/content/Question.kt
platform/ — backup
- com/vayunmathur/education/platform/AppBackupAgent.kt — key/value BackupAgent (
android:backupAgent): exportseducation-dbto plaintext viaSqlCipherDbCodec(educationDbConfigs) and shipsdatastore_default(badge unlocks); raw DB +secure_prefs.xmlstay excluded indata_extraction_rules.xml(device-transfer / fallback control)
data/ — learner progress (Room)
- com/vayunmathur/education/data/EducationDatabase.kt —
DB_NAME+educationDbConfigs()backup config - com/vayunmathur/education/data/EducationRepository.kt
- com/vayunmathur/education/data/Learner.kt
- com/vayunmathur/education/data/SkillProgress.kt
- com/vayunmathur/education/data/Deadline.kt
intents/ — assistant IPC
- com/vayunmathur/education/intents/GetProgressIntent.kt — OpenAssistant
education_get_progress(aggregates only) - com/vayunmathur/education/intents/EducationProgressSummary.kt — validated summary builder: per-course/subject skill counts, ≤5 upcoming deadlines (titles ≤120 chars), no lesson/question content or deadline notes
util/ — ViewModel + helpers
- com/vayunmathur/education/util/EducationViewModel.kt
- com/vayunmathur/education/util/EducationUiContract.kt
- com/vayunmathur/education/util/EducationDownloader.kt
- com/vayunmathur/education/util/EducationAchievements.kt
- com/vayunmathur/education/util/Narrator.kt
- com/vayunmathur/education/util/VideoExtractor.kt
ui/ — shell, courses, K2, quizzes, video, parents
- com/vayunmathur/education/ui/Shell.kt
- com/vayunmathur/education/ui/HomePage.kt
- com/vayunmathur/education/ui/CoursePage.kt
- com/vayunmathur/education/ui/UnitPage.kt
- com/vayunmathur/education/ui/LessonPage.kt
- com/vayunmathur/education/ui/QuizPage.kt
- com/vayunmathur/education/ui/QuizQuestionInputs.kt
- com/vayunmathur/education/ui/ResultsPage.kt
- com/vayunmathur/education/ui/ExplorerHomePage.kt
- com/vayunmathur/education/ui/ExplorerCoursePage.kt
- com/vayunmathur/education/ui/K2HomePage.kt
- com/vayunmathur/education/ui/K2LessonPage.kt
- com/vayunmathur/education/ui/K2QuizPage.kt
- com/vayunmathur/education/ui/K2RewardPage.kt
- com/vayunmathur/education/ui/K2DragMatch.kt
- com/vayunmathur/education/ui/TracingCanvas.kt
- com/vayunmathur/education/ui/VideoPlayerPage.kt
- com/vayunmathur/education/ui/BadgesPage.kt
- com/vayunmathur/education/ui/ParentPage.kt
- com/vayunmathur/education/ui/ParentGatePage.kt
- com/vayunmathur/education/ui/Common.kt
- com/vayunmathur/education/ui/dialogs/DeadlineDatePickerDialog.kt — deadline picker dialog route content
Verify (this module only)
./gradlew :education:compileDevKotlin
./gradlew :education:lint
./gradlew :education:checkMetadata