Bootstrap
Three commit() calls — one per root scope
(engine, ui, agent; see pilot.md).
The pilot uses a single database with these three scopes standing in for
what a peered system would mount from separate sources. Engine and UI
chunks come first, as if mounted from external databases. Agent chunks
come last, referencing engine contracts by placing instances on
them.
Commit 1: Engine
Runtime contracts and primitives. In a peered system these come from the engine's own database.
engine— root scopeprogramarchetype onengine:{ required: ['executable', 'runtime'] }. Any chunk with an executable and a runtime declaration is a program; instances of program are the runnable things in the system. Theruntimefield is'webview' | 'vm'(seeengine.md); other body fields (capabilities,boundary,timeout_ms) are optional.processarchetype onengine:{ propagate: true }. A process chunk is the artifact of a run — created by the engine each time a program is invoked.propagate: trueso any typed arguments placed on a process are validated against the program'saccepts. The engine writes process state into the body (status,started,pid,timeout_ms,error?— seeengine.md); these are engine-managed, not enforced by the substrate's spec rules.read-boundaryonengine(instance) andprocess(relates). A boundary chunk isrelateson the process it belongs to — boundaries are execution configuration, not structural content.write-boundaryonengine(instance) andprocess(relates).
Commit 2: UI
Composition primitives for the host's interface layer. In a peered system these come from the host module's own database.
ui— root scopesessiononui:{ propagate: true, accepts: ['tab', 'process'] }. The outer container of the host's interface state — a session holds tabs (current arrangements) and processes (running and completed programs, visible in the sidebar).tabonui:{ propagate: true, accepts: ['tile'] }. The root of a tile tree. Workspaces are tabs.tileonui:{ ordered: true }. A node in the split tree. Split nodes carry{ direction, ratio }; leaf nodes are empty and point at a process through arelatesplacement.overlayonui. A program rendered above its anchor (session, tab, or tile) rather than inside the tile composition.recipeonui:{ propagate: true, accepts: ['tile'] }. A preserved tile subtree that can be spawned into a new root.
Commit 3: Agent
Project tools and concrete programs. References engine contracts across the peer boundary.
agent— root scopesessionarchetype onagent:{ propagate: true, ordered: true, accepts: ['prompt', 'answer', 'tool-call', 'tool-result', 'context'] }. Distinct fromui/session— this is the agent's interaction trace.- Session event types on
agent(instance) andsession(relates):promptwith{ required: ['text'] },answer,tool-callwith{ required: ['program'] },tool-resultwith{ required: ['program'] },contextwith{ ordered: true }. - Tool programs on
agent(instance) andprogram(instance):filesystem,shell,web. Each declares{ propagate: true, accepts: [argument-type], runtime: 'vm' }, an intrinsic boundary limited to its own process scope, and the executable path. Each argument type isrelateson its program with{ required: [...] }and a schema in body for API tool generation. claudeonagent(instance) andprogram(instance):{ propagate: true, accepts: ['session', 'context', 'prompt'], runtime: 'vm' }.session,context,promptplacedrelatesonclaude. Intrinsic boundary:open— defers all restriction to the run.echoonagent(instance) andprogram(instance):{ propagate: true, accepts: ['message'], runtime: 'vm' }— a minimal test program that echoes its input back as an answer.messagetype onecho(relates) with{ required: ['text'] }.
After bootstrap. The substrate holds the three root
scopes with their contracts. Bootstrap doesn't create a
ui/session or any tabs; the first time the host launches,
it creates an initial session and an empty tab for the user to work
from. That first action is a program run, not part of the bootstrap
commit.