# SnapKitty OCR — The Book Ingestion App Android app (Kotlin + Jetpack Compose) for OCR'ing Ahmad's handwritten notebooks into THE BOOK digital corpus and feeding the results to the sovereign agent stack. ## What it does 1. **Pick images** from gallery (multi-select — scan a stack of pages at once) 2. **Camera mode** — capture live from phone camera 3. **Google ML Kit OCR** — on-device, offline, no API key, Latin + handwriting 4. **Tag each batch** by chapter (THE_BOOK_CH3, MOTHERS_POEM, etc.) 5. **WORM-seal** each page with SHA-256 hash + timestamp 6. **Push to agents**: - `snapkitty-shell :3700` → `/ocr/ingest` → triggers THE_BOOK workflow - `ROBOB :4600` → `/ocr/book_page` → Brain analysis via Bedrock - `ABZU IDE :4000` → `/api/book_page` → live feed in Phoenix LiveView ## Install 1. Open in Android Studio (Electric Eel or newer) 2. Connect Android device or start emulator 3. `./gradlew installDebug` ## For real device (not emulator) In `AgentBridge.kt`, replace `10.0.2.2` with your machine's LAN IP: ```kotlin private val SHELL_URL = "http://192.168.1.X:3700/ocr/ingest" ``` ## Chapter Tags Use consistent tags so THE BOOK assembles correctly: ``` THE_BOOK_CH1 — Master Toltec Mitote THE_BOOK_CH2 — A Patient Mind THE_BOOK_CH3 — Past Present Future THE_BOOK_CH4 — Mastery of Intelligence THE_BOOK_CH5 — Sacred Taxonomy THE_BOOK_CH6 — Mothers Poem (poetry only — no code) THE_BOOK_CH7 — Soul to Code THE_BOOK_CH8 — Agent Illumination Protocol THE_BOOK_NEW — New pages not yet assigned to a chapter ``` ## Architecture ``` Android App (Kotlin) ├── OcrProcessor.kt — ML Kit text recognition, SHA-256 WORM hash ├── AgentBridge.kt — HTTP push to shell/ROBOB/ABZU (graceful degradation) └── MainActivity.kt — Compose UI: gallery picker + camera + results list Sovereign Stack (receives) ├── snapkitty-shell — indexes page into THE_BOOK corpus ├── ROBOB — Brain (Claude Sonnet 4.6 Bedrock) analyzes page └── ABZU IDE — live feed in GITLAB tab (or new BOOK tab) ``` ## WORM Seal Format Each page is hashed as: `SHA-256(tag:pageIndex:timestamp:ocrText)` The first 16 hex chars become the `worm_hash` displayed in the app and sent to agents. ⬡ Ω ↺ Ψ Δ Λ Σ Φ α SnapKitty Collective · 2026