Requirements

Antora Tracer is an Antora extension that adds requirements traceability to AsciiDoc documentation sites. Authors declare traceable items using the [item] block macro, link them with inline relationship macros, and the extension generates traceability matrices and visualizations as part of the Antora build. This document specifies what the extension must do (functional requirements), what it must not violate (constraints), and what quality levels it must meet (quality requirements). Each requirement maps to an OpenSpec specification under openspec/specs/.

Constraints

Constraints are non-negotiable conditions that bound every implementation decision. They are not behaviors to implement — they are boundaries within which all behaviors must operate.

CON-001 — Antora extension integration

The system SHALL be implemented as an Antora extension, integrating via the Antora extension API (contentClassified and sitePublished events). No Antora build pipeline modification or custom Antora fork SHALL be required.

CON-002 — Source files are never modified

The system SHALL NOT modify any .adoc source file on disk at any point during processing. All content transformations (macro expansion, link substitution, title injection) SHALL operate exclusively on in-memory content buffers.

CON-003 — Generated output uses standard AsciiDoc constructs

All content generated by the extension’s macros (relationship lists, link blocks, graphs) SHALL use standard AsciiDoc constructs only — not raw HTML. This ensures compatibility with all Asciidoctor backends, including HTML and PDF.

CON-004 — Runtime is Node.js 20+ with ESM

The system SHALL run on Node.js 20 or later. The package SHALL use ECMAScript modules ("type": "module") throughout. No runtime framework SHALL be introduced as a dependency.

CON-005 — Document format is AsciiDoc processed by Antora

The system SHALL process AsciiDoc files as managed by Antora’s content catalog. Direct filesystem reads of source .adoc files SHALL only occur in the standalone CLI path, where no Antora content catalog is available.

Functional Requirements

Item Definition and Parsing

REQ-087 — Items inside verbatim blocks are not parsed

The system SHALL NOT register item declarations ([#ID, item, role=…​]) found inside AsciiDoc verbatim blocks (listing blocks delimited by ---- and literal blocks delimited by …​.) as traceability items.

Source: openspec/specs/parser-verbatim-skip/spec.md

Addressed by
Validated by
Verified by
REQ-088 — Inline macros inside verbatim blocks are not parsed

The system SHALL NOT register inline relationship macros (``) whose enclosing item was skipped because it fell inside a verbatim block.

Source: openspec/specs/parser-verbatim-skip/spec.md

Addressed by
Validated by
Verified by
REQ-090 — Verbatim block detection handles standard AsciiDoc fences

The system SHALL detect verbatim blocks by matching opening and closing fence lines consisting of exactly ---- or …​. (with optional trailing whitespace), ignoring style prefix lines like [source,asciidoc].

Source: openspec/specs/parser-verbatim-skip/spec.md

Addressed by
Verified by
REQ-091 — Inline macros inside verbatim blocks are preserved in rendered output

The system SHALL NOT strip inline relationship macros (``) from inside AsciiDoc verbatim blocks during the content substitution pass. Such macros are example code and SHALL remain visible in the rendered output.

Source: openspec/specs/parser-verbatim-skip/spec.md

Addressed by
Verified by
REQ-092 — Inline macros inside backtick code spans are not parsed

The system SHALL NOT register inline relationship macros (``) that appear inside backtick-enclosed code spans as traceability relationships.

Source: openspec/specs/parser-verbatim-skip/spec.md

Addressed by
Verified by
REQ-110 — Items defined in partials are registered in the graph

The system SHALL process items defined in AsciiDoc partial files alongside page files, registering them in the traceability graph.

Source: openspec/specs/partial-file-processing/spec.md

Addressed by
Verified by
Is derived from
REQ-144 — Partial items use view URL as source reference

Items from partial files SHALL use the file’s view URL as their source file reference, enabling traceability matrix links to resolve to the source repository.

Source: openspec/specs/partial-file-processing/spec.md

Addressed by
Verified by
REQ-145 — All processing passes apply to partial files

The system SHALL apply graph population, macro expansion, and link substitution passes to partial files in the same way as page files, because partial content is inlined into pages and reaches the browser.

Source: openspec/specs/partial-file-processing/spec.md

Addressed by
Verified by

Traceability Graph

REQ-129 — Bidirectional relationship pairs are merged into a single edge

The system SHALL detect when a newly added relationship is authored with the reverse of an existing relationship’s type — the existing edge goes from B to A with a type whose declared reverse equals the new edge’s type — and SHALL NOT store a second edge. The canonical primary edge is retained with its original metadata (sourceFile, line), and no warning is emitted. Merging is driven by the reverse declaration in relations (config), not by inverseLabels or the compile-time INVERSE_MAP.

Source: openspec/specs/bidirectional-relationship-merge/spec.md

Addressed by
Verified by
REQ-109 — Circular reference detection in graph validation

The system SHALL detect circular references in the traceability graph during validation. A circular reference is a cycle in the directed relationship graph (e.g., A → B → A, or A → B → C → A). Self-referencing relationships (A → A) SHALL also be detected as cycles. Auto-generated inverse relationships SHALL be skipped during cycle detection to avoid false positives. Relationships marked as bidirectional SHALL also be skipped during cycle detection.

Source: openspec/specs/circular-reference-detection/spec.md

Is derived from
Addressed by
Verified by
Is derived from
REQ-111 — File state is prepared once per file

The system SHALL compute file content, document attributes, and item block positions exactly once per page file, and SHALL reuse the computed values across all macro-expansion passes for that file.

Source: openspec/specs/file-preparation-cache/spec.md

REQ-112 — PreparedFile carries all needed state

The system SHALL cache the parsed state of each source file — including its full content, document attributes, item block positions, and normalized source-file metadata — so that subsequent processing steps within the same file pass do not reparse it.

Source: openspec/specs/file-preparation-cache/spec.md

Relationship Macros

REQ-044 — traceability:outgoing[] macro renders outgoing links

The system SHALL provide a traceability:outgoing[] macro that expands to a formatted list of all outgoing relationships for the enclosing item.

Source: openspec/specs/traceability-links-macro/spec.md

Addressed by
Verified by
REQ-146 — Empty-state message when item has no outgoing relationships

If the enclosing item has no outgoing relationships, then the traceability:outgoing[] macro SHALL render a configurable empty-state message controlled by the :traceability-empty: document attribute.

Source: openspec/specs/traceability-links-macro/spec.md

Verified by
REQ-055 — traceability:incoming[] macro renders incoming links

The system SHALL provide a traceability:incoming[] macro that expands to a formatted list of all relationships pointing to the enclosing item (reverse relationships).

Source: openspec/specs/incoming-links-macro/spec.md

Addressed by
Verified by
REQ-104 — traceability:links[] macro renders combined outgoing and incoming links

The system SHALL provide a traceability:links[] macro that expands to a combined list of all outgoing and incoming relationships for the enclosing item, with outgoing groups rendered first followed by incoming groups.

Source: openspec/specs/traceability-links-macro/spec.md

Addressed by
Verified by
REQ-045 — Opt-in via AsciiDoc attribute

The system SHALL only expand traceability:outgoing[] and traceability:incoming[] when the :traceability-links: document attribute is set to a truthy value.

Source: openspec/specs/traceability-links-macro/spec.md

Addressed by
Verified by
REQ-100 — Inline macros suppressed when links macros are active

When :traceability-links: is enabled, the system SHALL suppress the individual rendering of inline relationship macros within item blocks that contain a traceability:outgoing[] or traceability:incoming[] macro.

Source: openspec/specs/traceability-links-macro/spec.md

Addressed by
Verified by
REQ-047 — Configurable display style

The system SHALL support configurable display styles via the :traceability-style: document attribute for both traceability:outgoing[] and traceability:incoming[] macros.

Source: openspec/specs/traceability-links-macro/spec.md

Addressed by
Verified by
REQ-048 — Configurable sort order

The system SHALL support configurable sort order via the :traceability-order: document attribute for both traceability:outgoing[] and traceability:incoming[] macros, defaulting to sort by target ID for outgoing and source ID for incoming.

Source: openspec/specs/traceability-links-macro/spec.md

Addressed by
Verified by
REQ-102 — Collapsible list-style output via document attribute

The system SHALL support a :traceability-collapsible: document attribute that, when set to a truthy value, wraps each relation-type group in list-style output in a [%collapsible] AsciiDoc block.

Source: openspec/specs/traceability-links-macro/spec.md

Addressed by
Verified by
REQ-064 — Incoming macro respects document attributes

The system SHALL gate traceability:incoming[] expansion on the same :traceability-links: document attribute as the outgoing macro.

Source: openspec/specs/incoming-links-macro/spec.md

Addressed by
Verified by
REQ-065 — Incoming macro display styles

The system SHALL support the same display styles for traceability:incoming[] as for the outgoing macro, via the :traceability-style: document attribute.

Source: openspec/specs/incoming-links-macro/spec.md

Addressed by
Verified by
REQ-066 — Incoming macro sort order

The system SHALL support the same sort orders for traceability:incoming[] as for the outgoing macro, via the :traceability-order: document attribute, defaulting to sort by source ID.

Source: openspec/specs/incoming-links-macro/spec.md

Addressed by
Verified by
REQ-067 — Incoming groups use the reverse relation type

The system SHALL group incoming relationships in traceability:incoming[] by the reverse relation type — the declared reverse of the relationship’s type — so each group heading names the relation from the target item’s perspective.

Source: openspec/specs/incoming-links-macro/spec.md

Addressed by
Verified by
REQ-070 — Incoming macro supports collapsible output

The system SHALL apply the same :traceability-collapsible: document attribute to traceability:incoming[] output as it does for traceability:outgoing[]. When enabled, each inverse relation-type group in list-style incoming output SHALL be wrapped in a [%collapsible] block.

Source: openspec/specs/incoming-links-macro/spec.md

Addressed by
Verified by
REQ-103 — Graph isolation per component version

When building a site with multiple component versions, relationship macro expansion SHALL be scoped per version. Items from one component version SHALL NOT appear in xrefs generated for pages in a different component version.

Source: openspec/specs/traceability-links-macro/spec.md

Addressed by
Verified by
REQ-163 — Incoming macro PDF compatibility

The generated output from traceability:incoming[] SHALL be standard AsciiDoc constructs — not raw HTML — ensuring compatibility with both HTML and PDF backends.

Source: openspec/specs/incoming-links-macro/spec.md

REQ-164 — Source file not modified by incoming macro

The system SHALL NOT modify the .adoc source file on disk when expanding traceability:incoming[].

Source: openspec/specs/incoming-links-macro/spec.md

REQ-165 — PDF compatibility

The generated output from traceability:outgoing[] and traceability:incoming[] SHALL use standard AsciiDoc constructs, ensuring compatibility with both HTML and PDF rendering backends.

Source: openspec/specs/traceability-links-macro/spec.md

REQ-166 — Source file not modified

The system SHALL NOT modify the .adoc source file on disk when expanding traceability:outgoing[] or traceability:incoming[].

Source: openspec/specs/traceability-links-macro/spec.md

Cross-Module and Cross-Component References

REQ-116 — Items carry component and module context from Antora

When processing .adoc files through the Antora extension, the system SHALL store the Antora component and module names on each Item so that downstream xref and link generation can distinguish same-module from cross-module and cross-component references.

Source: openspec/specs/cross-module-xref/spec.md

Verified by
REQ-117 — Cross-module and cross-component xref includes correct prefix

When buildXref generates an Antora xref for an item in a different module or component than the current page, the system SHALL include the appropriate prefix matching Antora’s xref resolution hierarchy: component:module: for cross-component, module: for cross-module, and no prefix for same-module.

Source: openspec/specs/cross-module-xref/spec.md

Verified by
REQ-119 — Cross-module and cross-component xref resolution

When an item in one module has relationships to items in other modules or components, the traceability:outgoing[] and traceability:incoming[] macros SHALL generate xrefs with the correct Antora prefix (component:module: or module:) so Antora can resolve them correctly.

Source: openspec/specs/traceability-links-macro/spec.md

Verified by

Inverse Labels

REQ-071 — Relation display names are config-driven

The system SHALL support labels in the traceability configuration YAML, mapping each relation type to a human-readable display name used for rendering (incoming/outgoing lists, matrix headers, graph labels). labels SHALL NOT affect graph structure, merge behavior, or validation.

Source: openspec/specs/inverse-labels/spec.md

Addressed by
Verified by
REQ-161 — Default display name is the humanized type

If a relation type has no entry in labels, the system SHALL display the type name humanized: underscores replaced with spaces and the result sentence-cased.

Source: openspec/specs/inverse-labels/spec.md

Addressed by
Verified by
REQ-162 — No compile-time fallback

The system SHALL NOT consult a compile-time inverse map for display names; the pairing between primary and reverse types is derived solely from the reverse declaration in relations, and display text comes solely from labels or the humanized default.

Source: openspec/specs/inverse-labels/spec.md

Addressed by
Verified by

Matrix Generation

REQ-037 — Matrix displays row items as clickable links

The matrix SHALL render row item IDs as hyperlinks that navigate to the item’s definition in the rendered HTML documentation.

Source: openspec/specs/matrix-item-linking/spec.md

Addressed by
Verified by
Is derived from
REQ-038 — Matrix displays cell items as clickable links

The matrix SHALL render cell item IDs as hyperlinks that navigate to the item’s definition in the rendered HTML documentation.

Source: openspec/specs/matrix-item-linking/spec.md

Addressed by
Verified by
Is derived from
REQ-039 — Links include source file tooltip

The matrix SHALL display the source file name as a tooltip when users hover over item links.

Source: openspec/specs/matrix-item-linking/spec.md

Addressed by
Verified by
REQ-040 — Matrix links resolve correctly from site output location

The system SHALL generate matrix links that resolve correctly regardless of where the matrix file is served within the Antora site output.

Source: openspec/specs/matrix-item-linking/spec.md

Addressed by
Verified by
REQ-041 — Source file paths are normalized

The system SHALL normalize item source file references so that matrix links resolve to the rendered page URL rather than the AsciiDoc source file path.

Source: openspec/specs/matrix-item-linking/spec.md

Addressed by
Verified by
REQ-042 — Matrix renders correctly without link resolution configured

The system SHALL maintain existing matrix rendering behaviour when link resolution is not configured.

Source: openspec/specs/matrix-item-linking/spec.md

Addressed by
Verified by
REQ-043 — Non-HTML matrix outputs unchanged

The system SHALL NOT modify CSV and JSON matrix outputs to include links.

Source: openspec/specs/matrix-item-linking/spec.md

Addressed by
Verified by
REQ-128 — Matrix links include module path for module-aware items

When an item has module information, the system SHALL generate HTML links that include the module name so the link navigates to the correct module page.

Source: openspec/specs/matrix-item-linking/spec.md

Addressed by
Verified by
REQ-108 — Matrix files registered in the content catalog

The system SHALL register generated matrix files (HTML, CSV, JSON) as site attachments before document conversion, so that attachment$traceability/…​ xrefs in pages and navigation resolve correctly. Registration SHALL occur per component version and under every module that has AsciiDoc content. A committed copy, if present, SHALL have its contents refreshed in place.

Source: openspec/specs/matrix-attachment-sync/spec.md

Addressed by
Verified by
REQ-130 — Matrix links are compatible with Antora indexify URL style

When Antora’s indexify URL style is active (root-level pages are served as pagename/index.html), the system SHALL generate matrix links that include index.html in the path for root-level pages so links from traceability matrices resolve to the correct page.

Source: openspec/specs/matrix-generation/spec.md

Verified by
REQ-113 — Matrix template uses partials for structure

The HTML matrix template SHALL be split into a main template and four reusable partial fragments (styles, header, matrix-row, footer) loaded from the partials/ subdirectory.

Source: openspec/specs/template-partials/spec.md

REQ-167 — Matrix renders one status column per row

The HTML matrix SHALL render exactly one per-row status column, and SHALL NOT render a separate per-row coverage percentage column.

Source: openspec/specs/matrix-status/spec.md

Addressed by
Verified by
REQ-168 — Coverage summary remains

The matrix SHALL still render a top-level coverage summary with the counts of done/partial/missing rows and an overall percentage of done rows.

Source: openspec/specs/matrix-status/spec.md

Addressed by
Verified by
REQ-169 — CSV output is unchanged

The CSV export SHALL NOT render a per-row status or coverage column, matching its current behavior.

Source: openspec/specs/matrix-status/spec.md

Addressed by
Verified by

Configuration and Presets

REQ-083 — Preset defines pairwise requirements-to-design matrix

The requirements-engineering preset SHALL include a matrix named requirements-to-design with requirement rows and a single design column.

Source: openspec/specs/pairwise-matrices-preset/spec.md

Addressed by
Verified by
Is derived from
REQ-084 — Preset defines pairwise design-to-implementation matrix

The requirements-engineering preset SHALL include a matrix named design-to-implementation with design rows and a single implementation column.

Source: openspec/specs/pairwise-matrices-preset/spec.md

Addressed by
Verified by
Is derived from
REQ-085 — Preset defines pairwise requirements-to-tests matrix

The requirements-engineering preset SHALL include a matrix named requirements-to-tests with requirement rows and a single test column.

Source: openspec/specs/pairwise-matrices-preset/spec.md

Addressed by
Verified by
Is derived from
REQ-086 — Preset does not define wide multi-column matrices

The requirements-engineering preset SHALL NOT define matrices with more than one column role.

Source: openspec/specs/pairwise-matrices-preset/spec.md

Addressed by
Verified by
REQ-170 — Preset extends a parent by top-level extends

A preset SHALL declare its parent with a top-level extends field (sibling of name, version, description). When a preset declares extends, the resolved preset SHALL include the parent’s traceability deep-merged under the child’s own traceability.

Source: openspec/specs/preset-inheritance/spec.md

Addressed by
Verified by
REQ-171 — Merge semantics match config-file extends

Preset inheritance SHALL use the same merge rules as a config file extending a preset: roles are unioned, relations are deep-merged by source and target role, matrices are overridden by name, and labels are overridden key-by-key.

Source: openspec/specs/preset-inheritance/spec.md

Addressed by
Verified by
REQ-172 — Transitive inheritance

Inheritance SHALL resolve transitively: a preset extending a preset that itself extends another SHALL include the roles, relations, and matrices of the full chain.

Source: openspec/specs/preset-inheritance/spec.md

Addressed by
Verified by
REQ-173 — Missing parent is reported

When a preset’s extends names a preset that cannot be resolved, loading SHALL fail with an error that names the missing preset.

Source: openspec/specs/preset-inheritance/spec.md

Addressed by
Verified by
REQ-174 — Circular inheritance is rejected

A preset SHALL NOT extend itself, directly or transitively. Any inheritance cycle SHALL be detected and rejected with a clear error rather than looping indefinitely.

Source: openspec/specs/preset-inheritance/spec.md

Addressed by
Verified by
REQ-175 — Relations are declared keyed with a mandatory reverse

The relations config SHALL map sourceRole → targetRole → relationType → { reverse }, where reverse is required and names the authorable reverse relation type.

Source: openspec/specs/reverse-relations/spec.md

Addressed by
Verified by
REQ-176 — Authoring the reverse name canonicalizes to the primary edge

When an item authors a relationship using a reverse type, the graph SHALL store the canonical primary edge (primary direction and primary type), not the reverse-authored form.

Source: openspec/specs/reverse-relations/spec.md

Addressed by
Verified by
REQ-177 — Reverse direction is derived for validation

isRelationAllowed SHALL allow a relation type that is the reverse of a relation declared in the opposite role direction, without an explicit relations entry for that direction.

Source: openspec/specs/reverse-relations/spec.md

Addressed by
Verified by
REQ-178 — Matrix coverage matches the canonical primary type

A matrix coverageRelations entry SHALL name the canonical primary type, and a single entry SHALL count a relationship regardless of which name was authored.

Source: openspec/specs/reverse-relations/spec.md

Addressed by
Verified by

Graph Visualization

REQ-051 — Relationship graph via traceability:graph[] macro

The system SHALL provide a traceability:graph[] inline macro that renders a relationship diagram for the enclosing item. The diagram SHALL show the item and its related items as labeled nodes and edges, colored by role. An optional depth parameter SHALL control the number of relationship hops shown.

Source: openspec/specs/graph-visualization/spec.md

Is derived from
Addressed by
Verified by
Is derived from
REQ-052 — Coverage chart via traceability:graph-coverage[] macro

The system SHALL provide a traceability:graph-coverage[] inline macro that renders a coverage chart. When used inside an item block, it SHALL show per-relationship-type coverage for that item. When used outside an item block, it SHALL show global coverage by role.

Source: openspec/specs/graph-visualization/spec.md

Addressed by
Verified by
Is derived from
REQ-053 — Graph model supports traversal-bounded subgraph and coverage queries

The graph model SHALL support producing a traversal-bounded relationship subgraph for a given item, traversing both outgoing and incoming directions. Bidirectional relationships SHALL be visually distinguishable from one-directional relationships in the rendered output. The graph model SHALL also support producing coverage data for a given item, or globally across all items.

Source: openspec/specs/graph-visualization/spec.md

Addressed by
Verified by
REQ-054 — Dashboard page in example site

The example site SHALL include a dashboard page with a global coverage chart and select per-item relationship graphs, gated by the :traceability-graph: attribute.

Source: openspec/specs/graph-visualization/spec.md

Addressed by
Is derived from
REQ-063 — Configurable Kroki image format

The krokiImageFormat extension config option SHALL control the image format (svg or png) used in rendered relationship diagram images. When not set, the format SHALL default to svg. The configured krokiServerUrl (or its default https://kroki.io) SHALL be used as the base URL for diagram rendering requests.

Source: openspec/specs/graph-visualization/spec.md

Addressed by
Verified by
REQ-159 — Configuration graph via macro

The system SHALL provide a traceability:config-graph[] macro that renders the effective traceability configuration as a Kroki GraphViz diagram. The diagram SHALL show each configured role as a node colored by role and each declared relation as a labeled edge, using declared directions only.

Source: openspec/specs/graph-visualization/spec.md

Addressed by
Verified by
REQ-160 — Config graph generator renders configuration as DOT

The system SHALL provide a DOT generator for the traceability configuration that renders roles as nodes and declared relations as labeled edges.

Source: openspec/specs/graph-visualization/spec.md

Addressed by
Verified by
REQ-142 — Configurable Kroki server URL via extension config

The krokiServerUrl extension config option SHALL set the base URL used by traceability:graph[] and traceability:graph-coverage[] macros when generating Kroki image URLs. When set, the system SHALL use this URL instead of the default https://kroki.io.

Source: openspec/specs/kroki-server-url-config/spec.md

Verified by
REQ-143 — Kroki server URL via environment variable

The KROKI_SERVER_URL environment variable SHALL override the krokiServerUrl extension config option. When set, the system SHALL use its value as the Kroki server base URL.

Source: openspec/specs/kroki-server-url-config/spec.md

Verified by

CLI

REQ-056 — CLI next-id command returns next available ID

The CLI SHALL provide a next-id command that accepts a --prefix and -i/--input and returns the next available sequential ID for items matching that prefix.

Source: openspec/specs/next-id/spec.md

Addressed by
Verified by
Is derived from
REQ-136 — CLI exposes a query subcommand

The CLI SHALL provide a query subcommand that reads AsciiDoc source files and answers one structural question about items and their relationships per invocation. No Antora build SHALL be required.

Source: openspec/specs/cli-query/spec.md

Verified by
Is derived from
REQ-137 — query reverse — find all items that point at a given ID

The CLI SHALL provide query reverse <id> that returns all items whose relationship macros reference the given item ID.

Source: openspec/specs/cli-query/spec.md

Verified by
Is derived from
REQ-138 — query impact — find all items connected to a given ID

The CLI SHALL provide query impact <id> that returns all items transitively connected to the given item (its connected component, excluding the item itself), following relationships in both directions.

Source: openspec/specs/cli-query/spec.md

Verified by
Is derived from
REQ-139 — query orphaned — find items with no relationships

The CLI SHALL provide query orphaned that returns all items that have neither incoming nor outgoing relationships in the graph.

Source: openspec/specs/cli-query/spec.md

Verified by
Is derived from
REQ-140 — query path — find the shortest path between two items

The CLI SHALL provide query path <from-id> <to-id> that returns the shortest relationship path between two items in the graph.

Source: openspec/specs/cli-query/spec.md

Verified by
Is derived from
REQ-141 — JSON output flag

All query subcommands SHALL accept a --json flag that switches output to a machine-readable JSON array.

Source: openspec/specs/cli-query/spec.md

Verified by
Is derived from
REQ-150 — CLI exposes a validate command

The CLI SHALL provide a validate command that reads AsciiDoc source files and reports validation errors — invalid relation types, orphaned relationships, duplicate item IDs, and circular references — with diagnostics naming the source and target item IDs with roles, the invalid relation type, and the allowed alternatives. No Antora build SHALL be required. The command SHALL exit with a non-zero code when errors are found and code 0 when the input is valid.

Source: openspec/specs/cli-validate/spec.md

Search Integration

REQ-079 — Non-heading elements with IDs are indexed as navigable anchors

The search index SHALL include every non-heading HTML element inside <article class="doc"> that has an id attribute as a separate searchable chunk. Each chunk SHALL use the element’s id as its hash, enabling search result links to navigate directly to the element’s anchor.

Source: openspec/specs/lunr-item-anchor-indexing/spec.md

Addressed by
REQ-080 — Item title is extracted from .title child element

When an element has a child element with CSS class title, the extension SHALL use the text content of that child as the chunk’s title field. If no .title child exists, the element’s id SHALL be used as the title.

Source: openspec/specs/lunr-item-anchor-indexing/spec.md

Addressed by
REQ-081 — Heading elements are excluded from item indexing

Elements that are HTML headings (h1 through h6) SHALL be skipped by the item anchor indexing pass, as they are already indexed by the existing heading-based section chunking.

Source: openspec/specs/lunr-item-anchor-indexing/spec.md

Addressed by
REQ-082 — Item indexing is scoped to article body

The item anchor indexing SHALL only traverse elements within <article class="doc">. Elements outside the article body (navigation, TOC, footer) SHALL NOT be indexed.

Source: openspec/specs/lunr-item-anchor-indexing/spec.md

Addressed by

Quality Requirements

Quality attributes follow the arc42 Quality Model format. Each item maps to a scenario page with Context, Trigger, and measurable Acceptance Criteria. The ISO 25010 characteristic is noted for each group.

Reliability

ISO 25010: Reliability — degree to which a system performs specified functions under specified conditions.

QA-057 — Fail-fast with clear diagnostics

The extension SHALL validate every relationship against configured role-relation rules. Error messages SHALL include file path, line number, source and target item IDs with roles, the invalid relation type, and the list of allowed alternatives. Cross-file references SHALL be re-validated after all files are loaded.

Source: openspec/changes/archive/2026-07-28-add-pdf-output/specs/pdf-output/spec.md

QA-058 — No side effects on source files

All content transformations SHALL operate on in-memory buffers. Source .adoc files SHALL never be modified by the extension. Processing the same file twice SHALL produce the same result.

Source: openspec/changes/archive/2026-07-28-add-pdf-output/specs/pdf-output/spec.md

See full scenario: No Side Effects on Source Files

Performance Efficiency

ISO 25010: Performance Efficiency — performance relative to the amount of resources used.

QA-062 — Query and indexing performance

The traceability graph SHALL provide forward, reverse, and inverse relationship indexes enabling O(1) lookup by item ID. Path finding SHALL use BFS with configurable maxDepth. Result caching SHALL be used with invalidation on mutation to avoid redundant computation during repeated queries within a single processing session.

Source: examples/tracer/modules/ROOT/partials/04-solution-strategy.adoc (ARC-011)

See full scenario: Query and Indexing Performance

Maintainability

ISO 25010: Maintainability — degree of effectiveness with which a product can be modified.

QA-059 — Testability by design

Each module SHALL accept dependencies via constructor parameters. Each module SHALL have a dedicated test file. The traceability graph SHALL expose internal state for test access. The full test suite SHALL complete in under 500 ms.

Source: openspec/changes/archive/2026-07-28-add-pdf-output/specs/pdf-output/spec.md

See full scenario: Testability by Design

Portability

ISO 25010: Portability — degree of effectiveness with which a system can be transferred to a different environment.

QA-060 — PDF compatibility of generated output

Generated output from traceability:outgoing[] and traceability:incoming[] SHALL be standard AsciiDoc constructs — not raw HTML — ensuring compatibility with both HTML and PDF backends.

Source: openspec/specs/traceability-links-macro/spec.md

QA-061 — Platform stability and longevity

The extension SHALL use ESM ("type": "module"), TypeScript strict mode, and target Node.js 20+ as the baseline runtime. The zero-framework policy SHALL avoid dependencies on libraries with short upgrade cycles, ensuring the extension remains maintainable and runnable without forced migrations.

Source: examples/tracer/modules/ROOT/partials/04-solution-strategy.adoc (ARC-010)

Operability

ISO 25010: Usability (Operability) — degree to which users can operate and control a system.

QA-055 — Zero operational overhead

The extension SHALL operate without requiring external services, databases, or runtime dependencies beyond Node.js standard library and a minimal set of npm packages. Optional features such as Neo4j export SHALL degrade gracefully when not configured.

Source: openspec/changes/archive/2026-07-28-add-pdf-output/specs/pdf-output/spec.md

See full scenario: Zero Operational Overhead

QA-056 — Configurable without code changes

The extension SHALL allow users to define roles, relations, and matrices entirely in YAML configuration. Built-in presets SHALL be overridable via the extends mechanism. Items with roles not yet in the configuration SHALL generate warnings rather than errors.

Source: openspec/changes/archive/2026-07-28-add-pdf-output/specs/pdf-output/spec.md

Project Tooling Requirements

These requirements govern the build tooling, CI pipeline, and project website. They are not part of the traceability engine and are excluded from the reimplementation experiment.

PDF and DOCX Output

REQ-093 — Devbox provides Ruby and Node.js for PDF builds

The devbox.json configuration SHALL include ruby, bundler, and nodejs packages so that devbox shell provides a complete PDF build environment. The init hook SHALL run npm install and bundle install automatically.

Source: openspec/specs/pdf-output/spec.md

Addressed by
Validated by
REQ-094 — Gemfile locks asciidoctor-pdf version

The project SHALL include a Gemfile that specifies asciidoctor-pdf and asciidoctor-kroki gems so the PDF converter and diagram renderer are installed consistently across environments.

Source: openspec/specs/pdf-output/spec.md

Addressed by
REQ-095 — PDF playbook generates PDF from example site

A separate antora-playbook-pdf.yml SHALL exist that uses @antora/pdf-extension to generate a single PDF from the example site’s content. The playbook SHALL use the same content sources as the HTML playbook but output to public/pdf/.

Source: openspec/specs/pdf-output/spec.md

Addressed by
REQ-096 — PDF extension is a peer dependency

The @antora/pdf-extension npm package SHALL be listed as a peerDependency (with optional: true in peerDependenciesMeta) so consumers who want PDF output are signalled to install it explicitly. It SHALL also remain in devDependencies for local development.

Source: openspec/specs/pdf-output/spec.md

Addressed by
REQ-097 — Assembler profiles produce separate PDFs per document

The component descriptor SHALL define assembler profiles with dedicated nav files so that the assembler produces separate PDFs for requirements, architecture, and test-plan documents.

Source: openspec/specs/split-pdf-documents/spec.md

Addressed by
REQ-098 — Custom nav files select single documents

Each profile SHALL reference a custom nav file that contains a single xref to the target document, so only that page is included in the assembly.

Source: openspec/specs/split-pdf-documents/spec.md

Addressed by
REQ-099 — Single-PDF output is preserved

The existing single-PDF configuration SHALL remain available via antora-assembler-pdf.yml and the existing antora-playbook-pdf.yml SHALL continue to produce a single merged PDF.

Source: openspec/specs/split-pdf-documents/spec.md

Addressed by
REQ-131 — DOCX wrapper script converts assembled AsciiDoc to DOCX

The project SHALL include an adoc-to-docx shell script that reads assembled AsciiDoc from stdin, converts it to DocBook using asciidoctor -b docbook with Kroki support, then pipes the result through pandoc -f docbook -t docx to produce a DOCX file.

Source: openspec/specs/docx-output/spec.md

REQ-132 — DOCX assembler configs mirror PDF assembler configs

For each existing PDF assembler configuration, a corresponding DOCX assembler configuration SHALL exist that differs only in the build command, using ./adoc-to-docx instead of bundle exec asciidoctor-pdf.

Source: openspec/specs/docx-output/spec.md

REQ-133 — PDF playbook includes DOCX assembler configurations

The antora-playbook-pdf.yml SHALL register DOCX assembler configs alongside PDF assembler configs so a single build produces both PDF and DOCX outputs.

Source: openspec/specs/docx-output/spec.md

REQ-134 — pandoc is available in the build environment

The project SHALL declare pandoc as a dependency in devbox.json so that devbox shell provides the pandoc binary for DOCX generation.

Source: openspec/specs/docx-output/spec.md

REQ-135 — DOCX output format is documented

The project documentation SHALL include a how-to guide for generating DOCX output and reference documentation for the DOCX assembler configuration.

Source: openspec/specs/docx-output/spec.md

REQ-179 — PDF playbook references extension by local path in development

The antora-playbook-pdf.yml example playbook SHALL reference the PDF extension using a local path (./lib/src/antora-pdf-extension.cjs) since it is the project’s own development playbook. Consumer documentation SHALL show the package subpath pattern (antora-tracer/antora-pdf).

Source: openspec/specs/pdf-output/spec.md

REQ-180 — PDF extension is published and referenceable by package name

The antora-tracer npm package SHALL include lib/src/antora-pdf-extension.cjs and export it under the subpath antora-tracer/antora-pdf so consumers can reference it in their playbooks without copying files from the repository.

Source: openspec/specs/published-extensions/spec.md

REQ-181 — DOCX extension is published and referenceable by package name

The antora-tracer npm package SHALL include lib/src/antora-docx-extension.cjs and lib/src/antora-docx-converter.cjs and export the extension under the subpath antora-tracer/antora-docx.

Source: openspec/specs/published-extensions/spec.md

REQ-182 — Assembler packages declared as optional peer dependencies

The package.json SHALL declare @antora/assembler and @antora/pdf-extension as peerDependencies with optional: true in peerDependenciesMeta so npm signals the requirement to consumers who use PDF or DOCX output without requiring them for consumers who do not. These packages SHALL also remain in devDependencies for local development builds.

Source: openspec/specs/published-extensions/spec.md

REQ-183 — Assembler configs and adoc-to-docx script are example-site configuration

The assembler config YMLs and adoc-to-docx script SHALL reside in examples/ as reference consumer configuration, not at the project root and not in the npm package. The how-to documentation SHALL explain that consumers create their own configs modelled on these examples.

Source: openspec/specs/published-extensions/spec.md

REQ-184 — DOCX playbook references extension by local path in development

The antora-playbook-pdf.yml example playbook SHALL reference the DOCX extension using a local path (./lib/src/antora-docx-extension.cjs). Consumer documentation SHALL show the package subpath pattern (antora-tracer/antora-docx).

Source: openspec/specs/docx-output/spec.md

Vale Prose Linting

REQ-151 — Vale lints page and partial source content during the build

The system SHALL run Vale against the source AsciiDoc content of every page and partial file in the content catalog when the extension is enabled.

Source: openspec/specs/vale-build-integration/spec.md

Addressed by
Verified by
REQ-152 — The build gates on a configurable minimum severity

The system SHALL fail the build when Vale reports a finding at or above the configured minimum severity, and SHALL log findings below that severity without failing.

Source: openspec/specs/vale-build-integration/spec.md

Addressed by
Verified by
REQ-153 — The extension reports the Vale configuration source

The system SHALL load Vale’s configuration from the path supplied in the playbook configuration, so users control which styles and rules apply.

Source: openspec/specs/vale-build-integration/spec.md

Addressed by
REQ-154 — Missing executables fail with an actionable message

When the extension is enabled, if the vale or asciidoctor executable is unavailable, the system SHALL fail the build with a message naming the missing executable.

Source: openspec/specs/vale-build-integration/spec.md

Addressed by
Verified by
REQ-155 — The extension is opt-in

The system SHALL NOT run Vale unless the extension is explicitly registered in the playbook, so existing builds are unaffected.

Source: openspec/specs/vale-build-integration/spec.md

Addressed by
Verified by
REQ-156 — Source layout is out of scope

The system SHALL NOT enforce source line layout such as one sentence per line; that concern belongs to the source-layout checker.

Source: openspec/specs/vale-build-integration/spec.md

Addressed by
Verified by

Documentation Style Rules

REQ-157 — Reusable Vale rules encode the style guide

The system SHALL provide a set of Vale rule files that encode the machine-checkable parts of the documentation style guide, including filler-word avoidance, inclusive language, non-militaristic language, and the instead-of/use substitutions.

Source: openspec/specs/documentation-style-rules/spec.md

Addressed by
REQ-158 — Rules are packaged with the extension

The system SHALL ship the rule files and a sample configuration with the npm package, while remaining optional for users.

Source: openspec/specs/documentation-style-rules/spec.md

Addressed by
REQ-185 — Item blocks use the open-block delimiter

Item block examples in the documentation SHALL use the -- open-block delimiter as the canonical form. The ==== example-block delimiter SHALL be documented as a valid alternative with its rendering difference.

Source: openspec/specs/documentation-style-rules/spec.md

Documentation Structure

REQ-186 — Getting Started tutorial page

The example site SHALL include a single Tutorial page (getting-started.adoc) that guides a first-time user from zero to a working traceability setup in numbered, sequential steps.

Source: openspec/specs/doc-tutorial/spec.md

REQ-187 — Tutorial in navigation

The example site navigation SHALL include a "Tutorial" section as the first top-level item, containing the Getting Started page.

Source: openspec/specs/doc-tutorial/spec.md

REQ-188 — How-to guide pages exist for key tasks

The example site SHALL include How-to guide pages covering the following tasks:

  • Custom domain model definition

  • New project setup

  • Writing traceable items

  • Neo4j export

  • Using partial files with items

  • Adding traceability visualizations

  • Troubleshooting common issues

  • Contributing to the project (extracted from developer guide)

Source: openspec/specs/doc-howto-guides/spec.md

REQ-189 — How-to guides link to Reference

Each How-to guide page SHALL include links to relevant Reference pages for option details and syntax specifications.

Source: openspec/specs/doc-howto-guides/spec.md

REQ-190 — How-to guides section in navigation

The example site navigation SHALL include a "How-to Guides" section containing all how-to pages, ordered by typical usage frequency.

Source: openspec/specs/doc-howto-guides/spec.md

REQ-191 — Reference pages for macro syntax, configuration, CLI, presets, and API

The example site SHALL include Reference pages exhaustively documenting:

  • Item macro syntax and attributes

  • Traceability display macros (outgoing, incoming, links, graph, graph-coverage)

  • Configuration options (all playbook options, traceability.yml schema)

  • Built-in presets (complete definition of each)

  • CLI commands and flags

  • Public API surface (methods, signatures, data model interfaces)

Source: openspec/specs/doc-reference/spec.md

REQ-192 — Reference pages cross-link to other modes

Reference pages SHALL include links to relevant How-to guides, Explanation pages, and other Reference pages.

Source: openspec/specs/doc-reference/spec.md

REQ-193 — Reference section in navigation

The example site navigation SHALL include a "Reference" section containing all reference pages, ordered from most-used to least-used.

Source: openspec/specs/doc-reference/spec.md

REQ-194 — Explanation pages for concepts, architecture, and design rationale

The example site SHALL include Explanation pages covering:

  • The traceability model (roles, relations, matrices as concepts)

  • The processing pipeline (how passes work, the graph lifecycle)

  • The arc42 architecture document

  • Architecture Decision Records (ADRs)

  • Quality attributes

  • Comparison with Sphinx Needs (feature mapping)

  • Antora vs Sphinx publishing pipeline comparison

Source: openspec/specs/doc-explanation/spec.md

REQ-195 — Explanation pages link to Reference and How-to

Explanation pages SHALL include links to relevant Reference pages and How-to guides for readers who want to act on the understanding gained.

Source: openspec/specs/doc-explanation/spec.md

REQ-196 — Explanation section in navigation

The example site navigation SHALL include an "Explanation" section containing all explanation pages.

Source: openspec/specs/doc-explanation/spec.md

REQ-197 — Self-Traceability nav section groups demo pages

The example site navigation SHALL include a "Self-Traceability" section containing the pages that demonstrate the extension tracing its own development artifacts:

  • Requirements

  • Use Cases

  • Test Plan

  • Dashboard

Source: openspec/specs/doc-self-traceability/spec.md

REQ-198 — Self-Traceability section is visually distinct

The Self-Traceability section SHALL be clearly separated from the user-facing documentation sections, signaling to readers that these are demonstration artifacts, not documentation about using the tool.

Source: openspec/specs/doc-self-traceability/spec.md

REQ-199 — Self-Traceability section preserves traceable items

The restructuring SHALL NOT move any traceable [item] blocks out of their source files. All existing requirements (REQ), architecture (ARC), test (TST), use case (UC), and quality (QA) items SHALL remain in their current AsciiDoc files.

Source: openspec/specs/doc-self-traceability/spec.md

REQ-200 — Doc examples validate against the traceability configuration

The system SHALL provide a check that extracts [item] blocks from the example site’s prose documentation pages and validates them against the example traceability configuration (examples/traceability.yml). The check SHALL fail on unknown roles, disallowed relations, and item blocks that fail to parse.

Source: openspec/specs/doc-example-validation/spec.md

CI and Deployment

REQ-060 — Pages workflow generates PDFs

The GitHub Pages workflow SHALL include Ruby setup and PDF generation steps so that requirements, architecture, and test-plan PDFs are built and deployed alongside the HTML site on every push to main.

Source: openspec/specs/ci-pdf-deploy/spec.md

Addressed by
Validated by
REQ-061 — Site links to PDF downloads

The example site’s index page SHALL include download links to the three core PDF documents.

Source: openspec/specs/ci-pdf-deploy/spec.md

Addressed by
REQ-062 — Local PDF workflow is unchanged

The existing local PDF build workflow (devbox shell + npx antora antora-playbook-pdf.yml) SHALL continue to work unchanged.

Source: openspec/specs/ci-pdf-deploy/spec.md

Addressed by

Landing Page

REQ-072 — Landing page at GitHub Pages root

The system SHALL serve a landing page at the GitHub Pages root URL (/) that introduces the antora-tracer project before visitors enter the documentation, while the Antora documentation site remains accessible at /docs/.

Source: openspec/specs/landing-page/spec.md

Addressed by
Validated by
REQ-073 — Two-persona feature presentation

The landing page SHALL present project features in a way that resonates with both developers/architects (docs-as-code natives) and requirements engineers/project managers (traceability/compliance focused users).

Source: openspec/specs/landing-page/spec.md

Addressed by
REQ-074 — Traceability visualization preview

The landing page SHALL include a visual preview of traceability output that links to the live traceability matrices in the documentation site.

Source: openspec/specs/landing-page/spec.md

Addressed by
REQ-075 — Deployment integration

The GitHub Pages deployment workflow SHALL place the landing page at the root and the Antora documentation in a /docs/ subdirectory, with both built and deployed from the same repository.

Source: openspec/specs/landing-page/spec.md

Addressed by
REQ-076 — Minimal tooling

The landing page SHALL require no build step or installed dependencies to deploy — it SHALL be served as static HTML.

Source: openspec/specs/landing-page/spec.md

Addressed by
REQ-077 — Landing page uses conemso color palette

The landing page SHALL use a consistent brand color palette for all brand-colored elements. Primary brand elements (buttons, links, icons, section backgrounds) SHALL use the primary brand color for interactive elements and a darker variant for headings and dark backgrounds.

Source: openspec/specs/landing-page/spec.md

Addressed by
REQ-078 — Landing page uses Roboto font

The landing page SHALL use a consistent font family matching the documentation site theme for all text content.

Source: openspec/specs/landing-page/spec.md

Addressed by

Architecture Documentation

REQ-123 — Architecture document includes class-level API diagram

The architecture document SHALL include a class-level diagram showing the public interface of each major component.

Source: openspec/specs/architecture-diagram-checklist/spec.md

REQ-124 — Architecture document includes DocumentParser activity diagram

The architecture document SHALL include an activity diagram showing the parser’s step-by-step pipeline: verbatim block pre-scanning, item block extraction with quote-aware bracket matching, body delimiter detection, relationship macro scanning with inline-code exclusion, and result assembly.

Source: openspec/specs/architecture-diagram-checklist/spec.md

REQ-125 — Architecture document includes TraceabilityGraph state diagram

The architecture document SHALL include a state diagram showing the graph lifecycle: empty → populated (items added) → complete (relationships added, ready for queries), including which operations are valid in each state.

Source: openspec/specs/architecture-diagram-checklist/spec.md

REQ-126 — Architecture document includes PreparedFile caching flow diagram

The architecture document SHALL include an activity diagram showing the file-state caching flow: file content, document attributes, and block positions computed once per file, then reused across all macro-expansion passes.

Source: openspec/specs/architecture-diagram-checklist/spec.md

REQ-127 — update-example-site skill includes diagram checklist

The update-example-site skill SHALL include a diagram checklist per arc42 section, guidance on when to add each diagram type (class, sequence, activity, state), and conventions for diagram file placement in the examples/ directory.

Source: openspec/specs/architecture-diagram-checklist/spec.md

Self-Traceability Example

REQ-105 — Use-case role extends self-traceability preset

The example site SHALL demonstrate config extension by adding a use_case role not present in any built-in preset, with a directional leads_to relation to requirement.

Source: openspec/specs/use-case-example/spec.md

Addressed by
Verified by
REQ-106 — Use-case page renders with traceability links

The use-cases.adoc page SHALL render traceability:outgoing[] and traceability:incoming[] macros for each use-case item, showing its requirement links.

Source: openspec/specs/use-case-example/spec.md

Addressed by
REQ-107 — usecase-requirements matrix is generated

The example site SHALL generate a usecase-requirements matrix with use-case rows, requirement columns, and leads_to coverage.

Source: openspec/specs/use-case-example/spec.md

Addressed by
REQ-120 — Process requirements are traceable to product requirements

The example site SHALL include a delivery-process.adoc document containing process requirements with the process_requirement role. Each process requirement SHALL trace to the product requirements it validates via a validates relation and to the architectural decisions it implements via a deploys relation.

Source: openspec/specs/delivery-process-traceability/spec.md

REQ-121 — Process requirements document follows site conventions

The delivery-process.adoc SHALL use the same [item] macro format, [#PRQ-XXX, item, role=process_requirement] IDs, and traceability:links[] rendering macros as other example documents.

Source: openspec/specs/delivery-process-traceability/spec.md

REQ-122 — Process-to-product matrix exists

The example site configuration SHALL define a process-to-product matrix with process_requirement as rows, requirement as columns, and validates as the coverage relation.

Source: openspec/specs/delivery-process-traceability/spec.md

REQ-114 — Dead design-matrix template is removed

The unused design-matrix HTML template and its associated partials SHALL be removed, as they are not rendered by any code path.

Source: openspec/specs/template-partials/spec.md

REQ-115 — Dead MatrixGenerator methods are removed

The unused matrix generation methods (generateRequirementsMatrix, generateDesignMatrix, generateAllMatrices) SHALL be removed, as they are not called by any code path.

Source: openspec/specs/template-partials/spec.md