Type presets
The three starting presets and how they configure the project.
The --type value selects a starting preset: it sets projectType in weavekit.config.ts,
chooses the initial subsystem composition, and writes a one-line narrative into the config and the
generated README. The core engine is always enabled; a preset never trims it.
| Preset | Narrative | Adds |
|---|---|---|
agent (default) | AI-Agent backend — metadata-driven objects with REST access for AI agents | base field types only |
governance | Governance platform — auditable, permission-scoped business objects | semantic field types |
service | Business service — headless backend with RBAC and a REST API | semantic field types, script subsystem |
Field-type gating
agent presets whitelist only the engine's primitive field types. The other presets additionally
whitelist the semantic field types (for example user and department). The whitelist is
written to features.fieldTypes in weavekit.config.ts and is fail-closed: a schema using a type
outside the list is rejected. Extend the list in the config to opt in to more types.
Script subsystem
service enables the script subsystem:
subsystems: {
script: { enabled: true },
},Script hooks run sandboxed in isolated workers (*.server.js). The other presets leave the
subsystem out, so it costs nothing at runtime until you enable it.
Audit
The governance preset enables the audit subsystem in the generated config:
subsystems: {
audit: { enabled: true, mode: 'transactional' },
},transactional writes the audit row inside the business transaction (crash-safe); best-effort
(the default when you enable audit yourself) may lose the tail on a crash. The other presets leave
audit off — enable it and pick a crash-safe mode for production. See the engine's audit guide.
Workflow
Presets never enable a state machine. It is declaration-driven and opt-in per object:
weave workflow:open <object> # adds workflowEnabled: true + a starter workflow.jsonOnly the onTimeout timer scheduler is a subsystem — add it with weave module:add workflow when you
use state timeouts. See the engine workflow guide.
You can change the composition later with the CLI (weave module:add / weave module:remove);
weavekit.config.ts is the source of truth.