[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110942":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":26,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":15,"starSnapshotCount":15,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},110942,"exact","expo\u002Fexact","expo","Write an app once. It runs natively on the web, macOS, iOS, and Linux, and an AI agent can build it, run it, see it, and test it on every one of them.",null,"Rust",5013,151,14,43,0,48,517,1108,250,108.53,"MIT License",false,"main",true,[],"2026-11-23 20:33:25","2026-11-23 20:10:30","# Exact\n\n**Write an app once. It runs natively on the web, macOS, iOS, and Linux, and an AI\nagent can build it, run it, see it, and test it on every one of them.**\n\n**Building an app?** With the tools installed ([Quick start, step 1](#1-install-the-tools)),\nrun `bun scripts\u002Fexact.mjs setup` once, make the app with `bun scripts\u002Fexact.mjs new \u003Cpath>`,\nand read [`docs\u002Fstart-here.md`](docs\u002Fstart-here.md) (for a website,\n[`docs\u002Fstart-here-site.md`](docs\u002Fstart-here-site.md)): that guide is the only required\nreading. The rest of this page describes Exact for people deciding whether to use it\nor working on it.\n\n> [!TIP]\n> **Try it with a coding agent.** On a Mac with Xcode, Rust, Bun, and Chrome installed,\n> give Claude Code this prompt:\n>\n> ```text\n> Clone https:\u002F\u002Fgithub.com\u002Fexpo\u002Fexact and follow its README to make a new Exact\n> app with `exact new`. Run `bun scripts\u002Fexact.mjs setup` once first. Make a todo\n> list where I can add items, check them off, delete them,\n> and see how many are left. Put the view in Contract and keep the list in `app.ts`.\n> Write an `app.test.contract`, pass it on web, macOS, and the iOS Simulator with\n> `scripts\u002Fagent.mjs`, then open the app for me on all three.\n> ```\n>\n> A fresh agent given the earlier version of this prompt on a clean clone (2026-10-04, Hermes already in the\n> machine cache, Cargo's cache warm) finished in about 57 minutes, and its tests passed\n> on all three platforms. About 25 of those minutes were the first macOS and iOS builds,\n> roughly 13 minutes each; later builds take a minute or two. On a machine that has\n> lacked Hermes, its source build came first and added time. Current setup downloads and\n> verifies the pinned host\u002FiOS bundles once instead; ordinary builds stay offline.\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Cth>Web\u003C\u002Fth>\n    \u003Cth>iOS\u003C\u002Fth>\n    \u003Cth>macOS\u003C\u002Fth>\n  \u003C\u002Ftr>\n  \u003Ctr valign=\"top\">\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fsoftwear-web.webp\" width=\"360\" alt=\"Softwear's hoodies page in Chrome\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fsoftwear-ios.webp\" width=\"160\" alt=\"Softwear's hoodies page as a native iOS app\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fsoftwear-macos.webp\" width=\"290\" alt=\"Softwear's hoodies page as a native macOS app\">\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr valign=\"top\">\n    \u003Ctd>The browser's own DOM and CSS\u003C\u002Ftd>\n    \u003Ctd>UIKit views, native controls and the system's tab bar\u003C\u002Ftd>\n    \u003Ctd>AppKit views and native controls\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\u003Csub>One \u003Ccode>app.contract\u003C\u002Fcode>, the same screen on three hosts, captured by the agent driver. \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fexpo\u002Fexact-templates\u002Ftree\u002Fmain\u002Fsoftwear\">Softwear\u003C\u002Fa> is a demonstration store you can generate from \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fexpo\u002Fexact-templates\">exact-templates\u003C\u002Fa>: it shows Alternative Apparel's catalog, is not affiliated with that brand, and takes no real orders or payments.\u003C\u002Fsub>\n\nExact is a cross-platform application runtime. You describe your interface in\n**Contract**, a small declarative language, and you write your data logic in\n**TypeScript or Rust**. The Contract compiler turns the interface into a compact\n*plan*. On the web, that plan becomes one ES module over a ~20 KB runtime that drives\nthe real DOM. On macOS, iOS, and Linux, a Rust runner executes the same plan, a Rust\nlayout kernel computes every box with CSS rules, and each platform draws with its own\ntools: AppKit, UIKit, or a GPU painter. There is no webview and no JavaScript bridge\nin the UI, and no app JavaScript runs before the first pixel.\n\n> [!NOTE]\n> Exact is pre-1.0 and changes daily. There is no API stability, no backwards\n> compatibility, and no migration guide, by design (`rules\u002FDEFERRED.md`). This\n> repository, `exact2`, is a rebuild of an earlier one (\"exact1\"), whose design\n> documents are research, never authority.\n\nThe design record is a separate, private repository of numbered documents (LLPs), so this\nREADME and the guides cite it by number (`LLP 1115 D7`). The guides under [`docs\u002F`](docs)\nare the public documentation.\n\nUpgrade note (2026-10-16): Snapback mutation replies with `ok: false` now throw\n`refused(why)` and expose `failure(slot)`; see the\n[before\u002Fafter and inherited-app commands](snapback4\u002FREADME.md#updating-an-inherited-app).\n\n## Contents\n\n- [Three principles](#three-principles)\n- [How it works](#how-it-works)\n- [Quick start](#quick-start)\n- [Contract](#contract)\n- [Example apps](#example-apps)\n- [What works today, and what doesn't yet](#what-works-today-and-what-doesnt-yet)\n- [Repository map](#repository-map)\n- [Working on Exact](#working-on-exact)\n\n## Three principles\n\n### 1. Agent native\n\nExact assumes much of the code will be written by AI agents. An agent can make an app,\nrun it, look at it, operate it, and prove it works without a person in the loop.\n\n- **Ten operations, the same on every host.** `tree · screenshot · tap · type · state\n  · layout · logs · clock · prefer · perf` drive the web, macOS, iOS (Simulator or a real\n  iPhone), and Linux through one script, `scripts\u002Fagent.mjs`. There are ten on purpose:\n  the predecessor's agent API grew to eighty wire names, one reasonable addition at a\n  time.\n- **The clock belongs to the agent.** Between two operations nothing moves. Instead of\n  sleeping until an animation finishes, the agent says `clock +60000` or\n  `clock settle` and reads the result. No timing flakes, no waits.\n- **Tests are scripts of those operations.** An `app.test.contract` file runs unchanged\n  on any host, with no second evaluator.\n- **Every tool speaks to machines.** `contract build --json` gives diagnostics with\n  stable ids and source ranges. `contract symbols` gives navigation. A development\n  source map leads from any node on screen back to the line that declared it.\n  The driver refuses to drive a build older than its sources and names the rebuild.\n- **Contract is small on purpose.** A whole app fits in a context window. Every write\n  is declared, every list is keyed, every value is typed. Mistakes are refusals that\n  say what to do, not quiet misbehavior.\n\n```sh\nbun scripts\u002Fagent.mjs web tree \"tap change-station\" \"type station-search Palo\" \\\n  \"clock +60000\" state \"screenshot out.png\"\n```\n\n### 2. Speed is king\n\nSpeed of the app and speed of the loop. Each budget in `rules\u002FRULES.md` is tracked on\nevery commit, and a regression is a P0 with a name on it.\n\n| Budget | Target |\n|---|---|\n| Cold start to interactive first frame | 100 ms p50 |\n| Dev restart, edit to present | 100 ms p50 |\n| App JavaScript executed before first pixel | none |\n| Touch one line, rebuild that crate | 30 s |\n| The whole blocking check suite | 65 s |\n\nHow the design keeps those numbers:\n\n- **The boot path executes and compiles nothing.** TypeScript is compiled to Hermes\n  bytecode at build time and loads after the first pixel. The first frame comes from\n  data baked into the plan.\n- **Pay only for what you use.** GPU rendering, the Markdown editor, text flow, and\n  browser SQLite are separate artifacts, loaded on demand. Nothing is a feature flag\n  on a core crate.\n- **The web gets its own small runtime.** On the RealWorld (\"Conduit\") benchmark,\n  Exact's runtime was up about 300 ms before the React SSR build had hydrated. It used\n  26 KB of code against React's 81 KB\n  (LLP 1071).\n- **Edits land in about a tenth of a second.** On a fresh app made by `exact new`, a\n  saved Contract or TypeScript edit was rebuilt and in the page in 99 ms.\n\n### 3. Write the web, ship the platform\n\nWhat you write is CSS: the vocabulary, the layout model, the development loop. What you\nleave unsaid is the platform's: controls, colour, type, motion, gestures, the keyboard\nand accessibility come out as an app built by hand with UIKit or AppKit would have them,\nand on the web as a carefully built web app would. What you write wins. The order is\nauthor, then platform, then CSS's default, and one test settles a dispute: would someone\nwho knows the platform notice? (LLP 1115)\n\n- Layout is CSS's, because a person can't see a layout default, only its result. A bare\n  node is `display: block`, `box-sizing: content-box`, `flex-direction: row`,\n  `flex-shrink: 1`, the same as a bare `\u003Cdiv>`.\n- Names are CSS's, because names are what you write: `font-size`, `object-fit`,\n  `text-overflow`, `line-clamp`, `light-dark()`, `env(safe-area-inset-top)`. The compiler\n  refuses an alias and names the web's spelling.\n- Unsaid presentation is the platform's. Text is the system's label colour and size (17\n  points on an iPhone, 13 on a Mac, the reader's setting in a browser), a `button` is the\n  system's button, a pushed screen has the system's Back. An app that says less looks\n  more at home.\n- The browser is the parity oracle for layout and for what you wrote. Native layout\n  given the same inputs, Canvas 2D, SVG, gradients, and authored motion are checked\n  against what Chrome draws.\n- The web is also the development loop. You work on the seconds-long web loop, and the\n  native hosts are swept behind you.\n- Any unavoidable deviation in layout is declared, with its reason, in LLP 1001. For\n  example, Taffy has no `position: static`.\n\nWriting the web doesn't mean the lowest common denominator. Where a platform can do\nmore (real HTML in an SVG `foreignObject` on the web, MapKit through a native module on\nApple), Exact lets it.\n\n## How it works\n\n```mermaid\nflowchart LR\n  subgraph author[\"You write\"]\n    C[\"app.contract\u003Cbr\u002F>view · state · actions\"]\n    D[\"app.ts or a Rust crate\u003Cbr\u002F>data sources\"]\n  end\n  C --> K[\"Contract compiler\"] --> P[\"plan\u003Cbr\u002F>tables + bytecode\"]\n  P --> W[\"Web\u003Cbr\u002F>one ES module, ~20 KB runtime,\u003Cbr\u002F>the browser's DOM and CSS\"]\n  P --> R[\"Rust runner\u003Cbr\u002F>+ layout kernel (Taffy)\"]\n  R --> M[\"macOS\u003Cbr\u002F>AppKit + CoreText\"]\n  R --> I[\"iOS\u003Cbr\u002F>UIKit + CoreText\"]\n  R --> L[\"Linux\u003Cbr\u002F>vello GPU \u002F tiny-skia CPU\"]\n  D -.->|answers, checked against declared shapes| W\n  D -.-> R\n```\n\n- **Contract** (`contract\u002F`) is compiled in four passes: syntax, types, analysis, and\n  lowering. At build time the plan is *baked*: constant data is evaluated into it, so\n  the first frame needs nothing else.\n- **The runner** (`runner\u002F`) is the plan's virtual machine. It handles keyed component\n  instances, events, timers on a seekable clock, and the data seam.\n- **The kernel** (`kernel\u002F`) is a columnar node arena with CSS layout through a patched\n  [Taffy](vendor\u002Ftaffy\u002FEXACT-PATCHES.md). The host measures text: CoreText on Apple,\n  cosmic-text on Linux. On the web, the browser lays out the same CSS itself, so the web\n  build carries no layout engine.\n- **Hosts** (`host\u002F`) present the tree. The web host writes DOM nodes, and the browser\n  runs CSS transitions. The Apple host is a static library with a C ABI under AppKit and\n  UIKit presenters. The Linux host paints the tree itself, onto DRM\u002FKMS with evdev\n  input, or into an offscreen buffer.\n- **Data sources** sit below one seam. TypeScript runs on Hermes on native hosts and in\n  the browser's own engine on the web. Rust runs natively, and can be replaced live\n  (as a shared library, or as Wasm on iOS and the web). Every answer is checked against\n  the shape Contract declared. Grants control network, files, SQLite, and secrets.\n- **Optional pieces** are separate artifacts: a wgpu GPU module (Metal on Apple, WebGPU\n  in the browser), native modules (a hyphenated tag backed by a platform widget, like\n  MapKit), and a [game engine](game\u002FREADME.md) add-on.\n\n## Quick start\n\nThese steps were run on macOS on Apple Silicon. Linux works for the web loop and the\nLinux host.\n\n### 1. Install the tools\n\n- **Rust** through [rustup](https:\u002F\u002Frustup.rs). The pinned stable toolchain in\n  `rust-toolchain.toml` installs itself the first time Cargo runs.\n- **[Bun](https:\u002F\u002Fbun.sh) 1.4.2**, the version `package.json` pins. Node and npm are\n  not needed.\n- **Google Chrome.** The agent drives the web through headless Chrome. Set `CHROME` to\n  use another Chromium.\n- **Xcode 27.1 or later**, for the macOS and iOS hosts (`exact setup --check` checks it).\n- **Hermes**, only for TypeScript apps on native hosts. Exact consumes Ibex's\n  pinned, attested `260318099.0.4` release bundle; ordinary Cargo builds are\n  offline and never download or compile an engine. Install it once for each\n  target before building (for this Mac, use `aarch64-apple-darwin`):\n\n  ```sh\n  cargo run --manifest-path vendor\u002Fibex\u002Fcrates\u002Fhermes-lean-sys-installer\u002FCargo.toml -- --target \u003Ctriple>\n  ```\n\n  The installer verifies the bundle and publishes it under\n  `~\u002F.cargo\u002Fhermes-lean-sys\u002F`. The v4 set supports macOS, Linux, Windows, iOS\n  devices and the universal iOS Simulator, plus tvOS devices and arm64 tvOS\n  Simulators. Linux and Windows select Ibex's English `intl` tier; Apple keeps\n  Hermes's OS-backed Intl.\n  `HERMES_LEAN_SYS_DIR` is only an explicit development\n  override, not normal setup.\n\nTo install the pinned Bun beside any existing installation:\n`curl -fsSL https:\u002F\u002Fbun.sh\u002Finstall | BUN_INSTALL=~\u002F.bun-1.4.2 bash -s bun-v1.4.2`.\nUse `~\u002F.bun-1.4.2\u002Fbin\u002Fbun` for the commands below if it is not on your PATH.\n`bun scripts\u002Fexact.mjs setup` installs the declared stable and web nightly Rust\ntoolchains, their components\u002Ftargets (the nightly's clippy lints a game's web bake),\nmatching wasm-bindgen, pinned Binaryen and Bun dependencies, installs the pinned\nHermes host bundle and the iOS\u002FtvOS bundles this Mac builds, and fetches the crates\nof exact2's lock and the game SDK's (`game\u002Fapp\u002Fshells.lock`), since every bake\nresolves offline. It keeps Binaryen in `~\u002F.cache\u002Fexact\u002Fbinaryen`; builds find it\nautomatically. `setup --check` invokes Ibex's installer in its offline check mode for\nthat same target set. The resolver authenticates the canonical receipts, archives,\ncompiler and host\u002Ftarget HBC pairing without installing anything; its exit status and\ndiagnostic are the check's result.\n\n### 2. Run Caltrain in the browser\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fexpo\u002Fexact.git\ncd exact\nbun scripts\u002Fexact.mjs setup\nbun host\u002Fweb\u002Fdev.mjs            # Caltrain, at http:\u002F\u002F127.0.0.1:8765\u002F\n```\n\nThe first run compiles the toolchain, which takes a few minutes. After that, open\n[`apps\u002Fcaltrain\u002Fapp.contract`](apps\u002Fcaltrain\u002Fapp.contract), change some text, and save.\nThe page rebuilds and reloads in about a tenth of a second. Add `--lan` to open the\nsame page from a phone on your network. The server answers only to the names it\nprints (a DNS-rebinding guard; any other `Host` gets 421); to share it through a\ntunnel such as `tuft host`, name the tunnel's host with `--allow-host \u003Cname>`\n(repeatable; `name:port` pins a port). An allowed name reaches the page and its\nreload stream, never the local installer's token.\n\n### 3. Run it natively\n\n```sh\nbun host\u002Fapple\u002Fbuild.mjs --run              # macOS\nbun host\u002Fapple\u002Fbuild.mjs --ios --run        # an iOS Simulator (--device --run for a connected iPhone)\ncargo build --profile host-dev -p caltrain-linux   # Linux: a DRM\u002FKMS console, or headless anywhere (--release to ship)\n```\n\nA first native build takes ten to fifteen minutes on a laptop; later builds reuse it\nand take a minute or two. Watch its output rather than waiting blind. iOS commands use an\niPhone simulator that's already booted, or boot the newest iPhone Pro. To choose one,\nset `EXACT_SIM` to its name or UDID (or pass `--sim` to `build.mjs`), and keep the same\nsetting for `agent.mjs ios`.\n\nOn Linux, a development build can serve its screen with `EXACT_VNC=1` and\n`EXACT_VNC_PASSWORD` set to 1–8 bytes. It listens on `127.0.0.1:5900`;\nan explicit `EXACT_VNC=host:port` selects another address. Production bakes\nignore both variables.\n\n### 4. Drive it the way an agent does\n\n```sh\nbun host\u002Fweb\u002Fbuild.mjs caltrain-web         # the build the agent's web host serves\nbun scripts\u002Fagent.mjs web tree \"tap change-station\" \"type station-search Palo\" state \"screenshot out.png\"\nbun scripts\u002Fagent.mjs web --test apps\u002Fcaltrain\u002Fapp.test.contract\n```\n\nSwap `web` for `macos`, `ios`, or `linux` once that host is built. Caltrain's three\ntests take about two seconds on the web host. Each operation is one shell argument, so\nquote it: `\"type new-todo Buy milk\"` types `Buy milk` (everything after the target is\nthe text). `\"screenshot film.png over 600 every 50\"`\nfilms motion as a contact sheet; use an `.apng` name to get an animation.\n\n### 5. Make your own app\n\n```sh\nbun scripts\u002Fexact.mjs new ..\u002Fhello          # or run `bun link` once, then `exact new ..\u002Fhello`\ncd ..\u002Fhello\nbun exact.mjs contract types app.contract -o app.contract.d.ts   # first run builds the compiler\nbun exact.mjs web                           # the dev loop, at http:\u002F\u002F127.0.0.1:8765\u002F\nbun exact.mjs test web tests\u002F*.test.contract # the app's *.test.contract, or the files named\nbun exact.mjs mac --run                     # this Mac\nbun exact.mjs ios --run                     # an iOS Simulator\n```\n\n`exact new` creates a standalone app: `app.contract` (the view), `app.ts` (its data),\n`app.json` (the manifest: name, bundle id, hosts, deploy policy), and small `web\u002F` and\n`apple\u002F` host crates. Its `AGENTS.md` (and `CLAUDE.md`) points a coding agent at\n[`docs\u002Fstart-here.md`](docs\u002Fstart-here.md), the one guide it must read, and at `bun\nexact.mjs help` for the commands, including `bun exact.mjs contract …` for the compiler\nand `contract vocab` for the card of what an app writes (`--all`: every tag and property Contract accepts). Before any of\nit, run `bun scripts\u002Fexact.mjs setup` once; `setup --check` names everything this machine\nis missing without changing it. It has its own Cargo workspace, which uses your exact2 checkout\nby path. To drive it from exact2, point `EXACT_APP_DIR` at it:\n\n```sh\nEXACT_APP_DIR=..\u002Fhello bun host\u002Fweb\u002Fbuild.mjs hello-web\nEXACT_APP_DIR=..\u002Fhello bun scripts\u002Fagent.mjs web --app hello tree \"screenshot hello.png\"\n```\n\nLook at every screenshot, not just the test result: a test passes on a layout that\nspills off the screen. `bun exact.mjs agent \u003Chost> \"screenshot out.png\"` shows the app\non each host in its own session; for a copy you launched yourself, use\n`xcrun simctl io \u003Cdevice> screenshot out.png` on iOS.\n\n`bun scripts\u002Fexact.mjs` also runs apps from this repository as real Mac apps:\n`exact run markdown README.md`, or `exact install markdown` to put `mdview` on your\n`PATH`. `exact list` shows what's here.\n\n### Feedback\n\nAn app's `AGENTS.md` asks its agent to record friction in one line, `bun exact.mjs\nfeedback note \"\u003Cwhat happened>\"`. A failed or slow drive, build or verify, and a passing\n`test` or `verify`, end with one line naming it, at most once a day per project. A note stays in the app's\n`.exact\u002F` with exact2's commit, the last command's verb, exit code and duration, and the\nOS; never any command output, or the app's code or files. It goes to Expo (`https:\u002F\u002Fexact-diaries.ccheever-0f6.workers.dev`) only when\nthe project's answer allows: `always`, or a yes to `ask`, the default, after\n`bun exact.mjs feedback` shows exactly what would go. `bun exact.mjs feedback never`\nstops it for a project; `EXACT_FEEDBACK=0` silences the nudges and refuses every send\non the machine. [docs\u002Fdiary.md](docs\u002Fdiary.md) has the details.\n\n## Contract\n\nAn agent building an app starts at [start-here.md](docs\u002Fstart-here.md), the only\nrequired reading, then looks up the [recipe](docs\u002Frecipes\u002F) for each question. For more, read the complete [guide for humans](docs\u002Fcontract-for-humans.md),\nor look things up in the [guide for agents](docs\u002Fcontract-for-agents.md) or the\n[grammar and vocabulary reference](docs\u002Fcontract-grammar.md).\n\nContract describes what an app shows and how its state changes. It doesn't fetch, read\nfiles, or run arbitrary code. That's what data sources are for. Here is a complete todo\napp: a Contract file, a TypeScript file, and a test. This exact app was built for web,\nmacOS, and the iOS Simulator, and its test passed on all three.\n\nTo try it in an app created with `exact new`, replace `app.contract` and\n`app.test.contract` with the examples below. In `app.ts`, keep the generated\n`export const appId = …` line and replace the rest with the TypeScript below.\n\n```contract\n\u002F\u002F app.contract: the view, its state, and what each action changes. It names no colour,\n\u002F\u002F font or control size: each host draws its own heading, field, button, checkbox and list.\nshape Todo\n  id: string\n  title: string\n  done: bool\n\nshape Change\n  count: number\n\ncomponent Todos\n  state draft = \"\"\n  mutation changed as shape Change refreshes todos\n  resource todos = todos() as shape Todo[]\n  derive left = todos.filter(t => not t.done).length\n\n  action edit(value: string)\n    draft = value\n  action add\n    if draft.trim() != \"\"\n      send changed = addTodo(draft.trim())\n      draft = \"\"\n  action toggle(id: string, done: bool)\n    send changed = setDone(id, done)\n  action remove(id: string)\n    send changed = removeTodo(id)\n\n  view\n    list appearance=\"auto\" height=\"100%\"\n      section\n        header\n          text `${left} left` role=\"heading\" testId=\"count\"\n        row\n          input value=draft input=edit submit=add placeholder=\"What needs doing?\" aria-label=\"New todo\" testId=\"new-todo\" flex=1 min-width=0\n          button press=add buttonStyle=\"filled\" testId=\"add\"\n            text \"Add\"\n      section\n        for t in todos key=t.id\n          row testId=`todo-${t.id}`\n            input type=\"checkbox\" checked=t.done change=toggle(t.id) aria-label=t.title testId=`toggle-${t.id}`\n            text t.title flex=1\n            button press=remove(t.id) destructive=true testId=`remove-${t.id}`\n              text \"Delete\"\n```\n\n```ts\n\u002F\u002F app.ts: keeps the list, and answers what app.contract asks for\nimport type { Answer, Sources } from '.\u002Fapp.contract.d.ts';\n\nexport const grants = '';  \u002F\u002F e.g. 'net.fetch https:\u002F\u002Fapi.example.com'\n\ntype Todo = { id: string; title: string; done: boolean };\nlet todos: Todo[] = [];\nlet next = 1;\n\nconst sources: Sources = {\n  todos: () => todos,\n  addTodo: ([title]) => {\n    todos = [...todos, { id: String(next++), title, done: false }];\n    return { count: todos.length };\n  },\n  setDone: ([id, done]) => {\n    todos = todos.map((t) => (t.id === id ? { ...t, done } : t));\n    return { count: todos.length };\n  },\n  removeTodo: ([id]) => {\n    todos = todos.filter((t) => t.id !== id);\n    return { count: todos.length };\n  },\n};\n\nexport const answer: Answer = (source, args, store, storage, native) =>\n  sources[source](args, store, storage, native);\n```\n\n```contract-test\n\u002F\u002F app.test.contract: runs on any host with `scripts\u002Fagent.mjs \u003Chost> --test`\ntest \"add, finish and delete\"\n  expect text \"count\" == \"0 left\"\n  type \"new-todo\" \"Buy milk\"\n  tap \"add\"\n  type \"new-todo\" \"Walk the dog\"\n  type \"new-todo\" key \"Enter\"\n  expect text \"count\" == \"2 left\"\n  tap \"toggle-1\"\n  expect text \"count\" == \"1 left\"\n  tap \"remove-1\"\n  expect tree missing \"todo-1\"\n  expect tree has \"todo-2\"\n```\n\n\u003Ctable>\n  \u003Ctr>\u003Cth>Web\u003C\u002Fth>\u003Cth>macOS\u003C\u002Fth>\u003Cth>iOS Simulator\u003C\u002Fth>\u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Ftodo-web.webp\" width=\"260\" alt=\"The todo app on the web host\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Ftodo-macos.webp\" width=\"260\" alt=\"The todo app on macOS\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Ftodo-ios.webp\" width=\"260\" alt=\"The todo app on the iOS Simulator\">\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\nThe view never edits the list itself. An action `send`s a *mutation* to a source,\n`app.ts` changes its data and answers, and `refreshes todos` asks for the list again.\nData lives in one place, and every change to it is a named, typed call an agent can see.\nThis list lives in memory. To keep it across launches, give `app.ts` a grant like\n`sqlite.open app:\u002Fdata\u002Ftodos.db` and use `storage.sqlite`, as\n[Fieldnotes](apps\u002Ffieldnotes) does.\n\n### The pieces\n\n| Concept | What it is |\n|---|---|\n| `shape` | A closed record type. Fields are `number`, `string`, `bool`, another shape, `option\u003CT>`, or `T[]`. |\n| `component` | A unit of UI. The first one in a file is the root. Components take `props`, can `inject` what an ancestor `provide`s, and can fill a `slot` with `children`. |\n| `state` | A value the component owns, its type inferred or declared (`state picked: option\u003CItem> = none`). Under a `for`, child state belongs to that keyed row. |\n| `derive` | A value computed from others, recomputed when they change. |\n| `resource` | Data from a source: `resource x = source(args) as shape T`. When the arguments change, the source is asked again. |\n| `mutation` \u002F `send` | A change made through a source: `send x = source(args)`. `refreshes r` asks resource `r` again afterward, `pending(x)` and `failed(x)` show progress, and `failure(x)` says why a resource failed. |\n| `action` | The only place state changes. What it writes is inferred from its body, and `let` binds a local inside it. |\n| `task` | Work on a schedule: `every(1000, tick)`, `after(ms, a)`, `every(frame, a)`. |\n| `view` | Indented elements, `if … else`, `for … key=…` (a key is required), `match` over options, and calls to other components. |\n| `style` \u002F `class=` | A named set of CSS properties. The node's own attributes win, and there is no cascade. |\n| `fn`, `xs.map` \u002F `xs.filter` \u002F `xs.join` | Pure, single-expression helpers. Recursion is refused. |\n| Built-in functions | The web's string and array methods by their names, called on the value (`xs.length`, `s.trim()`, `s.includes(t)`, `xs.at(-1)`), and functions (`first(xs)`, `formatDate`, `formatNumber`); all are listed with their types under `stdlib` in [`plan\u002Ftables\u002Fformat.json`](plan\u002Ftables\u002Fformat.json). |\n| `routes` | A router: a location and a retained stack per tab, moved with `open`, `push`, `replace`, and `back`, and read with `top`. |\n| `font` | Declares a font family and binds it to files at build time. |\n| `use … from \".\u002Fx.contract\"` | Imports components, shapes, styles, and `fn`s from another Contract file. |\n| `testId` | A stable name for the agent, tests, and accessibility tools. |\n\n### What Contract leaves out, and why\n\n- **No JavaScript in the view, and no I\u002FO.** Expressions have no effects. Effects\n  happen only in actions, as assignments, `send`, `refresh`, or commands like\n  `focus(…)` and `share(…)`. Data crosses one seam: a source answers, and the runner\n  checks the answer.\n- **No loops in actions, no `await`.** A list is a view's keyed `for`, a computation is a `derive` or a\n  `fn` (an action may name a value with `let`), and anything slower lives in a\n  source. A list that changes changes where its data lives, through a mutation, as\n  in the example above. That's what lets the plan be baked, diffed, inspected, and\n  executed the same way on four hosts.\n- **No escape hatch; access hatches.** Nothing steps outside the plan. Where an app\n  needs a platform widget, it uses a *native module*: a hyphenated tag like\n  `exact-map`, backed by Swift, Kotlin or Rust, laid out by the kernel like any other box.\n  Where it needs the platform object Exact itself built (a `UIView`, a navigation\n  controller, a DOM element), it marks the node `hatch=\"word\"` and its native code is\n  handed that object: an *access hatch*, the panel a machine is built with so its\n  insides can be reached. It configures what Exact made and changes Contract state\n  only by acting on authored nodes, as a person would.\n\nThese limits serve the principles. An agent can't wire up a data race it can't write.\nA plan with no JavaScript in it starts fast. A view written in CSS's own words lays out\nthe same on every host and looks at home on each.\n\n### The compiler talks back\n\n```sh\n$ cargo run -q -p contract -- build app.contract\napp.contract:4:5 [type-assign] `count` is `number`, cannot assign `string`\napp.contract:7:23 [lower-unknown-attr] `text` has no attribute `size`; `size` is spelled `font-size` here, the web's name (LLP 1017 §8.1)\n```\n\nOne run reports up to twenty independent errors, not just the first. Other subcommands:\n`--json` for tools, `symbols` (definitions and references as JSON), `fmt`\n(source-preserving), `types` (generates `app.contract.d.ts` for TypeScript sources),\nand `rust` (shapes for a Rust data crate). The full language is in\n[the grammar reference](docs\u002Fcontract-grammar.md); its design is LLP 1006, LLP 1017.000\n(v1.1), LLP 1017.003 and, for data sources, LLP 1027.\n\n## Example apps\n\nEach app lives in [`apps\u002F\u003Cname>\u002F`](apps). Run one on the web with\n`bun host\u002Fweb\u002Fdev.mjs --app \u003Cname>`, on macOS with\n`bun host\u002Fapple\u002Fbuild.mjs \u003Cname>-apple --run`, and on iOS by adding `--ios`. All of\nthese screenshots come from the web host, taken by `scripts\u002Fagent.mjs`.\n\nTo learn from, start with [Shelf](apps\u002Fshelf), the recipe app. It names no colour and no\nfont size, and `scripts\u002Fno-tells.mjs` holds it to that, so it shows what an app that\nleaves presentation to the platform looks like on each host. Then read these four for\nwhat each teaches. They were written before LLP 1115\nand paint their own colours and sizes, so take their structure, not their style:\n\n| App | What it teaches |\n|---|---|\n| [Caltrain](apps\u002Fcaltrain) | A Rust data crate, authored tests, routes, an optional GPU module |\n| [Weatherlight](apps\u002Fweatherlight) | TypeScript with `fetch` and grants |\n| [Fieldnotes](apps\u002Ffieldnotes) | Storage: SQLite, files, backup and restore |\n| [Recorder](apps\u002Frecorder) | The microphone through `@exact\u002Fmedia-capture` and `@exact\u002Frecording` |\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd width=\"25%\">\u003Cimg src=\"docs\u002Fscreenshots\u002Fcaltrain-web.webp\" width=\"200\" alt=\"Caltrain\">\u003C\u002Ftd>\n    \u003Ctd width=\"25%\">\u003Cimg src=\"docs\u002Fscreenshots\u002Fweatherlight.webp\" width=\"200\" alt=\"Weatherlight\">\u003C\u002Ftd>\n    \u003Ctd width=\"25%\">\u003Cimg src=\"docs\u002Fscreenshots\u002Fspark.webp\" width=\"200\" alt=\"Spark\">\u003C\u002Ftd>\n    \u003Ctd width=\"25%\">\u003Cimg src=\"docs\u002Fscreenshots\u002Fexpose.webp\" width=\"200\" alt=\"Expose\">\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr valign=\"top\">\n    \u003Ctd>\u003Ca href=\"apps\u002Fcaltrain\">\u003Cb>Caltrain\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>The app that defines v1: nearby stations, live departure boards, search, theming, a Canvas 2D line map, and an aurora GPU sky. Rust data. Every host.\u003C\u002Ftd>\n    \u003Ctd>\u003Ca href=\"apps\u002Fweatherlight\">\u003Cb>Weatherlight\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>Weather from Open-Meteo under a GPU-animated sky that follows the hour you pick. TypeScript data and a wgpu module.\u003C\u002Ftd>\n    \u003Ctd>\u003Ca href=\"apps\u002Fspark\">\u003Cb>Spark\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>A swipe deck: throw a card with your finger, and it flies off with your release velocity. Pan gestures and springs on every host.\u003C\u002Ftd>\n    \u003Ctd>\u003Ca href=\"apps\u002Fexpose\">\u003Cb>Expose\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>A pretend phone OS (lock screen, home, Messages with an AI assistant, Reader) set in custom fonts. TypeScript. The assistant needs an OpenRouter key.\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fcalendar.webp\" width=\"200\" alt=\"Calendar\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fsparkline.webp\" width=\"200\" alt=\"Sparkline\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fphoto-editor.webp\" width=\"200\" alt=\"Photo Editor\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fvideo-player.webp\" width=\"200\" alt=\"Video Player\">\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr valign=\"top\">\n    \u003Ctd>\u003Ca href=\"examples\u002Fcalendar\">\u003Cb>Calendar\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>Month pages, draggable sheets, events dragged between days, wallpaper themes, SQLite. It lives outside \u003Ccode>apps\u002F\u003C\u002Fcode>, so set \u003Ccode>EXACT_APP_DIR\u003C\u002Fcode> to run it.\u003C\u002Ftd>\n    \u003Ctd>\u003Ca href=\"apps\u002Fsparkline\">\u003Cb>Sparkline\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>A market list of animated SVG charts that draw in and pulse.\u003C\u002Ftd>\n    \u003Ctd>\u003Ca href=\"apps\u002Fphoto-editor\">\u003Cb>Photo Editor\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>Rotate, pan, and crop, through a native module.\u003C\u002Ftd>\n    \u003Ctd>\u003Ca href=\"apps\u002Fvideo-player\">\u003Cb>Video Player\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>A bundled clip that shrinks out of the way when the keyboard opens.\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd width=\"50%\">\u003Cimg src=\"docs\u002Fscreenshots\u002Fexact-live.webp\" width=\"420\" alt=\"Exact Live\">\u003C\u002Ftd>\n    \u003Ctd width=\"50%\">\u003Cimg src=\"docs\u002Fscreenshots\u002Finteraction-gallery.webp\" width=\"420\" alt=\"Still, the interaction gallery\">\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr valign=\"top\">\n    \u003Ctd>\u003Ca href=\"apps\u002Fexact-live\">\u003Cb>Exact Live\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>A creative-production workspace: a photo grid you reorder by dragging, a crew chat that can take a 10,000-message burst, and a Markdown runbook. Rust data.\u003C\u002Ftd>\n    \u003Ctd>\u003Ca href=\"apps\u002Finteraction-gallery\">\u003Cb>Still\u003C\u002Fb> (Interaction Gallery)\u003C\u002Fa>\u003Cbr>Drag to reorder, pan and zoom photos, a resizable sheet with a nested list, and 100 to 25,000 records.\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Freflow.webp\" width=\"420\" alt=\"Reflow\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Ftextflow.webp\" width=\"420\" alt=\"Textflow\">\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr valign=\"top\">\n    \u003Ctd>\u003Ca href=\"apps\u002Freflow\">\u003Cb>Reflow\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>Seven typography studies after Cheng Lou's Pretext demos: text flowing around moving balls, a dragon, masonry, and a magazine spread. Line heights come from font metrics read at build time.\u003C\u002Ftd>\n    \u003Ctd>\u003Ca href=\"apps\u002Ftextflow\">\u003Cb>Textflow\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>Text around shapes with CSS's \u003Ccode>shape-outside\u003C\u002Fcode> and \u003Ccode>wrap-flow\u003C\u002Fcode>: draggable orbs, a dancer, an editorial layout. One Rust walker shared by every host.\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fmarkdown.webp\" width=\"420\" alt=\"Markdown reader\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Frealworld.webp\" width=\"420\" alt=\"Conduit, the RealWorld app\">\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr valign=\"top\">\n    \u003Ctd>\u003Ca href=\"apps\u002Fmarkdown\">\u003Cb>Markdown\u003C\u002Fb>\u003C\u002Fa>\u003Cbr>A Markdown reader that opens files from Finder or the command line (\u003Ccode>mdview README.md\u003C\u002Fcode>). Its sibling \u003Ca href=\"apps\u002Fllp\">\u003Cb>LLP\u003C\u002Fb>\u003C\u002Fa> (\u003Ccode>llpview\u003C\u002Fcode>) reads a directory of numbered design documents (LLPs).\u003C\u002Ftd>\n    \u003Ctd>\u003Ca href=\"apps\u002Frealworld\">\u003Cb>Conduit\u003C\u002Fb> (RealWorld)\u003C\u002Fa>\u003Cbr>The RealWorld Medium clone against its hosted API. It's the benchmark that compared Exact's web build with React 19. Web only.\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\u003Ctable>\n  \u003Ctr>\u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fsvg-gallery.webp\" width=\"860\" alt=\"SVG Gallery\">\u003C\u002Ftd>\u003C\u002Ftr>\n  \u003Ctr>\u003Ctd>\u003Ca href=\"apps\u002Fsvg-gallery\">\u003Cb>SVG Gallery\u003C\u002Fb>\u003C\u002Fa>: SVG as the browser renders it, one page per feature, held to Chrome's pixels on every host.\u003C\u002Ftd>\u003C\u002Ftr>\n  \u003Ctr>\u003Ctd>\u003Cimg src=\"docs\u002Fscreenshots\u002Fcanvas-gallery.webp\" width=\"860\" alt=\"Canvas Gallery\">\u003C\u002Ftd>\u003C\u002Ftr>\n  \u003Ctr>\u003Ctd>\u003Ca href=\"apps\u002Fcanvas-gallery\">\u003Cb>Canvas Gallery\u003C\u002Fb>\u003C\u002Fa>: the HTML Canvas 2D API drawn by the browser, Core Graphics, or tiny-skia, and compared to Chrome.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n### More apps, labs, and stress tests\n\n| App | What it shows | Notes |\n|---|---|---|\n| [Fieldnotes](apps\u002Ffieldnotes) | A local notebook with pins, search, SQLite storage, and JSON backup and restore | TypeScript + Rust |\n| [Messages](apps\u002Fmessages) | A port of Expo's chat demo, talking to models through OpenRouter | Needs `bun apps\u002Fmessages\u002Fservice.ts` and an OpenRouter key |\n| [Type Tour](apps\u002Ftypetour) | Phone-OS screens as a type specimen for the Expose fonts | No JavaScript at all |\n| [Map Demo](apps\u002Fmap-demo) | Native modules: MapKit on Apple and OpenStreetMap on the web | |\n| [Carousel](apps\u002Fcarousel) | A horizontal virtualized list of 25,000 cards | |\n| [Motion Gallery](apps\u002Fmotion-gallery) | Animated GIF and WebP images and CSS keyframes, compared across hosts | |\n| [Update Lab](apps\u002Fupdate-lab) | Live replacement of Contract, TypeScript, and Rust in a running app | Hand-testing lab |\n| [Messages Stress](apps\u002Fmessages-stress), [Completion Storm](apps\u002Fcompletion-storm), [Markdown Stress](apps\u002Fmarkdown-stress) | 100k-message histories, 128 parallel requests, and 4 MiB documents, under load | Opt-in workloads (LLP 1041) |\n| [Native Fixture](apps\u002Fnative-fixture), [Auth Fixture](apps\u002Fauth-fixture) | The native-module interface; OAuth with PAR, DPoP, and PKCE against a local server | Test fixtures |\n| [Beacons, Tennis, …](game\u002Fgames) | Games on the optional [engine add-on](game\u002FREADME.md): Rust gameplay, Contract menus | `bun game\u002Fdev.mjs beacons` |\n\n## What works today, and what doesn't yet\n\nThe v1 bar, from `rules\u002FDEFERRED.md`: *one real application, not a demo, runs from a\nsingle Contract source on web, macOS, iOS, and Linux, within the time budgets in\n`rules\u002FRULES.md`.* Caltrain is that application, and it runs on all four. Everything\nelse here was admitted because a real app needed it.\n\n### Working\n\n- **Four hosts.** Web, macOS (AppKit, no SwiftUI), iOS (UIKit, on the Simulator and\n  on devices), and Linux (GPU or CPU painting, DRM\u002FKMS or headless). Existing Swift apps\n  can embed Exact sessions through ExactKit\n  (LLP 1031).\n- **Layout and text.** CSS block, flex, and grid; `position: static` and containing\n  blocks; `aspect-ratio`; declared fonts; text around shapes\n  (LLP 1043.000).\n- **Paint.** Gradients, shadows, `backdrop-filter`, glass materials, complete SVG\n  (LLP 1055), Canvas 2D on every host\n  (LLP 1056), and a wgpu GPU canvas loaded after first\n  pixel.\n- **Motion.** CSS transitions, springs, `@keyframes`, follow-and-release gestures (pan,\n  swipe, pinch) with release velocity, layout transitions, exit animations, and\n  drag-linked timelines (LLP 1002,\n  LLP 1063,\n  LLP 1057.003); a scroller is not yet a\n  timeline's source.\n- **Lists.** Virtualized lists, vertical or horizontal, one level deep\n  (LLP 1070). The rows of a vertical\n  `list` are its platform's: UIKit's separators and highlight, a table on the Mac, one\n  line between rows on the web, with nothing drawn by the app\n  (LLP 1115.000, D16).\n- **Controls and media.** Inputs, `select`, a WYSIWYG Markdown editor on the web, macOS,\n  and iOS (LLP 1045), images including animated\n  ones, video (LLP 1042), pickers for an app's declared file\n  types, and share.\n- **Data.** TypeScript or Rust sources, optionally on a worker. Grant-checked `fetch` and\n  streams, files and SQLite (native and in the browser), Keychain secrets, and OAuth\n  sign-in. A router keeps a stack per tab (LLP 1038).\n- **Native modules.** Platform widgets as hyphenated tags\n  (LLP 1024).\n- **The web, server side.** Pages pre-rendered at build time or per request by a Rust\n  renderer, then adopted in place instead of hydrated\n  (LLP 1048).\n- **Delivery.** `scripts\u002Fdeploy.mjs` publishes the web root and signed update bundles,\n  which installed apps fetch after first pixel. Apple apps check every fifteen\n  minutes while active under every activation policy; `deploy.check.interval`\n  overrides the interval in seconds. Checks stage a candidate; `deploy.activate`\n  controls when it applies. TypeScript and Rust logic can be\n  replaced live in development. Every web build gets an install page, and\n  `exact release` signs and notarizes a Mac app\n  (LLP 1030).\n- **Agents and tests.** The ten operations on every host, including a physical\n  iPhone; Contract tests; source maps; filmed screenshots.\n\n### Not yet, or not at all\n\n- **Windows.** Apps default to ink on a DirectX 11 composition swap chain,\n  or CPU when the manifest declares `game`. `host.windows.painter: \"ink\"`\n  or `\"cpu\"` selects either painter, and `EXACT_PAINTER` overrides both.\n  Skirmish is a standalone game built with Exact's optional game engine;\n  the CPU default preserves its module-owned window presentation (LLP 1149 D12).\n  [Windows Desk](apps\u002Fwindows-desk\u002FREADME.md) demonstrates\n  native controls over Contract and the kernel with an app-local Win32 presenter;\n  general Windows control parity and delivery remain unfinished.\n- **Android.** Admitted (2026-10-07) and early. An app builds for Android and runs\n  on an emulator or a phone: `bun exact.mjs android` builds it, `bun exact.mjs test\n  android` runs its tests, and `bun exact.mjs agent android …` drives it\n  (LLP 1107). It needs the Android SDK,\n  the Rust target `aarch64-linux-android`, and the Hermes Android bundle, which\n  `exact setup` installs with the target. Delivery and\n  store packaging don't exist yet.\n- **No JSX or React tier.** Nothing runs JavaScript above the data seam. The door stays\n  open, but no one is building it.\n- **Code updates in production.** Signed delivery covers plans and assets. Signed\n  delivery of TypeScript or Rust modules isn't implemented, and app-store rules limit\n  it anyway.\n- **Linux editing.** The web and Apple hosts edit; Linux reads. Linux also has no\n  word segmenter, so flowed Thai, Lao, Khmer, and Myanmar text breaks only at spaces.\n- **Out on purpose for v1.** Camera access, a gesture arena, general layout animation,\n  grid or masonry virtualization, a general webview beyond `iframe`, and a devtools UI.\n- **No packaged CLI.** You work from a source checkout. `exact new` apps refer to it by\n  path.\n\n[`QUEUE.md`](QUEUE.md) lists what would make sense to do next.\n\n## Repository map\n\n| Path | What's there |\n|---|---|\n| [`kernel\u002F`](kernel) | `exact-kernel`: the node arena, wire frames, transactions, Taffy layout, and the export. [`kernel\u002Ftables\u002Fschema.json`](kernel\u002Ftables\u002Fschema.json) declares every node type, property, and opcode. |\n| [`contract\u002F`](contract) | The Contract compiler (`syntax` → `types` → `analyze` → `lower`), its CLI, and the corpus |\n| [`plan\u002F`](plan), [`runner\u002F`](runner) | The plan format, generated from one JSON authority, and the VM that runs it |\n| [`motion\u002F`](motion) | CSS transitions, springs, and the seekable clock for non-web hosts |\n| [`host\u002F`](host) | `web\u002F`, `web-js\u002F` (the JS target), `apple\u002F` (Rust core, ExactKit Swift package, AppKit and UIKit), `linux\u002F`, `render\u002F` (server pages), plus update adapters and rasterizers |\n| [`js\u002F`](js), [`logic\u002F`](logic), [`data\u002F`](data) | The TypeScript executor (Hermes, and the browser's engine on the web), Rust logic modules, and the data seam |\n| [`gpu\u002F`](gpu), [`canvas\u002F`](canvas), [`textflow\u002F`](textflow), [`markdown\u002F`](markdown) | Capabilities loaded on demand: the wgpu canvas, Canvas 2D, text around shapes, and the Markdown editor |\n| [`route\u002F`](route), [`update\u002F`](update), [`bake\u002F`](bake), [`filesystem\u002F`](filesystem) | The router, the signed update store, delivery baking, and app-owned files |\n| [`apps\u002F`](apps), [`examples\u002F`](examples), [`game\u002F`](game) | The apps above, the Calendar example, and the optional game engine |\n| [`scripts\u002F`](scripts) | `exact.mjs`, `agent.mjs`, `smoke.mjs`, `metrics.mjs`, `deploy.mjs`, and the checks |\n| [`rules\u002F`](rules) | [`RULES.md`](rules\u002FRULES.md) and [`DEFERRED.md`](rules\u002FDEFERRED.md), the two binding documents |\n| [`vendor\u002Ftaffy\u002F`](vendor\u002Ftaffy) | Taffy, plus Exact's patches |\n\n## Working on Exact\n\nStart with [`rules\u002FRULES.md`](rules\u002FRULES.md), one page on how work happens here, and\n[`rules\u002FDEFERRED.md`](rules\u002FDEFERRED.md), what v1 deliberately leaves out. Agents should\nalso read [`AGENTS.md`](AGENTS.md). In short:\n\n- **Six blocking checks, 65 seconds in total.** Anything slower runs asynchronously,\n  per commit.\n\n  ```sh\n  cargo build --all-targets --keep-going\n  cargo test --tests --no-fail-fast\n  cargo clippy --all-targets --keep-going -- -D warnings && cargo fmt --all -- --check\n  bun scripts\u002Fcaps.mjs     # budgets: 1,500 lines per source file, document caps\n  bun scripts\u002Fboot.mjs     # counts the module graph before first pixel\n  cargo check --workspace --all-targets --keep-going   # every crate compiles\n  ```\n\n  The first three build and test Cargo's `default-members`. The last compiles every\n  other crate too, so a host or an app outside them cannot stop compiling unseen. It\n  needs the pinned Bun (`package.json`) first on `PATH`: app crates' build scripts run it.\n\n- **Verify by running, not by reading.** Build the app a change touches and drive it:\n  `bun scripts\u002Fsmoke.mjs \u003Cweb|macos|ios|linux>` drives the whole app on that host.\n- **Delete; don't deprecate.** Before 1.0 there are no compatibility shims. Generated\n  files are built, never committed.\n- **Agents remove apparatus freely and add none** (checks, scripts, registries, design\n  documents) without a person saying so.\n- **Design happens in LLPs.** These are the numbered documents of the design record. A spec gets\n  written only when it has an implementer and a date.\n\nDetailed operational notes cover toolchains, the Contract CLI's JSON formats, source\nmaps, TypeScript and Rust data modules, storage, live replacement, delivery trust, the\ninstall page, and the stress harnesses. They're in\n[`docs\u002Freference.md`](docs\u002Freference.md). Open issues are files under\n[`issues\u002F`](issues) ([how that works](docs\u002Fissues.md)).\n\nThe workspace is MIT-licensed (`Cargo.toml`).\n\nExact’s Snapback4 adapter uses published **0.4.33** with the matching immutable\nRust source revision `3653cae823145170df3e720f5e321bd1b5b4d79d`.\nSee [the adapter guide](snapback4\u002FREADME.md) for wiring and device rebuilds.\n","Exact 是一个跨平台原生应用运行时框架，支持一次编写、多端原生运行（Web、macOS、iOS、Linux）。其核心采用声明式界面语言 Contract 描述 UI，结合 TypeScript 编写业务逻辑，并深度集成 AI 工具链，使 AI 代理可自动完成构建、启动、视觉验证与跨平台测试。技术上基于 Rust 实现高性能底层运行时，Web 端直用 DOM\u002FCSS，桌面与移动端分别渲染为 AppKit\u002FUIKit 原生控件，确保各平台体验一致性。适用于需兼顾开发效率与原生质量的中小型跨端应用，尤其适合由 AI 协同开发、快速验证多端一致性的场景。",2,"2026-11-24 04:40:02","CREATED_QUERY"]