| # 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 | |