{% setting %}
Attributes
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | β | Unique identifier prefixed with 'setting:' β e.g., 'setting:storage' |
type | string | β | Value type: string | boolean | number | enum |
default | string | β | Default value serialised as a string |
Valid Parent Contexts
This tag is valid inside: {% domain %}, {% feature %}
Rules
| Rule | Force | Realm | Reference | Description |
|---|---|---|---|---|
setting-id-prefixed | | | β | Setting ids follow the convention. The unqualified part must be descriptive and unique within the project β e.g. , , . |
Declares a single application configuration setting. Body text (optional) is treated as the setting description. Settings are collected into the parent document bundle, a global aggregate, and a public settings.mdx page.
Agent bundle shape
{ "settings": [ { "id": "setting:storage", "type": "string", "default": "indexedDB", "description": "Storage backend used for bookmark persistence." } ]}Aggregate bundle shape (aggregate/settings.toon)
{ "type": "aggregate", "id": "settings", "items": [ { "sourceId": "domain/bookmark", "id": "setting:storage", "type": "string", "default": "indexedDB", "description": "Storage backend used for bookmark persistence." } ]}Markdoc config schema
The \{% setting %\} tag is included in the generated markdoc.config.mjs (used by the VS Code Markdoc extension for inline validation). The schema entry is produced by packages/compiler/scripts/generate-schema.ts, which reads the Tag classβs static Schema from core/tags/Setting.ts (via the processorβs zodSchema property) to emit Markdoc attribute descriptors with Zod descriptions.
Regenerate after any attribute change:
pnpm generate-schema # or: pnpm compile (runs it as part of the full build)Expected entry in markdoc.config.mjs:
setting: { render: 'setting', attributes: { scope: { type: String, description: 'Visibility scope (e.g. public agent)' }, id: { type: String, required: true, description: 'Unique identifier...' }, type: { type: String, required: true, description: 'The value type...' }, default: { type: String, required: false, description: 'Default value...' }, }, description: 'An application configuration setting...',}VS Code snippet
The tag:setting snippet is registered in .vscode/starspec.code-snippets and is scoped to *.domain.mdoc and *.feature.mdoc files. Trigger it by typing tag:setting and pressing Tab.
"Tag: Setting": { "prefix": "tag:setting", "include": ["*.domain.mdoc", "*.feature.mdoc"], "body": [ "{% setting id=\"setting:${1:name}\" type=\"${2|string,boolean,number,enum|}\" default=\"${3:value}\" %}", "${4:Description of the setting}", "{% /setting %}" ]}{% setting id="setting:storage" type="string" default="indexedDB" %}Storage backend used for bookmark persistence. Supported values: `indexedDB`, `sqlite`.{% /setting %}
{% setting id="setting:max-bookmarks" type="number" default="1000" %}Maximum number of bookmarks allowed per user account.{% /setting %}
{% setting id="setting:sync-enabled" type="boolean" default="false" /%}