Configuration Reference
Playbook Options
Configure the extension in your Antora playbook (antora-playbook.yml or antora.yml):
antora:
extensions:
- require: @antora-tracer/core/antora-extension
config:
preset: requirements-engineering
# ... additional options ...
| Option | Type | Default | Description |
|---|---|---|---|
|
boolean |
|
Set to |
|
string |
|
Built-in preset name. Overridden by |
|
string |
— |
Path to a custom |
|
string |
|
Directory relative to Antora’s |
|
boolean |
|
Generate traceability matrices and the per-version |
|
string[] |
|
Output formats. Valid: |
|
boolean |
|
Add generated HTML matrices to the Traceability navigation section, merging with existing entries and skipping links already present. |
|
string |
|
Image format for Kroki URLs generated by |
|
string |
Base URL for Kroki image generation. Overridden by the |
|
|
boolean |
|
When |
|
boolean |
|
When |
|
boolean |
|
Generate the traceability overview page (totals, per-role statistics, a superseded-items list, and the dangling-reference worklist) into the output directory |
|
string |
|
Attachment relative path for the generated overview, so it is navigable via |
|
string[] |
|
Antora component names to exclude from the traceability graph. Excluded components still render and cross-link normally, but their items never enter the graph, their pages are not macro-expanded, and they receive no generated matrices, overview, or guidance attachments |
excludeComponents matches Antora component names exactly; no glob or substring matching.
Item status classes are not configurable.
The extension emits tracer-status-<value> on every item that declares a status, and the class carries no decoration by itself, so the stylesheet is the switch rather than an option.
The conemso UI theme draws a glyph for five common statuses; other values need a rule in the site’s own stylesheet.
See Item Macro Reference for the derived class names and styling examples.
The KROKI_SERVER_URL environment variable overrides the krokiServerUrl option.
When set, it is used as the Kroki server base URL instead of the configured value or the default https://kroki.io.
When matrix generation is enabled, the extension also registers a per-version graph.json snapshot as a site attachment under traceability/graph.json.
The snapshot contains every item and relationship of that component version in the canonical { format, component, version, items, relationships } shape, with per-item scope fields but no per-page pubUrl.
It gives each published version a machine-readable record of its traceability graph.
Build version
On every build, the extension computes the version string git describe --tags --always --dirty from the playbook directory and exposes it under one key in two channels:
-
site.keys.git_describe— for HTML UI templates ({{site.keys.git_describe}}) -
asciidoc.attributes.git_describe— for AsciiDoc content and the PDF/DOCX backends (fb10ec2)
When the build runs outside a git repository, neither key is set and the build continues unchanged. No configuration is required. See How to show the build version in the footer.
Vale Extension
The bundled antora-vale extension runs the Vale prose linter against the source AsciiDoc of the complete content catalog during the build.
It is opt-in: register it in the playbook to enable it.
antora:
extensions:
- require: @antora-tracer/core/antora-vale
valeConfig: .vale.ini
minLevel: warning
| Option | Type | Description |
|---|---|---|
|
string |
Path to the Vale configuration file ( |
|
string |
Minimum severity that fails the build: |
Prerequisites: the vale and asciidoctor executables must be on PATH.
If either is missing, the build fails with an actionable message.
A starter style is shipped at node_modules/@antora-tracer/core/lib/src/vale/; copy it into your project and reference it from your .vale.ini, or write your own rules.
Source-layout rules such as one sentence per line are not enforced by Vale.
Use scripts/check-one-sentence-per-line.js for that.
traceability.yml Schema
When using a custom configuration, create a traceability.yml file:
extends: requirements-engineering # optional
roles:
- requirement
- design
- test
relations:
design:
requirement:
addresses:
reverse: addressed_by
test:
requirement:
verifies:
reverse: verified_by
linkDisplayPolicies:
l2-to-l3-addressing:
hide:
- relation: addressed_by
currentItem:
role: requirement
attributes:
abstraction-level: L2
relatedItem:
role: design
attributes:
abstraction-level: L3
matrices:
- name: requirements-to-design
description: "Forward traceability from requirements to design"
rows: requirement
columns: [design]
coverageRelations:
design: [addresses]
linkDisplayPolicy: l2-to-l3-addressing
labels: # optional display names
addresses: "Addresses"
extends
tracer:
extends: requirements-engineering
Pulls in a built-in preset as the base.
Your config is deep-merged on top:
- roles: appended (duplicates silently merged)
- relations: merged at all levels
- matrices: merged by name; a child replaces a same-named matrix
- linkDisplayPolicies: merged by name; a child replaces a same-named policy in full
If extends is omitted, the config is standalone — no preset is loaded.
Presets can themselves extend another preset.
In a preset file, extends is a top-level field next to name and version:
name: medical-safety
version: 1.0.0
extends: requirements-engineering (1)
tracer:
roles:
- use_case
| 1 | The parent’s roles, relations, matrices, labels, and linkDisplayPolicies are merged under the child |
Inheritance chains resolve transitively; circular inheritance is rejected. See Presets Reference for the preset schema.
roles
Flat list of strings.
Every [item] must use a role in this list.
Case-insensitive.
Unknown roles generate warnings.
relations
Nested map: source_role → target_role → type → { reverse }.
Each relation type is a key with a mandatory reverse — the authorable name for the same edge seen from the other side.
relations:
design:
requirement:
addresses:
reverse: addressed_by
Both names are authorable: a design may write addresses:REQ-001[], or a requirement may write addressed_by:DES-001[].
Either authoring stores the same canonical edge (design → requirement : addresses).
The reverse direction is allowed automatically — you do not declare requirement → design separately.
Symmetric relations declare themselves as their own reverse:
relations:
requirement:
requirement:
conflicts_with:
reverse: conflicts_with
If a relation type is used that is not declared (or derived as a reverse), the extension reports an error with the allowed alternatives.
linkDisplayPolicies
linkDisplayPolicies is a map of named link display policies.
Each policy must define a non-empty hide array containing one or more rules.
A matching rule hides a relationship only from the view of its currentItem; it does not remove the graph relationship.
All specified conditions in one rule must match; any matching rule hides the link.
The relation type is interpreted from the displayed item’s perspective using the configured reverse relation, so authored direction does not change matching.
Each rule’s relation type must be declared in relations.
Each endpoint matcher must specify role, attributes, or both.
| Rule field | Type | Description |
|---|---|---|
|
string |
Configured relation type from the |
|
object |
Required matchers for the item being displayed and the related item. |
|
string, optional |
Configured item role to match exactly. |
|
map of string to string, optional |
Non-empty map of attribute names to string values; supplied names and values must match exactly, and both conditions must match when |
The complete policy and matrix-selection example appears in the traceability.yml sample above.
Preset inheritance merges policies by name; a child policy replaces the full parent policy with the same name.
The selector value none disables filtering and is reserved as a policy name, case-insensitively.
Unknown document policy names report the source file; unknown matrix policy names report the matrix and policy.
Supersession
A baselined item is superseded rather than edited in place.
The successor declares supersedes (reverse superseded_by) to the item it replaces.
relations:
requirement:
requirement:
supersedes:
reverse: superseded_by
An item is superseded when one or more incoming supersedes relationships target it — no status attribute is required.
Splits (one predecessor, several successors) and merges (one successor, several predecessors) are supported.
Self-supersession, duplicate links, and cycles are validation errors.
Current-state matrices omit superseded items.
Functional links to a superseded item remain visible and are marked for review.
See supersession check for the read-only impact report.
labels
Optional display-only map: type → human-readable name.
Never affects graph structure, merge behavior, or validation.
labels:
leads_to: "Leads to"
is_derived_from: "Is derived from"
If a type has no labels entry, the humanized type name is used: underscores become spaces, sentence-cased (is_derived_from → "Is derived from").
matrices
An array of matrix definitions:
| Key | Type | Description |
|---|---|---|
|
string |
Used in output filename: |
|
string |
Human-readable description, displayed as caption in HTML output |
|
string |
Role for the row index. One row per item of this role |
|
string[] |
Roles for the columns. Each cell shows items of that role related to the row item |
|
map |
Which relation types count as "coverage" per column role. |
|
string |
Optional name from |
|
string |
Optional expression applied to current row items after filtering by |
matrices:
- name: approved-security-requirements
rows: requirement
columns: [design]
rowFilter: "status == 'approved' and 'security' in tags"
The filter expression uses an allowlisted grammar and is never evaluated as code.
Omitting rowFilter keeps all current items of the configured row role.
roleGuidance
Per-role authoring guidance for AI agents and humans. Each entry maps a role to an AsciiDoc page describing how to write items of that role, plus an optional ID prefix fallback:
roleGuidance:
requirement:
page: guidance/requirement.adoc
idPrefix: REQ
design:
page: guidance/design.adoc
idPrefix: ARC
| Key | Type | Description |
|---|---|---|
|
string |
Path to an AsciiDoc page with the role’s authoring guidance, resolved relative to the file that declares it |
|
string |
ID prefix fallback (advisory, never authoritative) |
Built-in presets ship default guidance pages.
A project’s roleGuidance overrides the preset per role.
Resolve guidance from the CLI with antora-tracer role-guidance <role>.
idAllocation
Opt-in remote ID allocation for the next-id command.
When set, next-id requests the next ID from a shared allocator instead of scanning local files:
idAllocation:
endpoint: https://ids.example.com # required, HTTP(S) URL
token: ${ID_ALLOC_TOKEN} # optional bearer token
endpoint must be a non-empty HTTP(S) URL.
token, when set, is sent as Authorization: Bearer <token>.
Both values support environment-variable interpolation.
Keep secrets out of the committed file.
An unset endpoint variable fails configuration loading.
An unset token variable does not prevent configuration loading or site generation.
Remote next-id reports the missing variable and fails before contacting the allocator.
--local does not require the token.
The CLI loads a .env file from the working directory at startup, so you can keep the token there instead of exporting it.
When endpoint is set, next-id fails closed: an unreachable allocator, a non-2xx response, or a malformed body exits with an error rather than falling back to a local ID.
A 401 or 403 response is reported as an authentication failure.
Pass --local to force the local scan regardless.
Absent idAllocation, next-id keeps its local max+1 behavior unchanged.
The allocator itself is the separate ID allocation server package.
Configuration Resolution
When both preset and configPath are provided, configPath takes precedence:
1.
If configPath is set → load user YAML file
2.
If configPath has extends → load the referenced preset, then deep-merge
3.
If only preset is set → load the built-in preset
4.
If neither → error
The resolved configuration is memoized — loaded once and shared across all components.
Related
-
How to define a custom domain model — practical configuration guide
-
Presets Reference — built-in preset definitions