LAYER 3: REALITY BRIDGEPathways ⑭‑⑲ · 6 pathways
LAYER 2: CROSS‑PROCESS & EXTENSIONPathways ⑦‑⑬ · 7 pathways
LAYER 1: CORE APPLICATION SYSTEMSPathways ①‑⑥ · 6 pathways
The core insight: The sovereign artifact is the bootstrap kernel. The actual application is a distributed system of specialized processes (workers, tabs, service workers), hardware bridges (WebHID, Web-Bluetooth), internet connections (iFrame, Fetch, WebRTC, WebSocket), and agent logic (LLM + API) — all orchestrated by a microkernel that treats the browser as a parallel computer and integration platform. The sovereign artifact is the anchor. The application is the network it creates.
Layer 1 — Core Application Systems
Six pathways from Sovereign Artifact (①) × Core-First (②) × Browser-as-OS (⑤). SRC: Aether v1.0 §IV
①Unified Computation Substrate
All Data Operations — One WASM Module, One Memory Space, One Pipeline
WASMSharedArrayBufferUnifiedNo Partitioning
A single WASM-compiled module handles ALL data operations — CRUD, search, transformation, validation, analysis — in one continuous computation space. Entity types are schema-level distinctions, not boundaries. All data coexists in the same broadphase pipeline.
"Applications need different engines for different data types. SQL for structured, search indexes for text, graph DBs for relationships."→ A single WASM substrate with SharedArrayBuffer handles ALL operations in one memory space. Partitioning is imposed by industry tooling, not computational reality.
Key Requirements
- WASM computation module (C++ or Rust)
- SharedArrayBuffer for cross-thread state
- Unified: CRUD, search, transform, validate, analyze in one pipeline
- Entity type = schema distinction, not processing boundary
- Direct memory references for cross-entity ops
②Deterministic State Engine
Every Application Flow Is a Formal State Machine. Impossible States Cannot Be Reached.
State MachineFormalDeterministicMulti-Layer
Every flow is a deterministic state machine. Layer 1: navigation/routes. Layer 2: workflow states (wizards). Layer 3: data lifecycle (create→review→approve→archive). Layer 4: composed states (parallel machines with synchronized transitions). Every state enumerated. Every transition specified. No "unexpected states" — they cannot be reached.
"State is implicit — scattered across components, callbacks, stores, URL params. Edge cases multiply. Impossible states are discovered."→ Explicit state machines define all states and transitions. Impossible states cannot be reached by construction. Edge cases become enumerated cases.
Key Requirements
- Formal FSM core (XState or hand-rolled)
- Machine composition with synchronized transitions
- Deterministic: same input → same state, same output, every device
- State visualization for debugging
- URL-synced states for deep-linkable workflows
- Migration path for versioning
③Persistent Data Provenance Engine
Created, Modified, Accessed, Transformed, Related — The Entity IS Its History
Knowledge GraphAudit TrailEntity BiographyLLM Render
Every significant entity spawns with a provenance tree: creation context, modification history, access log, relationship changes, state transitions, user interactions. This is first-class identity — not a compliance afterthought. The entity IS its history; current state is just the most recent node. Stored as deterministic knowledge graph. Optional LLM renders natural language summaries. Undo = tree traversal. Audit = tree reading.
"Entity metadata: created_at, updated_at, maybe version. Audit trails are bolted-on compliance overhead."→ Provenance is the fundamental data structure from creation. History is identity. The entity IS its history of events.
Key Requirements
- Provenance graph schema (entity_id, event_type, timestamp, actor, delta, context)
- Automatic capture on every mutation — no opt-in
- LLM text rendering with deterministic template fallback
- Provenance query: "show me everything that happened to this entity"
- Exportable audit trail
- Size-bounded: configurable retention with summary compression
④Event-Sourced Persistence
The Save File Is an Event Log. Loading Is Replaying. State Is Derived.
Event SourcingBinary EncodingCRDT-CompatibleReplay
Every action generates an event. The persistence store is the event log — not a state snapshot. Loading = event replay against a fresh engine. Time is not a column, it is the substrate. Stores are tiny (binary-encoded), version-tolerant, shareable (email a file), forkable (diverge and merge). Checkpoint system for fast-forward replay. Undo = replay to point. Time-travel debugging = reading the log.
"Persistence = serializing current state to JSON. Data grows. Schema changes break old saves. Version migration is a separate problem."→ Event sourcing applied to application persistence. Small, deterministic, replayable, forkable, mergable. Version tolerance is architectural, not bolted on.
Key Requirements
- Binary event log with checksums and version markers
- Replay engine: state at any point in timeline
- Checkpoint system (snapshot every N events)
- Export/import as downloadable file — shareable, forkable
- Integrity verification at checkpoints (SHA-256)
- Version-tolerant: new events don't break old replay
- Undo/redo via inverse event or replay to point
⑤Core-First AI Integration
Enhancement, Never Dependency. The User May Never Know It's Active.
OptionalNon-BlockingGraceful DegradationOffline-First
Every AI-enhanced feature has a deterministic core that works offline. Templates produce valid output. Recommendations are algorithmic with AI as enhancement. Natural language has regex/rule-based fallback. AI is a parallel enhancement pipeline — like texture streaming swaps a blurry mip-map for a sharp one mid-frame. The user never waits. The deterministic core is the real application. AI is production value, not functionality. PATTERN: CP-4
"AI integration means API calls and latency. Every AI feature has a loading state. When the API is down, the feature is down."→ The deterministic core runs at full speed continuously. AI enriches output transparently. The user never sees a loading state. The limitation is architectural, not technical.
Key Requirements
- Every AI system has deterministic fallback (complete, not placeholder)
- Non-blocking pipeline: fire → continue with fallback → crossfade when ready
- Crossfade transition (opacity + interpolation, not flash/replace)
- Offline mode: core features identical without AI
- API key encryption via CryptoVault (AES-256-GCM, key never leaves browser) CP-6
- Cost-aware: budgets, coalescing, caching, provider failover
⑥Background Processing & Time-Independent Operations
The System Breathes Whether the User Is Active or Not. Compressed Time.
Web WorkerBackground SyncCompressed TimePersistent
Background tasks run as low-priority Web Workers. Data syncs, scheduled operations, cache warming, cleanup, batch processing — all without blocking UI. Key insight: time is relative to the process, not the user. When away, the worker simulates in compressed time. On return, missed ticks replay at high speed. The system never sleeps.
"Background processing requires server infrastructure. Browser apps are passive — respond to input and stop when tab closes."→ Web Workers with compressed-time tick replay achieve persistent background processing. No server required. Time is relative to the process.
Key Requirements
- Worker pool with configurable priority and concurrency
- Schedule-based execution (cron-like in browser)
- Compressed-time catch-up: hours of missed processing in seconds
- State serialization to IndexedDB between sessions
- Background sync via Service Worker (when registered)
- Task queue with persistence, retry, error handling
Layer 2 — Cross-Process & Extension Architecture
Seven pathways from Browser-as-OS (⑤) × Offline-Primary (③) × Core-First (②). SRC: Aether v1.0 §V
⑦Sidecar Process
Dedicated Helper in Its Own Address Space. Own Tab. Own Memory. Own Lifespan.
BroadcastChannelSharedArrayBufferwindow.openPersistent Context
A dedicated Sidecar Tab for AI processing, heavy computation, or long-running automation. Own memory budget, persistent context across sessions, local inference via WebGPU, communicates via BroadcastChannel. Persists when main app closes. On reopen, remembers everything. On multi-monitor, occupies second screen. Not a child — a peer process with its own lifecycle.
"Heavy processing shares the main thread. AI computation freezes the UI. Tab closes = everything dies. Persistent context requires a server."→ A dedicated browser tab is a full OS process. Own memory, own GPU context, own lifecycle. Survives main tab closing. Recovers from crashes.
Key Requirements
- Tab bootstrap via window.open with injected initial state
- BroadcastChannel: app ↔ sidecar bidirectional
- Persistent context in IndexedDB — survives restarts
- Local inference via WebGPU
- Heartbeat + respawn: crash recovery
- Remote LLM as quality enhancement (parallel, non-blocking)
⑧Service Worker — Always-On Background Process
Operates Without Rendering. Cache, Sync, Notify, Process — Zero UI Required.
Service WorkerBackground SyncCache APIPush
A dedicated Service Worker runs continuous operations: cache warming, background sync, push notifications, scheduled processing. Operates without DOM, without rendering, without user attention. When UI tab is open, shares state via SharedArrayBuffer. When closed, continues independently. The autonomic nervous system.
"Applications stop when the tab closes. Background work requires native mobile apps or server infrastructure."→ A Service Worker IS an always-on process. Runs without rendering, without a UI tab. The browser has had this for years.
Key Requirements
- Registration with install, activate, fetch handlers
- Cache strategies: cache-first, network-first, stale-while-revalidate
- Background sync for offline queue processing
- Push notification support (user-permitted)
- SharedArrayBuffer for real-time state sync when UI open
- IndexedDB snapshots at configurable intervals
⑨CSS Compositor Pipeline — The Browser's Hidden GPU
CSS Effects Are Shaders for Free. Two Independent Frame Rates.
will-changebackdrop-filterCompositor LayersDOM HUD
Two visual layers: primary content (canvas/DOM) and overlay (HUD, notifications, modals, tooltips) rendered by the browser's hardware compositor as independent GPU layers. CSS backdrop-filter for glass effects costs virtually nothing vs. shader equivalents. Independent frame rates — UI at 120fps while content at 30fps. Accessibility lives in DOM layer as first-class concern.
"All UI rendering should happen on canvas. Post-processing needs WebGPU shaders. CSS is for documents, not application UI."→ The browser's hardware compositor is a parallel GPU pipeline. CSS backdrop-filter, transform, and opacity are GPU-composited at virtually zero cost. Decoupling gives independent frame rates and native accessibility for free.
Key Requirements
- Overlays rendered as DOM with will-change: transform for compositor promotion
- backdrop-filter for glass/frost (compositor, not main thread)
- Shared state bridge: app state → DOM UI via BroadcastChannel/SharedArrayBuffer
- Event routing: DOM clicks → app logic via postMessage
- 46-category CSS architecture applied to overlay layer
- WCAG 2.1 AA built into DOM UI
⑩Cache-First Predictive Architecture — Two-Pass, No Loading
Local Prediction in <50ms. Remote Enrichment Crossfades When Ready.
Two-Pass PipelineService Worker CacheCrossfadeNo Loading
Two-pass pipeline for any data with latency. Pass 1: local cache, template, or computation generates output in <50ms. User sees it instantly. Pass 2: remote API, LLM, or compute-intensive process fires in parallel. When ready, output crossfades to richer version. User never waits because they never see blank state. Offline: Pass 1 handles everything. API down? Slightly less rich but fully functional.
"Loading data means waiting for network. Loading spinners are unavoidable — they communicate 'something is happening.'"→ The user sees output instantly. Crossfade to richer output is imperceptible. Loading spinners are replaced by progressive enhancement. The user is never asked to wait.
Key Requirements
- Cache-first: Service Worker serves cached data instantly
- Background refresh: stale-while-revalidate — show cache, update behind
- Predictive precomputation: compute likely outputs before request
- Crossfade when rich data replaces local prediction
- Offline-first: cached data always sufficient for core function
⑪Runtime Self-Optimization — Adaptive Configuration
Probe Hardware at Startup. Select Capability Tier. Reconfigure at Runtime.
Hardware ProbeCapability VectorWASM Hot-SwapThermal Aware
The engine profiles hardware and environment at startup: GPU capabilities, CPU cores, RAM pressure, battery status, connection speed, display resolution, device type. Capability vector selects WASM module tier, worker count, processing intensity, rendering quality, feature set. If thermal throttling detected mid-session, hot-swaps to lightweight modules preserving state. Same file. Every device. No minimum requirements.
"Applications have minimum system requirements. If hardware doesn't meet the bar, experience degrades or doesn't work."→ The engine profiles every variable, constructs capability vector, reconfigures entire pipeline. WASM modules hot-swappable at runtime. Same file runs on a 2019 phone and high-end desktop.
Key Requirements
- Detection: hardwareConcurrency, WebGPU features, RAM, battery, DPR, connection, deviceMemory
- Capability vector: intersection of all resources → optimal config
- Tiered WASM selection: compatible first, upgrade if supported
- WASM hot-swap with state preservation (no reload)
- Performance budget tracker with real-time adjustment
- Thermal/battery awareness: downclock when hot or on battery
⑫Plugin & Extension System — Event Streams, Not Installation
Independent Processes That Inject Event Streams. No Install. No Conflict.
Extension ProcessEvent StreamCRDT MergeSandboxed
Extensions are independent processes (tabs, workers, isolated iframes) that inject event streams into shared state via BroadcastChannel. Each has its own context, memory, lifecycle. Multiple extensions = multiple processes contributing to one coherent state, merged via CRDT mathematics. Removing an extension = closing its process. Corrupted? CRDT merge rejects invalid state. No installation. No registry conflicts. No package manager.
"Extensions need installation, package managers, dependency resolution, registry accounts. They modify shared state unpredictably."→ Extensions are event streams from independent processes. CRDT-based conflict resolution merges concurrent streams mathematically. No install, no conflict, no orphaned data. Close the process, the stream stops.
Key Requirements
- Extension bootstrap protocol embedded in main HTML
- Event stream replay with CRDT-based state merging
- Extension context: load URL → spawn isolated process → inject event stream
- Sandboxed: no direct access to core state — structured events only
- CRDT conflict resolution (commutative, no rollbacks)
- Rewind-to-checkpoint for corruption recovery
⑬AI as Agent — Genuine Agency, Verified Fallbacks
The AI Acts. It Automates. It Creates. Every Action Has a Verified Deterministic Alternative.
Function CallingBehavior ScriptsLocal SLMWorkflow Gen
The AI has genuine agency within bounded capabilities. Controls application functions via function calling toolbox. Automates workflows via strategy generation → compiled behavior script → deterministic execution. Creates content tailored to user history. Every AI-driven action has a deterministic fallback that is not a loading state — it is a complete, functional alternative. Between AI cycles, deterministic functions maintain seamless continuity.
13a — Co-Pilot (Shared Control)
AI receives application state as structured data. Function calling access to controls. User delegates → AI computes → executes native functions → presents results. Fallback: scripted assistant if AI exceeds budget.
13b — Automation Agent (AI as Workflow Designer)
Full state → AI generates multi-step workflow → compiled behavior script → deterministic execution at full speed. Re-evaluates on significant state changes. Fallback: procedural rules engine between strategy updates.
13c — Content Generator (AI as Creator)
Reads user state, history, preferences. Generates content, summaries, reports. Fallback: procedural template generator produces complete output. Not a placeholder. PATTERN: CP-4
13d — Local Inference Pipeline
Small language model compiled to WebGPU compute. Lives in GPU memory. Inference = GPU dispatch, ~10–50ms. No network. No latency. Local handles real-time; remote LLM enriches quality in parallel.
🔑 Core-First Fallback Protocol — Governing All AI Interfaces
| AI Interface | Deterministic Fallback | Activation Trigger |
| Co-Pilot Control | Scripted assistant: pattern-based, rule-driven | AI response exceeds budget or network unavailable |
| Automation Agent | Procedural rules engine: triggers, conditions, actions | Between AI strategy updates |
| Content Generation | Parameterized template system — complete output | AI call exceeds 50ms or network unavailable |
| Natural Language Input | Regex/rule-based parser with keyword matching | Offline or local confidence <80% |
| Recommendation / Ranking | Algorithmic recommender: collaborative filtering, heuristics | AI unavailable |
| External Data Enrichment | Cached summaries from last successful fetch | Network error or rate limit |
| Agentic Workflows | Queued actions for next online session, never lost | Agent Worker offline |
Governing rule: At no point does the application loop pause waiting for an AI response, network call, or external service. The deterministic core runs continuously. The AI layer is a parallel enhancement pipeline. The user should never determine whether AI is active — only that the enriched version feels better.
Layer 3 — Reality Bridge
Six pathways from Browser-as-OS (⑤) beyond browser boundaries — into physical hardware, internet services, other devices. SRC: Aether v1.0 §VI
⑭Physical Hardware Bridge — The Browser IS the Driver Layer
USB · HID · Bluetooth · NFC — Zero Install, Zero Drivers, Browser-Native
WebHIDWeb-BluetoothWeb-NFCGamepad API
The engine queries navigator.hid.getDevices() at startup. Reads input at native polling rates via raw HID reports. Sends output and feedback. No driver installation. No configuration utility. No platform-specific SDK. The browser exposes hardware directly — the application speaks HID reports. Graceful fallback: keyboard/mouse when no specialized hardware detected.
"Specialized hardware requires platform-native drivers, installation, vendor-specific SDKs. Browser apps can't access USB, Bluetooth, NFC."→ WebHID exposes raw HID reports. Web-Bluetooth exposes GATT services. Web-NFC exposes NDEF messages. The browser exposes hardware at protocol level — no drivers, no SDKs, no install.
Key Requirements
- WebHID enumeration and permission at startup
- Native-rate HID report reading
- Output/feedback via HID output reports
- Web-Bluetooth: discover, connect, read/write characteristics
- Web-NFC: tap tags → trigger actions
- Graceful fallback: standard input when specialized absent
⑮Performance Optimization Engine — Decouple Resolution from Quality
Render Internally at Reduced Resolution. Compute Upscale. Battery-Aware.
WebGPU ComputeOffscreenCanvasTemporal UpscaleDynamic Scaling
Render/process internally at reduced resolution → compute shader analyzes temporal data between frames → edge-preserving upscale to target. Compositor displays optimized output while compute engine calculates next frame. Mobile: halves GPU fill rate, preserving battery. Desktop: full quality. Internal resolution is a processing parameter, not a quality signal. Performance and quality are independently configurable.
"Browser rendering happens at display resolution. Higher resolution = higher GPU load. Performance and quality are a direct trade-off."→ Internal rendering resolution is independent of output. Compute shaders upscale efficiently. Performance and quality are independently configurable axes.
Key Requirements
- OffscreenCanvas at configurable internal resolution
- Temporal data analysis via compute shader between frames
- Edge-preserving upscale to target display resolution
- Dynamic resolution scaling based on frame time budget
- Battery-aware: reduce resolution and compute on battery
- Quality presets: Performance → Balanced → Quality → Ultra
⑯Procedural/Computed Content Engine — Nothing Is Stored. Everything Is Generated.
Zero Asset Files. Zero Storage for Detail. Complexity Costs Nothing.
Procedural GenerationNoise FunctionsSynthetic DataMath-Defined
Every piece of derivative content — generated from mathematical functions, not stored as assets. Graphics: procedural patterns, generated textures, computed effects. Data: synthetic datasets, test fixtures, placeholder content upgrading seamlessly to production data. Key insight: storage is irrelevant to detail. A mountain of visual complexity costs the same bytes as a flat plain. Complexity is a function parameter, not a resource budget.
"Rich content needs gigabytes of assets. Visual detail is limited by storage, bandwidth, loading time. Every new asset increases footprint."→ A mathematically defined system has zero assets. All detail computed from functions and noise. Complexity has zero storage cost. A million variations cost the same as one.
Key Requirements
- Procedural generation via compute shaders or Web Worker
- Seed-based deterministic output: same seed = same result on every device
- Level-of-detail: complexity scales with processing power, not storage
- Synthetic data generation for test/dev/placeholder
- Placeholder-to-production pipeline: generated upgrades seamlessly to authored
⑰Internet as Native Integration Layer — The Web Is Not External
The Application IS the Browser. User Sessions Are Present. The Internet Is the Same System.
iFrame PortalsFetch APIOAuth2Cross-Service Auth
Because the application IS a browser context, the user's existing sessions, cookies, and logins are already present. In-app views render real web content via iFrame — authenticated services, streaming platforms, productivity tools. AI agents have web awareness: search, summarize, discuss current information. The "browser tax" becomes an architectural advantage: native apps can't touch user sessions; browser apps inherit them. Permission scaffolding ensures transparency.
"Applications are closed environments. Real web content breaks security models, introduces cross-origin issues. Applications should be self-contained."→ The application IS a browser context. User sessions are already there. iFrame portals, Fetch API, OAuth2 are the platform's native integration capabilities.
Key Requirements
- iFrame portal system: embedded views render real content, inheriting sessions
- AI web awareness: scrape → summarize → inject with consent
- Third-party API integration via OAuth2 with transparent permission
- Permission scaffolding: opt-in per service, transparent data flow
- Offline fallback: all web integrations degrade to local equivalents
⑱Peer-to-Peer Collaboration — Serverless, Accountless, Pure Protocol
No Server. No Account. Direct Browser-to-Browser. State Is Merged Mathematically.
CRDTWebRTCMesh NetworkSnapshot Protocol
Users discover each other via lightweight signaling (no server in data path). WebRTC DataChannels form direct mesh — browser-to-browser, zero intermediaries. State reconciled via CRDTs — merged mathematically, no locking, no "server says no." Any participant can freeze a snapshot: a deterministic file recreating exact state on any other browser. The application IS the protocol — no company owns the infrastructure.
"Real-time collaboration needs servers, user accounts, infrastructure, central authority for conflict resolution."→ CRDTs + WebRTC = serverless collaboration. Direct P2P mesh. State reconciles mathematically — no central authority needed. Snapshots are portable files. The application IS the infrastructure.
Key Requirements
- WebRTC DataChannel mesh for direct browser-to-browser communication
- Lightweight signaling for handshake only (no server in data path)
- CRDT state reconciliation: conflict-free, commutative, no rollbacks
- Snapshot protocol: freeze state → export file → import on any browser → exact state
- Federated identity via OpenID Connect for optional reputation (no mandatory accounts)
- Real-time cursor/selection awareness (when applicable)
⑲Agentic Automation Bridge — App Actions → Real-World Outcomes
Play in the Application. Produce Value Outside It. Every Session Creates External Artifacts.
LLM AgentAPI GatewayWorkflow AutomationOpt-In Only
An Agent Worker receives the application event stream. An LLM interprets events and maps them to real-world actions via authorized API connections. User achieves a milestone → agent creates a document, sends a notification, updates a CRM, triggers an automation. Every action is opt-in, configurable, transparent. The agent never acts without explicit permission. Key insight: the application is not a container for value — it is a generator of value extending beyond its own UI.
"Applications produce results within themselves. Documents stay in the app. Value is trapped in the application's boundaries."→ An agent bridge maps application events to real-world API calls. Every meaningful action produces an artifact outside the app. The limitation is not technical — it is the assumption that applications are self-contained.
Key Requirements
- Agent Worker: event stream → LLM interpretation → authorized API execution
- Authorized integrations (webhooks, Zapier, IFTTT, Notion, Calendar, CRMs, etc.)
- Permission architecture: user sees, approves, denies, or automates every action
- Transparency log: every agent action recorded and reviewable
- Opt-in only: zero external activity without explicit configuration
🔗 Core-First Architecture — Governing Principle
At no point does the application loop pause waiting for an LLM, network response, or external service. The deterministic core runs continuously at full speed. The AI layer is a parallel enhancement pipeline. Between AI cycles, deterministic functions maintain complete functionality. The user should never be able to tell whether AI is active — only that the enriched version feels better.
This is not a technical constraint. It is a design principle: the application is complete at the moment of download. Everything else is enhancement. SRC: Aether v1.0 §VII
⦿ Layer 1: Deterministic Core
Runs continuously. Never waits. Never fails. Works offline. This is the real application.
◉ Layer 2: AI Enhancement
Parallel, non-blocking, optional. Enhances output from Layer 1. The user may not know it exists.
◎ Layer 3: Network & External Bridge
APIs, collaboration, web content, agentic workflows. Opt-in. Degrades gracefully offline. Never a dependency.