Plan

This is the plan for writing and building The OpenAgents Book. It gives an order and no dates.

The first draft (2026-11-10) followed the port audit and started from the agent loop; the apps waited for chapter 61. On 2026-11-13 (#13512) the book was reordered so that working web and iPhone apps came first, on Coax Native, from shared DOM and UIKit components. On 2026-11-15 (#13645) the opening, chapters 1 to 11, was rewritten for the compiled-Coax GPU architecture: every component drawn on the GPU by the shared display-list kit, no JavaScript and no over-the-air updates. Subsequent desktop-first shipping made `apps/openagents-desktop` the primary native host (macOS Metal 4, Linux Vulkan, and Windows Win32/Vulkan #14046), backed by shared Coax screen/app modules in `apps/shared/` that `apps/openagents-ios` and Android consume, the unified 24-layer pure-Coax runtime in `openagents/core/` (#14050–#14057), Coax Web with Coax UI Core/Kit/Router and 0-KB-Wasm SSR in `components/ui/`, OpenAgents Cloud pricing/usage APIs (#14069–#14072), and the locked WorkOS hybrid acct_ auth SDK in `coax/lib/workos/` (#14097–#14103). Chapters 12 to 78 keep their numbers and structure. The chapter map gives each chapter's number in the first draft and in the 2026-11-13 order, so links and notes against the old numbers can be traced.

Where the code goes

A chapter adds a path only where no current owner exists. Everything else extends the owner.

WhatOwnerChapters
App state, actions, routes and the driverCoax Native (`coax/native.md`); shared app state in `apps/shared/`2, 4, 6, 7
Components on the GPU: the frame context, keyed state, the semantic table, the surface commit, text, Markdown, the edit buffer`components/` (GPU components on native)1–3, 5, 7–9
Coax Web, Coax UI Core/Kit/Router, Native SSR/Hydration & DOM presentation`components/ui/`, `components/backend/dom.coax`, `components/backend/html.coax`, `coax/web/`11
The apps`apps/openagents-desktop` primary (macOS Metal 4, Linux Vulkan, Windows Win32/Vulkan `windows/`), with `apps/openagents-ios`, Android (`apps/shared/host/android`), and `apps/openagents-web` consuming shared Coax modules in `apps/shared`1–11, 30, 31, 34, 36, 75, 77
Login, accounts, WorkOS hybrid acct_ spine, agent grants and the HTTP API`coax/web/api/`, `coax/lib/workos/`, `tools/oagen-coax/`, GPU login screen (`apps/shared/login/`), and native auth adapter (`AppAuth.swift`)4, 5, 59, 64
Engines, typed router, sessions, the journal, observation`coax/lib/agent/` (including `router/`)3, 4, 12, 15, 18, 25, 26, 37
Unified 24-layer pure-Coax agent runtime, member packs, subagents, permissions & memory`openagents/core/` and `coder/tui/oa-worker.coax` / `oa-subagent.coax`12–14, 17–18, 23–28, 33–36
Money rules, paid capabilities & author payoutsThe Payments context, `pay/` (wallet.coax, wallet-rpc.coax, price-policy.coax, receipt-policy.coax, payout-policy.coax, executor-settlement.coax)32, 33, 56–58, 61, 70
Signed capability registry & hash-pinned installs`openagents/registry/` (registry.coax, install.coax, #14060)47, 54–55
The walletShared Apple Breez Spark host (`SparkWallet.swift`), Desktop wallet panel & RPC (`walletpane.coax`, `Window+Wallet.swift`, `Window+WalletRPC.swift`), and openagents wallet CLI (`wallet.coax`) over #authority `pay/`32, 33
Voice`metaverse/voice.coax`, `apps/shared/dictation.coax`, `apps/openagents-desktop/page/voice.coax`, `Window+Voice.swift`31
Worlds & Embedded GameBuilderThe Metaverse Engine (`metaverse-engine/`), `gamebuilder/worlds/`, `apps/openagents-desktop/page/metaversepane.coax`71–74
Releases (every iOS change ships in a TestFlight or store build; Desktop via signed macOS/Linux/Windows builds)`coax/remote/`, each app's release script76
Remaining planned product specs (knowledge base, sandboxed plugin SDK, public Gym runner)openagents/agent/, openagents/knowledge/, openagents/eval/ (planned; tracked in #14058–#14059)20–22, 38–53, 60–61, 73

The wire shapes live in `proto/`, and the OpenAgents Protocol describes them. Chapter 4 gives the app the minimum; chapters 62 to 67 give the rest.

The environment application profile owns the proto-first desktop/phone connection to Claude on this Mac and CoderOS, and subsequent realm editing/preview. It composes HOST, ENV, WS and SESS rather than defining another app-specific agent wire. The desktop app and optional headless CLI attach to the same resident execution owner. Chapters 8 and 10 use it.

The checker refuses a planned path that already exists or that sits where a current owner lives (CONTRACT.md).

Chapter map

Each chapter, its part, its number in the first draft ("new" for a chapter added in the 2026-11-13 reorder), what it replaces in the 2026-11-13 order, and the earlier chapters it depends on. Chapters 12 to 78 kept their numbers in the 2026-11-15 rewrite.

ChapterPartFirst draft2026-11-13 orderDepends on
1. A text input on the GPUInewpart of 3 (components)none
2. State and actionsInew21
3. A transcriptInewpart of 11 (the transcript)2
4. A reply from the serviceInew5 (effects), 9 (the API), part of 11 (reply and Stop)3
5. Logging in when a send needs itI508 (accounts and login), part of 4 (modals)4
6. One case, every stepInew6, and 11's milestone as history5
7. History and the sidebarIInew4 (routes), part of 10 (the side)6
8. Environment and repository chipsIInewnew7
9. SettingsIInewpart of 10 (settings)7
10. Mobile and other native hostsII21 (one app, every surface)6, 7, 8, 9
11. The webIInew7 (the public website), part of 3 (DOM)6, 7, 9
12. The simplest agentIII1126
13. MembersIII31312
14. A typed planIII41413
15. Decide before you generateIII51514
16. Measure the frontIII61615
17. Grants and approvalsIII71714
18. On the recordIII81814, 17
19. ConversationIII91915
20. Prepared answersIII102016, 19
21. A knowledge baseIII112118, 20
22. Retrieval by meaningIII122221
23. Memory and consentIII132317, 21
24. Coder as a memberIV142413, 17
25. Other enginesIV152524
26. Subagents you can seeIV162618, 25
27. ProgramsIV172714, 24
28. The command line behind the agentIV182815, 17
29. Where work runsIV212917, 24
30. Files and device servicesIVnew304, 6
31. VoiceIVnew316, 30
32. A walletIV193217, 28
33. Spending approvalIV203317, 32
34. State that survivesVnew344, 6
35. Sync across devicesV51355, 10, 34
36. Background, resume and cancelVnew364, 34
37. One owner per taskVnew3729, 35, 36
38. The plugin interfaceVI223813, 17
39. The sandboxVI233938
40. Installing grants nothingVI244017, 39
41. Write a pluginVI254140

Promise coverage

Every promise from the audit's section 1 is covered by at least one chapter. The gap for each is in the audit's section 4. A chapter that covers a promise plans for it; it does not show that the promise is met.

Order of building

Each step ships something a person can use and is the base for the next. Desktop (apps/openagents-desktop) leads as the primary host, sharing its Coax logic in apps/shared/ and openagents/core/ with mobile and web:

StepWhat shipsChaptersTargets
Step 1: the chat pageShared GPU chat page (desktop primary + mobile consumer): text input, Send, transcript, streamed reply with Stop, login card (cpu verified)1–6cpu, macos-arm64, ios-simulator, ios-device
Step 2: sidebar, chips and settingsHistory and sidebar, environment and repository chips, settings (cpu verified)7–9as step 1
Step 3: mobile and other native hostsFull native host parity across iOS (#14023, #14068), Linux Vulkan, Windows Win32/Vulkan (#14046), and Android10, 75, 77macos-arm64, ios-device, android-emulator, android-device
Step 4: the webCoax Web, Coax UI Core/Kit/Router, 0-KB-Wasm SSR books (cpu verified), plus migrating /chat, history and settings onto shared state11cpu, web
Step 5: one agentUnified openagents/core/ loop, #authority members, typed RoutePlan router, grants, records (12–13, 15, 17 cpu verified), plus shared NIP-KB knowledge and memory (#14058)12–23cpu, macos-arm64, ios-device
Step 6: capabilitiesCoder (oa-worker), opt-in external engines (#14071), visible subagents (#14096), CLI allowlist (#14057), files/browser/voice, Desktop+iOS Spark wallet & bypass-immune WalletPay (26, 28, 32–33 cpu verified)24–33as step 5
Step 7: continuityPersistence, checkpoints (#14026), sync, resident coder-host background survival & Tailnet/LAN/Nostr failover (#14027, #14030, #14032)34–37as step 5
Step 8: plugins, evidence and the marketOpenAgents Studio & plugin sandbox (#14059), Gym & evidence rules, signed registry (54–55 cpu verified), 3-leg author royalties (#13961, 58 cpu verified), public NIP-REG/EVAL/PAY market (#14060)38–61as step 5
Step 9: the protocol and computeProtocol compliance, OpenAgents Cloud API & Usage HUD (#14064, #14069–#14072), local $0 Psionic serving (#14028, #14087, 69 cpu verified), Pylons (70 cpu verified)62–70as step 5
Step 10: worlds and deliveryEmbedded Metaverse & GameBuilder pane (#14038–#14046), cross-host conformance, releases from one source, Windows engine conformance, and 1.071–78every target

The desktop and environment service (reconciled with shipped main). `apps/openagents-desktop` is the primary unified desktop host across macOS Metal 4, Linux Vulkan, and Windows Win32/Vulkan (#14046). It attaches to the independent resident coder-host environment service (#14027, #14032) so closing the window never stops an active agent turn, and reaches paired phones over Tailnet → LAN → Nostr relay failover (#14030). See the canonical stages and gates. Full Metaverse Engine Windows conformance (chapter 77) qualifies on its own evidence and never blocks macOS, Linux, web, or mobile.

What the new approach keeps from the first plan

The opening of 2026-11-13 (old chapters 1 to 11), its contract and its plan held ideas the new iOS app should keep. Some it already has; some the old plan did better, and the new app should adopt them.

Keep, and where each applies now:

  1. The four-part chapter check (source, exact trace, refusal, independent check). It is what made the 2026-11-13 milestone credible. Every new opening chapter plans one (CONTRACT.md).
  2. Common coax drive operations on every host, with no private test language per host. The GPU login screen's driver answers tree, tap, type and counts; the old shared module also answered state, clock and logs. Chapter 6 needs the whole set. The old plan is ahead here.
  3. Driver input through the real input path. The old rule was that tap and type never write state directly, and both old hosts refused a driver tap that no real press delivered. Today the login screen's driver tap presses the row's action directly and type sets the field's value, so hit testing and the editor path are not exercised. Adopt: a driver tap enters as a pointer down and up at the row's committed bounds, as the screen's own checks already do, and type enters where the editor's edits enter (chapters 1 and 6).
  4. Fake services with held answers and a controlled clock (`clock data release NAME`, the pinned seed, date, locale and zone), so a trace is byte-exact with no network. The GPU login screen is checked today against a local fixture server and an XCUITest, which is slower and timed by the host. The old plan is better here; chapter 4 adopts it.
  5. A cpu host for cases. The old case runner (apps/shared/cases.coax) played every case on the build host with no simulator and compared bytes. Keep a cpu host for the new cases, so the trace runs in seconds on a build host and the simulator run adds only what needs a simulator (chapter 6).
  6. Meaning before pictures. Assert on state and the semantic tree first; a screenshot last. On the GPU kit everything is pixels, so the committed semantic rows are the anchor for checks, accessibility and the driver alike (chapters 1 and 6).
  7. Effect outbox semantics. Taking a request means accepted or refused, not succeeded; states are pending, done, failed or unknown; an unknown outcome never retries on its own; an operation ID makes a retry safe (chapter 4).
  8. The late-answer fence. Stop, logout and leaving a screen drop late answers; the old logout-pending and reconnect cases are the model for chapters 4 and 5.
  9. Typed routes, and a link is input, not permission, with a return target through login. These arrive with the second place to go (chapter 7) and with URLs on the web (chapter 11).
  10. One execution owner per task. A client presents a turn and never runs it again. It first shows in the app with the environment chip (chapter 8), and chapter 37 builds it.
  11. The three meanings of "one app": shared code, shared data, one execution owner. Chapter 10 keeps the old chapter 1's statement.
  12. The device evidence list. The old milestone ran on a physical iPhone: the number pad on the code field, a Japanese input method sending 日本語 once, non-Latin text and an emoji, labels and the accessibility audit, a reply finishing once across backgrounding. The GPU login screen has run none of these yet. Chapter 6 runs the same list again.
  13. Who may drive a phone: TCP on the phone's own network, a launch token, one driver at a time. Decided on 2026-11-13 and unchanged (chapter 6).
  14. The stale-build refusal. The driver checks the app was built from the source under test. The web has it; the iOS driver still lacks it (chapter 6).
  15. One schema per record, the decision in Coax, and a versioned API. With no over-the-air updates, an installed app can lag the service for weeks and a bad build is fixed only forward, so the version rule matters more than before (chapter 4).
  16. Tokens stay native. No token or pending handle enters Coax, a trace or a log. The GPU login screen already keeps to this (chapter 5).
  17. Stable IDs from role and domain key, never an index, and a duplicate refused, not shared. The G0 foundation enforces this in the keyed store and the surface commit (chapters 1 to 3).
  18. Show only what works, and every limit with its number (chapter 9).
  19. A public page is a web page first, with one source for the page and its Markdown twin (chapter 11).
  20. Large text. The old shared screens were fixed to follow the text size after the device audit. The GPU login screen draws at a fixed scale today. The old app is ahead here; chapter 9 makes it a requirement and chapter 5 applies it to the login card.

Dropped, and why:

  • Shared DOM and UIKit presentation on iOS (old chapters 3 and 11). The GPU kit draws every native component; the UIKit control projection is deleted.
  • Coax as Wasm or JavaScript in WebKit or JavaScriptCore, and the Coax Native starter as the base (old chapter 1 and the README). The app is compiled Coax linked into the binary.
  • Over-the-air Updates (the old README and chapter 76's rule for what may go over the air, and the signed previous package as a way back). Dropped by the owner. The cost is a slower fix path; chapter 4's version rule and chapter 76's fix-forward carry it.
  • The web and the iPhone as twin first targets (old chapter 6). iOS is first; desktop and Android follow (chapter 10); the web is chapter 11. Cross-host byte equality moves to chapters 10, 11 and 75.
  • The public website in the opening (old chapter 7). The iOS app does not need it; it moved to chapter 11.
  • A routes chapter before any screen needs a route (old chapter 4). Routes arrive in chapter 7, with the second place to go.
  • The logged-in shell as one chapter (old chapter 10). It split into the sidebar (chapter 7) and settings (chapter 9).
  • Standalone example programs for the opening chapters (app-state.coax, login-screen.coax, routes.coax, effects.coax). They would copy the app's code into the book. The new checks run against the app's own modules and its .ops cases. The cost: book.py --coax runs none of the opening, so item 5's cpu host is what keeps those traces cheap.
  • Login as the first screen. The code on main built the login screen first (stage G1). The book starts from the composer instead and reuses that screen as chapter 5's login card.

Not written yet

  • PORT.md: one line for each of the 229 crates at coder-v1.0.0.
  • PROTOCOL.md (chapter 63) and ONE-POINT-ZERO.md (chapter 78).
  • The drafts of chapters 35, 65 and 66, which are planned outlines.
  • The capstones "A maker is paid" and "Coder takes a job from the queue", which chapters 73 and 61 point to.

Open questions for the owner

The audit lists five decisions in its section 8. Several major questions are now settled on main:

  • Directory & ownership (decision 1): openagents/book/ holds this book, and `openagents/core/` holds the unified 24-layer pure-Coax agent runtime.
  • Wallet & execution ownership: the self-custodial Breez Spark wallet runs across Desktop, iOS, and CLI over #authority pay/ (#14057, chapter 32), with bypass-immune WalletPay approval (chapter 33); every agent task has one execution owner via resident coder-host (#14027, #14032, chapter 37).
  • Authentication: locked WorkOS hybrid acct_ spine (#14097–#14103, `docs/auth/2026-11-26-workos-coax-sdk.md`) with Custom Coax UI, social OAuth/SSO at L1, and first-party Passkey/Nostr L2/L2-fresh step-up (chapters 5 and 59).
  • Default engines, gateway & local serving: native openagents/core/ (oa-worker.coax) + OpenAgents Cloud retail gateway (#14069–#14072) + $0.00 local psionic-inkling-serve (Inkling-2-Mini, #14028, #14087), with external coding engines (Claude Code, Codex, Cursor, Antigravity) explicitly opt-in (#14071, chapters 25, 68, 69).
  • Executor author royalty cap: 3-leg settlement (Worker + Validator + Module Author) capped at <= 25% (2500 bps) in pay/executor-settlement.coax (#13961, chapters 58 and 70).
  • Windows graphics (decision 5): Vulkan is the shared desktop graphics API across Linux and Windows (apps/openagents-desktop/windows/, #14046, chapter 77).

The chapters still ask these genuinely open owner questions:

<!-- questions:begin --> There are 78 of them.

ChapterQuestion
1Does the first TestFlight build of the lean app ship with only this chapter's text input, or does it wait until chapter 4 gives it a reply?
4Which service answers in this chapter, before chapter 12: the existing /chat route with its live models, or only the fake service until our own loop exists?
5Does the lean app's login card include "Use a Nostr key" in this chapter, or only email until the key login is rebuilt on the kit?
5Do a member's grant (chapter 17) and an agent's grant become one record, or stay two?
5Which scopes come after profile:read and wallet:spend?
8Which environments does the first build list: this account's hosted computer, your enrolled computers, or both?
10The sync spec recommends syncing a conversation through our service, readable by the server at first (chapter 35). Confirm that, and say which collections get end-to-end encryption first.
13What does the product call these? The essays say "members"; Episode 289 says tools, subagents and plugins.
14The audit's plan carries a budget. Our rule is that we impose no limits on a run and show any limit the user sets. Should a plan carry only limits the user set?
15Which of our own decision models backs up Gemini Decision 1 for the front at 1.0, and what result would move our own model to the first door?
15What does the front do when no decision route answers: plain conversation with no routing, as the old tree did, or a visible error?
16Where do the labeled messages come from now? The old set is at the tag. New ones would come from real conversations, which needs a consent rule and must leave out our own testing.
17Which grants can a person give once and keep, and which ask every time?
18Confirm the default: records are private, and publishing one is a separate, explicit act.
19Which model answers general conversation by default, and may a person choose another?
19Where does the written policy live, and who can change it?
20Who reviews a prepared answer before it is served: only us, or trusted contributors too?
21Which of the old tree's notes come back? Many were learned from benchmark tasks and need new evidence.
21Is every entry about OpenAgents public, or are some for logged-in people only?
22Which model makes the embeddings: a hosted one through the gateway, or one we serve with Psionic?
23Where does memory live: on the device only, encrypted on a relay, or on our service?
23Which sharing model do we offer first: none, opt-in publishing, or opt-in sale?
27Which of the twenty recipes come back, and are they members of the general agent or examples in this book?
28Beyond the shipped 8-subcommand allowlist (openagents/core/members.coax), which additional CLI commands should remain permanently denied from chat?
29Does 1.0 offer hosted computers to everyone, and at what price? Episode 276 named one dollar an hour at the time.
29How does hosted compute fit inside the monthly cloud budget as use grows?
31Which voice reads replies aloud by default, and may a person choose another?
32Do we offer a way to buy Bitcoin with a card, as Episode 290 shows, and through whom?
33May a person give an agent a standing allowance in 1.0, or does every payment ask?
35Confirm the sync spec's recommendations S1 to S6, including the 1 GB limit for each account.
35Which collections get end-to-end encryption first?
38Do we read Claude Code's plugin and skill formats directly, or only our own package format?
39Wasm with grants, as the audit recommends, or native processes with an operating-system sandbox? This is the audit's decision 2.
39Which Wasm runtime runs plugins on native hosts: one we write in Coax, or an existing one we link?
41Which of the nine do we port first after the repository map?
42Who pays for the compute an authoring run uses: the person, us for a first run, or the first paid use of the plugin?
42A plugin that files tickets needs the person's login to another service. Does 1.0 include a vault for such logins, or do first plugins avoid them?
45How many cases does a test set need before its result may be published? The first adoption used six.
48How do we get the first validation written by someone outside the company?
49What does the policy require before something becomes a default for everyone: how many confirmations, how many validations, and from whom?
49Is there one default set for the whole agent, or one per member, as Coder had?
50Should verification also earn sats, for example a bounty for a check or a validation, or does it stay points only?
51How much compute do we set aside each month for re-running old claims, inside the cloud budget?
52Who pays for a run on the hosted runner: the trainer in sats, us up to a free amount, or both?
54Do we mirror releases from any relay by default, or only from a list we choose? An open mirror needs a plan for spam.
55Does a defaults update install on its own, or does each person confirm it?
56What can an author price: a call, a unit of work, a subscription?
56Do we offer card-funded credits as Episode 290 describes, with a fee and a Bitcoin discount, and what are the numbers?
56Is there a free amount of paid calls for new people, and who funds it?
57How public is the ledger: every receipt, or totals per release with receipts shown only to the author and the payer?
58What is the general plugin payout schedule and minimum (beyond Executor Network 3-leg royalties capped at 25%)?
58When a plugin depends on another paid plugin, how is the price split between the two authors?
58A tip goes straight from the payer to the maker's own wallet (owner decision D6 in docs/auth, built in #13210). A paid call with a split can't always do that. Who holds the money between such a call and the payout, and under what custody?
59When does a person who logged in by WorkOS email/OAuth get a Nostr key for signing public records, where is it made, and how do they take it with them?
60What makes two keys distinct enough to count as independent confirmations?
61Who accepts a result: the buyer alone, or an independent checker when the buyer asks for one?
61Do the terms of the subscriptions people would lend allow this use? We need an answer per provider before we ship worker mode.
63Which gaps do we close before 1.0, and which do we ship with and name?
64Does the API include an endpoint in the shape other vendors' clients already speak, so existing tools can point at it?
64What does API use cost a partner, and how does that sit with the author's share of paid calls?
65Which record is the worked example: a release, which is public, or a grant, which is private?
65Do chapters show schema text, or only link to proto/?
66Does a chapter reach "implemented" only when its records are compliant?
66Do we publish the fixtures as a kit that a second implementation can run?
67How are authors paid when a self-hosted instance runs a paid plugin locally: by license terms, by plugins that call home for payment, or not at all?
70As public operators join beyond our own machines, should per-job payouts stay fixed or move to open market bidding under daily caps?
70What trust/reputation threshold graduates a new public Pylon from Tier-2 redundant replication to sampled validation?
70Beyond our own coding agents and the Metaverse, who is the first outside buyer?
72Do agents appear in shared public realms by default, or only in your own space until you choose to show them?
73Is the maker's share the same as a plugin author's, and what does a fork's maker owe the original's?
73Who curates the featured list, and by what written rule?
74Who pays for a guard's decisions: the realm's maker, the player, or us while the network starts?
75Does Android get the full OpenAgents app for 1.0, or does the Android game app come first and the agent follow?
76Which stores do we publish to at 1.0, and which platforms get a direct download only?
76Which kinds of update may install on their own, and which ask the person first?
77Do we need a Windows machine in the build fleet, or do we build from another platform and test on a rented one?
78Is 1.0 one release of everything, or does each surface reach 1.0 when its own chapters run?
78Which of the sixteen promises may ship marked "gated" at 1.0, if any?
<!-- questions:end -->