{% feature %}
Attributes
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | ✓ | Unqualified feature id matching the frontmatter id (e.g., 'add-bookmark') |
roles | string | — | Space-separated qualified role ids (e.g., 'user admin') |
domains | string | — | Space-separated qualified domain ids (e.g., 'domain/bookmark') |
scope | string | — | Space-separated list of visibility scopes |
Valid Children
| Tag | Multiplicity |
|---|---|
{% tldr %} | [1] |
{% explanation %} | [*] |
{% requirement %} | [*] |
{% api %} | [?] |
{% diagram %} | [*] |
{% example %} | [*] |
{% setting %} | [*] |
{% surface %} | [*] |
Rules
| Rule | Force | Realm | Reference | Description |
|---|---|---|---|---|
feature-criteria-outside | | | — | Acceptance criteria live in a block placed outside and after the feature tag, not inside it. |
Auto-generated backlinks
The compiler automatically injects a Related Documents header section with cross-references from:
- Milestones — milestone documents whose
includesreference this feature - Design Blueprints — blueprint documents whose
implementsreferences this feature - UI Designs — surface documents that reference this feature
Feature tag with requirements, API, and acceptance criteria
{% feature id="add-bookmark" roles="user" domains="domain/bookmark" scope="public agent" %}
{% requirement id="save-url" priority="must" %} The system must allow a user to save any valid URL as a bookmark. {% /requirement %}
{% requirement id="fetch-title" priority="should" %} The system should auto-fetch the page title if none is provided. {% /requirement %}
{% api %} {% action name="add-bookmark" %} Orchestrates saving the bookmark. {% property name="url" type="string" required=true /%} {% /action %} {% /api %}
{% /feature %}
{% criteria %} {% criterion id="save-url" requirement="save-url" %} Given a valid URL, when submitted, then a bookmark is created. {% /criterion %}{% /criteria %}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.{% requirement %}[*]Defines a granular product requirement — the primary unit of traceability in StarSpec.{% 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.{% 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.