Skip to content
{% domain %}
AutoXXS (320px)XS (375px)SM (640px)MD (768px)LG (1024px)XL (1280px)XXL (1536px)
SketchMaterialiOSTamagui
DataInjectionKeyPatternsServiceTransactionProcessResearchProductQualityPerformanceSpecDomainFunctionTechnologyArchitectureConfigMiddlewareDataDatabaseDrizzleMigrationModelop-sqliteSchemaSQLState ManagementDraftKeystoneMergePatchPatchesPersistenceReactiveRedoStoreUndoTestingDeviceFactoryIsolationTypeScriptZodTopicsCommunicationBidsNVCDesignDesign ImplicationsEducationPedagogyFoundationsPsychologyAttachmentFloodingRelatingAuthentic RelatingUIEditorReact Native

{% domain %}

Attributes

Parameter Type Required Description
id string Unqualified domain id matching the frontmatter id (e.g., 'bookmark')
scope string Space-separated list of visibility scopes (e.g., 'public agent')

Valid Children

TagMultiplicity
{% tldr %}[1]
{% explanation %}[*]
{% glossary %}[?]
{% model %}[?]
{% api %}[?]
{% policy %}[*]
{% rule %}[*]
{% diagram %}[*]
{% example %}[*]
{% setting %}[*]
{% surface %}[*]

The domain tag is the root container of a .domain.mdoc file. It groups all vocabulary, data model, API, and reactive policies for a bounded context.

Child tags

TagDescription
glossaryContainer for term children. Terms are also collected globally into the Glossary aggregated page.
modelData model definition. See \{% model %\} for the full schema.
apiActions and events. See \{% api %\} for the full schema.
policyBusiness rule. See \{% policy %\} for the full schema.
diagramEmbedded Mermaid diagram. Any number of diagrams may be embedded; they are rendered in a ## Diagrams section and collected in the global Diagram Gallery. See \{% diagram %\}.

The compiler automatically injects a section into the rendered domain page.

SectionSource
## Related FeaturesFeature documents whose domains attribute references this domain

Agent bundle shape

{
"type": "domain",
"id": "domain/bookmark",
"title": "Bookmark",
"tldr": "Manages the lifecycle of user-saved bookmarks.",
"glossary": [{ "term": "Bookmark", "definition": "A saved URL with metadata." }],
"api": { "actions": [], "events": [], "operations": [], "errors": [] }
}
Minimal domain with glossary and API
tagdomainapiglossary domain-tag-basic
{% domain id="bookmark" scope="public agent" %}
{% tldr %}Manages the lifecycle of user-saved bookmarks.{% /tldr %}
{% glossary %}
{% term id="Bookmark" %}A saved URL with metadata.{% /term %}
{% /glossary %}
{% api %}
{% action name="add-bookmark" %}
Saves a new bookmark.
{% property name="url" type="string" required=true /%}
{% /action %}
{% /api %}
{% /domain %}

Tag Tree

{% tldr %}[1]One-sentence summary rendered as a lead paragraph and used as the document's short description throughout the site.{% explanation %}[*]Provides targeted advice or collapsible detail for a specific audience. Renders as a callout () or a disclosure element (). Supports full Markdown in the body.{% glossary %}[?]Container for all domain-specific vocabulary, ensuring terms are consistently defined across the project.{% term %}[+]Defines a single domain term and its definition inside a glossary.{% model %}[?]Defines the data model for a domain using DBML, rendered with Diagram, Source, and Description tabs.{% rule %}[*]Declares a named convention or constraint in a blueprint, domain, or manifest — optionally traced to a motivating spec item.{% api %}[?]Container for all machine-callable actions, events, operations, and errors within a domain or feature.{% action %}[*]Defines an idempotent or state-changing operation that the system can perform.{% property %}[*]Defines a single typed data field within an action's input, an event's payload, or an operation's returns.{% explanation %}[*]Provides targeted advice or collapsible detail for a specific audience. Renders as a callout () or a disclosure element (). Supports full Markdown in the body.{% event %}[*]Defines a message emitted by the system after an action or internal state change has occurred.{% property %}[*]Defines a single typed data field within an action's input, an event's payload, or an operation's returns.{% operation %}[*]Declares a request/response operation with a typed input, a typed success response, and declared domain errors.{% property %}[*]Defines a single typed data field within an action's input, an event's payload, or an operation's returns.{% returns %}[?]Container for property tags describing the success-path response shape of an operation.{% property %}[+]Defines a single typed data field within an action's input, an event's payload, or an operation's returns.{% throws %}[*]Declares that an operation may fail with a specific named domain error.{% error %}[*]Declares a named domain error in the API registry, referenced by operations via the throws tag.{% policy %}[*]Defines reactive business logic: "When [Source] happens, then perform [Reaction]".{% rule %}[*]Declares a named convention or constraint in a blueprint, domain, or manifest — optionally traced to a motivating spec item.{% diagram %}[*]Embeds an interactive Mermaid diagram inline in a document and collects it in the global Diagram Gallery.{% example %}[*]Embeds a named, filterable example inline in a document and collects it in the global Examples Gallery.{% setting %}[*]Declares a typed application configuration setting with an optional default value.{% surface %}[*]Defines a UI wireframe sketch using a restricted Pug DSL compiled into themed HTML elements.{% interactions %}[*]Links multiple surfaces into a clickable prototype by defining navigation transitions between surface elements.{% clickable %}[+]Defines a single navigation transition from an element on one surface to another surface.