# Architecture ```mermaid flowchart LR Host[Codex / Claude / Cursor / Grok] --> Skills[Portable Agent Skills] Skills --> MCP[Touchline MCP server] CLI[Touchline CLI] --> Core[Orchestrator + state machine] MCP --> Core Core --> Store[Atomic snapshots + JSONL events] Core --> Router[Browser and host adapters] Router --> Chrome[Chrome bridge / MCP] Router --> PW[Direct Playwright] Store --> UI[Signed localhost dashboard] ``` The core is one Node.js runtime. Hono serves a localhost API/dashboard; Zod validates external boundaries; the MCP server exposes the same orchestrator; React renders state from the HTTP/SSE surface. Run snapshots and append-only events live under `.touchline/runs//` in the selected workspace. Each host adapter resolves an installed CLI, applies bounded arguments, and launches a child process with timeout, abort propagation, redaction, and output caps. PTY support is reserved for adapters that prove they require it. Roster aliases never select a model implicitly. The local runtime is intentionally not deployed to Vercel Edge because Edge functions cannot safely spawn local CLIs. A future hosted surface may remain read-only.