Build pipeline
Build pipeline
bolt check and bolt build are one pipeline. A workspace has no Vite config and no build script: the compiler discovers the roles from the file tree and owns every stage.
Stages
bolt check runs every stage and reports every error at once:
- Discover — walk
src/, match every+file to its role, and refuse unknown files, misplaced roles and bad names - Names — write the names index,
.norbital/names.ts, which maps each name totypeofits declaration - Bundle — bundle tenant code for the guest isolate, and pages for the client
- Evaluate — evaluate the declarations in an isolate with a frozen clock, twice; a declaration whose result differs between the runs is refused
- Manifest — build the manifest, pure data, from the declarations
- Seed — decode the seed rows against their collections
- Schema — derive the database schema from the manifest
- Types — tsc and svelte-check over the workspace
- Doctor — the static rules, the layout rules included
The artifact
bolt build writes .norbital/artifact/ — the manifest, the schema, the guest bundle, the client bundle, assets and skills — and the seed packs beside it: base, and sample when given a seed bank. A host runs only an artifact; it never builds source.
Schema plans
On activation a host compares the applied schema with the manifest and applies one plan in one transaction, in steps: additive, backfill, validating, destructive. A failed validation names the constraint and the offending rows. Destructive steps are accepted automatically only by bolt dev; bolt start needs --accept.
The dev loop
bolt dev rebuilds incrementally, re-evaluates, applies the plan and swaps the running workspace in about two seconds; a failed step keeps the previous one serving.