SPEC v0.3.1 FINAL (frozen 2026-09-05)
AI-First OS
A private phone OS where user-intent orchestration above the security kernel is performed by cooperating local agents, while authority, safety, resource control, and fallback behaviour remain deterministic.
The invariant, in one line. Intelligence may propose. Only deterministic authority may permit. Compute may optimise; it never authorises. Remote systems may deliver; they never execute.
Current status: Phase 0 — not started.
Who owns which layer
Seven rows, six numbered layers plus the owned inference runtime inserted at L2.5. Everything above the security kernel that decides, is deterministic code; agents only propose.
3D view (progressive enhancement). The table below is the authoritative description.
| Layer | Nature | Ownership | Contents |
|---|---|---|---|
L5 Interface | AI-native | Project | Intent-driven UI. Apps reachable, not primary. |
L4 Agent City | AI + deterministic glue | Project | Mayor, Auditor (Thraksha), first-party and SDK Workers. ModelProvider calls into L2.5. |
L3 Runtime slot | Deterministic | AOSP (ART), pluggable slot | AndroidRuntime (ART) is real. IosAdapter is a name only; nothing may depend on it. |
L2.5 Inference Runtime | Deterministic | Project — owned | Residency, placement, batching, backend abstraction, metering. Sees tensors plus opaque execution metadata only. No write access to the audit log. |
L2 Security Kernel | Deterministic | Project — no model input | Registrar, policy engine, allow-lists, audit writer, TEE binding, remote-command verifier, key hierarchy. |
L1 Base | Deterministic | Forked AOSP | Linux kernel, HALs, ART, system services. Google proprietary services removed. No project kernel code in v1. |
L0 Hardware | — | Vendor | Development device: Samsung S20 FE Snapdragon 865 (r8q). Target: Pixel 8 or later. |
Agent City
Agents live in zones with fixed trust levels. Zone membership and autonomy tier are policy facts held by the security kernel, never agent beliefs. Rank changes priority and budget only.
3D view (progressive enhancement). The rings and tables below are the authoritative description.
| Zone | Trust | Model access | Typical residents |
|---|---|---|---|
Z0 Core | Highest | None | Registrar, audit writer |
Z1 Civic | High | Yes, budgeted | Mayor, Auditor explainer |
Z2 Domestic | Medium | Yes, budgeted | Workers owning personal data |
Z3 Foreign | Low | Yes, minimal | Workers wrapping third-party apps; SDK Workers by default |
Z4 Quarantine | None | None | Suspended agents |
- Registrar
Z0 - Pure code in L2. Inputs: agent id, typed request, effective policy. Output: grant or deny plus an audit record.
- Mayor
Z1 - Orchestrator. Receives intent, decomposes, dispatches, tracks rank, requests Tier-3 authorisation. Holds no resource capabilities.
- Auditor
Z1 - Thraksha Personal. Deterministic, evidence-driven. Can suspend anything including the Mayor. Cannot grant. Has no egress.
- Workers
Z2 - One resource class each. Talk only through the Mayor over typed messages.
- SDK Workers
Z3 - Third-party agents installed to Z3. Same bus, same ModelProvider, same Registrar. No second path.
The Law
Ten non-negotiable invariants. Every packet of work is tested against them, and those tests are protected: they can be added to, never weakened.
L1Agents decide what to ask for. Code decides what is allowed.L2No model output ever reaches the security kernel as an instruction. The kernel consumes only typed capability requests.L3No unsolicited inbound network endpoint exists on the device. Ever. This includes Android apps.L4Egress is denied by default for every userspace principal. Grants are per agent, per app and per enumerated system principal, all deterministic, all held by the Registrar.L5Agent rank never grants or widens a capability.L6Every agent request produces linked append-only REQUEST and DECISION records, and every intent ends with exactly one METER record. No record is ever mutated.L7The Auditor can suspend. It cannot grant.L8AI is a detachable plugin. Every subsystem degrades to a deterministic fallback when the model is absent, wrong, or offline.L9No remote party executes on the device. Vendors and administrators deliver artefacts and policy; only owner authority causes them to take effect.L10Inference is a measured resource. Every intent records model calls, tokens, latency, energy and the measurement source.