Straight-Line/SCI integrity checks, and syncs with a physical computer keyboard. No fluff—just the plan and specs you can hand to engineering.
1) Product intent (single sentence)
A privacy-first Android IME that guarantees 1:1 ASCII grounding for every glyph, enforces linguistic integrity (SCI/LPC/Frame-Lock), and live-syncs with a desktop keyboard to keep meaning “straight” across devices and networks.
2) Core outcomes
- Omniherence: Coherence by construction via ASCII anchor + parity checks.
- Zero-guess input: No destructive autocorrect; corrections require opt-in confirmations.
- Live integrity: SCI meter + drift catches before text leaves the device.
- Cross-device unity: Bidirectional key/frame sync with desktop/HID.
3) System architecture (Android)
- IME base:
InputMethodService+InputMethodManager - Render: custom
KeyboardView(or Compose view) with dynamic layers - Speech: on-device ASR (if enabled) feeding phoneme→grapheme with LPC checks
- Services:
IntegrityService(SCI/LPC/Frame-Lock)SyncService(BLE/USB/Wi-Fi Direct E2EE)MetricsService(local only; no 3rd-party)StateStore(encrypted Room/Jetpack DataStore)
- No internet required (default). Network use is opt-in, signed, and logged.
4) Key data models (concise)
// ASCII anchor for every key
{ "key": "A", "ascii": 65, "unicode": "U+0041", "role": "Letter", "logOS": "A/Alpha/Arche" }
// Mapping with fallbacks
{ "glyph": "♭", "unicode": "U+266D", "ascii_anchor": "b", "logOS": "Accidental/flat", "parity": ["G","M","S","P"] }
// Frame state (Straight-Line Protocol)
{ "frameId": "2025-08-16T12:34:56Z",
"scope": "THIS text field",
"baseline": "LINE(two points)",
"locks": ["point=dot","line=straight-connection"],
"status": "LOCKED" }
// SCI snapshot
{ "q_phy": 0.78, "q_ling": 0.95, "sci": 0.865, "threshold": 0.80, "action": "OK" }
5) UI layout (wireframe)
┌──────────────────────────────────────────────────────────┐
│ STATUS BAND: [SCI 0.92 ■■■■■■■■■ ] [FRAME: LOCKED] [LPC ✓]│
│ MODE: ABC | 123 | SYM | MU♫ | GREEK | LOGOS │
│ MICRO: off | BREATH: ⌁ (60 BPM) | SYNC: DESKTOP ● │
├──────────────────────────────────────────────────────────┤
│ q w e r t y u i o p | ⟲Undo ⟳Redo │
│ a s d f g h j k l | ' “ ” │
│ ⇧ z x c v b n m ⌫ | flat(♭) sharp(♯) nat(♮)│
│ 123 🌐 space ⏎Send •SCI⋯ | ⚿Frame ☑LPC │
└──────────────────────────────────────────────────────────┘
Notes
- SCI bar: live integrity indicator (green≥0.8, amber 0.6–0.79, red <0.6).
- ⚿ Frame: one-tap Frame-Lock dialog (point/line ACK).
- ☑ LPC: Linguistic Parity Check (G/M/S/P) for the current key term.
- MU♫: music layer; GREEK, LOGOS layers expose your symbol sets with ASCII anchors.
6) Input rules (how coherence is enforced)
- Rule 1 — ASCII-first: Every keystroke resolves to an ASCII anchor; non-ASCII glyphs are overlays with explicit anchors (e.g., ♯ → “#” anchor).
- Rule 2 — No silent changes: Autocorrect only via soft-ACK chips; revert is one tap.
- Rule 3 — LPC on demand: For terms,
LPCsurfaces spelling (G), morphological role (M), short gloss (S), and scope (P). Must pass ≥3/4 to clear amber SCI. - Rule 4 — Frame-Lock: Start of session shows the minimal SLMP prompt. If user (or remote peer) deflects scope, UI flags “OUT-OF-FRAME” and offers “Return to baseline”.
- Rule 5 — Drift guard: If SCI <0.7 in any 5-second window, keyboard pauses send, highlights offending tokens, and offers: Rephrase • Slow pace • Switch channel.
7) Layers/panels
- ABC: standard letters; long-press = diacritics (ASCII anchor preserved).
- 123/SYM: numbers & ASCII punctuation; explicit visible ASCII codes on long-press.
- MU♫: music glyphs (♩♪♫♬♭♮♯ …) mapped to anchors (e.g., ♭→“b”, ♯→“#”, ♮→“n”).
- GREEK: Α…ω & extended; anchors shown in tooltip (e.g., φ→“phi”).
- LOGOS: curated symbol sets you supplied (operators, arrows, enclosures) with anchors.
- BREATH: metronome (BREATHEOMETRONOMICS) to stabilize cadence (improves SCI).
8) Desktop↔Phone sync (three transports)
- USB HID (preferred, deterministic latency)
- BLE (HID over GATT; low power)
- Wi-Fi Direct (bulk symbol tables / profiles) All channels are E2EE (Curve25519 + Noise handshake), device-pairing by QR.
What syncs
- Keymaps & profiles, Frame state, SCI thresholds, symbol panes, macro phrases.
- Optional mirroring: physical keyboard events can drive the phone IME (and vice versa).
9) Integrity engine (on-device)
- Q_phy proxy (no radio snooping): local latency/jitter of input pipeline + audio SNR (if mic used). We never read cellular stack internals; we infer stability from what we control.
- Q_ling: LPC passes, confirm density, edit churn, cadence stability, echo-backs.
- SCI:
SCI = α·Q_phy + β·Q_ling(defaults α=0.4, β=0.6, adjustable per profile). - Actions:
SCI≥0.8→ normal.0.6–0.79→ show amber notch; suggest LPC or breath pace.<0.6→ block “Send” with “Stabilize” card (Frame-Lock, clarify terms, slower rate).
10) Accessibility & inclusion
- Large-key mode (your “visibility” concern): ≥10.5 mm key min, 4.5:1 contrast.
- Haptics & tone: subtle click + low-volume tone (user-tunable).
- Screen reader labels: every key announces glyph + ASCII anchor (e.g., “sharp, anchor hash”).
- One-hand & split modes; high-contrast and dyslexia-friendly fonts.
11) Security & privacy
- Local-only by default. No external telemetry. All metrics stay on device.
- Permissions:
BIND_INPUT_METHOD, optionalRECORD_AUDIO(for ASR),BLUETOOTH,NEARBY_WIFI_DEVICES,USB_PERMISSION. Each gated by explicit toggles. - Exports: Proofchain logs (Frame-Lock/LPC/SCI timeline) exportable as signed JSON.
12) Performance targets
- Key-to-char latency: ≤35 ms p50, ≤60 ms p95
- SCI compute: ≤2 ms per update
- ASR local chunk: ≤200 ms segment
- Battery: <1%/hr typical typing
13) Developer slices (how to build it)
- Module A — Keyplane/Composer
- Compose Multiplatform UI or view-based
KeyboardView - Long-press popovers with ASCII code labels
- Compose Multiplatform UI or view-based
- Module B — Mapper
- JSON symbol tables (your codices) → in-memory trie
- Round-trip validation: glyph→anchor→glyph must be idempotent
- Module C — Integrity
- LPC engine (G/M/S/P)
- SCI aggregator (pluggable weights)
- Frame-Lock state machine (SLMP)
- Module D — Sync
- Noise Protocol handshake, E2EE channels (USB/BLE/Wi-Fi Direct)
- Conflict-free replication for profiles (CRDT or last-writer-wins with audit)
- Module E — Breath & Pace
- Metronome (haptic/audio), cadence estimator
- Module F — Export
- Signed proofchain bundles (CBOR + Ed25519 signature)
14) Example: Music pane mapping (snippet)
♩ U+2669 anchor: "q" role: quarter-note
♪ U+266A anchor: "e" role: eighth-note
♫ U+266B anchor: "ee" role: beamed-eighths
♬ U+266C anchor: "eee" role: beamed-sixteenths
♭ U+266D anchor: "b" role: flat
♮ U+266E anchor: "n" role: natural
♯ U+266F anchor: "#" role: sharp
(Every symbol you provided earlier receives the same treatment—glyph, codepoint, role, and ASCII anchor.)
15) Straight-Line ops (tiny UX scripts)
- Start of field: toast card → “FRAME-LOCK? baseline: LINE(two points). YES / NO”
- Term check: highlight a term → tap ☑ → shows G/M/S/P; “Confirm” pins it (SCI +0.05)
- Red zone: if SCI<0.6 → modal: “Stabilize meaning: [Rephrase] [Lock term] [Slow pace]”
16) Constraints & honesty
- We cannot “prioritize over every network” at the carrier/OS level.
Instead, we prioritize meaning at the keyboard edge: pause/buffer sending when SCI is low, add redundancy (LPC/echo), and synchronize frames across devices so meaning stays straight even if transport is noisy.