Skip to content

File system

File system

A tenant workspace is a plain Vite project. Authors place one declaration in each recognized filesystem role under src/ ; Bolt derives all assembly and generated types from there. This page is the map — the rest of the Authoring section details each role.

Canonical layout

src/
├── +agents.md                     # required — the workspace prompt
├── +env.ts                        # optional — declare env vars; private keys are server-only
├── access/
│   ├── +teams.ts                  # which policies each named team holds
│   ├── +anonymous_limits.ts       # pre-sign-in address limits only
│   └── policies/+<name>.ts        # grants, approvals, capabilities, and limits
├── capabilities/
│   ├── tools/+<name>.ts           # optional workspace tool
│   ├── mcp/+<name>.ts             # optional remote MCP server
│   └── skills/<name>/SKILL.md     # optional workspace Agent Skill
├── collections/
│   ├── +relationship.ts
│   └── <lower_snake_case>/
│       ├── +model.ts
│       ├── +collection.ts         # optional — the write contract; absent means read-only
│       ├── +pipelines.ts          # optional
│       ├── +integrations.ts       # optional
│       └── +representation.svelte # required — create, display, and edit form
├── datatypes/<name>/
│   ├── +definition.ts
│   └── +renderer.svelte           # optional — falls back to the built-in JSON renderer
├── apps/
│   ├── +<app>.svelte
│   └── <group>/
│       ├── +group.ts
│       └── +<app>.svelte
├── automations/+<name>.ts
├── envoys/+<name>.ts
├── functions/+<name>.ts
├── i18n/
│   ├── messages.en.json           # required — English copy
│   └── messages.zh.json           # required — Chinese copy, exact same keys
└── lib/**                         # optional, free-form helper code — no role, no + prefix

Required roles are src/collections/+relationship.ts , at least one collection +model.ts , and at least one app src/apps/**/+<lower_snake_case>.svelte . App, automation, function, and envoy IDs come from their filenames. Misplaced, duplicated, nested, and unknown role files fail structural compilation. The workspace prompt in src/+agents.md and the bilingual catalogs in src/i18n/ are required.

Generated state

.norbital/
├── artifact/      # ignored — release bundle, code chunks, manifest, assets
├── config/        # committed — doctor configuration
├── diagnosis/     # ignored
├── dist/          # ignored — browser client
├── generated/     # ignored
├── migrations/    # committed — SQL lineage
├── types/         # ignored
└── tsconfig.json  # ignored

The authored root tsconfig.json extends .norbital/tsconfig.json . Bolt owns that single generated config and all compiler paths; it does not use baseUrl . Only .norbital/migrations/ and the authored doctor configuration .norbital/config/ are committed — everything else under `.norbital/` is regenerable output, including the release artifact.

Commands

bolt sync
bolt migrate
bolt audit
  • bolt sync runs the filesystem compiler: it validates roles, generates registry modules, local $types , and the generated TypeScript config.
  • bolt migrate diffs the authored models against the migration lineage and writes the next entry under .norbital/migrations/ .
  • bolt audit runs the static code-quality audit when the optional peer @norbital-ai/doctor is installed, and writes its report under .norbital/diagnosis/ .

Authoring boundaries

  • Apps import typed client access from $bolt/client .
  • Server roles use their adjacent generated ./$types.js .
  • Do not hand-author registries, assembly modules, generated declarations, or bundling scripts.
  • Do not add SvelteKit routes, svelte.config.* , $app/* , or #lib .

Every role at a glance

Each role is one file in one place, default-exports one declaration, and owns its identity by filename. Unknown, duplicate, misplaced, or legacy role files are compiler errors — not silently ignored files.

RoleLocationExportsDocs
Collection modelcollections/<name>/+model.tsdefineModelCollections
Relationship registrycollections/+relationship.tsrelationship builderCollections
Write contractcollections/<name>/+collection.tsdefineCollection declarationWrite contract
Pipelinescollections/<name>/+pipelines.tspipelines declarationPipelines
Integrationscollections/<name>/+integrations.tsintegrations declarationIntegrations
Form overridecollections/<name>/+representation.sveltecreate/display/edit component — required for any collection users create or openUI components
Custom typedatatypes/<name>/+definition.tsdefineCustomTypeUI components
Custom type rendererdatatypes/<name>/+renderer.sveltedisplay/edit component — optional; a kind without one falls back to the JSON rendererUI components
Appapps/**/+<name>.svelteapp componentApps
App groupapps/<group>/+group.tsgroupApps
Automationautomations/+<name>.tsdefineAutomationAutomations
Agent toolcapabilities/tools/+<name>.tsdefineAgentToolCustom tools
Envoyenvoys/+<name>.tsenvoy declarationEnvoys
Agent instructions+agents.mdworkspace promptNorbius
Agent skillcapabilities/skills/<name>/SKILL.mdskill documentNorbius
Policyaccess/policies/+<name>.tspolicy declarationPolicies
Functionfunctions/+<name>.tsdefineQueryHandler / defineCommandHandlerFunctions
Environment+env.tsdefineEnvironmentWorkspace Studio

Reserved names and identifiers

Several names are owned by the platform. Using them is a compile error, not an override:

  • System collections — user , team , approval_request , session , and the rest of the platform baseline can be queried but never redefined ( System collections )
  • Platform columns — id , created_at , updated_at , row_version , sys_period , and approval_id are added to every row automatically
  • Built-in agent tools — describe_workspace , read_collection , write_collection , list_skills , read_skill , subagent , wait / todo / compact / search_task_history / read_messages / use_image / update_plan cannot be redefined as workspace agent tools — dispatch matches the platform’s names first
  • Shipped skills — authoring-tenant-workspace , the runtime’s own authoring contract, is always added; an authored skill of the same name wins
  • Layout primitives — Stack , Inline , Cluster , Split , Grid , Columns , Column , Cover , Center , Frame , Bound , Scroll own their geometry props — see Layout
  • Compiler-private modules — virtual:bolt/* is compiler-private; tenant source must use $bolt/client

Forbidden anywhere in tenant source:

  • schema.ts , workspace.ts , collection barrels, *.schema.ts , app App.svelte , SvelteKit routes, a custom bundler, defineTable , defineSchema , QueryRow , NorbitalAuthoring , $tenant , #lib
  • Legacy APIs the compiler rejects outright — the former Page/Pane/Region, layout metadata, split-client, legacy enum, record-rep, +create.svelte , and call-site create APIs. There is no compatibility path.