# design-os-system-one: TypeSafe System 1 & Dual-Brain Architecture > design-os-system-one: sub-10ms on-device decisions with Laya-MLX, 5-stage speculative commit engine, and 95% LLM cost reduction for autonomous agents. Sub-10ms Calibrated Judgments for Autonomous Agents with Zero Cloud Waste. ## Documentation & Case Study - [Landing Overview](https://jangtrinh.github.io/design-os-system-one/): Main project overview, benchmarks, and interactive architecture. - [Case Study & Battle Journal](https://jangtrinh.github.io/design-os-system-one/case-study.html): In-depth empirical benchmark report, battle journal, and speculative commit engine architecture. - [Architectural Patterns](https://jangtrinh.github.io/design-os-system-one/08-architectural-patterns.html): Architectural patterns for agents, swarms, and browser loops. - [Core Primitives](https://jangtrinh.github.io/design-os-system-one/02-core-primitives.html): TypeSafe System 1 decision contracts (Choice, Score, Noul). - [Full Technical Specification (LLMs Full)](https://jangtrinh.github.io/design-os-system-one/llms-full.txt): Complete architecture specification, empirical benchmark logs, and execution contracts for AI search crawlers. - [Repository](https://github.com/jangtrinh/design-os-system-one): GitHub source code, releases, and tests. ## Key Architecture & Invariants - **Dual-Brain System 1 Cascade**: - Tier 1: Local Laya-MLX on Apple Silicon Unified Memory (6.53ms P50, $0.00 cost, 100% air-gapped). - Cascade sweet spot (tau = 0.30): 70% of traffic resolved on-device in <10ms; 30% ambiguous cases escalate to TypeSafe JEV Cloud API (3.41x overall speedup). - **5-Stage Speculative Commit Engine**: - `OBSERVED -> EVALUATED -> PREPARED -> DISPATCHING -> VERIFYING -> CONFIRMED` (or `UNKNOWN -> RECONCILING`). - Speculate on judgments only; high-risk browser mutations require postcondition verifiers and transaction journaling. - Dispatch timeouts transition to `UNKNOWN` / `UNCERTAIN` and trigger read-only DOM reconciliation, eliminating duplicate mutations. - **Revocation of Autonomous 'DONE'**: - Models cannot unilaterally close tasks; task completion requires 100% acceptance test proof (`VERIFY_AND_STOP`). - **Cryptographic exactCache**: - All Gateway Router and Skill Pruner cache keys use SHA-256 over canonical JSON to prevent cross-prompt collision exploits. - **Enterprise Swarm & Penetration-Hardened Security**: - `PreExecutionGuardrail`: <2ms pre-dispatch threat firewall intercepting zero-width obfuscation, pipe-to-shell RCE, DAN jailbreaks, and credential leaks (33/33 penetration tests passing). - `HierarchicalAgentRouter`: Sub-35ms specialist delegation replacing slow 3,000ms LLM managers with calibrated Softmax and opt-in abstention (`min_confidence: 0.30`). - `HighCardinalityShortlist`: Filters 1,000+ candidates down to top-10 in 3.6ms, preventing head token overflow (`head_max_len`). - `Browser Reflex Head`: 17–23ms step latency (200x faster than 27B LLMs) for autonomous DOM navigation. - **Air-Gapped Privacy (`localOnly: true`)**: - Strictly forbids WAN cloud calls, guaranteeing zero telemetry and zero external data leaks.