Skip to content

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:

  1. Discover — walk src/, match every + file to its role, and refuse unknown files, misplaced roles and bad names
  2. Names — write the names index, .norbital/names.ts, which maps each name to typeof its declaration
  3. Bundle — bundle tenant code for the guest isolate, and pages for the client
  4. Evaluate — evaluate the declarations in an isolate with a frozen clock, twice; a declaration whose result differs between the runs is refused
  5. Manifest — build the manifest, pure data, from the declarations
  6. Seed — decode the seed rows against their collections
  7. Schema — derive the database schema from the manifest
  8. Types — tsc and svelte-check over the workspace
  9. 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.