Android IME ↔ ASCII↔Unicode↔LogOS

(ADIP-grade)

1) Modules (APK)

  • ime-ui (Compose): keyboard grid, status band, mode tabs, long-press popovers.
  • mapper-core: trie keymap, ASCII anchors, Unicode glyphs, LogOS roles, fallbacks.
  • integrity-engine: SCI loop (α·Q_phy + β·Q_ling), LPC checks, Frame-Lock FSM.
  • sync-crdt: CRDT (RGA for text previews, LWW for maps/locks), USB/BLE/Wi-Fi Direct.
  • sec-crypto: Noise XX, Curve25519, ChaCha20-Poly1305; signed exports.
  • registry: Universal Alphabet + Music/Math/Bio lanes (seed JSON).

2) Data primitives

2.1 KeyMap entry

{
  "glyph": "♯",
  "unicode": "U+266F",
  "ascii_anchor": "#",
  "logOS": "accidental.sharp",
  "lanes": ["music.symbol","text.latin"],
  "parity": ["G","M","S","P"],          // LPC-ready
  "longpress": ["#","♯","𝄪"]
}

2.2 Frame state (SLMP)

{
  "frame_id":"fr_2025-08-16T12:34:56Z",
  "scope":"THIS text field",
  "baseline":"LINE(two points)",
  "locks":["point=dot","line=straight-connection"],
  "status":"LOCKED"
}

2.3 SCI snapshot

{
  "q_phy":0.78,        // latency/jitter proxy normalized 0–1
  "q_ling":0.95,       // LPC passes, edit churn, echo accuracy
  "alpha":0.4,"beta":0.6,
  "sci":0.865,
  "thresholds":{"ok":0.80,"amber":0.60}
}

3) SCI engine (deterministic loop)

Inputs

  • Q_phy: rolling EWMA of input latency, key jitter, OS thread stalls.
  • Q_ling: LPC 4-parity score (G/M/S/P), edit churn (undos/rewrites), echo-match ratio.

State machine

IDLE → LOCKING → LOCKED → (AMBER|RED) → LOCKED

Actions

  • SCI ≥ 0.80 → pass, green.
  • 0.60 ≤ SCI < 0.80 → amber: prompt “LPC” chip + “Slow pace” chip (+0.05 q_ling on confirm).
  • SCI < 0.60 → red: block send; enforce Frame-Lock dialog.

Pseudo:

val sci = alpha*qPhy + beta*qLing
when {
  sci >= OK -> ui.green()
  sci >= AMBER -> ui.amber().suggest(LPC, SlowPace)
  else -> ui.red().blockSend().require(FrameLock)
}

4) LPC (Linguistic Parity Check)

  • G (Grapheme): user spells term (e.g., L-I-N-E).
  • M (Morph role): select from small menu (“noun: straight connection”).
  • S (Short gloss): confirm 3–7 word gloss.
  • P (Scope): “in THIS frame”. Pass ≥3/4 to proceed; 4/4 boosts q_ling by +0.05.

5) Keyboard UI (text wireframe)

[Status]  SCI 0.92 ●  Frame: LOCKED  LPC ☑  Sync: Desktop ✓  Breath: 60 BPM ▶
[Modes]   ABC | 123 | SYM | MU♫ | GREEK | LOGOS | BREATH
[Rows]    q w e r t y u i o p
          a s d f g h j k l ;
          z x c v b n m , . /
[Bar]     [SPACE] [ENTER] [UNDO] [REDO] [SCI]
(Long-press popover on key)  "♯  U+266F  anchor #  role: sharp"

Accessibility: large-key toggle, haptics, TTS announces “♯, anchor sharp, ASCII #”.


6) Mode panes (seed maps)

6.1 Music (MU♫)

♩ U+2669  anchor:q  role:note.quarter
♪ U+266A  anchor:e  role:note.eighth
♫ U+266B  anchor:ee role:beamed.eighths
♬ U+266C  anchor:eee role:beamed.sixteenths
♭ U+266D  anchor:b  role:accidental.flat
♮ U+266E  anchor:n  role:accidental.natural
♯ U+266F  anchor:#  role:accidental.sharp

6.2 Greek

α U+03B1 anchor:a  logOS:alpha
φ U+03C6 anchor:phi logOS:phi
Ω U+03A9 anchor:Ohm logOS:omega

6.3 LogOS (operators/arrows)

→ U+2192 anchor:-> role:map.to
↔ U+2194 anchor:<-> role:map.bi
∞ U+221E anchor:oo role:infinity

6.4 Bio (optional lane)

  • Enforce triplets; highlight start/stop codons; ASCII anchor: A C G T/U.

7) Synchronization (edge-only, no cloud)

  • Transports: USB (ADB/Accessory), BLE, Wi-Fi Direct.
  • CRDTs:
    • Text previews: RGA.
    • Keymaps/locks: LWW-Register.
    • Symbol sets: OR-Set.
  • Security: Noise XX pairing (QR), E2EE streams, signed exports.

8) ADIP control points (on device)

  • CP1 Mic level → feed Q_phy (if voice dictation).
  • CP2 ADC/latency proxy → scheduler hints.
  • CP3 Codec choice → text has ASCII fallback; no silent changes.
  • CP9 Decode/LPC → drives Q_ling.
  • CP10 SCI threshold → gates send.

9) Deterministic scheduler (coherence-first)

  • Interleave lanes by weight: w = base * (1-err) + lockBonus.
  • When amber/red: throttle bursts; prioritize LPC/Frame-Lock events.
  • Never reorder within a lane; CRDT merges across devices.

10) Developer fixtures (drop-in)

Seed registry (excerpt)

{
  "alphabet.v1":[
    {"tag":"Latn","map":[["A","U+0041"],["a","U+0061"]]},
    {"tag":"Grek","map":[["Ω","U+03A9"],["ω","U+03C9"]]}
  ],
  "music.v1":[
    {"glyph":"♩","unicode":"U+2669","anchor":"q","role":"note.quarter"},
    {"glyph":"♯","unicode":"U+266F","anchor":"#","role":"accidental.sharp"}
  ],
  "logos.v1":[
    {"glyph":"→","unicode":"U+2192","anchor":"->","role":"map.to"}
  ]
}

SCI thresholds

{"alpha":0.4,"beta":0.6,"ok":0.80,"amber":0.60}

11) QA matrix

  • No-drift path: Airplane mode, local text field → SCI stable ≥0.9.
  • Stress: Heavy edits + mode switches → SCI amber; LPC raises to ≥0.8.
  • Low-latency sync: USB pair; ensure CRDT convergence with conflicting keymap edits.
  • Security: Rekey on frame change; verify send blocked on SCI < 0.6.

12) User scripts (micro-UX)

  • Start: “FRAME-LOCK? baseline: LINE(two points). YES/NO.”
  • Low SCI: “Stabilize meaning: [Run LPC] [Slow pace] [Hold breath 2s]”
  • Symbol bind: Long-press → “Bind ♯ to # (sharp) in MU♫? YES/NO.”

13) Constraints

  • On-device by default; offline OK.
  • Zero silent autocorrect; all changes explicit.
  • Export/import: signed JSON only.

14) What this guarantees

  • Straight-line input: ASCII anchors make every glyph resolvable and survivable across hops.
  • Omni-coherence: SCI/LPC/Frame-Lock keep language units aligned—text, symbols, math, bio.
  • Non-interference: lanes never trample; scheduler is deterministic; CRDT ensures same result everywhere.