SpecCompiler Core Design
1 Scope
This document describes the software architecture and design of SpecCompiler Core.
1.1 Pipeline Architecture
1.1.1 Overview
SpecCompiler uses a layered architecture with the engine orchestrating a five-phase <Pipeline> that processes documents through registered <Handler>.
1.1.2 Component Summary
The architecture comprises 30 CSCs organized in four source layers and two model packages. For the complete decomposition with all 162 CSUs, see the Software Decomposition chapter.
1.2 Type System Architecture
1.2.1 Overview
SpecCompiler uses a dynamic type system where models define available types for objects, <Float>, relations, and views.
1.2.2 Type Module Structure
Each extension module returns one descriptor table. The host reads the declared descriptor fields.
-- Example: models/default/types/objects/hlr.lua
return {
kind = "object", -- object | float | view | relation | specification | analyze
schema = { -- SpecIR fields for this kind. schema.id is authoritative.
id = "HLR",
long_name = "High-Level Requirement",
extends = "TRACEABLE", -- attribute + hook inheritance via the extends chain
attributes = {
{ name = "status", type = "ENUM", values = { "Draft", "Review", "Approved", "Implemented" } },
},
},
hooks = { -- Optional custom behavior.
render = function(ctx) ... end,
},
}Custom behavior belongs in hooks.
The host validates each hook name against the descriptor kind. It
rejects functions on other top-level keys. A data-only type can omit
hooks. An on_<phase> function in hooks registers phase participation.
1.2.3 Type Categories
| Category | Database Table | Key Fields |
|---|---|---|
| Specifications | spec_specification_types | id, long_name, extends, is_default |
| Objects | spec_object_types | id, long_name, extends, is_default (HLR, FD, CSC, CSU, VC, etc.) |
| Floats | spec_float_types | id, long_name, counter_group, needs_external_render |
| Relations | spec_relation_types | id, source_type_ref, target_type_ref, link_selector |
| Views | spec_view_types | id, inline_prefix, aliases |
1.2.4 Hook Contract
Each hook accepts one frozen context table. The polymorphic subject field contains the hook input.
The capability field identifies
the hook. The hook name selects one of two context tiers:
| Hook(s) | Tier / context | Returns |
|---|---|---|
| render, render_block, render_link, message | render context with Pandoc and output-format fields | Pandoc AST / string |
| dataset | data context with
subject.params |
{ source / data / links } dataset |
| build_block | data context with
subject.params |
pandoc.Block |
| transform | data context with
subject.raw_content and subject.float |
resolved-AST string |
| resolve | data context with target text and source identifier | { target, ambiguous } |
| prepare_task, handle_result | data context with task or result fields | task table / DB write |
A render hook receives the render core and its subject. A data hook
receives data, spec_id, log, and its subject. The host checks
required context fields. It prevents assignment to top-level context
fields. Each hook must return its documented type.
1.2.5 Loading Process
- The host engine (
contract.registry) loadsdefaultthen each overlay model (later-wins-by-id), scanningmodels/{model}/types/{category}/. - Each file returns one descriptor; the host validates it (
kind,schema.id, each hook valid for the kind, no behaviour on top-level keys) and emits the type row into the corresponding SpecIR table. - Each declared hook is eager-indexed into the
(kind, id) -> hookmap that every consumer reads viaget_hook/get_hook_inherited(which walks theextendschain). Anon_<phase>hook inhooksis synthesized intopipeline:register_handler. host:finalize()propagates inherited attributes, creates the analyze-query SQL views, and asserts required hooks (e.g. a TABLE_VIEW subtype must resolve abuild_block).
1.3 SpecIR Database Schema
1.3.1 Overview
The Specification <Intermediate Representation> (SpecIR) is implemented as a <SQLite Database> schema composed from:
src/db/schema/types.luasrc/db/schema/content.luasrc/db/schema/build.luasrc/db/schema/search.luasrc/db/schema/init.lua(combines all schema modules, initializes EAV pivot views)
The schema has four domains:
| Domain | Tables |
|---|---|
| Type system | spec_specification_types,
spec_object_types, spec_float_types,
spec_relation_types, spec_view_types,
datatype_definitions, spec_attribute_types,
enum_values |
| Content | specifications,
spec_objects, spec_floats,
spec_relations, spec_views,
spec_attribute_values |
| Build cache | build_graph,
output_cache |
| Search (FTS5) | fts_objects,
fts_attributes, fts_floats |
1.3.2 Type + Content (SpecIR)
SpecIR is a ReqIF inspired relational metamodel that lowers textual specifications into a typed intermediate representation against which structural validity is evaluated.
Where Pandoc provides the syntactic bridge from Markdown to a structured AST, SpecIR provides the semantic layer by separating: a type layer (Γ), which defines what may exist and a content layer, which records what does exist.
Validation reduces to relational set operations: constraints are expressed as queries over finite sets of entities and relations, and violations emerge as counterexamples (e.g., anti-joins between expected and actual structures).
1.4 Pipeline Design
FD-001: Pipeline Execution Orchestration
Allocation: Realized by Core Runtime (Core Runtime) through Build Engine (Build Engine) and Pipeline Orchestrator (Pipeline Orchestrator), with handlers registered via Pipeline Handlers (Pipeline Handlers). Phase-specific handlers are organized in Analyze Handlers (Analyze Handlers), Initialize Handlers (Initialize Handlers), and Transform Handlers (Transform Handlers), with shared utilities in Shared Pipeline Utilities (Shared Pipeline Utilities).
The <Pipeline> execution orchestration function manages the five-phase document processing lifecycle from initial Pandoc hook entry through final output generation. It encompasses <Handler> registration, dependency-based execution ordering, context propagation, and phase abort logic.
Entry Point: The Pandoc filter (Build Engine) hooks into the Pandoc Meta callback, extracts project metadata via Validation Policy, and invokes the build engine. The engine creates the database, initializes the data manager, loads the model via Type Loader, processes document files (with <Build Cache> checks), and delegates to the pipeline orchestrator.
Handler Registration: During model loading, Type Loader registers each
handler with the Pipeline Orchestrator Pipeline Orchestrator, which enforces the
registration contract by validating that every handler declares both a
name and a [dic:prerequisites](#) field before
accepting registration. The orchestrator rejects duplicate handler names
— attempting to register a handler whose name already exists raises an
immediate error. Accepted handlers are stored in a lookup table keyed by
name for O(1) retrieval during phase execution. Each handler implements
phase hooks using the naming convention on_{phase} (e.g., on_initialize, on_analyze, on_transform, on_verify, on_emit). All hooks receive the full
contexts array: on_{phase}(data, contexts, diagnostics).
<Topological Sort>: Before
executing each phase, the Pipeline Orchestrator Pipeline Orchestrator applies Kahn’s
algorithm to produce a deterministic handler execution order. Only
handlers that implement an on_{phase} hook for the current phase
participate in the sort; handlers without a relevant hook are skipped
entirely. The algorithm begins by building a dependency graph restricted
to participants and initializing an in-degree count for each node. Nodes
with zero in-degree — handlers whose prerequisites are already satisfied
— seed a processing queue. At each step the algorithm dequeues the first
node, appends it to the sorted output, and decrements the in-degree of
all its dependents; any dependent whose in-degree reaches zero is
enqueued. Alphabetical tie-breaking is applied at every dequeue step so
that handlers at the same dependency depth are always emitted in the
same order, guaranteeing deterministic output across runs. After the
queue is exhausted, if the sorted list length is less than the
participant count a dependency cycle exists and is reported as an
error.
For example, if INITIALIZE has three handlers —
specifications(no prerequisites),spec_objects(prerequisite:specifications), andspec_floats(prerequisite:specifications) — the sort produces[specifications, spec_floats, spec_objects], withspec_floatsandspec_objectsordered alphabetically since both depend only onspecifications.
Phase Execution: The pipeline executes five phases in order:
- <INITIALIZE Phase> — Parse Pandoc <Abstract Syntax Tree> into <Intermediate Representation> database tables (specifications, spec_objects, attributes, spec_floats, spec_views, spec_relations)
- <RESOLVE Phase> — Resolve cross-references and infer relation types
- <TRANSFORM Phase> — Render content, materialize views, execute external renderers
- <ANALYZE Phase> — Run analyze queries and collect diagnostics
- <EMIT Phase> — Assemble documents and generate output files
All phases use the same dispatch model: for each handler in sorted
order, the Pipeline Orchestrator Pipeline Orchestrator calls the handler’s
on_{phase}(data, contexts, diagnostics)
hook once with the full set of contexts. Handlers are responsible for
iterating over contexts internally. Each handler invocation is bracketed
by uv.hrtime() calls at nanosecond
precision to record its duration, and the orchestrator also records the
aggregate duration of each phase, providing two-level performance
visibility (handler-level and phase-level).
Phase Abort: After ANALYZE, the Pipeline Orchestrator Pipeline Orchestrator inspects the diagnostics collector for any error-level entries. If errors exist, the pipeline aborts before EMIT — only output generation is skipped, since TRANSFORM has already completed. This design allows analyze queries to validate transform results before committing to output.
Context Propagation: Each document file produces a context containing the parsed AST, file path, specification ID, and walker state. Contexts are passed through all phases, accumulating state. The diagnostics collector aggregates errors and warnings across all handlers and contexts.
Component Interaction
The pipeline is realized through the core runtime and four handler packages that correspond to pipeline phases.
CSC Core Runtime (Core
Runtime) provides the entry point and orchestration layer. CSU Pandoc Filter Entry
Point (Pandoc Filter Entry Point) hooks into the Pandoc callback to
launch the build. CSU
Configuration Parser (Configuration Parser) reads project.yaml and resolves model, output,
and logging settings. CSU Data
Loader (Data Loader) loads external data files referenced by
specifications. CSU Build
Engine (Build Engine) coordinates the full build lifecycle —
creating the database, loading the model, processing document files with
cache checks, and delegating to CSU Pipeline Orchestrator (Pipeline
Orchestrator) for phase execution. The orchestrator drives topological
sort, handler dispatch, timing, and abort logic across all five
phases.
CSC Pipeline Handlers
(Pipeline Handlers) registers cross-cutting handlers. CSU Include Expansion Filter (Include
Expansion Filter) resolves include
directives during INITIALIZE, expanding referenced files into the
document AST before entity parsing begins.
CSC Initialize Handlers (Initialize Handlers) parses the Pandoc AST into SpecIR entities. CSU Specification Parser (Specification Parser) extracts document-level metadata, CSU Object Parser (Object Parser) identifies typed content blocks, CSU Attribute Parser (Attribute Parser) extracts key-value attributes from object paragraphs, CSU Float Parser (Float Parser) detects embedded figures, tables, and listings, CSU Relation Parser (Relation Parser) captures cross-reference links, and CSU View Parser (View Parser) identifies view directives.
CSC Analyze Handlers (Analyze Handlers) resolves cross-references and infers types. CSU Relation Resolver (Relation Resolver) matches link targets to spec objects using selector-based resolution. CSU Relation Type Inferrer (Relation Type Inferrer) assigns relation type_refs based on source and target object types. CSU Attribute Caster (Attribute Caster) validates and casts attribute values against their declared datatypes.
CSC Shared Pipeline Utilities (Shared Pipeline Utilities) provides reusable base modules consumed by handlers across phases. CSU Spec Object Base (Spec Object Base) and CSU Specification Base (Specification Base) provide shared parsing logic for objects and specifications. CSU Float Base (Float Base) provides float detection and extraction. CSU Attribute Paragraph Utilities (Attribute Paragraph Utilities) parses attribute blocks from definition-list paragraphs. CSU Include Handler (Include Handler) and CSU Include Utilities (Include Utilities) manage file inclusion and path resolution. CSU Render Utilities (Render Utilities) and CSU Math Render Utilities (Math Render Utilities) provide AST-to-output conversion helpers. CSU View Utilities (View Utilities) supports view parsing and rendering. CSU Source Position Compatibility (Source Position Compatibility) normalizes Pandoc source position data across API versions.
- TRACEABILITY:
- srs: SF-001
LLR-PIPE-002-01: Handler Registration Requires Name
Pipeline handler registration shall reject handlers that do not
provide a non-empty name
field.
- TRACEABILITY:
- srs: HLR-PIPE-002
- VERIFICATION METHOD:
- Test
LLR-PIPE-002-02: Handler Registration Requires Prerequisites
Pipeline handler registration shall reject handlers that do not
provide a prerequisites array.
- TRACEABILITY:
- srs: HLR-PIPE-002
- VERIFICATION METHOD:
- Test
LLR-PIPE-002-03: Duplicate Handler Names Are Rejected
Pipeline handler registration shall reject duplicate handler names within the same pipeline instance.
- TRACEABILITY:
- srs: HLR-PIPE-002
- VERIFICATION METHOD:
- Test
LLR-PIPE-006-01: Base Context Fields Are Propagated
Pipeline execution shall propagate the base context fields (validation, build_dir, log, output_format, template, reference_doc, docx, project_root, outputs, html5, bibliography, csl) to handlers.
- TRACEABILITY:
- srs: HLR-PIPE-006
- VERIFICATION METHOD:
- Test
LLR-PIPE-006-02: Document Context Is Attached Per Document
Pipeline execution shall attach doc and spec_id for each processed document
context passed to handlers.
- TRACEABILITY:
- srs: HLR-PIPE-006
- VERIFICATION METHOD:
- Test
LLR-PIPE-006-03: Project Context Exists Without Documents
Pipeline execution shall create a fallback project context when the
document list is empty, with doc=nil and a derived spec_id.
- TRACEABILITY:
- srs: HLR-PIPE-006
- VERIFICATION METHOD:
- Test
LLR-020: Phase Execution Order
Given registered <Handler>s, CSU Pipeline Orchestrator shall execute phases in fixed order: <INITIALIZE Phase> → <RESOLVE Phase> → <TRANSFORM Phase> → <ANALYZE Phase> → <EMIT Phase>.
- TRACEABILITY:
- srs: HLR-PIPE-001
- VERIFICATION METHOD:
- Test
LLR-021: Phase Hook Filtering
Given the <Handler> set for a <Phase>, CSU Pipeline Orchestrator
shall invoke only those declaring an on_{phase} hook for that phase.
- TRACEABILITY:
- srs: HLR-PIPE-001
- VERIFICATION METHOD:
- Test
LLR-022: No EMIT After Abort
When diagnostics:has_errors()
returns true after <ANALYZE Phase>, CSU Pipeline Orchestrator shall not
execute <EMIT
Phase> phase handlers.
- TRACEABILITY:
- srs: HLR-PIPE-001
- VERIFICATION METHOD:
- Test
LLR-023: Topological Sort Phase Filtering
Given a <Phase> name and the <Handler>
registry, CSU Pipeline
Orchestrator shall build the <Topological Sort> dependency graph
from only those handlers declaring an on_{phase} hook, producing an ordered
execution list.
- TRACEABILITY:
- srs: HLR-PIPE-003
- VERIFICATION METHOD:
- Test
LLR-024: Alphabetic Tie-Breaking
When multiple <Handler>s have no dependency
ordering between them, CSU
Pipeline Orchestrator shall sort them alphabetically by name, producing deterministic
output.
- TRACEABILITY:
- srs: HLR-PIPE-003
- VERIFICATION METHOD:
- Test
LLR-025: Circular Dependency Reporting
When a cyclic <Prerequisites> graph is detected, CSU Pipeline Orchestrator shall report an error listing the remaining unordered handler names.
- TRACEABILITY:
- srs: HLR-PIPE-003
- VERIFICATION METHOD:
- Test
LLR-026: TRANSFORM Completes Before Abort Check
CSU Build Engine shall
complete all <TRANSFORM Phase> phase handlers
before checking has_errors() for
abort, ensuring transforms are applied before validation results are
inspected.
- TRACEABILITY:
- srs: HLR-PIPE-004
- VERIFICATION METHOD:
- Test
LLR-027: Abort Logs Error Count
When aborting execution before <EMIT Phase>, CSU Build Engine shall log the error count via CSU Logger.
- TRACEABILITY:
- srs: HLR-PIPE-004
- VERIFICATION METHOD:
- Test
LLR-028: Full Contexts Array Dispatch
Given a document context array, CSU Pipeline Orchestrator shall pass the
full array to each <Handler>’s on_{phase} hook in a single call.
- TRACEABILITY:
- srs: HLR-PIPE-005
- VERIFICATION METHOD:
- Test
LLR-029: Handler Hook Signature
CSU Pipeline
Orchestrator shall invoke phase hooks with signature on_{phase}(data, contexts, diagnostics)
where data is a CSU Data Manager instance, contexts is the array, and diagnostics is a CSU Diagnostics Collector instance.
- TRACEABILITY:
- srs: HLR-PIPE-005
- VERIFICATION METHOD:
- Test
LLR-030: L1 Headers Register as Specifications
Given a Pandoc Header at level 1 in the <Abstract Syntax Tree>, CSU Specification Parser
shall parse the optional TYPE:
prefix and @<Project
Identifier> suffix and insert one <Specification> record into the specifications table with identifier derived from filename, type_ref validated against the <Type
Registry>, and header_ast
storing the serialized <Abstract Syntax Tree>.
- TRACEABILITY:
- srs: HLR-PIPE-007
- VERIFICATION METHOD:
- Test
LLR-031: L2-H6 Headers Register as Spec Objects
Given a Pandoc Header at level 2–6, CSU Object Parser shall insert one <Spec
Object> record with type resolved via explicit TYPE: prefix → <Type Alias>
lookup → default fallback.
- TRACEABILITY:
- srs: HLR-PIPE-007
- VERIFICATION METHOD:
- Test
LLR-032: Blockquotes Register as Attributes
Given Pandoc BlockQuote lines matching > key: value, CSU Attribute Parser shall insert <Attribute>
records in spec_attribute_values
linked to the enclosing <Spec Object> via owner_object_id.
- TRACEABILITY:
- srs: HLR-PIPE-007
- VERIFICATION METHOD:
- Test
LLR-033: Code Blocks Register as Floats
Given a Pandoc CodeBlock with syntax:label class, CSU Float Parser shall insert one <Spec Float>
record with type_ref resolved from
<Type
Alias>, label, and raw_content.
- TRACEABILITY:
- srs: HLR-PIPE-007
- VERIFICATION METHOD:
- Test
LLR-034: Links Register as Relations
Given a Pandoc Link with (@) or
(#) target, CSU Relation Parser shall insert one <Spec
Relation> record with target_text and <Relation
Selector> preserved for downstream resolution.
- TRACEABILITY:
- srs: HLR-PIPE-007
- VERIFICATION METHOD:
- Test
LLR-035: Content-Addressable Identifiers and Document Order
For any <Intermediate Representation> record,
CSU Object Parser and CSU Hash Utilities shall
compute identifier as SHA1 hash of
source context and assign file_seq
preserving document order.
- TRACEABILITY:
- srs: HLR-PIPE-007
- VERIFICATION METHOD:
- Test
LLR-036: Include Path Resolution
Given .include CodeBlock paths,
CSU Include Expansion
Filter shall resolve each path relative to the including file’s
directory.
- TRACEABILITY:
- srs: HLR-PIPE-008
- VERIFICATION METHOD:
- Test
LLR-037: Circular Include Detection
When recursive include traversal detects a cycle, CSU Include Expansion Filter shall raise an error with the include chain path before performing any expansion.
- TRACEABILITY:
- srs: HLR-PIPE-008
- VERIFICATION METHOD:
- Test
LLR-038: Source Position Injection
After expanding included content, CSU Include Expansion Filter shall inject
data-source-file and data-pos attributes into expanded blocks
for diagnostic tracing.
- TRACEABILITY:
- srs: HLR-PIPE-008
- VERIFICATION METHOD:
- Test
LLR-039: Non-Composite PID Format
Given a non-<Composite Object Type> <Spec
Object> without explicit @<Project
Identifier>, the pid_generator shall produce a <Project
Identifier> using pid_prefix
+ pid_format from the <Type>
definition (e.g., HLR-%03d → HLR-001).
- TRACEABILITY:
- srs: HLR-PIPE-009
- VERIFICATION METHOD:
- Test
LLR-040: Composite Hierarchical PID
Given a <Composite Object Type> <Spec
Object> without explicit @<Project Identifier>, the
pid_generator shall produce a hierarchical <Project Identifier> qualified by the
<Specification> PID (e.g., SRS-sec1.2.3).
- TRACEABILITY:
- srs: HLR-PIPE-009
- VERIFICATION METHOD:
- Test
LLR-041: Explicit PID Preservation
Given a <Spec
Object> with explicit @<Project
Identifier> annotation, the pid_generator shall preserve the PID
unchanged.
- TRACEABILITY:
- srs: HLR-PIPE-009
- VERIFICATION METHOD:
- Test
LLR-042: PID Collision Detection
After generating a <Project Identifier>, the pid_generator shall check for collisions across all <Specification>s, raising an error if a duplicate is found.
- TRACEABILITY:
- srs: HLR-PIPE-009
- VERIFICATION METHOD:
- Test
LLR-043: Relation Type Constraint Filtering
Given an unresolved <Spec Relation> and the <Type
Registry>, CSU
Relation Type Inferrer shall filter candidate relation types by <Relation
Selector>, source_attribute, source type_ref, and target type_ref constraints.
- TRACEABILITY:
- srs: HLR-PIPE-010
- VERIFICATION METHOD:
- Test
LLR-044: NULL Constraints Are Wildcards
When a candidate relation type has a NULL constraint, CSU Relation Type Inferrer shall treat it as a wildcard matching any value, adding 0 to the <Specificity Scoring> score.
- TRACEABILITY:
- srs: HLR-PIPE-010
- VERIFICATION METHOD:
- Test
LLR-045: Specificity Tie Marks Ambiguity
When multiple candidates achieve equal highest <Specificity Scoring>, CSU Relation Type Inferrer shall mark the <Spec Relation> as ambiguous.
- TRACEABILITY:
- srs: HLR-PIPE-010
- VERIFICATION METHOD:
- Test
LLR-046: Same-Specification Target Preference
When resolving target candidates, CSU Resolution Queries shall prefer targets in the same <Specification> over cross-specification targets.
- TRACEABILITY:
- srs: HLR-PIPE-010
- VERIFICATION METHOD:
- Test
DD-CORE-001: SQLite as SpecIR Persistence Engine
Selected SQLite as the persistence engine for the Specification Intermediate Representation.
- RATIONALE:
-
SQLite provides:
- Zero-configuration embedded database requiring no server process
- Single-file database portable across platforms (specir.db)
- SQL-based query interface enabling declarative analyze queries and resolution logic
- ACID transactions for reliable incremental builds with cache coherency
- Built-in FTS5 for full-text search in the web application output
- Mature Lua binding (lsqlite3) available in the Pandoc ecosystem
DD-CORE-002: EAV Attribute Storage Model
Selected Entity-Attribute-Value storage for dynamic object and float attributes.
- RATIONALE:
-
The EAV model enables runtime schema extension through model definitions:
- Object types declare custom attributes in Lua modules without DDL changes
- New models can add attributes by declaring them in type definitions
- Typed columns provide SQL-level type safety while preserving EAV flexibility
- Per-type pivot views (view_{type}_objects) generated dynamically from spec_attribute_types restore columnar access for queries
- Alternative of wide tables rejected: column set unknown at schema creation time since models load after initialization
DD-CORE-003: Five-Phase Pipeline Architecture
Selected a five-phase sequential pipeline (INITIALIZE, RESOLVE, TRANSFORM, ANALYZE, EMIT) for document processing.
- RATIONALE:
-
Five phases separate concerns and enable verification before output:
- INITIALIZE parses AST into normalized relational IR before any resolution
- RESOLVE resolves cross-references and infers types on the complete IR, not partial state
- TRANSFORM renders content with all references resolved (views render live at EMIT)
- ANALYZE runs analyze queries after TRANSFORM so it can check transform results (e.g., float render failures)
- EMIT generates output only after verification passes, preventing invalid documents
- ANALYZE-before-EMIT enables abort on error without wasting output generation time
- Phase ordering is fixed; handler ordering within each phase is controlled by topological sort
DD-CORE-004: Topological Sort for Handler Ordering
Selected Kahn’s algorithm with declarative prerequisite arrays for handler execution ordering within each pipeline phase.
- RATIONALE:
-
Declarative prerequisites with topological sort enable:
- Handlers declare
prerequisites = {"handler_a", "handler_b"}rather than manual sequence numbers - Only handlers implementing the current phase’s hook participate in the sort
- Alphabetical tie-breaking at equal dependency depth guarantees deterministic execution across runs
- Cycle detection with error reporting prevents invalid configurations
- New handlers (including model-provided handlers) integrate by declaring their prerequisites without modifying existing handlers
- Alternative of priority numbers rejected: fragile when inserting new handlers between existing priorities
1.5 Type Discovery Design
FD-002: Type Model Discovery and Registration
The host loads model descriptors from the filesystem. It registers schema data, behavior hooks, phase hooks, and analyze queries.
Model order: The engine loads default before the selected model. It loads
manifest dependencies before the model that requires them. A descriptor
with the same kind and identifier replaces the earlier descriptor.
Model paths: The host searches $SPECCOMPILER_HOME/models/{model} first.
It then searches {cwd}/models/{model}. A missing selected
or required model stops the build.
Type discovery: The host scans five directories
under models/{model}/types/.
| Category | Directory | Descriptor kind |
Database table |
|---|---|---|---|
| Specifications | specifications/ |
specification |
spec_specification_types |
| Objects | objects/ |
object |
spec_object_types |
| Floats | floats/ |
float |
spec_float_types |
| Relations | relations/ |
relation |
spec_relation_types |
| Views | views/ |
view |
spec_view_types |
The host loads Lua files in sorted order. A type can use one file or
a directory with init.lua. The
declared kind must match the directory category.
Descriptor contract: Each module returns { kind, schema, hooks }. The hooks field is optional. The host requires
a known kind and a non-empty schema.id. It rejects invalid hooks and
functions outside hooks.
return {
kind = "object",
schema = {
id = "HLR",
extends = "TRACEABLE",
attributes = {
{ name = "status", type = "ENUM",
values = { "Draft", "Approved" } },
},
},
hooks = {
render = function(ctx)
return ctx.subject.element
end,
},
}Registration: The host writes schema data to the
applicable SpecIR table. It registers declared attributes and records
the extends relationship. It
indexes each behavior hook by kind, identifier, and hook name.
Hook inheritance: get_hook_inherited searches the descriptor
and then its ancestors. This lookup applies to all descriptor kinds that
support extends.
Phase hooks: An on_<phase> hook creates a pipeline
handler named <lowercase schema.id>_handler. The
schema.phase_prerequisites field
defines its ordering constraints. Phase hooks do not enter the
behavior-hook index.
Analyze queries: The host scans models/{model}/analyze_queries/. Each
descriptor uses kind = "analyze".
Repeated policy keys use later-model precedence. A descriptor with disabled = true removes the policy
key.
Finalization: After model loading, the host
propagates inherited attributes. It creates analyze-query SQL views and
checks required hooks. A TABLE_VIEW subtype without build_block stops the build.
- TRACEABILITY:
- srs: SF-005 , CSC-001 , CSU-008
LLR-EXT-020-01: Known Type Categories Are Scanned
The host shall scan the five known type-category directories in deterministic order.
- TRACEABILITY:
- srs: HLR-EXT-002
- VERIFICATION METHOD:
- Test
LLR-EXT-021-01: Declared Hooks Are Indexed
The host shall index each valid behavior hook by kind, schema.id, and hook name.
- TRACEABILITY:
- srs: HLR-EXT-003
- VERIFICATION METHOD:
- Test
LLR-EXT-021-02: Attribute Display Order
The standard object renderer shall render attributes listed in schema.attr_order first. It shall append
other attributes in alphabetical order.
- TRACEABILITY:
- srs: HLR-EXT-003
- VERIFICATION METHOD:
- Test
LLR-EXT-022-01: Schema Identifier Validation
The host shall stop model loading when a descriptor has no non-empty
schema.id. It shall apply category
defaults to valid schemas and register enum values.
- TRACEABILITY:
- srs: HLR-EXT-004
- VERIFICATION METHOD:
- Test
LLR-EXT-023-01: Model Path Resolution Order
Model resolution shall check SPECCOMPILER_HOME/models/{model} before
{cwd}/models/{model}.
- TRACEABILITY:
- srs: HLR-EXT-005
- VERIFICATION METHOD:
- Test
LLR-EXT-023-02: Missing Model Paths Fail Fast
Model loading shall stop when neither model path contains the selected or required model.
- TRACEABILITY:
- srs: HLR-EXT-005
- VERIFICATION METHOD:
- Test
LLR-EXT-024-01: Data View Resolution
Chart data loading shall use the inherited dataset hook for the requested view.
Fixture modules outside the host index can use the loose-module
loader.
- TRACEABILITY:
- srs: HLR-EXT-006
- VERIFICATION METHOD:
- Test
LLR-EXT-024-02: Sankey Data Injection
For a Sankey series, chart injection shall copy returned data and links to the first series. It shall
remove the conflicting dataset.
- TRACEABILITY:
- srs: HLR-EXT-006
- VERIFICATION METHOD:
- Test
LLR-EXT-024-03: Unsupported View Data
Chart injection shall preserve the chart configuration when no view is specified or the view returns an unsupported shape.
- TRACEABILITY:
- srs: HLR-EXT-006
- VERIFICATION METHOD:
- Test
LLR-094: Phase Hook Registration
The host shall register descriptor on_<phase> hooks with the
pipeline.
- TRACEABILITY:
- srs: HLR-EXT-001
- VERIFICATION METHOD:
- Test
LLR-095: Data View Discovery
The host shall register view descriptors from models/{model}/types/views/.
- TRACEABILITY:
- srs: HLR-EXT-007
- VERIFICATION METHOD:
- Test
LLR-096: Hook Index Lookup
The host shall return direct hooks from its index and inherited hooks
from the extends chain. An absent
hook shall return nil.
- TRACEABILITY:
- srs: HLR-EXT-008
- VERIFICATION METHOD:
- Test
DD-CORE-006: Lua Type System with Inheritance
SpecCompiler shall use Lua descriptor modules for model types.
- RATIONALE:
-
Lua supports computed schema data and co-locates behavior with its type.
The
extendsfield supports attribute and hook inheritance. Ordered model loading supports replacement without changes to the default model.
1.6 Storage Design
FD-003: SpecIR Persistence and Cache Coherency
Allocation: Realized by Database Persistence (Database Persistence) through Data Manager (Data Manager) and Build Cache (Build Cache). The database schema is defined in DB Schema (DB Schema), queries in DB Queries (DB Queries), and materialized views in DB Views (DB Views).
The <Intermediate Representation> persistence function manages the <SQLite Database> database that stores all parsed specification content and provides cache coherency for incremental builds. It encompasses schema management, the <EAV Model> storage model, build caching, and output caching.
SQLite Persistence: The data manager (Data Manager) wraps all
database operations, providing a query API over the SpecIR schema. The
database file is created in the project’s output directory and persists
across builds. Schema creation is executed inside DataManager.new(), establishing all content
and type tables.
SpecIR Schema: The content schema (Output Cache) defines the core entity tables:
specifications— Document-level containers with header AST and metadataspec_objects— Typed content blocks with AST, file position, and specification scopespec_floats— Embedded figures, listings, tables with render statespec_views— Materialized data views (TOC, LOF, traceability matrices)spec_relations— Links between objects with type inference resultsspec_attribute_values— EAV-model attribute storage for object and float properties
The type schema (Analyze Query Definitions) defines the metamodel tables that describe valid types, attribute definitions, and datatype constraints.
EAV Attribute Model: Attributes are stored as
individual rows in spec_attribute_values rather than as
columns, enabling dynamic schema extension through model definitions.
Each attribute row references its parent entity (object or float),
attribute definition, and stores the value as text with type casting at
query time.
<Build
Cache>: The build cache (Build Cache) records, per document, the full
file set the last successful build read — the root document itself plus
every included file — as nodes of the build_graph table, each with the SHA1 it
had at build time (the root is its own node). Before parsing, the Build
Engine (Build Engine)
hashes the root and the build cache walks the recorded nodes, hashing
include files via the Hash Utilities (Hash Utilities). The document is dirty —
reparsed from source — when any node’s current hash differs, a node file
is missing (hash returns nil, forcing the parse to fail fast with a
clear include-not-found error), or no root node is recorded (first
build, or the previous build failed before the deferred cache update).
Unchanged documents skip parsing entirely and reuse their cached SpecIR
state.
<Output Cache>: The output cache stores, per generated output file, the SHA1 of the exact serialized document that was fed to Pandoc — assembled from the database, views rendered, and the format filter applied. Before invoking Pandoc, the emitter serializes the assembled document, hashes it, and skips the invocation when the stored hash matches and no file dependency (bibliography, LaTeX class archive, reference.docx for DOCX) is newer than the output. Because the hash covers the render input itself rather than a model of its dependencies, any change that affects the rendered document — including cross-document view data such as traceability matrices, and template filter changes — invalidates the cache by construction.
Component Interaction
The storage subsystem is realized through four packages that separate runtime operations from static definitions.
CSC Database Persistence
(Database Persistence) provides the runtime database layer. CSU Database Handler
(Database Handler) wraps raw SQLite operations and connection management
with DELETE journal mode for single-file reliability. CSU Data Manager (Data Manager) builds on the
handler to provide the high-level query API used by all pipeline phases
— inserting spec entities during INITIALIZE, updating references during
RESOLVE, and reading assembled content during EMIT. CSU Build Cache (Build Cache) queries build_graph to detect changed documents
via SHA1 comparison of every recorded node (root and includes). CSU Output Cache (Output
Cache) tracks generated output files and the hash of their serialized
render input to skip redundant generation. CSU Analyze Query Loader (Analyze Query
Loader) materializes SQL analyze query views at build time for the
ANALYZE phase.
CSC DB Schema (DB Schema) defines the database structure through composable modules. CSU Schema Aggregator (Schema Aggregator) is the entry point, composing: CSU Content Schema (Content Schema) for the core SpecIR tables, CSU Type System Schema (Type System Schema) for attribute and datatype definitions, CSU Build Schema (Build Schema) for source file and dependency tracking, and CSU Search Schema (Search Schema) for FTS5 virtual tables.
CSC DB Queries (DB Queries) mirrors the schema structure with composable query modules. CSU Query Aggregator (Query Aggregator) combines: CSU Content Queries (Content Queries) for spec entity CRUD, CSU Resolution Queries (Resolution Queries) for cross-reference and relation resolution, CSU Build Queries (Build Queries) for cache and dependency lookups, CSU Type Queries (Type Queries) for type definitions and attribute constraints, and CSU Search Queries (Search Queries) for FTS5 population and search.
CSC DB Views (DB Views) provides materialized SQL views over the SpecIR data. CSU Views Aggregator (Views Aggregator) composes: CSU EAV Pivot Views (EAV Pivot Views) for pivoting attribute values into typed columns, CSU Resolution Views (Resolution Views) for joining relations with resolved targets, and CSU Public API Views (Public API Views) for stable query interfaces used by pipeline handlers and external tools.
- TRACEABILITY:
- srs: SF-002
LLR-DB-007-01: DataManager Rollback Cancels Staged Inserts
DataManager.begin_transaction()
followed by facade insert calls and DataManager.rollback() shall leave no
persisted staged rows.
- TRACEABILITY:
- srs: HLR-STOR-001
- VERIFICATION METHOD:
- Test
LLR-DB-007-02: DataManager CRUD Facade Persists Canonical IR Rows
DataManager facade methods (insert_specification, insert_object, insert_float, insert_relation, insert_view, insert_attribute_value, query_all, query_one, execute) shall persist and retrieve
canonical IR rows in content tables.
- TRACEABILITY:
- srs: HLR-STOR-001
- VERIFICATION METHOD:
- Test
LLR-DB-008-01: Attribute Casting Persists Typed Columns For Valid Pending Rows
Attribute casting shall map raw attribute values to the correct typed
columns (string_value, int_value, real_value, bool_value, date_value, enum_ref) and skip updates for invalid
casts.
- TRACEABILITY:
- srs: HLR-STOR-002
- VERIFICATION METHOD:
- Test
LLR-047: Build Cache Clean on Hash Match
Given a document path and its current SHA1 hash, CSU Build Cache is_document_dirty() shall walk the
document’s <Build Graph> nodes and return false when the root node is recorded and
every node’s stored node_sha1
matches its current file hash.
- TRACEABILITY:
- srs: HLR-STOR-003
- VERIFICATION METHOD:
- Test
LLR-048: Build Cache Dirty on Missing Entry
Given a document path with no root node recorded in the <Build
Graph> (first build, or a previous build that failed before the
deferred cache update), CSU
Build Cache is_document_dirty() shall return true.
- TRACEABILITY:
- srs: HLR-STOR-003
- VERIFICATION METHOD:
- Test
LLR-049: Output Cache Stale on Hash Mismatch
Given a spec_id, output_path, and the SHA1 of the serialized document
to be rendered (the exact Pandoc input, after assembly, view rendering,
and format filtering), CSU
Output Cache is_output_current() shall return false when the stored hash in the <Output
Cache> differs.
- TRACEABILITY:
- srs: HLR-STOR-004
- VERIFICATION METHOD:
- Test
LLR-050: Output Cache Stale on Missing File
When the output file does not exist on disk, CSU Output Cache is_output_current() shall return false regardless of hash match.
- TRACEABILITY:
- srs: HLR-STOR-004
- VERIFICATION METHOD:
- Test
LLR-051: Include-Aware Dirty Check
Given a root document path, CSU Build Cache is_document_dirty() shall compare every
<Build
Graph> node — the root itself and all includes — against current
file hashes, returning true if any
differs or a node file is missing.
- TRACEABILITY:
- srs: HLR-STOR-005
- VERIFICATION METHOD:
- Test
LLR-052: Build Graph Refresh After Build
After a successful build, CSU Build Cache and CSU Build Queries update_build_graph() shall delete old <Build
Graph> rows for root_path
and insert the current file set: the root document as its own node plus
the include tree.
- TRACEABILITY:
- srs: HLR-STOR-005
- VERIFICATION METHOD:
- Test
LLR-053: EAV Pivot View Naming
Given <Type
Registry> spec_object_types
entries, CSU EAV Pivot
Views shall generate <EAV Model> pivot views named view_{type_lower}_objects with one
column per registered attribute.
- TRACEABILITY:
- srs: HLR-STOR-006
- VERIFICATION METHOD:
- Test
LLR-054: No Pivot View for Composites
Given a <Composite Object Type> spec_object_types entry, CSU EAV Pivot Views shall
not generate a pivot view.
- TRACEABILITY:
- srs: HLR-STOR-006
- VERIFICATION METHOD:
- Test
DD-CORE-007: Content-Addressed Build Caching
Selected SHA1 content hashing for incremental build detection.
- RATIONALE:
-
Content-addressed hashing provides deterministic cache invalidation:
- SHA1 of document content detects actual changes, ignoring timestamp-only modifications
- One
build_graphtable records the whole file set of a build (root as its own node plus includes), so a single node walk answers the dirty check - Missing include files force cache miss (hash returns nil), preventing stale IR state
- Deferred cache updates (after successful pipeline execution) prevent stale entries on error
- The output cache keys on the hash of the serialized render input (the exact Pandoc input), not on a model of its dependencies — cross-document view data and template filter changes invalidate by construction
- Uses Pandoc’s built-in
pandoc.sha1()when available, falling back tovendor/sha2.luain standalone mode - Alternative of file timestamps rejected: unreliable across platforms (git checkout, copy, WSL2 clock skew)
- Alternative of per-spec dependency-model hashing (the previous “P-IR hash”) rejected: it missed inbound relations and live view queries, serving stale outputs after cross-document edits
DD-DB-002: Dynamic SQL View Generation for EAV Pivots
Selected runtime-generated CREATE VIEW statements per object type to pivot EAV attributes into typed columns.
- RATIONALE:
-
Dynamic view generation bridges EAV flexibility with query usability:
- Views generated after type loading, when attribute definitions are known
- One view per non-composite object type (view_{type}_objects) with type-appropriate MAX(CASE) pivot expressions
- Datatype-aware column selection (string_value for STRING, int_value for INTEGER, etc.)
- External tools query familiar columnar views instead of raw EAV tables
- Three-stage view initialization: resolution views first, public API views second, EAV pivots last
- Alternative of application-layer pivoting rejected: pushes N+1 query patterns to every consumer
1.7 Output Design
FD-004: Multi-Format Publication
Allocation: Realized by Transform Handlers (Transform Handlers) and Emit Handlers (Emit Handlers) through External Render Handler (External Render Handler) and Emitter Orchestrator (Emitter Orchestrator). Output infrastructure is provided by Infrastructure (Infrastructure), with format-specific utilities in Format Utilities (Format Utilities), DOCX generation in DOCX Generation (DOCX Generation), I/O operations in I/O Utilities (I/O Utilities), and external process management in Process Management (Process Management).
The multi-format publication function encompasses the TRANSFORM and EMIT pipeline phases, covering content rendering, external subprocess rendering, document assembly from the <Intermediate Representation> database, <Float> numbering and resolution, and parallel output generation via Pandoc. Views (table of contents, list of figures/tables, abbreviation lists, matrices) are rendered live at EMIT time by their view-type render hooks querying the database, so their content always reflects current database state — a requirement of the output cache, which keys on the serialized render input.
TRANSFORM Phase: Prepares content for output through the handler stages:
Float Transformer: Resolves float content that does not require external rendering (e.g., CSV parsing, text processing) and updates
spec_floats.resolved_ast.External Render Handler: Coordinates parallel subprocess rendering for float types requiring external tools (PlantUML, ECharts, Math). Prepares tasks via renderer callbacks, checks output cache for hits, and spawns remaining tasks in parallel via luv
spawn_batch(). Results updateresolved_astwith output paths.Object Render Handler: Invokes type-specific handlers for each spec_object (ordered by file_seq). Type handlers provide
header()andbody()functions dispatched through the base handler wrapper. Rendered AST is merged back tospec_objects.ast.Specification Render Handler: Renders document title headers via specification type handlers, storing result in
specifications.header_ast.
EMIT Phase: Assembles and generates output documents in multiple formats, fulfilling multi-format output requirements:
Float Numbering: Assigns sequential numbers to floats by counter_group (e.g., FIGURE, TABLE, LISTING, EQUATION) across all documents. Shared counter groups enable natural numbering where related visual content types form a single sequence.
Document Assembler: Reconstructs a complete Pandoc AST from the SpecIR database Queries spec_objects ordered by
file_seq, decodes JSON AST fragments, normalizes header levels, and assembles floats and views into the document structure. Metadata is built from specification attributes and the assembler returns a completepandoc.Pandocdocument.Float Resolver: Builds a lookup map of rendered float results (ast, number, caption, type_ref) from
spec_floatswithresolved_ast. The resolver queries the database for all floats belonging to the current specification and indexes them for efficient lookup during document traversal.Float Emitter: Walks assembled document blocks and replaces float placeholder CodeBlocks with rendered Div elements containing captions and semantic CSS classes for format-specific styling.
FTS Indexer: Replaces view placeholder blocks with materialized content from the TRANSFORM phase. Views are expanded inline as formatted tables, lists, or custom structures depending on view type. Additionally, populates FTS5 virtual tables (
fts_objects,fts_attributes,fts_floats) for <Full-Text Search> in the web application, converting AST to plain text and indexing searchable fields with Porter stemming.Inline Handler Dispatcher: Processes inline elements during emit - resolves
(@)links to#anchorreferences, processes citations, and renders inline math expressions.Emitter Orchestrator: Format-agnostic orchestration for batch mode execution: (1) assigns float numbers globally, (2) assembles documents per specification, (3) resolves and transforms floats, (4) applies format-specific filters (docx, html), (5) serializes assembled documents to intermediate JSON via
pandoc.write(doc, "json")to temporary files, (6) checksoutput_cachefor staleness and skips generation when outputs are current, (7) spawns parallel Pandoc processes via luv for concurrent format conversion (docx, html5), and (8) cleans up intermediate JSON files after generation completes. Format-specific postprocessors run after Pandoc generation: DOCX postprocessing applies style fixups via OOXML manipulation, and HTML5 postprocessing bundles assets for web application deployment.
Infrastructure Support: The Pandoc CLI wrapper (Pandoc CLI Builder) builds
command arguments for multiple output formats (docx, html5, markdown,
json) with reference document, bibliography, and filter support. The
reference generator (Reference
Generator) creates reference.docx from style presets for DOCX
output styling.
Component Interaction
The output subsystem spans the TRANSFORM and EMIT pipeline phases, realized through handler packages and infrastructure components.
CSC Transform Handlers
(Transform Handlers) prepares content for output. CSU Float Transformer (Float Transformer)
resolves float content not requiring external tools. CSU External Render Handler (External Render
Handler) coordinates parallel subprocess rendering via luv. CSU Object Render Handler
(Object Render Handler) invokes type-specific header/body renderers. CSU Specification Render
Handler (Specification Render Handler) renders document title
headers. CSU Relation Link
Rewriter (Relation Link Rewriter) rewrites (@) link targets to resolved anchors in
the final AST.
CSC Emit Handlers (Emit Handlers) assembles and generates output documents. CSU FTS Indexer (FTS Indexer) populates full-text search tables. CSU Float Numbering (Float Numbering) assigns sequential numbers by counter group. CSU Document Assembler (Document Assembler) reconstructs complete Pandoc AST from SpecIR. CSU Float Resolver (Float Resolver) builds the rendered float lookup map. CSU Float Emitter (Float Emitter) replaces float placeholders with rendered Divs. CSU View Emitter (View Emitter) expands view placeholders with materialized content. CSU Inline Handler Dispatcher (Inline Handler Dispatcher) processes inline elements — links, citations, math. CSU Float Handler Dispatcher (Float Handler Dispatcher) routes float rendering to type-specific handlers. CSU View Handler Dispatcher (View Handler Dispatcher) routes view expansion to type-specific materializers. CSU Emitter Orchestrator (Emitter Orchestrator) coordinates the full emit sequence: numbering, assembly, resolution, filtering, and parallel Pandoc output.
CSC Infrastructure (Infrastructure) provides cross-cutting utilities. CSU Hash Utilities (Hash Utilities) computes SHA1 hashes for cache coherency. CSU Logger (Logger) implements NDJSON structured logging. CSU JSON Utilities (JSON Utilities) handles JSON serialization for AST interchange. CSU Reference Cache (Reference Cache) caches resolved cross-references for O(1) lookup during emit. CSU MathML to OMML Converter (MathML to OMML Converter) translates MathML equations to Office Math Markup for DOCX output.
CSC Format Utilities (Format Utilities) provides format-specific helpers. CSU Format Writer (Format Writer) serializes AST to intermediate JSON for Pandoc consumption. CSU XML Utilities (XML Utilities) generates and manipulates XML for OOXML postprocessing. CSU ZIP Utilities (ZIP Utilities) handles DOCX archive creation and modification.
CSC DOCX Generation
(DOCX Generation) produces Word documents. CSU Preset Loader (Preset Loader) reads
style preset definitions from Lua files. CSU Style Builder (Style Builder) generates
OOXML style elements from preset values. CSU OOXML Builder (OOXML Builder) assembles
the final DOCX package with styles, numbering, and content parts. CSU Reference Generator
(Reference Generator) creates reference.docx for Pandoc’s --reference-doc option.
CSC I/O Utilities (I/O Utilities) provides file-system operations. CSU Document Walker (Document Walker) traverses specification documents and their includes to build processing contexts. CSU File Walker (File Walker) scans directories for files matching glob patterns during model discovery.
CSC Process Management (Process Management) manages external subprocesses. CSU Pandoc CLI Builder (Pandoc CLI Builder) constructs Pandoc command-line arguments for each output format. CSU Task Runner (Task Runner) provides the luv-based parallel task executor used by both external float rendering and batch Pandoc output generation.
- TRACEABILITY:
- srs: SF-004
LLR-OUT-029-01: DOCX Preset Loader Resolves, Merges, And Validates Preset Chains
DOCX preset loading shall resolve preset paths, merge extends chains deterministically, and reject malformed or cyclic preset definitions.
- TRACEABILITY:
- srs: HLR-OUT-005
- VERIFICATION METHOD:
- Test
LLR-070: Assembler Queries by File Sequence
Given a <Specification> identifier, CSU Document Assembler
shall query spec_objects ordered
by file_seq, producing a Pandoc
Block list in document order.
- TRACEABILITY:
- srs: HLR-OUT-001
- VERIFICATION METHOD:
- Test
LLR-071: Include Header Level Adjustment
Given an included file under an active heading, CSU Include Handler shall shift all Pandoc
Header levels by the same amount. The shallowest included heading shall
be one level below the active heading. The handler shall preserve
relative depths and combine shifts across nested includes. A ---- section close shall reduce the
active level by one. Without an active heading, the handler shall
preserve source levels. The source file can start at any heading level.
The handler shall preserve computed levels greater than 6.
- TRACEABILITY:
- srs: HLR-OUT-001
- VERIFICATION METHOD:
- Test
LLR-072: Float and View Placeholder Insertion
Given <Spec
Float> and <Spec View> positions, CSU Document Assembler
shall insert <Placeholder Block>s at correct
file_seq positions for
downstream resolution.
- TRACEABILITY:
- srs: HLR-OUT-001
- VERIFICATION METHOD:
- Test
LLR-073: Float Placeholder Label Matching
Given a <Placeholder Block> in the assembled
document, CSU Float
Emitter shall match its label against spec_floats records to retrieve the
resolved_ast.
- TRACEABILITY:
- srs: HLR-OUT-002
- VERIFICATION METHOD:
- Test
LLR-074: Float Semantic Div Wrapping
Given a resolved <Spec Float>, CSU Float Emitter shall wrap it in a Pandoc
Div with semantic classes (speccompiler-float, <Counter
Group>-specific class) and a bookmark anchor identifier.
- TRACEABILITY:
- srs: HLR-OUT-002
- VERIFICATION METHOD:
- Test
LLR-075: Failed Float Error Placeholder
Given a <Spec
Float> with NULL resolved_ast (failed <External
Renderer>), CSU
Float Emitter shall preserve an error placeholder block with <Diagnostic Record> message.
- TRACEABILITY:
- srs: HLR-OUT-002
- VERIFICATION METHOD:
- Test
LLR-076: Monotonic Float Numbering
Given all <Spec Float>s across all <Specification>s ordered by file_seq, CSU Float Numbering shall assign
monotonically increasing number
within each <Counter Group>, starting at 1.
- TRACEABILITY:
- srs: HLR-OUT-003
- VERIFICATION METHOD:
- Test
LLR-077: Shared Counter Group Numbering
When float types share a <Counter Group> (e.g., FIGURE, CHART, PLANTUML share “FIGURE”), CSU Float Numbering shall use a single numbering sequence.
- TRACEABILITY:
- srs: HLR-OUT-003
- VERIFICATION METHOD:
- Test
LLR-078: Output Cache Skip
Given an assembled Pandoc document and output config, CSU Emitter Orchestrator
shall call CSU Output
Cache is_output_current()
and skip format generation when it returns true.
- TRACEABILITY:
- srs: HLR-OUT-004
- VERIFICATION METHOD:
- Test
LLR-079: Intermediate JSON Cleanup
After Pandoc format conversion completes, CSU Emitter Orchestrator shall remove the intermediate JSON file from the build directory.
- TRACEABILITY:
- srs: HLR-OUT-004
- VERIFICATION METHOD:
- Test
LLR-080: HTML5 Resource Embedding
When embed_resources: true is
set in project.yaml html5: config,
CSU Pandoc CLI Builder
shall add --embed-resources to
Pandoc CLI args, producing single-file HTML5 output.
- TRACEABILITY:
- srs: HLR-OUT-006
- VERIFICATION METHOD:
- Test
LLR-081: HTML5 Search Index Bundling
When <Full-Text Search> tables are populated, CSU HTML5 Postprocessor HTML5 postprocessor shall bundle the search index JSON into the output.
- TRACEABILITY:
- srs: HLR-OUT-006
- VERIFICATION METHOD:
- Test
LLR-082: FTS5 Table Creation with Porter Stemming
During <EMIT
Phase> phase, CSU FTS
Indexer shall create FTS5 virtual tables (fts_objects, fts_attributes, fts_floats) with tokenize='porter'.
- TRACEABILITY:
- srs: HLR-OUT-007
- VERIFICATION METHOD:
- Test
LLR-083: AST to Plain Text for FTS Indexing
Given <Spec
Object> body <Abstract Syntax Tree>, CSU FTS Indexer shall
convert to plain text via Pandoc utils.stringify() before inserting
into the <Full-Text Search> index.
- TRACEABILITY:
- srs: HLR-OUT-007
- VERIFICATION METHOD:
- Test
DD-INFRA-001: NDJSON Logging
Selected Newline-Delimited JSON format for structured logging.
- RATIONALE:
-
NDJSON enables:
- Machine-parseable log output for CI/CD integration
- Structured data (level, message, timestamp, context)
- Easy filtering and analysis with standard tools (jq)
- Human-readable when formatted
Configuration via
config.logging.levelwith env overrideSPECCOMPILER_LOG_LEVEL.
DD-INFRA-002: Parallel Task Execution
Selected luv (libuv) for parallel subprocess execution.
- RATIONALE:
-
Document processing benefits from parallel execution:
- External renderers (PlantUML, ECharts) run concurrently
- Pandoc output generation runs in parallel for multiple formats
- luv provides cross-platform async I/O without external dependencies
DD-INFRA-003: Preset-Based DOCX Styles
Selected preset system for DOCX style customization.
- RATIONALE:
-
Corporate documents require consistent styling. The preset system:
- Loads style definitions from Lua files
- Generates reference.docx with custom styles
- Caches generated reference based on preset hash
- Enables style changes without modifying source documents
DD-TOOLS-001: Deno Runtime for External Tools
Selected Deno as the runtime for TypeScript-based external tools.
- RATIONALE:
-
Deno provides:
- Single-file TypeScript execution without build step
- Built-in npm module support via
npm:specifiers - Permission-based security model
- Cross-platform compatibility
Tools are spawned via
task_runner.spawn_sync()with timeout handling.
DD-CORE-005: Pandoc as Document Processing Engine
Selected Pandoc as the document parsing and output generation engine.
- RATIONALE:
-
Pandoc serves as both input parser and output generator:
- CommonMark+extensions parsing via
pandoc.read()provides a well-defined AST - Lua filter API enables in-process AST manipulation without subprocess overhead for parsing
- Multi-format output (DOCX, HTML5, Markdown, LaTeX/PDF, JSON) from a single intermediate representation
--reference-docsupport enables DOCX style customization via generated reference.docx--lua-filtersupport enables format-specific transformations (docx.lua, html.lua)- Native bibliography support (–bibliography, –csl) for citation processing
- Broad ecosystem adoption provides stability and community support
1.8 Model Design
FD-005: Type System and Domain Model Definition
The type system and domain model definition function encompasses the default model components that provide base type definitions, format-specific processing, and style configuration. These components are overlaid by the host engine (<Type Loader>, Type Loader) during the model discovery phase described in Type Model Discovery and Registration and collectively define the foundational capabilities that all domain models inherit and extend.
Model Directory Structure: Each model provides a
standard directory layout with types/
(objects, floats, relations, views, specifications), filters/, postprocessors/, and styles/ subdirectories. Each .lua file under types/ returns one descriptor table { kind, schema, [hooks] }. The host reads
the descriptor fields. The default model (models/default/) establishes baseline
definitions for all five type categories.
Type Definitions: CSC-017 defines the foundational document
object and specification types (SECTION, SPEC) that every overlay reuses. CSC-022 defines float types
(FIGURE, TABLE, LISTING, PLANTUML, CHART, MATH) with counter groups for
shared numbering. CSC-023
defines the reusable base relation types (PID_REF, LABEL_REF) plus built-in cross-reference
relations (XREF_SEC, XREF_FIGURE, XREF_TABLE, XREF_LISTING, XREF_MATH, XREF_CITATION) that map @ and #
selectors to typed targets without reimplementing resolution. CSC-024 defines view types
(TOC, LOF, ABBREV, ABBREV_LIST, GAUSS, MATH_INLINE) with inline prefix
syntax and materializer strategies.
Format Processing: CSC-018 provides Pandoc Lua filters for DOCX, HTML, and Markdown output that convert speccompiler-format markers (page breaks, bookmarks, captions, equations) into native output elements. CSC-019 applies format-specific post-processing after Pandoc output generation, loading template-specific fixup modules for DOCX and LaTeX. CSC-021 defines style presets with page layout, typography, and formatting configuration for DOCX (Letter-sized, standard margins) and HTML (Inter/JetBrains Mono fonts, color palette) output.
Component Interaction
The default model is realized through six packages that define the baseline type system, format processing, and style configuration inherited by all domain models.
CSC Default Float Types (Default Float Types) defines the visual content types. CSU FIGURE Float Type (FIGURE) handles image-based floats. CSU TABLE Float Type (TABLE) handles tabular data with CSV parsing. CSU LISTING Float Type (LISTING) handles code blocks with syntax highlighting. CSU PLANTUML Float Type (PLANTUML) renders UML diagrams via external subprocess. CSU CHART Float Type (CHART) renders ECharts visualizations. CSU MATH Float Type (MATH) renders LaTeX equations via KaTeX. Each type declares a counter group for cross-specification numbering.
CSC Default Relation
Types (Default Relation Types) defines reusable cross-reference
relations. The base types PID_REF and
LABEL_REF centralize @ and # resolution. XREF_SEC targets sections by PID. CSU XREF_FIGURE Relation Type
(XREF_FIGURE) targets FIGURE floats. CSU XREF_TABLE Relation Type (XREF_TABLE)
targets TABLE floats. CSU
XREF_LISTING Relation Type (XREF_LISTING) targets LISTING floats. CSU XREF_MATH Relation Type
(XREF_MATH) targets MATH floats. CSU XREF_CITATION Relation Type
(XREF_CITATION) resolves bibliography citations via BibTeX keys.
CSC Default View Types (Default View Types) defines data views with inline prefix syntax. CSU TOC View Type (TOC) generates tables of contents from spec objects. CSU LOF View Type (LOF) generates lists of figures, tables, or listings by counter group. CSU ABBREV View Type (ABBREV) renders inline abbreviation expansions. CSU ABBREV_LIST View Type (ABBREV_LIST) generates abbreviation glossaries. CSU GAUSS View Type (GAUSS) renders Gaussian distribution charts. CSU MATH_INLINE View Type (MATH_INLINE) renders inline LaTeX math expressions.
CSC Default Filters (Default Filters) provides format-specific Pandoc Lua filters applied during EMIT. CSU DOCX Filter (DOCX Filter) converts markers to OOXML-compatible elements — page breaks, bookmarks, and custom styles. CSU HTML Filter (HTML Filter) converts markers to semantic HTML5 elements with CSS classes. CSU Markdown Filter (Markdown Filter) normalizes markers for clean Markdown output.
CSC Default Postprocessors (Default Postprocessors) applies fixups after Pandoc generation. CSU DOCX Postprocessor (DOCX Postprocessor) manipulates the OOXML package — injecting custom styles, fixing table widths, and applying numbering overrides. CSU LaTeX Postprocessor (LaTeX Postprocessor) applies template-specific LaTeX fixups for PDF output.
CSC Default Styles (Default Styles) provides output styling presets. CSU DOCX Style Preset (DOCX Style Preset) defines page layout (Letter, standard margins), heading styles, table formatting, and font selections for Word output. CSU HTML Style Preset (HTML Style Preset) defines the web typography (Inter/JetBrains Mono), color palette, and responsive layout for HTML output.
LLR-055: Specification Identifier from Filename
Given a source file path, CSU Specification Parser shall derive the
<Specification> identifier from the filename without
extension.
- TRACEABILITY:
- srs: HLR-TYPE-001
- VERIFICATION METHOD:
- Test
LLR-056: Unknown Specification Type Fallback
When a L1 header declares an unknown type_ref, CSU Specification Parser shall fall back to
the default <Type> or emit a <Diagnostic Record> warning via CSU Diagnostics
Collector.
- TRACEABILITY:
- srs: HLR-TYPE-001
- VERIFICATION METHOD:
- Test
LLR-057: Spec Object Content-Addressable ID
Given source path, start_line, and title_text, CSU Object Parser and CSU Hash Utilities shall compute the <Spec
Object> identifier as
SHA1 hash of the concatenation.
- TRACEABILITY:
- srs: HLR-TYPE-002
- VERIFICATION METHOD:
- Test
LLR-058: Spec Object Type Resolution Order
Given L2-H6 header text, CSU Object Parser shall resolve the <Type> in
order: explicit TYPE: prefix →
<Type
Alias> lookup in <Type Registry> → default type.
- TRACEABILITY:
- srs: HLR-TYPE-002
- VERIFICATION METHOD:
- Test
LLR-059: Spec Object Label Format
Given a resolved <Spec Object>, CSU Object Parser shall format the label field as {type_lower}:{title_slug} for (#) cross-referencing.
- TRACEABILITY:
- srs: HLR-TYPE-002
- VERIFICATION METHOD:
- Test
LLR-060: Float Short Identifier Format
Given a float source context, CSU Float Parser and CSU Hash Utilities shall compute the <Spec
Float> identifier in
short format float-{8-char-sha1}
for DOCX bookmark compatibility.
- TRACEABILITY:
- srs: HLR-TYPE-003
- VERIFICATION METHOD:
- Test
LLR-061: Float Type Alias Resolution
Given a CodeBlock class string, CSU Float Parser shall resolve the <Spec
Float> type_ref from <Type
Alias> entries in spec_float_types (e.g., “csv” →
“TABLE”).
- TRACEABILITY:
- srs: HLR-TYPE-003
- VERIFICATION METHOD:
- Test
LLR-062: External Render Delegation
When a <Spec
View> has needs_external_render = 1 in spec_view_types, CSU External Render Handler shall delegate
it to the registered <External Renderer>.
- TRACEABILITY:
- srs: HLR-TYPE-004
- VERIFICATION METHOD:
- Test
LLR-063: Inline View Syntax
Given Inline Code with type: content format, CSU View Parser shall insert a <Spec
View> record with view_type_ref and raw_ast.
- TRACEABILITY:
- srs: HLR-TYPE-004
- VERIFICATION METHOD:
- Test
LLR-064: PID and Label Selector Resolution
Given a (@) <Relation
Selector>, CSU
Resolution Queries shall resolve via spec_objects.pid; given (#) <Relation Selector>, CSU Resolution Queries
shall resolve via spec_objects.label or spec_floats.label.
- TRACEABILITY:
- srs: HLR-TYPE-005
- VERIFICATION METHOD:
- Test
LLR-065: Default Relation Type Selection
When no explicit relation type is provided, CSU Relation Type Inferrer shall select the
default <Spec
Relation> type where is_default = 1 AND link_selector matches in spec_relation_types.
- TRACEABILITY:
- srs: HLR-TYPE-005
- VERIFICATION METHOD:
- Test
LLR-066: ENUM Attribute Resolution
Given an ENUM <Attribute> raw_value, CSU Attribute Caster shall
resolve it against the enum_values table and populate the
enum_ref foreign key.
- TRACEABILITY:
- srs: HLR-TYPE-006
- VERIFICATION METHOD:
- Test
LLR-067: XHTML AST Preservation
Given an XHTML <Attribute> raw_value, CSU Attribute Parser shall
preserve the Pandoc <Abstract Syntax Tree> serialization
in the ast column as JSON.
- TRACEABILITY:
- srs: HLR-TYPE-006
- VERIFICATION METHOD:
- Test
LLR-068: Analyze Query Registration
Given a <Analyze Query> SQL string, CSU Analyze Query Loader
shall register it as a CREATE VIEW in the <SpecIR> database during the <ANALYZE
Phase> phase.
- TRACEABILITY:
- srs: HLR-TYPE-007
- VERIFICATION METHOD:
- Test
LLR-069: Validation Policy Severity Resolution
Given a <Validation Policy> policy_key and project.yaml
configuration, CSU
Validation Policy shall return severity (error, warn, ignore) controlling <Diagnostic Record> emission.
- TRACEABILITY:
- srs: HLR-TYPE-007
- VERIFICATION METHOD:
- Test
DD-MODEL-001: Layered Model Extension with Override Semantics
Selected layered model loading where domain models extend and override the default model by type identifier.
- RATIONALE:
-
ID-based override enables clean domain specialization:
- Default model loads first, establishing baseline types (SECTION, SPEC, float types, relations, views)
- Domain model loads second; types with matching IDs replace defaults, new IDs add to the registry
- Verification views follow the same pattern: domain analyze queries override defaults by
policy_key - Attribute inheritance propagated iteratively after all types are loaded, enabling parent attributes to flow to child types across model boundaries
- Filter, postprocessor, and style directories follow conventional naming for predictable discovery
- Alternative of mixin composition rejected: ordering ambiguity when multiple mixins define the same attribute
1.9 Audit & Integrity Design
FD-006: Audit and Integrity
Allocation: Realized by Core Runtime (Core Runtime) and Default Analyze Queries (Default Analyze Queries) through Analyze Handler (Analyze Handler) and Hash Utilities (Hash Utilities).
The audit and integrity function ensures deterministic compilation, reproducible builds, and audit trail integrity. It encompasses content-addressed hashing for incremental build detection, structured logging for audit trails, and include dependency tracking for proper cache invalidation.
Include Hash Computation: The engine (Build Engine) queries the
build_graph table for known includes
from the previous build, then computes SHA1 hashes for each include
file. Missing files cause a cache miss (triggering a full rebuild). The
resulting map of path-to-hash is compared against stored values to
detect changes. SHA1 hashing uses Pandoc’s built-in pandoc.sha1() when available, falling back
to vendor/sha2.lua in standalone
worker mode.
Document Change Detection: Each document’s content
is hashed and compared against the hashes recorded as build_graph nodes (the root document is
its own node, alongside its includes). Unchanged documents (every node
hash matching) skip parsing and reuse cached <Intermediate Representation> state,
providing significant performance improvement for large projects.
Structured Logging: NDJSON (Newline-Delimited JSON)
logging provides machine-parseable audit trails with structured data
(level, message, timestamp, context). Log level is configurable via
config.logging.level with
environment override via SPECCOMPILER_LOG_LEVEL. Levels: DEBUG,
INFO, WARN, ERROR.
Build Reproducibility: Given identical source files (by content hash), project configuration, and tool versions, the system produces identical outputs. Content-addressed hashing of documents, includes, and the P-IR state ensures deterministic compilation.
Verification Execution: The Analyze Handler Analyze Handler executes in batch mode during the ANALYZE phase. It iterates over all registered analyze queries, querying each via the Data Manager Data Manager. For each violation row returned, the handler consults the Validation Policy Validation Policy to determine the configured severity level. Error-level violations are emitted as structured diagnostics via the Diagnostics Collector Diagnostics Collector. Violations at the ignore level are suppressed entirely. Each analyze query enforces constraints declared by the type metamodel, ensuring that registered types satisfy their validation rules.
After verification completes, the handler stores the verification result (error and warning counts) in all pipeline contexts. The Pipeline Orchestrator Pipeline Orchestrator checks for errors after ANALYZE and aborts before EMIT if any exist.
Analyze Queries — Entity-Based Taxonomy
Verification views follow the SpecIR 5-tuple: S
(Specification), O (Object), F (<Float>),
R (Relation), V (View). Each analyze
query is identified by its policy_key.
Specification Verification views (S)
| Policy Key | View Name | Validates |
|---|---|---|
spec_missing_required |
view_spec_missing_required | Required spec attributes present |
spec_invalid_type |
view_spec_invalid_type | Specification type is valid |
Spec Object Verification views (O)
| Policy Key | View Name | Validates |
|---|---|---|
missing_required |
view_object_missing_required | Required object attributes present |
cardinality_over |
view_object_cardinality_over | Attribute count <= max_occurs |
invalid_cast |
view_object_cast_failures | Attribute value casts to declared type |
invalid_enum |
view_object_invalid_enum | Enum value exists in enum_values |
invalid_date |
view_object_invalid_date | Date format is YYYY-MM-DD |
bounds_violation |
view_object_bounds_violation | Numeric values within min/max bounds |
object_duplicate_pid |
view_object_duplicate_pid | PID is globally unique |
Spec Float Verification views (F)
| Policy Key | View Name | Validates |
|---|---|---|
float_orphan |
view_float_orphan | Float has a parent object |
float_duplicate_label |
view_float_duplicate_label | Float labels unique per specification |
float_render_failure |
view_float_render_failure | External render succeeded |
float_invalid_type |
view_float_invalid_type | Float type is registered |
Spec Relation Verification views (R)
| Policy Key | View Name | Validates |
|---|---|---|
unresolved_relation |
view_relation_unresolved | Link target resolves |
dangling_relation |
view_relation_dangling | Target ref points to existing object |
ambiguous_relation |
view_relation_ambiguous | Float reference is unambiguous |
Component Interaction
The audit subsystem is realized through core runtime components and the default verification view package.
CSC Core Runtime (Core
Runtime) provides the verification infrastructure. CSU Build Engine (Build Engine) drives the
build lifecycle and content-addressed hash computation. CSU Analyze Query Loader
(Analyze Query Loader) discovers and loads analyze query modules from
model directories, registering them with the data manager for ANALYZE
phase execution. CSU
Validation Policy (Validation Policy) maps analyze query policy_key values to configured severity
levels (error, warn, ignore) from project.yaml. CSU Analyze Handler (Analyze Handler)
iterates over registered analyze queries during ANALYZE, querying each
via CSU Data Manager
(Data Manager) and emitting violations through CSU Diagnostics Collector (Diagnostics
Collector). CSU Pipeline
Orchestrator (Pipeline Orchestrator) inspects diagnostics after
ANALYZE and aborts before EMIT if errors exist.
CSC Default Analyze Queries (Default Analyze Queries) provides the baseline verification rules organized by the SpecIR 5-tuple. Specification analyze queries: CSU Spec Missing Required (Spec Missing Required) validates that required specification attributes are present, and CSU Spec Invalid Type (Spec Invalid Type) validates that specification types are registered. Object analyze queries: CSU Object Missing Required (Object Missing Required) checks required object attributes, CSU Object Cardinality Over (Object Cardinality Over) enforces max_occurs limits, CSU Object Cast Failures (Object Cast Failures) validates attribute type casts, CSU Object Invalid Enum (Object Invalid Enum) checks enum values against allowed sets, CSU Object Invalid Date (Object Invalid Date) validates YYYY-MM-DD date format, and CSU Object Bounds Violation (Object Bounds Violation) checks numeric bounds. Float analyze queries: CSU Float Orphan (Float Orphan) detects floats without parent objects, CSU Float Duplicate Label (Float Duplicate Label) enforces label uniqueness per specification, CSU Float Render Failure (Float Render Failure) flags failed external renders, and CSU Float Invalid Type (Float Invalid Type) validates float type registration. Relation analyze queries: CSU Relation Unresolved (Relation Unresolved) detects links whose targets cannot be resolved, CSU Relation Dangling (Relation Dangling) detects resolved references pointing to nonexistent objects, and CSU Relation Ambiguous (Relation Ambiguous) flags ambiguous float references.
- TRACEABILITY:
- srs: SF-006
LLR-084: Deferred Hash Update on Success
When build completes with no <ANALYZE Phase> errors, CSU Build Engine shall rewrite the <Build Graph> node hashes via CSU Build Cache; when errors are present, hashes shall not be updated.
- TRACEABILITY:
- srs: HLR-AUDIT-001
- VERIFICATION METHOD:
- Test
LLR-085: Cache Hit Skips Pipeline
When all <Build Graph> node hashes (root and includes) match current content, CSU Build Engine shall skip <Pipeline> processing and reuse cached <Intermediate Representation> state.
- TRACEABILITY:
- srs: HLR-AUDIT-001
- VERIFICATION METHOD:
- Test
LLR-086: Include Dependencies Recorded in Build Graph
During include expansion, CSU Include Expansion Filter shall record
root_path, node_path, and node_sha1 for each included file into the
<Build
Graph> table via CSU
Build Cache.
- TRACEABILITY:
- srs: HLR-AUDIT-002
- VERIFICATION METHOD:
- Test
LLR-087: Circular Include Error Before Expansion
When an include path is already in the processed-file set, CSU Include Expansion Filter shall raise an error with the circular include chain path before performing any expansion.
- TRACEABILITY:
- srs: HLR-AUDIT-002
- VERIFICATION METHOD:
- Test
LLR-088: Diagnostic Record Structure
Given a diagnostics:error(file, line, code, msg)
or diagnostics:warn(...) call from
any <Handler>, CSU Diagnostics Collector shall store a <Diagnostic
Record> record with file
(path), line (int), code (string), and msg (string).
- TRACEABILITY:
- srs: HLR-AUDIT-003
- VERIFICATION METHOD:
- Test
LLR-089: Diagnostic Code Domain Prefix Format
<Diagnostic Record> codes shall follow
domain prefix + number format (e.g., invalid_enum, dangling_relation) enabling
machine-parseable classification via CSU Diagnostics Collector.
- TRACEABILITY:
- srs: HLR-AUDIT-003
- VERIFICATION METHOD:
- Test
LLR-090: NDJSON Log Output Format
Given non-TTY output, CSU
Logger shall emit one <Newline-Delimited JSON> object per
line with fields level, message, timestamp, and optional context.
- TRACEABILITY:
- srs: HLR-AUDIT-004
- VERIFICATION METHOD:
- Test
LLR-091: NO_COLOR Compliance
Given TTY output with NO_COLOR
environment variable set, CSU Logger shall suppress ANSI color codes
in console mode.
- TRACEABILITY:
- srs: HLR-AUDIT-004
- VERIFICATION METHOD:
- Test
LLR-092: Deterministic Float Numbering by File Sequence
CSU Float Numbering
shall determine <Spec Float> numbering solely by
file_seq ordering, which is stable
across builds for identical input.
- TRACEABILITY:
- srs: HLR-AUDIT-005
- VERIFICATION METHOD:
- Test
LLR-093: Hash-Only Cache Invalidation
CSU Build Cache shall base <Build Cache> dirty checks solely on SHA1 content hashes, never on filesystem timestamps or mtime.
- TRACEABILITY:
- srs: HLR-AUDIT-005
- VERIFICATION METHOD:
- Test
1.10 SW Docs Model Design
FD-007: Software Documentation Domain Model
Allocation: Realized by SW Docs Model (SW Docs Model), with domain analyze queries in SW Docs Analyze Queries (SW Docs Analyze Queries), object types in SW Docs Object Types (SW Docs Object Types), relation types in SW Docs Relation Types (SW Docs Relation Types), specification types in SW Docs Specification Types (SW Docs Specification Types), and view types in SW Docs View Types (SW Docs View Types).
The software documentation domain model extends the default model with traceable object types, domain-specific relation semantics, specification document types, and verification views for MIL-STD-498 and DO-178C compliant software documentation workflows.
Object Type Taxonomy: SW Docs Object Types defines the TRACEABLE
abstract base type providing an inherited status enum (Draft, Review,
Approved, Implemented) that all domain objects extend. The taxonomy
includes requirements (HLR, LLR, NFR), design elements (FD, SF, DD),
architectural decomposition (CSC, CSU), verification artifacts (VC, TR),
and reference types (DIC, SYMBOL). Each SW Docs type declares its own
attributes, PID prefix, and inheritance chain through the extends field.
Relation Types: SW Docs Relation Types defines
domain-specific traceability relations: REALIZES (FD traces to SF via
the traceability source attribute),
BELONGS (HLR membership in SF via belongs_to), TRACES_TO (general-purpose
@ link traceability), XREF_DIC
(dictionary cross-references), and XREF_DECOMPOSITION (references
targeting CSC/CSU elements). These relations enable automated
traceability matrix generation and coverage analysis.
Specification Types: SW Docs Specification Types defines document types for the software documentation lifecycle: SRS (Software Requirements Specification), SDD (Software Design Description), SVC (Software Verification Cases), SUM (Software User Manual), and TRR (Test Results Report). Each type declares version, status, and date attributes.
View Types: SW Docs View Types defines domain-specific views for generating traceability matrices (TRACEABILITY_MATRIX, TEST_EXECUTION_MATRIX, TEST_RESULTS_MATRIX) and coverage summaries (COVERAGE_SUMMARY, REQUIREMENTS_SUMMARY).
Analyze Queries: SW Docs Analyze Queries provides domain-specific analyze query queries that enforce traceability constraints: VC must trace to HLR, TR must trace to VC, every HLR must be covered by at least one VC, every FD must trace to at least one CSC and CSU, and every CSC and CSU must have at least one FD allocated. SW Docs Model provides the HTML5 postprocessor that generates a single-file documentation web app with embedded CSS, JS, and SQLite-WASM full-text search.
Component Interaction
The software documentation domain model is realized through six packages that extend the default model with traceable types, domain relations, document types, analyze queries, and verification constraints.
CSC SW Docs Object Types (SW Docs Object Types) defines the domain object taxonomy. CSU TRACEABLE Base Object Type (TRACEABLE Base Object Type) provides the abstract base with an inherited status enum (Draft, Review, Approved, Implemented) that all domain objects extend. Requirements: CSU HLR Object Type (HLR) for high-level requirements, CSU LLR Object Type (LLR) for low-level requirements, and CSU NFR Object Type (NFR) for non-functional requirements. Design elements: CSU FD Object Type (FD) for functional descriptions and CSU SF Object Type (SF) for software functions. Architecture: CSU CSC Object Type (CSC) for computer software components and CSU CSU Object Type (CSU) for computer software units. Verification: CSU VC Object Type (VC) for verification cases and CSU TR Object Type (TR) for test results. Design decisions: CSU DD Object Type (DD) for design decision records. Reference types: CSU DIC Object Type (DIC) for dictionary entries and CSU SYMBOL Object Type (SYMBOL) for symbol definitions.
CSC SW Docs Relation
Types (SW Docs Relation Types) defines domain-specific traceability
relations. CSU REALIZES
Relation Type (REALIZES) traces FD to SF via the traceability source attribute. CSU BELONGS Relation Type
(BELONGS) establishes HLR membership in SF via belongs_to. CSU TRACES_TO Relation Type (TRACES_TO)
provides general-purpose @ link
traceability between any traceable objects. CSU XREF_DIC Relation Type (XREF_DIC)
resolves dictionary cross-references targeting DIC entries.
CSC SW Docs Specification Types (SW Docs Specification Types) defines document types for the software documentation lifecycle. CSU SRS Specification Type (SRS) for Software Requirements Specifications. CSU SDD Specification Type (SDD) for Software Design Descriptions. CSU SVC Specification Type (SVC) for Software Verification Cases. CSU SUM Specification Type (SUM) for Software User Manuals. CSU TRR Specification Type (TRR) for Test Results Reports. Each type declares version, status, and date attributes.
CSC SW Docs View Types (SW Docs View Types) defines domain-specific views for documentation output. CSU Traceability Matrix View (Traceability Matrix) generates requirement-to-design traceability matrices. CSU Test Execution Matrix View (Test Execution Matrix) generates verification case execution status tables. CSU Test Results Matrix View (Test Results Matrix) generates test result summary tables. CSU Coverage Summary View (Coverage Summary) computes requirement coverage statistics. CSU Requirements Summary View (Requirements Summary) generates requirement status dashboards.
CSC SW Docs Analyze Queries (SW Docs Analyze Queries) provides domain-specific traceability verification rules. CSU VC Missing HLR Traceability (VC Missing HLR Traceability) ensures every verification case traces to at least one HLR. CSU TR Missing VC Traceability (TR Missing VC Traceability) ensures every test result traces to a verification case. CSU HLR Missing VC Coverage (HLR Missing VC Coverage) ensures every HLR is covered by at least one VC. CSU FD Missing CSC Traceability (FD Missing CSC Traceability) ensures every FD references at least one CSC. CSU FD Missing CSU Traceability (FD Missing CSU Traceability) ensures every FD references at least one CSU. CSU CSC Missing FD Allocation (CSC Missing FD Allocation) ensures every CSC is allocated to at least one FD. CSU CSU Missing FD Allocation (CSU Missing FD Allocation) ensures every CSU is allocated to at least one FD.
CSC SW Docs Model (SW Docs Model) provides the domain postprocessor. CSU HTML5 Postprocessor (HTML5 Postprocessor) generates a single-file documentation web application with embedded CSS, JS, navigation, and SQLite-WASM full-text search from the SpecIR database.
1.11 Software Decomposition
This chapter defines decomposition and design allocation using MIL-STD-498 nomenclature:
CSC(<CSC (Computer Software Component)>) identifies structural subsystems/layers.CSU(<CSU (Computer Software Unit)>) identifies concrete implementation units.
Note: Software Functions (SF) are defined in the SRS alongside their constituent HLRs. Functional Descriptions (FD) trace to SFs via the REALIZES relation and are documented in the SDD design files.
1.11.1 Core Software Components
1.11.1.1 Core Runtime Layer
CSC-001: Core Runtime
- COMPONENT TYPE:
- Layer
- DESCRIPTION:
- Pipeline orchestration, metadata/config extraction, model loading, analyze query loading, validation policy, and runtime control.
- PATH:
- src/core/
CSU-001: Pandoc Filter Entry Point
- DESCRIPTION:
- Pandoc filter entry point that hooks into Meta(meta) to extract project configuration and invoke engine.run_project(), serving as the bridge between Pandoc and the SpecCompiler build system.
- FILE PATH:
- src/filter.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-001
CSU-002: Configuration Parser
- DESCRIPTION:
- Parses and validates project.yaml metadata via Pandoc, extracting project configuration into plain Lua tables for consumption by the engine.
- FILE PATH:
- src/core/config.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-001
CSU-003: Data Loader
- DESCRIPTION:
- Loads view modules from models/{model}/types/views/ and invokes their dataset hook to produce data for charts and other data-driven consumers.
- FILE PATH:
- src/core/data_loader.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-001
CSU-004: Diagnostics Collector
- DESCRIPTION:
- Collects and emits structured errors and warnings (with file, line, column, and diagnostic code) via the logger diagnostic API.
- FILE PATH:
- src/core/diagnostics.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-001
CSU-005: Build Engine
- DESCRIPTION:
- Main orchestrator that wires together the pipeline, database, <Type Loader> , file walker, <Build Cache> , and output emission to run a full SpecCompiler project build across all documents.
- FILE PATH:
- src/core/engine.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-001
CSU-006: Pipeline Orchestrator
- DESCRIPTION:
- Pipeline lifecycle orchestrator that manages a 5-phase (INITIALIZE, RESOLVE, TRANSFORM, ANALYZE, EMIT) execution model with declarative handler prerequisites and topological sorting.
- FILE PATH:
- src/core/pipeline.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-001
CSU-007: Analyze Query Loader
- DESCRIPTION:
- Discovers, loads, and registers analyze query modules from models/{model}/analyze_queries/, maintaining an in-memory registry of analyze query definitions used for verification policies.
- FILE PATH:
- src/core/analyze_query_loader.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-001
CSU-008: Type Loader
- DESCRIPTION:
- Host engine (registry) that overlays the default model then each requested model (later-wins-by-id, repo-bundled), reads each extension point’s single descriptor table {kind, schema, [hooks]}, validates it, emits the type row into the corresponding SpecIR type table, and eager-indexes every hook into a (kind, id) -> hook map read via get_hook / get_hook_inherited; host:finalize() propagates inherited attributes, creates the verification SQL views, and asserts required hooks.
- FILE PATH:
- src/contract/registry.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-001
CSU-009: Validation Policy
- DESCRIPTION:
- Manages configurable validation severity levels (error/warn/ignore) for policy keys, building default policies from loaded analyze query definitions and allowing project-level overrides.
- FILE PATH:
- src/core/validation_policy.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-001
1.11.1.2 Database Persistence Layer
CSC-002: Database Persistence
- COMPONENT TYPE:
- Layer
- DESCRIPTION:
- Canonical insert/query API for SpecIR, transaction handling, build cache, output cache, and analyze query definitions.
- PATH:
- src/db/
CSU-010: Build Cache
- DESCRIPTION:
- Provides incremental build support by comparing SHA1 hashes of source documents against cached values to determine which files need rebuilding.
- FILE PATH:
- src/db/build_cache.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-002
CSU-011: Database Handler
- DESCRIPTION:
- Low-level SQLite database handler that wraps lsqlite3, providing execute, query_all, and prepared statement operations for all database access.
- FILE PATH:
- src/db/handler.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-002
CSU-012: Data Manager
- DESCRIPTION:
- High-level data manager that initializes the database schema and provides domain-specific insert/update operations for spec objects, floats, relations, and attributes.
- FILE PATH:
- src/db/manager.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-002
CSU-013: Output Cache
- DESCRIPTION:
- Checks whether generated output files are up-to-date by comparing the current SpecIR state hash against the cached hash, enabling skipping of unchanged output regeneration.
- FILE PATH:
- src/db/output_cache.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-002
CSU-014: Analyze Query Definitions
- DESCRIPTION:
- Defines SQL CREATE VIEW statements for all analyze queries used in the ANALYZE phase, organized by entity type (specifications, objects, floats, relations, views).
- FILE PATH:
- src/db/proof_views.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-002
1.11.1.2.1 DB Queries Package
CSC-005: DB Queries
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- SQL query string modules for all database operations across content, types, build, search, and resolution domains.
- PATH:
- src/db/queries/
CSU-015: Build Queries
- DESCRIPTION:
- SQL query strings for build infrastructure operations: source file hash lookups, build graph (include dependency) management, and output cache entries.
- FILE PATH:
- src/db/queries/build.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-005
CSU-016: Content Queries
- DESCRIPTION:
- SQL query strings for content-layer CRUD operations on spec_objects, spec_floats, spec_relations, spec_views, and spec_attribute_values tables.
- FILE PATH:
- src/db/queries/content.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-005
CSU-017: Query Aggregator
- DESCRIPTION:
- Aggregation module that re-exports all domain-specific query sub-modules (types, content, search, build, resolution) under a single Queries namespace.
- FILE PATH:
- src/db/queries/init.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-005
CSU-018: Resolution Queries
- DESCRIPTION:
- SQL query strings for resolving relations, float types, cross-references, and relation type inference rules using the weighted quadruple scoring system.
- FILE PATH:
- src/db/queries/resolution.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-005
CSU-019: Search Queries
- DESCRIPTION:
- SQL query strings for managing FTS5 full-text search tables, including clearing, indexing, and populating fts_objects, fts_attributes, and fts_floats.
- FILE PATH:
- src/db/queries/search.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-005
CSU-020: Type Queries
- DESCRIPTION:
- SQL query strings for inserting and querying type system metadata: float types, relation types, object types, view types, specification types, attribute types, datatype definitions, and enum values.
- FILE PATH:
- src/db/queries/types.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-005
1.11.1.2.2 DB Schema Package
CSC-006: DB Schema
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- DDL table creation statements for content, types, build infrastructure, and search tables.
- PATH:
- src/db/schema/
CSU-021: Build Schema
- DESCRIPTION:
- DDL for build infrastructure tables (build_graph, output_cache) that enable incremental builds through file dependency tracking and content hashing.
- FILE PATH:
- src/db/schema/build.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-006
CSU-022: Content Schema
- DESCRIPTION:
- DDL for content-layer tables (specifications, spec_objects, spec_floats, spec_relations, spec_views, spec_attribute_values) that store parsed specification data.
- FILE PATH:
- src/db/schema/content.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-006
CSU-023: Schema Aggregator
- DESCRIPTION:
- Aggregation module that combines all domain-specific schema SQL in dependency order and provides an initialize_views() entry point for post-load view creation.
- FILE PATH:
- src/db/schema/init.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-006
CSU-024: Search Schema
- DESCRIPTION:
- DDL for FTS5 virtual tables (fts_objects, fts_attributes, fts_floats) that enable full-text search across specification content with porter stemming.
- FILE PATH:
- src/db/schema/search.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-006
CSU-025: Type System Schema
- DESCRIPTION:
- DDL for type system (metamodel) tables (spec_object_types, spec_float_types, spec_relation_types, spec_view_types, spec_specification_types, datatype_definitions, spec_attribute_types, enum_values, implicit_type_aliases).
- FILE PATH:
- src/db/schema/types.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-006
1.11.1.2.3 DB Views Package
CSC-007: DB Views
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- SQL view definitions for EAV pivots, public API, and resolution helpers.
- PATH:
- src/db/views/
CSU-026: EAV Pivot Views
- DESCRIPTION:
- Dynamically generates per-object-type SQL views that pivot the <EAV Model> into typed columns for external BI queries (e.g., SELECT * FROM view_hlr_objects WHERE status = ‘approved’ ). These views are not used by internal pipeline code, which queries the raw EAV tables directly. See HLR-STOR-006.
- FILE PATH:
- src/db/views/eav_pivot.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-007
CSU-027: Views Aggregator
- DESCRIPTION:
- Aggregation module that initializes all database view categories (resolution, public API, and EAV pivot) in the correct dependency order.
- FILE PATH:
- src/db/views/init.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-007
CSU-028: Public API Views
- DESCRIPTION:
- Stable BI-friendly SQL views (e.g., public_traceability_matrix) intended as the public interface for external dashboards and query tools.
- FILE PATH:
- src/db/views/public_api.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-007
CSU-029: Resolution Views
- DESCRIPTION:
- Internal SQL views for resolving float type aliases, relation types, and cross-references, moving resolution logic from Lua handler code into queryable SQL.
- FILE PATH:
- src/db/views/resolution.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-007
1.11.1.3 Pipeline Handlers Layer
CSC-003: Pipeline Handlers
- COMPONENT TYPE:
- Layer
- DESCRIPTION:
- Phase handlers implementing initialize, resolve, transform, analyze, and emit behavior across five pipeline phases.
- PATH:
- src/pipeline/
CSU-030: Include Expansion Filter
- DESCRIPTION:
- Standalone Pandoc Lua filter that recursively expands include code blocks in a subprocess, outputting include dependencies to a JSON metadata file for build graph tracking.
- FILE PATH:
- src/filters/expand_includes.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-003
CSU-031: Analyze Handler
- DESCRIPTION:
- ANALYZE phase handler that iterates over all registered analyze queries, queries each for violations, and emits structured diagnostics based on validation policy.
- FILE PATH:
- src/pipeline/analyze/analyze_handler.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-003
1.11.1.3.1 Resolve Handlers Package
CSC-008: Analyze Handlers
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- RESOLVE phase handlers for relation resolution, relation type inference, and attribute casting.
- PATH:
- src/pipeline/resolve/
CSU-032: Attribute Caster
- DESCRIPTION:
- Casts raw attribute values to their typed columns (string, integer, real, boolean, enum, date) based on the datatype definition, returning the appropriate typed field for database storage.
- FILE PATH:
- src/pipeline/resolve/attribute_caster.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-008
CSU-033: Relation Resolver
- DESCRIPTION:
- RESOLVE phase handler that resolves spec_relation targets by matching PIDs and header IDs across specifications, populating target_object_id and target_float_id foreign keys.
- FILE PATH:
- src/pipeline/resolve/relation_resolver.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-008
CSU-161: Relation Type Inferrer
- DESCRIPTION:
- RESOLVE phase handler that infers relation types using 4-dimension unweighted specificity scoring (selector, source_attribute, source_type, target_type) after relation_resolver has populated targets.
- FILE PATH:
- src/pipeline/resolve/relation_type_inferrer.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-008
1.11.1.3.2 Emit Handlers Package
CSC-009: Emit Handlers
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- EMIT phase handlers for document assembly, float resolution, view rendering, FTS indexing, and output generation.
- PATH:
- src/pipeline/emit/
CSU-034: Document Assembler
- DESCRIPTION:
- Reconstructs a complete Pandoc document from the SpecIR database by querying spec_objects, spec_floats, and spec_views, decoding their stored AST JSON back into Pandoc blocks.
- FILE PATH:
- src/pipeline/emit/assembler.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
CSU-035: Float Emitter
- DESCRIPTION:
- Transforms Pandoc documents during EMIT by replacing float CodeBlock elements with their rendered content (images, tables, charts) and adding captions and bookmarks.
- FILE PATH:
- src/pipeline/emit/emit_float.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
CSU-036: View Emitter
- DESCRIPTION:
- Transforms inline Code elements and standalone Code-in-Para patterns during EMIT phase, resolving each view type’s render (inline) or render_block (block) hook from the host hook index via get_hook_inherited to produce rendered inline or block output.
- FILE PATH:
- src/pipeline/emit/emit_view.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
CSU-037: Emitter Orchestrator
- DESCRIPTION:
- Format-agnostic EMIT phase orchestrator that assembles the Pandoc document from IR, resolves floats, applies numbering, runs format filters and postprocessors, and writes output via Pandoc CLI.
- FILE PATH:
- src/pipeline/emit/emitter.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
CSU-038: Float Handler Dispatcher
- DESCRIPTION:
- Model-agnostic dispatch layer that resolves each float type’s render hook from the host’s (kind, id) -> hook index via get_hook_inherited (walking the extends chain), then invokes it to replace float CodeBlock elements with rendered content.
- FILE PATH:
- src/pipeline/emit/float_handlers.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
CSU-039: Float Numbering
- DESCRIPTION:
- Assigns sequential numbers to captioned floats per specification and per counter_group, so that related types (e.g., FIGURE, CHART, PLANTUML) share a single numbering sequence within each spec.
- FILE PATH:
- src/pipeline/emit/float_numbering.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
CSU-040: Float Resolver
- DESCRIPTION:
- Collects floats with their resolved_ast and categorizes them for EMIT phase processing, distinguishing between image-producing floats and handler-dispatched floats.
- FILE PATH:
- src/pipeline/emit/float_resolver.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
CSU-041: FTS Indexer
- DESCRIPTION:
- EMIT phase handler that populates FTS5 virtual tables by converting stored Pandoc AST JSON to plain text and indexing spec objects, attributes, and floats for full-text search.
- FILE PATH:
- src/pipeline/emit/fts_indexer.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
CSU-042: Inline Handler Dispatcher
- DESCRIPTION:
- Model-agnostic dispatch layer that matches an inline Code prefix to a view id via the host’s prefix index, then resolves and invokes that view’s render hook from the host’s (kind, id) -> hook index via get_hook_inherited to produce inline output.
- FILE PATH:
- src/pipeline/emit/inline_handlers.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
CSU-043: View Handler Dispatcher
- DESCRIPTION:
- Model-agnostic dispatch layer that resolves each block-level view type’s render_block hook from the host’s (kind, id) -> hook index via get_hook_inherited (walking the extends chain), then invokes it to produce block-level view output.
- FILE PATH:
- src/pipeline/emit/view_handlers.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-009
1.11.1.3.3 Initialize Handlers Package
CSC-010: Initialize Handlers
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- INITIALIZE phase handlers that parse document AST and populate all SpecIR container tables.
- PATH:
- src/pipeline/initialize/
CSU-044: Attribute Parser
- DESCRIPTION:
- INITIALIZE phase handler that extracts attributes from BlockQuote elements following headers, parses name: value syntax, casts values via datatype definitions, and stores them in spec_attribute_values.
- FILE PATH:
- src/pipeline/initialize/attributes.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-010
CSU-045: Include Handler
- DESCRIPTION:
- Pre-pipeline utility that recursively expands include code blocks by reading referenced files and parsing them through Pandoc, with cycle detection and depth limiting. Called directly by the engine before pipeline execution; not a pipeline handler.
- FILE PATH:
- src/pipeline/shared/include_handler.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
CSU-046: Float Parser
- DESCRIPTION:
- INITIALIZE phase handler that parses float CodeBlock syntax (type.lang:label), resolves type aliases, and stores float instances in spec_floats.
- FILE PATH:
- src/pipeline/initialize/spec_floats.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-010
CSU-047: Object Parser
- DESCRIPTION:
- INITIALIZE phase handler that creates spec_objects rows from L2+ headers parsed by the specifications handler, inferring object types from header prefixes.
- FILE PATH:
- src/pipeline/initialize/spec_objects.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-010
CSU-048: Relation Parser
- DESCRIPTION:
-
INITIALIZE phase handler that extracts link-based relations (
[PID](@)and[PID](#)) from object ASTs and stores them in spec_relations. Type inference and link rewriting are delegated to relation_type_inferrer (RESOLVE) and relation_link_rewriter (TRANSFORM). - FILE PATH:
- src/pipeline/initialize/spec_relations.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-010
CSU-049: View Parser
- DESCRIPTION:
- INITIALIZE phase handler that registers view instances from CodeBlock and inline Code syntax, resolving view type prefixes and storing entries in spec_views.
- FILE PATH:
- src/pipeline/initialize/spec_views.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-010
CSU-050: Specification Parser
- DESCRIPTION:
- INITIALIZE phase handler that runs first to parse document headers, register the root specification from the L1 header, and store parsed header data in the pipeline context.
- FILE PATH:
- src/pipeline/initialize/specifications.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-010
1.11.1.3.4 Shared Pipeline Utilities Package
CSC-011: Shared Pipeline Utilities
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Shared infrastructure modules providing base handlers, rendering utilities, and view helpers used across pipeline phases.
- PATH:
- src/pipeline/shared/
CSU-051: Attribute Paragraph Utilities
- DESCRIPTION:
- Shared utility functions for parsing attribute paragraphs from Pandoc inline nodes, handling Span unwrapping, text extraction, and inline content normalization.
- FILE PATH:
- src/pipeline/shared/attribute_para_utils.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
CSU-052: Float Base
- DESCRIPTION:
- Shared infrastructure for float type handlers, providing helper functions to update resolved_ast in the database and query floats by type and specification.
- FILE PATH:
- src/pipeline/shared/float_base.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
CSU-053: Include Utilities
- DESCRIPTION:
- Shared utility functions for identifying include directive CodeBlocks and parsing include file paths, used by both include_handler and expand_includes.
- FILE PATH:
- src/pipeline/shared/include_utils.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
CSU-054: Math Render Utilities
- DESCRIPTION:
- Shared helpers for AsciiMath and MathML/OMML rendering, providing content hashing, script path resolution, and external process invocation for math conversion.
- FILE PATH:
- src/pipeline/shared/math_render_utils.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
CSU-055: Render Utilities
- DESCRIPTION:
- Shared rendering utilities for spec object handlers, providing functions to add CSS classes, insert page breaks, create bookmarks, and build styled header elements.
- FILE PATH:
- src/pipeline/shared/render_utils.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
CSU-056: Source Position Compatibility
- DESCRIPTION:
- Pandoc version compatibility layer that strips inline sourcepos tracking Spans from the AST while preserving line/column data on Link elements for diagnostics.
- FILE PATH:
- src/pipeline/shared/sourcepos_compat.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
CSU-057: Specification Base
- DESCRIPTION:
- Shared infrastructure for specification type handlers, providing default header rendering and configurable title formatting with optional PID display.
- FILE PATH:
- src/pipeline/shared/specification_base.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
CSU-058: Spec Object Base
- DESCRIPTION:
- Shared infrastructure for spec object types (HLR, FD, VC, etc.), providing styled headers with PID prefixes, attribute display, and the host-owned standard object-card renderer registered as the render hook of the base requirement type, which leaf types inherit via the extends chain.
- FILE PATH:
- src/pipeline/shared/spec_object_base.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
CSU-059: View Utilities
- DESCRIPTION:
- Shared utility functions for view handlers, providing MathML-to-HTML wrapping, Pandoc element JSON serialization, and other common view rendering operations.
- FILE PATH:
- src/pipeline/shared/view_utils.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-011
1.11.1.3.5 Transform Handlers Package
CSC-012: Transform Handlers
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- TRANSFORM phase handlers for external rendering and spec object/specification rendering.
- PATH:
- src/pipeline/transform/
CSU-060: External Render Handler
- DESCRIPTION:
- TRANSFORM phase handler that orchestrates parallel rendering of external float and view types (PlantUML, charts, math) by batching tasks and dispatching to registered renderer callbacks.
- FILE PATH:
- src/pipeline/transform/external_render_handler.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-012
CSU-061: Float Transformer
- DESCRIPTION:
- TRANSFORM phase handler that resolves internal float types (TABLE, CSV, etc.) by reading each type’s transform data hook from the host hook index (get_hook) and invoking it with a frozen data context to produce the resolved AST; external floats are delegated to external_render_handler.
- FILE PATH:
- src/pipeline/transform/spec_floats.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-012
CSU-162: Relation Link Rewriter
- DESCRIPTION:
-
TRANSFORM phase handler that rewrites
@and#links in stored spec_object AST JSON, replacing them with resolved anchor targets using the relation lookup built from spec_relations. - FILE PATH:
- src/pipeline/transform/relation_link_rewriter.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-012
CSU-062: Object Render Handler
- DESCRIPTION:
- TRANSFORM phase handler that resolves each object type’s render hook from the host via get_hook_inherited (walking the extends chain) and invokes it with a frozen render context to transform stored AST into styled output with headers, attributes, and bookmarks.
- FILE PATH:
- src/pipeline/transform/spec_object_render_handler.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-012
CSU-063: Specification Render Handler
- DESCRIPTION:
- TRANSFORM phase handler that resolves each specification type’s render hook from the host via get_hook_inherited (walking the extends chain) and invokes it with a frozen render context to generate the document title header.
- FILE PATH:
- src/pipeline/transform/specification_render_handler.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-012
1.11.1.4 Infrastructure Layer
CSC-004: Infrastructure
- COMPONENT TYPE:
- Layer
- DESCRIPTION:
- Output toolchain integration, hashing, logging, JSON utilities, reference cache management, and external tool wrappers.
- PATH:
- src/infra/
CSU-065: Hash Utilities
- DESCRIPTION:
- Provides SHA1 hashing for content and files, using Pandoc’s built-in sha1 when running inside Pandoc or falling back to a pure-Lua SHA1 implementation for standalone workers.
- FILE PATH:
- src/infra/hash_utils.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-004
CSU-066: JSON Utilities
- DESCRIPTION:
- Unified JSON encode/decode wrapper using the dkjson pure-Lua library, providing a consistent JSON interface independent of Pandoc’s JSON functions.
- FILE PATH:
- src/infra/json.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-004
CSU-067: Logger
- DESCRIPTION:
- TTY-aware logging system that outputs human-readable colored console messages when connected to a terminal, or structured NDJSON when piped, with configurable severity levels.
- FILE PATH:
- src/infra/logger.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-004
CSU-068: Reference Cache
- DESCRIPTION:
- Tracks whether reference.docx needs rebuilding by comparing the SHA1 hash of the preset file against a cached hash in the build_meta database table.
- FILE PATH:
- src/infra/reference_cache.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-004
CSU-069: MathML to OMML Converter
- DESCRIPTION:
- Converts MathML to Office MathML (OMML) by invoking an external Deno process running the mathml2omml npm library.
- FILE PATH:
- src/tools/mathml2omml_external.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-004
1.11.1.4.1 Format Utilities Package
CSC-013: Format Utilities
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Writer adapters, XML utilities, and ZIP archive operations for format-specific output generation.
- PATH:
- src/infra/format/
CSU-070: Format Writer
- DESCRIPTION:
- Provides postprocessor and filter loading utilities for template-specific output modifications, discovering format-specific Lua modules from models/{template}/ directories.
- FILE PATH:
- src/infra/format/writer.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-013
CSU-071: XML Utilities
- DESCRIPTION:
- XML utility module providing escaping, DOM construction, parsing, and manipulation via the SLAXML library for generating and transforming XML content.
- FILE PATH:
- src/infra/format/xml.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-013
CSU-072: ZIP Utilities
- DESCRIPTION:
- Cross-platform ZIP archive utilities using the lua-zip library, providing extract and create operations for DOCX archive manipulation.
- FILE PATH:
- src/infra/format/zip_utils.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-013
1.11.1.4.2 DOCX Generation Package
CSC-014: DOCX Generation
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- OOXML builder, preset loader, reference generator, and style builder for Word document output.
- PATH:
- src/infra/format/docx/
CSU-073: OOXML Builder
- DESCRIPTION:
- Unified OOXML builder for generating Word Open XML, offering both a stateful Builder API (method chaining) and a stateless Static API (inline OOXML generation).
- FILE PATH:
- src/infra/format/docx/ooxml_builder.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-014
CSU-074: Preset Loader
- DESCRIPTION:
- Loads Lua preset files that define DOCX styles, executing the preset script and returning the resulting configuration table for use by the reference generator.
- FILE PATH:
- src/infra/format/docx/preset_loader.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-014
CSU-075: Reference Generator
- DESCRIPTION:
- Generates reference.docx by merging custom styles from preset definitions into Pandoc’s default DOCX template via ZIP manipulation of the word/styles.xml file.
- FILE PATH:
- src/infra/format/docx/reference_generator.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-014
CSU-076: Style Builder
- DESCRIPTION:
- Provides unit conversion (cm/pt/in to twips) and OOXML style-building functions for generating Word paragraph and character style definitions.
- FILE PATH:
- src/infra/format/docx/style_builder.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-014
1.11.1.4.3 I/O Utilities Package
CSC-015: I/O Utilities
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- AST traversal with source position tracking and basic file I/O operations.
- PATH:
- src/infra/io/
CSU-077: Document Walker
- DESCRIPTION:
- Provides AST traversal methods for pipeline handlers, extracting source position (line numbers) from Pandoc data-pos attributes and tracking source file provenance through include expansion.
- FILE PATH:
- src/infra/io/document_walker.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-015
CSU-078: File Walker
- DESCRIPTION:
- Provides basic file I/O operations (read file, resolve relative paths, check existence, list directory) using luv for filesystem access.
- FILE PATH:
- src/infra/io/file_walker.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-015
1.11.1.4.4 Process Management Package
CSC-016: Process Management
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- External process spawning via luv and Pandoc command-line argument building.
- PATH:
- src/infra/process/
CSU-079: Pandoc CLI Builder
- DESCRIPTION:
- Builds Pandoc command-line argument arrays from configuration, resolving filter paths and speccompiler home directory for external pandoc process invocation.
- FILE PATH:
- src/infra/process/pandoc_cli.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-016
CSU-080: Task Runner
- DESCRIPTION:
- Unified interface for spawning and managing external processes using luv (libuv), providing async I/O, timeouts, CPU count detection, and command existence checking.
- FILE PATH:
- src/infra/process/task_runner.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-016
1.11.2 Default Model Components
1.11.2.1 Default Model
CSC-017: Default Model
- COMPONENT TYPE:
- Model
- DESCRIPTION:
- Foundational type model providing base object, float, relation, and view types that all other models extend.
- PATH:
- models/default/
CSU-081: SECTION Object Type
- DESCRIPTION:
- Defines the SECTION object type (id=“SECTION”), the default type for headers without explicit TYPE: prefix; numbered, with optional XHTML description attribute.
- FILE PATH:
- models/default/types/objects/section.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-017
CSU-082: SPEC Specification Type
- DESCRIPTION:
- Defines the SPEC specification type (id=“SPEC”), the default type for H1 headers without explicit TYPE: prefix; title is unnumbered and does not display a PID.
- FILE PATH:
- models/default/types/specifications/spec.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-017
1.11.2.1.1 Default Filters Package
CSC-018: Default Filters
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Format-specific Pandoc Lua filters that convert speccompiler markers to native output elements.
- PATH:
- models/default/filters/
CSU-083: DOCX Filter
- DESCRIPTION:
- Pandoc Lua filter for DOCX output that converts speccompiler-format markers (page-break, bookmarks, math-omml, captions, equations) into native OOXML elements.
- FILE PATH:
- models/default/filters/docx.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-018
CSU-084: HTML Filter
- DESCRIPTION:
- Pandoc Lua filter for HTML5 output that converts speccompiler-format markers into semantic HTML elements with Bootstrap-compatible styling.
- FILE PATH:
- models/default/filters/html.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-018
CSU-085: Markdown Filter
- DESCRIPTION:
- Pandoc Lua filter for Markdown output that converts speccompiler page-break markers to horizontal rules and removes markers with no Markdown equivalent.
- FILE PATH:
- models/default/filters/markdown.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-018
1.11.2.1.2 Default Postprocessors Package
CSC-019: Default Postprocessors
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Format-specific post-processing applied after Pandoc output generation.
- PATH:
- models/default/postprocessors/
CSU-086: DOCX Postprocessor
- DESCRIPTION:
- DOCX post-processor that loads and applies template-specific OOXML post-processing to fix styles regenerated by Pandoc’s DOCX writer.
- FILE PATH:
- models/default/postprocessors/docx.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-019
CSU-087: LaTeX Postprocessor
- DESCRIPTION:
- LaTeX post-processor that loads and applies template-specific LaTeX post-processing to transform Pandoc’s standard LaTeX output.
- FILE PATH:
- models/default/postprocessors/latex.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-019
1.11.2.1.3 Default Analyze Queries Package
CSC-020: Default Analyze Queries
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- SQL analyze query queries for detecting constraint violations across specifications, objects, floats, relations, and views.
- PATH:
- models/default/analyze_queries/
CSU-089: Spec Missing Required
- DESCRIPTION:
- Verification view detecting specifications missing required attributes.
- FILE PATH:
- models/default/analyze_queries/sd_101_spec_missing_required.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-090: Spec Invalid Type
- DESCRIPTION:
- Verification view detecting specifications whose type_ref does not match any registered specification type.
- FILE PATH:
- models/default/analyze_queries/sd_102_spec_invalid_type.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-091: Object Missing Required
- DESCRIPTION:
- Verification view detecting spec objects missing required attributes.
- FILE PATH:
- models/default/analyze_queries/sd_201_object_missing_required.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-092: Object Cardinality Over
- DESCRIPTION:
- Verification view detecting spec object attributes exceeding their declared max_occurs cardinality.
- FILE PATH:
- models/default/analyze_queries/sd_202_object_cardinality_over.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-093: Object Cast Failures
- DESCRIPTION:
- Verification view detecting spec object attributes whose raw values failed to cast to their declared datatype.
- FILE PATH:
- models/default/analyze_queries/sd_203_object_cast_failures.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-094: Object Invalid Enum
- DESCRIPTION:
- Verification view detecting spec object ENUM attributes with values not matching any entry in enum_values.
- FILE PATH:
- models/default/analyze_queries/sd_204_object_invalid_enum.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-095: Object Invalid Date
- DESCRIPTION:
- Verification view detecting spec object DATE attributes not matching the YYYY-MM-DD format.
- FILE PATH:
- models/default/analyze_queries/sd_205_object_invalid_date.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-096: Object Bounds Violation
- DESCRIPTION:
- Verification view detecting numeric attributes falling outside declared min_value/max_value bounds.
- FILE PATH:
- models/default/analyze_queries/sd_206_object_bounds_violation.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-097: Float Orphan
- DESCRIPTION:
- Verification view detecting floats with no parent object despite objects existing in the same specification.
- FILE PATH:
- models/default/analyze_queries/sd_301_float_orphan.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-098: Float Duplicate Label
- DESCRIPTION:
- Verification view detecting floats sharing the same label within a specification.
- FILE PATH:
- models/default/analyze_queries/sd_302_float_duplicate_label.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-099: Float Render Failure
- DESCRIPTION:
- Verification view detecting floats requiring external rendering but with NULL resolved_ast.
- FILE PATH:
- models/default/analyze_queries/sd_303_float_render_failure.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-100: Float Invalid Type
- DESCRIPTION:
- Verification view detecting floats whose type_ref does not match any registered float type.
- FILE PATH:
- models/default/analyze_queries/sd_304_float_invalid_type.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-101: Relation Unresolved
- DESCRIPTION:
- Verification view detecting relations with target_text but no resolved target_ref.
- FILE PATH:
- models/default/analyze_queries/sd_401_relation_unresolved.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-102: Relation Dangling
- DESCRIPTION:
- Verification view detecting relations whose target_ref points to a non-existent identifier.
- FILE PATH:
- models/default/analyze_queries/sd_402_relation_dangling.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
CSU-103: Relation Ambiguous
- DESCRIPTION:
- Verification view detecting relations flagged as ambiguous where the float reference matched multiple targets.
- FILE PATH:
- models/default/analyze_queries/sd_407_relation_ambiguous.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-020
1.11.2.1.4 Default Styles Package
CSC-021: Default Styles
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Style presets defining page layout, typography, and formatting for DOCX and HTML output.
- PATH:
- models/default/styles/default/
CSU-106: DOCX Style Preset
- DESCRIPTION:
- Defines the default DOCX style preset with Letter-sized page configuration, paragraph styles, and standard margins for Word document output.
- FILE PATH:
- models/default/styles/default/docx.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-021
CSU-107: HTML Style Preset
- DESCRIPTION:
- Defines the default HTML style preset with typography (Inter/JetBrains Mono fonts), color palette, and layout configuration for web output.
- FILE PATH:
- models/default/styles/default/html.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-021
1.11.2.1.5 Default Float Types Package
CSC-022: Default Float Types
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Float type definitions for numbered content blocks including images, tables, code listings, diagrams, charts, and equations.
- PATH:
- models/default/types/floats/
CSU-108: CHART Float Type
- DESCRIPTION:
- Defines the CHART float type for ECharts JSON configurations rendered to PNG via Deno; shares FIGURE counter group and requires external rendering.
- FILE PATH:
- models/default/types/floats/chart.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-022
CSU-109: FIGURE Float Type
- DESCRIPTION:
- Defines the FIGURE float type for existing image files (PNG, JPG, etc.); does not require external rendering and resolves image paths relative to the source file.
- FILE PATH:
- models/default/types/floats/figure.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-022
CSU-110: LISTING Float Type
- DESCRIPTION:
- Defines the LISTING float type for code listings and source code blocks; has its own counter group, supports aliases like src, quadro, and code.
- FILE PATH:
- models/default/types/floats/listing.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-022
CSU-111: MATH Float Type
- DESCRIPTION:
- Defines the MATH float type for block-level AsciiMath expressions converted to MathML/OMML; uses the EQUATION counter group and requires external rendering.
- FILE PATH:
- models/default/types/floats/math.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-022
CSU-112: PLANTUML Float Type
- DESCRIPTION:
- Defines the PLANTUML float type for PlantUML diagrams rendered to PNG; shares the FIGURE counter group and requires external rendering.
- FILE PATH:
- models/default/types/floats/plantuml.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-022
CSU-113: TABLE Float Type
- DESCRIPTION:
- Defines the TABLE float type for tables parsed from CSV, TSV, or list-table syntax using Pandoc’s built-in readers; has its own counter group.
- FILE PATH:
- models/default/types/floats/table.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-022
1.11.2.1.6 Default Relation Types Package
CSC-023: Default Relation Types
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Cross-reference relation type definitions mapping PID and label selectors to typed object and float targets.
- PATH:
- models/default/types/relations/
CSU-114: XREF_CITATION Relation Type
- DESCRIPTION:
- Defines the XREF_CITATION relation type for cross-references to bibliography entries; uses the # link selector with cite/citep prefix aliases.
- FILE PATH:
- models/default/types/relations/xref_citation.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-023
CSU-115: XREF_FIGURE Relation Type
- DESCRIPTION:
- Defines the XREF_FIGURE relation type for cross-references to FIGURE, PLANTUML, and CHART floats; default relation type for # references.
- FILE PATH:
- models/default/types/relations/xref_figure.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-023
CSU-116: XREF_LISTING Relation Type
- DESCRIPTION:
- Defines the XREF_LISTING relation type for cross-references to LISTING floats; uses the # link selector.
- FILE PATH:
- models/default/types/relations/xref_listing.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-023
CSU-117: XREF_MATH Relation Type
- DESCRIPTION:
- Defines the XREF_MATH relation type for cross-references to MATH floats; uses the # link selector.
- FILE PATH:
- models/default/types/relations/xref_math.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-023
CSU-118: XREF_TABLE Relation Type
- DESCRIPTION:
- Defines the XREF_TABLE relation type for cross-references to TABLE floats; uses the # link selector.
- FILE PATH:
- models/default/types/relations/xref_table.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-023
1.11.2.1.7 Default View Types Package
CSC-024: Default View Types
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- View type definitions for inline and block-level data-driven content rendering.
- PATH:
- models/default/types/views/
CSU-119: ABBREV View Type
- DESCRIPTION:
- Defines the ABBREV view type for inline abbreviation/acronym definitions using abbrev: syntax with first-use expansion support.
- FILE PATH:
- models/default/types/views/abbrev.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-024
CSU-120: ABBREV_LIST View Type
- DESCRIPTION:
- Defines the ABBREV_LIST view type for generating a sorted list of all abbreviations defined in the document.
- FILE PATH:
- models/default/types/views/abbrev_list.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-024
CSU-121: GAUSS View Type
- DESCRIPTION:
- Defines the GAUSS view type for generating Gaussian distribution data from inline gauss: syntax with configurable parameters; returns ECharts dataset format.
- FILE PATH:
- models/default/types/views/gauss.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-024
CSU-122: LOF View Type
- DESCRIPTION:
- Defines the LOF view type for generating lists of floats (figures, tables) from inline lof:/lot: syntax; queries spec_floats by counter_group.
- FILE PATH:
- models/default/types/views/lof.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-024
CSU-123: MATH_INLINE View Type
- DESCRIPTION:
- Defines the MATH_INLINE view type for inline AsciiMath expressions using math:/eq:/formula: syntax; requires external rendering for MathML-to-OMML conversion.
- FILE PATH:
- models/default/types/views/math_inline.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-024
CSU-124: TOC View Type
- DESCRIPTION:
- Defines the TOC view type for generating a table of contents from inline toc: syntax with optional depth parameter.
- FILE PATH:
- models/default/types/views/toc.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-024
1.11.3 SW Docs Model Components
1.11.3.1 SW Docs Model
CSC-025: SW Docs Model
- COMPONENT TYPE:
- Model
- DESCRIPTION:
- Domain model for software documentation providing traceable object types, domain-specific analyze queries, specification types, relation types, and views.
- PATH:
- models/sw_docs/
CSU-125: HTML5 Postprocessor
- DESCRIPTION:
- HTML5 post-processor that generates a single-file documentation web app with embedded CSS, JS, content, and SQLite-WASM full-text search.
- FILE PATH:
- models/sw_docs/postprocessors/html5.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-025
1.11.3.1.1 SW Docs Analyze Queries Package
CSC-026: SW Docs Analyze Queries
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Domain-specific analyze query queries for software documentation traceability and naming convention enforcement.
- PATH:
- models/sw_docs/analyze_queries/
CSU-126: VC Missing HLR Traceability
- DESCRIPTION:
- Verification view detecting verification cases with no traceability link to any high-level requirement.
- FILE PATH:
- models/sw_docs/analyze_queries/sd_601_vc_missing_hlr_traceability.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-026
CSU-127: TR Missing VC Traceability
- DESCRIPTION:
- Verification view detecting test results with no traceability link to any verification case.
- FILE PATH:
- models/sw_docs/analyze_queries/sd_602_tr_missing_vc_traceability.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-026
CSU-128: HLR Missing VC Coverage
- DESCRIPTION:
- Verification view detecting high-level requirements not covered by any verification case.
- FILE PATH:
- models/sw_docs/analyze_queries/sd_603_hlr_missing_vc_coverage.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-026
CSU-131: FD Missing CSC Traceability
- DESCRIPTION:
- Verification view detecting functional descriptions with no traceability link to any Computer Software Component.
- FILE PATH:
- models/sw_docs/analyze_queries/sd_606_fd_missing_csc_traceability.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-026
CSU-132: FD Missing CSU Traceability
- DESCRIPTION:
- Verification view detecting functional descriptions with no traceability link to any Computer Software Unit.
- FILE PATH:
- models/sw_docs/analyze_queries/sd_607_fd_missing_csu_traceability.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-026
CSU-163: CSC Missing FD Allocation
- DESCRIPTION:
- Verification view detecting Computer Software Components with no functional description (FD) allocated to them.
- FILE PATH:
- models/sw_docs/analyze_queries/csc_missing_fd_allocation.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-026
CSU-164: CSU Missing FD Allocation
- DESCRIPTION:
- Verification view detecting Computer Software Units with no functional description (FD) allocated to them.
- FILE PATH:
- models/sw_docs/analyze_queries/csu_missing_fd_allocation.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-026
1.11.3.1.2 SW Docs Object Types Package
CSC-027: SW Docs Object Types
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Domain object type definitions for traceable specification items including requirements, design decisions, verification cases, and MIL-STD-498 architectural elements.
- PATH:
- models/sw_docs/types/objects/
CSU-133: CSC Object Type
- DESCRIPTION:
- Defines the CSC (Computer Software Component) object type for MIL-STD-498 architectural decomposition, with required component_type and path attributes, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/csc.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-134: CSU Object Type
- DESCRIPTION:
- Defines the CSU (Computer Software Unit) object type for implementation-level source file units, with required file_path and optional language attributes, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/csu.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-135: DD Object Type
- DESCRIPTION:
- Defines the DD (Design Decision) object type for recording architectural decisions, with a required rationale XHTML attribute, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/dd.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-136: DIC Object Type
- DESCRIPTION:
- Defines the DIC (Dictionary Entry) object type for project term definitions, with optional term, acronym, and domain attributes, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/dic.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-137: FD Object Type
- DESCRIPTION:
- Defines the FD (Functional Description) object type for design elements that realize Software Functions, with optional traceability XHTML attribute, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/fd.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-138: HLR Object Type
- DESCRIPTION:
- Defines the HLR (High-Level Requirement) object type for top-level system requirements, with priority enum (High/Mid/Low), rationale, and belongs_to attributes, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/hlr.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-139: LLR Object Type
- DESCRIPTION:
- Defines the LLR (Low-Level Requirement) object type for detailed implementation requirements derived from HLRs, with optional rationale, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/llr.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-140: NFR Object Type
- DESCRIPTION:
- Defines the NFR (Non-Functional Requirement) object type for quality-attribute requirements, with category enum, priority, and metric attributes, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/nfr.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-141: SF Object Type
- DESCRIPTION:
- Defines the SF (Software Function) object type for grouping related HLRs into functional units, with optional description and rationale attributes, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/sf.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-142: SYMBOL Object Type
- DESCRIPTION:
- Defines the SYMBOL object type for code symbols (functions, variables, registers) extracted from firmware analysis, with kind, source, complexity, and calls attributes.
- FILE PATH:
- models/sw_docs/types/objects/symbol.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-143: TR Object Type
- DESCRIPTION:
- Defines the TR (Test Result) object type for verification-case execution outcomes, with required result enum (Pass/Fail/Blocked/Not Run) and required traceability to a VC, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/tr.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-144: TRACEABLE Base Object Type
- DESCRIPTION:
- Defines the TRACEABLE abstract base object type that all traceable objects extend; provides the inherited status enum attribute (Draft/Review/Approved/Implemented) and extends SECTION.
- FILE PATH:
- models/sw_docs/types/objects/traceable.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
CSU-145: VC Object Type
- DESCRIPTION:
- Defines the VC (Verification Case) object type for test specifications, with required objective and verification_method attributes plus optional preconditions, expected results, and pass criteria, extending TRACEABLE.
- FILE PATH:
- models/sw_docs/types/objects/vc.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-027
1.11.3.1.3 SW Docs Relation Types Package
CSC-028: SW Docs Relation Types
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Domain relation type definitions for traceability links between software documentation elements.
- PATH:
- models/sw_docs/types/relations/
CSU-146: BELONGS Relation Type
- DESCRIPTION:
- Defines the BELONGS relation type representing HLR membership in a Software Function (SF), resolved from the belongs_to source attribute using the @ link selector.
- FILE PATH:
- models/sw_docs/types/relations/belongs.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-028
CSU-147: REALIZES Relation Type
- DESCRIPTION:
- Defines the REALIZES relation type representing a Functional Description (FD) realizing a Software Function (SF), resolved from the traceability source attribute.
- FILE PATH:
- models/sw_docs/types/relations/realizes.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-028
CSU-148: TRACES_TO Relation Type
- DESCRIPTION:
- Defines the TRACES_TO relation type, the default (is_default=true) general-purpose traceability link using the @ link selector with no source/target type constraints.
- FILE PATH:
- models/sw_docs/types/relations/traces_to.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-028
CSU-149: XREF_DIC Relation Type
- DESCRIPTION:
- Defines the XREF_DIC relation type for cross-references targeting Dictionary (DIC) entries from any source type, using the @ link selector.
- FILE PATH:
- models/sw_docs/types/relations/xref_dic.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-028
1.11.3.1.4 SW Docs Specification Types Package
CSC-029: SW Docs Specification Types
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Specification type definitions for SDN document types (SRS, SDD, SVC, SUM, TRR).
- PATH:
- models/sw_docs/types/specifications/
CSU-150: SDD Specification Type
- DESCRIPTION:
- Defines the SDD (Software Design Description) specification type with required version, optional status and date attributes.
- FILE PATH:
- models/sw_docs/types/specifications/sdd.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-029
CSU-151: SRS Specification Type
- DESCRIPTION:
- Defines the SRS (Software Requirements Specification) specification type with required version, optional status and date attributes.
- FILE PATH:
- models/sw_docs/types/specifications/srs.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-029
CSU-152: SUM Specification Type
- DESCRIPTION:
- Defines the SUM (Software User Manual) specification type for user manuals, with required version, optional status and date attributes.
- FILE PATH:
- models/sw_docs/types/specifications/sum.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-029
CSU-153: SVC Specification Type
- DESCRIPTION:
- Defines the SVC (Software Verification Cases) specification type with required version, optional status and date attributes.
- FILE PATH:
- models/sw_docs/types/specifications/svc.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-029
CSU-154: TRR Specification Type
- DESCRIPTION:
- Defines the TRR (Test Results Report) specification type for aggregating test-execution results, with required version plus optional test_run_id and environment attributes.
- FILE PATH:
- models/sw_docs/types/specifications/trr.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-029
1.11.3.1.5 SW Docs View Types Package
CSC-030: SW Docs View Types
- COMPONENT TYPE:
- Package
- DESCRIPTION:
- Domain view type definitions for traceability matrices, test results, and coverage summaries.
- PATH:
- models/sw_docs/types/views/
CSU-155: Coverage Summary View
- DESCRIPTION:
- Defines the COVERAGE_SUMMARY view generating a table of VC counts and pass rates grouped by Software Function (SF).
- FILE PATH:
- models/sw_docs/types/views/coverage_summary.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-030
CSU-156: Requirements Summary View
- DESCRIPTION:
- Defines the REQUIREMENTS_SUMMARY view generating a table of HLR counts grouped by Software Function (SF) via the BELONGS relation.
- FILE PATH:
- models/sw_docs/types/views/requirements_summary.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-030
CSU-157: Test Execution Matrix View
- DESCRIPTION:
- Defines the TEST_EXECUTION_MATRIX view generating a deterministic VC-to-HLR-to-procedure/oracle matrix from the SpecIR.
- FILE PATH:
- models/sw_docs/types/views/test_execution_matrix.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-030
CSU-158: Test Results Matrix View
- DESCRIPTION:
- Defines the TEST_RESULTS_MATRIX view generating a table of VC-to-TR traceability with pass/fail result status.
- FILE PATH:
- models/sw_docs/types/views/test_results_matrix.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-030
CSU-159: Traceability Matrix View
- DESCRIPTION:
- Defines the TRACEABILITY_MATRIX view generating a table showing the full HLR-to-VC-to-TR traceability chain with test results.
- FILE PATH:
- models/sw_docs/types/views/traceability_matrix.lua
- LANGUAGE:
- Lua
- TRACEABILITY:
- CSC-030
2 Requirements Allocation Gaps
The matrix below is generated live from SpecIR at build time and lists only HLRs whose allocation chain (SF -> FD -> CSC -> CSU) is incomplete. An empty result means every requirement is fully allocated to the design.
| HLR | HLR Title | SF | FD | CSC | CSU | Status |
|---|---|---|---|---|---|---|
| HLR-AUDIT-001 | Content-Addressed Hashing | SF-006 | FD-006 | — | — | No CSC |
| HLR-AUDIT-001 | Content-Addressed Hashing | SF-006 | FD-006 | CSC-001 | — | No CSU |
| HLR-AUDIT-002 | Include Dependency Tracking | SF-006 | FD-006 | — | — | No CSC |
| HLR-AUDIT-002 | Include Dependency Tracking | SF-006 | FD-006 | CSC-001 | — | No CSU |
| HLR-AUDIT-003 | Structured Diagnostic Reporting | SF-006 | FD-006 | — | — | No CSC |
| HLR-AUDIT-003 | Structured Diagnostic Reporting | SF-006 | FD-006 | CSC-001 | — | No CSU |
| HLR-AUDIT-004 | Structured Logging | SF-006 | FD-006 | — | — | No CSC |
| HLR-AUDIT-004 | Structured Logging | SF-006 | FD-006 | CSC-001 | — | No CSU |
| HLR-AUDIT-005 | Build Reproducibility | SF-006 | FD-006 | — | — | No CSC |
| HLR-AUDIT-005 | Build Reproducibility | SF-006 | FD-006 | CSC-001 | — | No CSU |
| HLR-CFG-001 | Manifest Configuration | SF-005 | FD-002 | — | — | No CSC |
| HLR-CFG-001 | Manifest Configuration | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-001 | Type Descriptor Loading | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-001 | Type Descriptor Loading | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-002 | Model Directory Structure | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-002 | Model Directory Structure | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-003 | Descriptor Registration | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-003 | Descriptor Registration | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-004 | Type Schema | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-004 | Type Schema | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-005 | Model Resolution and Overlay | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-005 | Model Resolution and Overlay | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-006 | External Renderer Hooks | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-006 | External Renderer Hooks | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-007 | Data View Hooks | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-007 | Data View Hooks | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-008 | Hook Index | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-008 | Hook Index | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-009 | Canonical Hook Context | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-009 | Canonical Hook Context | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-010 | Model Manifest | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-010 | Model Manifest | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-011 | Hook Validation and Phase Registration | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-011 | Hook Validation and Phase Registration | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-EXT-012 | Analyze Query Descriptor | SF-005 | FD-002 | — | — | No CSC |
| HLR-EXT-012 | Analyze Query Descriptor | SF-005 | FD-002 | CSC-001 | — | No CSU |
| HLR-OUT-001 | Document Assembly | SF-004 | FD-004 | — | — | No CSC |
| HLR-OUT-002 | Float Resolution | SF-004 | FD-004 | — | — | No CSC |
| HLR-OUT-003 | Float Numbering | SF-004 | FD-004 | — | — | No CSC |
| HLR-OUT-004 | Multi-Format Output | SF-004 | FD-004 | — | — | No CSC |
| HLR-OUT-005 | DOCX Generation | SF-004 | FD-004 | — | — | No CSC |
| HLR-OUT-006 | HTML5 Generation | SF-004 | FD-004 | — | — | No CSC |
| HLR-OUT-007 | Full-Text Search Indexing | SF-004 | FD-004 | — | — | No CSC |
| HLR-PIPE-001 | Five-Phase Lifecycle | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-001 | Five-Phase Lifecycle | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-002 | Handler Registration and Prerequisites | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-002 | Handler Registration and Prerequisites | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-003 | Topological Ordering via Kahn’s Algorithm | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-003 | Topological Ordering via Kahn’s Algorithm | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-004 | Phase Abort on ANALYZE Errors | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-004 | Phase Abort on ANALYZE Errors | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-005 | Batch Dispatch for All Phases | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-005 | Batch Dispatch for All Phases | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-006 | Context Creation and Propagation | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-006 | Context Creation and Propagation | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-007 | CommonSpec Input Parsing | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-007 | CommonSpec Input Parsing | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-008 | Include File Expansion | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-008 | Include File Expansion | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-009 | PID Auto-Generation | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-009 | PID Auto-Generation | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-010 | Relation Type Inference | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-010 | Relation Type Inference | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-011 | Prerequisite-Not-Found Diagnostic | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-011 | Prerequisite-Not-Found Diagnostic | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-PIPE-012 | Section Scope Termination | SF-001 | FD-001 | — | — | No CSC |
| HLR-PIPE-012 | Section Scope Termination | SF-001 | FD-001 | CSC-001 | — | No CSU |
| HLR-STOR-001 | SQLite Persistence | SF-002 | FD-003 | — | — | No CSC |
| HLR-STOR-002 | EAV Attribute Model | SF-002 | FD-003 | — | — | No CSC |
| HLR-STOR-003 | Build Cache | SF-002 | FD-003 | — | — | No CSC |
| HLR-STOR-004 | Output Cache | SF-002 | FD-003 | — | — | No CSC |
| HLR-STOR-005 | Incremental Rebuild Support | SF-002 | FD-003 | — | — | No CSC |
| HLR-STOR-006 | EAV Pivot Views for External Queries | SF-002 | FD-003 | — | — | No CSC |
| HLR-TYPE-001 | Specifications Container | SF-003 | FD-005 | — | — | No CSC |
| HLR-TYPE-001 | Specifications Container | SF-003 | FD-005 | CSC-017 | — | No CSU |
| HLR-TYPE-001 | Specifications Container | SF-003 | FD-005 | CSC-018 | — | No CSU |
| HLR-TYPE-001 | Specifications Container | SF-003 | FD-005 | CSC-019 | — | No CSU |
| HLR-TYPE-001 | Specifications Container | SF-003 | FD-005 | CSC-021 | — | No CSU |
| HLR-TYPE-001 | Specifications Container | SF-003 | FD-005 | CSC-022 | — | No CSU |
| HLR-TYPE-001 | Specifications Container | SF-003 | FD-005 | CSC-023 | — | No CSU |
| HLR-TYPE-001 | Specifications Container | SF-003 | FD-005 | CSC-024 | — | No CSU |
| HLR-TYPE-002 | Spec Objects Container | SF-003 | FD-005 | — | — | No CSC |
| HLR-TYPE-002 | Spec Objects Container | SF-003 | FD-005 | CSC-017 | — | No CSU |
| HLR-TYPE-002 | Spec Objects Container | SF-003 | FD-005 | CSC-018 | — | No CSU |
| HLR-TYPE-002 | Spec Objects Container | SF-003 | FD-005 | CSC-019 | — | No CSU |
| HLR-TYPE-002 | Spec Objects Container | SF-003 | FD-005 | CSC-021 | — | No CSU |
| HLR-TYPE-002 | Spec Objects Container | SF-003 | FD-005 | CSC-022 | — | No CSU |
| HLR-TYPE-002 | Spec Objects Container | SF-003 | FD-005 | CSC-023 | — | No CSU |
| HLR-TYPE-002 | Spec Objects Container | SF-003 | FD-005 | CSC-024 | — | No CSU |
| HLR-TYPE-003 | Spec Floats Container | SF-003 | FD-005 | — | — | No CSC |
| HLR-TYPE-003 | Spec Floats Container | SF-003 | FD-005 | CSC-017 | — | No CSU |
| HLR-TYPE-003 | Spec Floats Container | SF-003 | FD-005 | CSC-018 | — | No CSU |
| HLR-TYPE-003 | Spec Floats Container | SF-003 | FD-005 | CSC-019 | — | No CSU |
| HLR-TYPE-003 | Spec Floats Container | SF-003 | FD-005 | CSC-021 | — | No CSU |
| HLR-TYPE-003 | Spec Floats Container | SF-003 | FD-005 | CSC-022 | — | No CSU |
| HLR-TYPE-003 | Spec Floats Container | SF-003 | FD-005 | CSC-023 | — | No CSU |
| HLR-TYPE-003 | Spec Floats Container | SF-003 | FD-005 | CSC-024 | — | No CSU |
| HLR-TYPE-004 | Spec Views Container | SF-003 | FD-005 | — | — | No CSC |
| HLR-TYPE-004 | Spec Views Container | SF-003 | FD-005 | CSC-017 | — | No CSU |
| HLR-TYPE-004 | Spec Views Container | SF-003 | FD-005 | CSC-018 | — | No CSU |
| HLR-TYPE-004 | Spec Views Container | SF-003 | FD-005 | CSC-019 | — | No CSU |
| HLR-TYPE-004 | Spec Views Container | SF-003 | FD-005 | CSC-021 | — | No CSU |
| HLR-TYPE-004 | Spec Views Container | SF-003 | FD-005 | CSC-022 | — | No CSU |
| HLR-TYPE-004 | Spec Views Container | SF-003 | FD-005 | CSC-023 | — | No CSU |
| HLR-TYPE-004 | Spec Views Container | SF-003 | FD-005 | CSC-024 | — | No CSU |
| HLR-TYPE-005 | Spec Relations Container | SF-003 | FD-005 | — | — | No CSC |
| HLR-TYPE-005 | Spec Relations Container | SF-003 | FD-005 | CSC-017 | — | No CSU |
| HLR-TYPE-005 | Spec Relations Container | SF-003 | FD-005 | CSC-018 | — | No CSU |
| HLR-TYPE-005 | Spec Relations Container | SF-003 | FD-005 | CSC-019 | — | No CSU |
| HLR-TYPE-005 | Spec Relations Container | SF-003 | FD-005 | CSC-021 | — | No CSU |
| HLR-TYPE-005 | Spec Relations Container | SF-003 | FD-005 | CSC-022 | — | No CSU |
| HLR-TYPE-005 | Spec Relations Container | SF-003 | FD-005 | CSC-023 | — | No CSU |
| HLR-TYPE-005 | Spec Relations Container | SF-003 | FD-005 | CSC-024 | — | No CSU |
| HLR-TYPE-006 | Spec Attributes Container | SF-003 | FD-005 | — | — | No CSC |
| HLR-TYPE-006 | Spec Attributes Container | SF-003 | FD-005 | CSC-017 | — | No CSU |
| HLR-TYPE-006 | Spec Attributes Container | SF-003 | FD-005 | CSC-018 | — | No CSU |
| HLR-TYPE-006 | Spec Attributes Container | SF-003 | FD-005 | CSC-019 | — | No CSU |
| HLR-TYPE-006 | Spec Attributes Container | SF-003 | FD-005 | CSC-021 | — | No CSU |
| HLR-TYPE-006 | Spec Attributes Container | SF-003 | FD-005 | CSC-022 | — | No CSU |
| HLR-TYPE-006 | Spec Attributes Container | SF-003 | FD-005 | CSC-023 | — | No CSU |
| HLR-TYPE-006 | Spec Attributes Container | SF-003 | FD-005 | CSC-024 | — | No CSU |
| HLR-TYPE-007 | Type Validation | SF-003 | FD-005 | — | — | No CSC |
| HLR-TYPE-007 | Type Validation | SF-003 | FD-005 | CSC-017 | — | No CSU |
| HLR-TYPE-007 | Type Validation | SF-003 | FD-005 | CSC-018 | — | No CSU |
| HLR-TYPE-007 | Type Validation | SF-003 | FD-005 | CSC-019 | — | No CSU |
| HLR-TYPE-007 | Type Validation | SF-003 | FD-005 | CSC-021 | — | No CSU |
| HLR-TYPE-007 | Type Validation | SF-003 | FD-005 | CSC-022 | — | No CSU |
| HLR-TYPE-007 | Type Validation | SF-003 | FD-005 | CSC-023 | — | No CSU |
| HLR-TYPE-007 | Type Validation | SF-003 | FD-005 | CSC-024 | — | No CSU |
SpecCompiler Requirements
1 Scope
This document defines the high-level requirements for SpecCompiler , a document processing pipeline for structured specifications.
The document is organized in two parts. The first part defines the SpecIR data model, the six core types that the <Pipeline> operates on. The second part specifies the functional requirements, grouped into System Features (Pipeline Execution through Audit and Integrity), each decomposed into High-Level Requirements.
1.1 SpecCompiler Core Data Dictionary
1.1.1 SpecIR Types
SpecIR (see <SpecIR>) is the data model that SpecCompiler builds from source Markdown during the <INITIALIZE Phase> phase. The core task of parsing is to lower Markdown annotations into a set of typed content tables that the <Pipeline> can analyze, transform, verify, and emit. The entries below define each of these six content tables as a formal tuple specifying the Markdown syntax that produces it.
SpecIR-01: Specification
A Specification is the root document container created from an H1 header. It represents a complete document like an SRS, SDD, or SVC. Each specification has a type, optional PID, and contains attributes and all spec objects within that document.
- DESCRIPTION:
-
Formal definition: — a tuple of type, title, project identifier, attributes, and child objects.
Syntax:
# [TypeRef:] Text [@PID]Full specification: See the CommonSpec Language Specification for the complete grammar, type inference rules, and examples.
SpecIR-02: Spec Object
A Spec Object represents a traceable element in a specification document, created from H2-H6 headers. Objects can be requirements (HLR, LLR), verification cases (VC), design elements (FD, CSC, CSU), or structural sections (SECTION). Each object has a type, PID and can contain attributes, body content, floats, relations, views, and child objects.
- DESCRIPTION:
-
Formal definition: — a tuple of type, title, project identifier, body content, attributes, floats, relations, views, and child objects.
Syntax:
##...###### [TypeRef:] Title [@PID]Full specification: See the CommonSpec Language Specification for the complete grammar, type inference, PID auto-generation, and examples.
SpecIR-03: Spec Float
A Spec Float represents a floating element like a
figure, table, or diagram. Floats are created from fenced code blocks
with a TypeRef:Label pattern. They
are automatically numbered within their counter group and can be
cross-referenced by their label. Some floats require external rendering
(e.g., PlantUML diagrams).
- DESCRIPTION:
-
Formal definition: — a tuple of type, label, key-value metadata, and raw content.
Syntax:
```TypeRef:Label[{Key=Value, ...}] Content ```Full specification: See the CommonSpec Language Specification for float types, aliases, counter groups, and examples.
SpecIR-04: Attribute
An Attribute stores metadata for specifications and spec objects using an Entity-Attribute-Value (EAV) pattern. Attributes are defined in blockquotes following headers and support multiple datatypes including strings, integers, dates, enums, and rich XHTML content (Pandoc AST). Relations are extracted from the AST. Attribute definitions constrain which attributes each object type can have.
- DESCRIPTION:
-
Formal definition: — a triple of attribute type, blockquote content, and child relations.
Syntax:
> TypeRef: valueDatatypes: STRING, INTEGER, REAL, BOOLEAN, DATE, ENUM, XHTML.
Full specification: See the CommonSpec Language Specification for the complete datatype semantics, attribute constraints, and examples.
SpecIR-05: Spec Relation
A Spec Relation represents a traceability link between specification elements. Relations are created from Markdown links where the link target (URL) acts as a selector that drives type inference. The relation type is not authored explicitly — it is inferred by constraint matching: each relation type defines optional constraints on selector, source attribute, source type, and target type. The most specific match (most non-NULL constraints) wins.
- DESCRIPTION:
-
Formal definition: — a 4-tuple of source object, target element, link selector, and source attribute.
Type inference: — the relation type is inferred by constraint matching with most-specific-wins across selector, attribute, source type, and target type.
Syntax:
[Target](selector)where the URL starts with@or#. Selectors are not hardcoded — they are defined by relation types in the model (e.g.,PID_REFdefines@,LABEL_REFdefines#,XREF_CITATIONdefines@cite,@citep). Models can register any@...or#...selector.Full specification: See the CommonSpec Language Specification for the complete inference algorithm and examples.
SpecIR-06: Spec View
A Spec View represents a dynamic query or generated content block. Views are materialized during the TRANSFORM phase and can generate tables of contents (TOC), lists of figures (LOF), or custom queries, abbreviations, and inline math. Views enable dynamic document assembly based on specification data.
- DESCRIPTION:
-
Formal definition: — a pair of view type and parameter string.
Syntax:
`TypeRef:[ViewParam]`Full specification: See the CommonSpec Language Specification for view types, rendering, and examples.
2 Functional Requirements
With the data model established, the following sections define the functional requirements for SpecCompiler Core. Requirements are organized into System Features (SF), each covering a distinct functional domain. Every SF is decomposed into <High-Level Requirement>s that state what the system shall do.
2.1 Pipeline Requirements
SF-001: Pipeline Execution
Five-phase document processing lifecycle with <Handler> orchestration and <Topological Sort> ordering.
- DESCRIPTION:
- Groups requirements for the core <Pipeline> that drives document processing through <INITIALIZE Phase> , <RESOLVE Phase> , <TRANSFORM Phase> , <ANALYZE Phase> , <EMIT Phase> phases with declarative handler dependencies.
- RATIONALE:
- A structured processing pipeline enables separation of concerns, validation gates, and deterministic handler ordering.
HLR-PIPE-001: Five-Phase Lifecycle
The pipeline shall execute handlers in a five-phase lifecycle: INITIALIZE, RESOLVE, TRANSFORM, ANALYZE, EMIT.
- DESCRIPTION:
-
Each phase serves a distinct purpose in document processing:
- INITIALIZE: Parse document AST and populate database with specifications, spec_objects, floats, relations, views, and attributes
- RESOLVE: Resolve relations between objects (link target resolution, type inference)
- TRANSFORM: Pre-compute views, render external content (PlantUML, charts), prepare for output
- ANALYZE: Run analyze queries to validate data integrity, type constraints, cardinality rules
- EMIT: Assemble final documents and write to output formats (docx, html5, markdown, json)
- RATIONALE:
- Separation of concerns enables validation between phases, allows early abort on errors, and supports format-agnostic processing until the final output stage.
- STATUS:
- Approved
HLR-PIPE-002: Handler Registration and Prerequisites
The pipeline shall support handler registration with declarative <Prerequisites> for dependency ordering.
- DESCRIPTION:
-
Handlers register via
register_handler(handler)with required fields:name: Unique string identifier for the handlerprerequisites: Array of handler names that must execute before this handler
Handlers declare participation in phases via hook methods (
on_initialize,on_analyze,on_verify,on_transform,on_emit). Duplicate handler names cause registration error. - RATIONALE:
- Declarative prerequisites decouple handler ordering from registration order, enabling modular handler development and preventing implicit ordering dependencies.
- STATUS:
- Approved
HLR-PIPE-003: Topological Ordering via Kahn’s Algorithm
The pipeline shall order handlers within each phase using topological sort with Kahn’s algorithm.
- DESCRIPTION:
-
For each phase, the pipeline:
- Identifies handlers participating in the phase (those with
on_{phase}hooks) - Builds dependency graph from prerequisites (only for participating handlers)
- Executes Kahn’s algorithm to produce execution order
- Sorts alphabetically at each level for deterministic output
- Detects and reports circular dependencies with error listing remaining nodes
- RATIONALE:
- Kahn’s algorithm provides O(V+E) complexity, clear cycle detection, and deterministic ordering through alphabetic tie-breaking.
- STATUS:
- Approved
HLR-PIPE-004: Phase Abort on ANALYZE Errors
The pipeline shall abort execution after ANALYZE phase if any errors are recorded.
- DESCRIPTION:
-
After running ANALYZE phase, the pipeline checks
diagnostics:has_errors(). If true, execution halts before EMIT phase, with TRANSFORM already completed. Error message is logged with error count. This prevents generating invalid output from documents with specification violations. - RATIONALE:
- Early abort on verification failures saves computation and prevents distribution of invalid specification documents. Errors in ANALYZE indicate data integrity issues that would produce incorrect outputs.
- STATUS:
- Approved
HLR-PIPE-005: Batch Dispatch for All Phases
The pipeline shall use a single batch dispatch model for all phases where handlers receive all contexts at once.
- DESCRIPTION:
-
All handlers implement
on_{phase}(data, contexts, diagnostics)hooks that receive the full contexts array. The pipeline orchestrator calls each handler’s hook once per phase viarun_phase(), passing all document contexts. Handlers are responsible for iterating over contexts internally.This enables cross-document optimizations, transaction batching, and parallel processing within any phase.
- RATIONALE:
- A uniform dispatch model simplifies the pipeline engine, eliminates the dual-path batch/per-doc dispatch, and allows handlers in any phase to optimize across all documents (e.g., wrapping DB operations in a single transaction, parallel output generation in EMIT).
- STATUS:
- Approved
HLR-PIPE-006: Context Creation and Propagation
The pipeline shall create and propagate context objects containing document metadata and configuration through all phases.
- DESCRIPTION:
-
The
execute(docs)method creates context objects for each input document with:doc: Pandoc document AST (via DocumentWalker)spec_id: Specification identifier derived from filenameconfig: Preset configuration (styles, captions, validation)build_dir: Output directory pathoutput_format: Target format (docx, html5, etc.)template: Template name for model loadingreference_doc: Path to reference.docx for stylingdocx,html5: Format-specific configurationoutputs: Array of {format, path} for multi-format outputbibliography,csl: Citation configurationproject_root: Root directory for resolving relative paths
Context flows through all phases, enriched by handlers (e.g., verification results in ANALYZE phase).
- RATIONALE:
- Unified context object provides handlers with consistent access to document metadata and build configuration without global state, enabling testable and isolated handler implementations.
- STATUS:
- Approved
HLR-PIPE-007: CommonSpec Input Parsing
The system shall parse <CommonSpec> documents during the <INITIALIZE Phase> phase, lowering Markdown annotations into <Intermediate Representation> content tables.
- DESCRIPTION:
-
The INITIALIZE phase <Handler>s parse the Pandoc <Abstract Syntax Tree> and populate the six IR content tables according to these rules:
- H2-H6 headers register as <Spec Object> records with type inference (explicit
TYPE:prefix, implicit alias lookup, or default type fallback) - Blockquote lines (
> key: value) register as <Attribute> records attached to the enclosing spec object - Fenced code blocks with
TypeRef:Labelclass register as <Spec Float> records - Inline code with
TypeRef: contentsyntax registers as <Spec View> records
Each handler populates its content table with content-addressable identifiers (SHA1) and preserves document ordering via
file_seq. - RATIONALE:
- Formal parsing rules ensure deterministic lowering from CommonSpec to SpecIR, enabling round-trip fidelity and predictable behavior across document structures.
- STATUS:
- Approved
HLR-PIPE-008: Include File Expansion
When a document contains .include code blocks, the system shall
expand them by embedding the referenced file content before <Pipeline>
processing.
- DESCRIPTION:
-
Include expansion runs before the five-phase pipeline on each source document:
- Fenced code blocks with class
.includeare identified - Each line in the block is treated as a relative file path
- Paths are resolved relative to the including file’s directory
- Referenced files are read, parsed, and recursively expanded
- The include block is replaced with the parsed content blocks
Cycle detection prevents infinite recursion. Maximum include depth is bounded. Source position tracking attributes are injected for diagnostic reporting.
- RATIONALE:
- Include expansion enables modular document authoring where specifications are composed from reusable fragments. Pre-pipeline expansion ensures all downstream handlers see a complete, flattened document.
- STATUS:
- Approved
HLR-PIPE-009: PID Auto-Generation
When a spec object does not have an explicit @PID, the system shall auto-generate a
<Project
Identifier> during the <RESOLVE Phase> phase based on the
object’s type definition.
- DESCRIPTION:
-
The PID generator runs in the RESOLVE phase before relation resolution:
- Non-<Composite Object Type> objects: PIDs are generated using the type’s
pid_prefixandpid_format(e.g.,HLR-%03dproduces “HLR-001”), starting from the next available sequence number - <Composite Object Type> objects: Hierarchical PIDs are qualified by the specification PID (e.g., “SRS-sec1.2.3”)
Auto-generated PIDs never overwrite explicit
@PIDannotations. Collision detection ensures global uniqueness across all specifications. - RATIONALE:
- Auto-generation reduces authoring burden while maintaining stable identifiers for traceability.
- STATUS:
- Approved
HLR-PIPE-010: Relation Type Inference
The system shall infer relation types during the <RESOLVE Phase> phase using constraint-based matching with <Specificity Scoring> scoring.
- DESCRIPTION:
-
For each unresolved relation, the relation analyzer:
- Filter: Identifies candidate relation types whose constraints are compatible with the relation’s <Relation Selector>, source attribute, source type, and target type
- Resolve: Calls the resolver (determined by the type’s extends chain root) to find the target object
- Score: Counts matching non-NULL constraints across all four dimensions; NULL constraints act as wildcards (match anything but do not increase specificity)
- Pick: The highest specificity match wins; ties mark the relation as ambiguous
Same-specification targets are preferred over cross-specification targets. The relation’s
target_refandtype_refare updated in the database. - RATIONALE:
- Type inference from constraints eliminates explicit relation type annotation in source documents, reducing authoring burden. Specificity scoring ensures the most specific matching type is selected, enabling both generic and specialized relation types to coexist.
- STATUS:
- Approved
HLR-PIPE-011: Prerequisite-Not-Found Diagnostic
The system shall distinguish a handler prerequisite that resolves to another phase from one that resolves to no registered handler at all, emitting a diagnostic only for the latter.
- DESCRIPTION:
-
The per-phase topological sort deliberately drops a prerequisite that
does not participate in the current phase (handlers cannot be ordered
across phases).
Pipeline:validate_prerequisites(), run once when all handlers are registered, distinguishes the two cases the filter conflates: a prerequisite registered in ANOTHER phase (legitimate, silent) versus one registered in NO phase (a typo/bug). It emits aprerequisite_not_founddiagnostic only for the latter, and only for phase handlers (those declaring anon_<phase>hook) – a decorated per-item callback’sprerequisitesfield is inert and not flagged. The cross-phase filter itself is unchanged. - RATIONALE:
- An unresolved same-phase prerequisite can change handler order and corrupt output. The pipeline reports this error without rejecting valid cross-phase prerequisites.
- STATUS:
- Approved
HLR-PIPE-012: Section Scope Termination
A <Spec
Object>’s scope shall be closed either automatically by the next
header of equal-or-shallower level, or manually by a ---- thematic break, and a heading
shall not be empty.
- DESCRIPTION:
-
During INITIALIZE, the first
----thematic break ends the active section scope. The marker does not appear in rendered output. Later content keeps its document position and belongs to the parent section.An empty heading (a header whose title is blank) is rejected: it would otherwise render as an empty numbered heading and corrupt downstream numbering. The
object_broken_hierarchyanalyze query reports it as an error and directs the author to use----instead. - RATIONALE:
- The marker closes a section without adding a rendered heading. Rejection of empty headings prevents invalid numbered sections.
- STATUS:
- Approved
2.2 Storage Requirements
SF-002: Specification Persistence
<SQLite Database>-based storage with incremental build support and output caching.
- DESCRIPTION:
- Groups requirements for the persistence layer including ACID-compliant storage, <EAV Model> attribute model, <Build Cache> , <Output Cache> , and incremental rebuild support.
- RATIONALE:
- Reliable persistence with change detection enables efficient rebuilds for large specification projects.
HLR-STOR-001: SQLite Persistence
The system shall persist all specification data to SQLite database with ACID guarantees.
- DESCRIPTION:
- All specifications, spec_objects, floats, relations, views, and attribute values stored in SQLite database. Database operations wrapped in transactions to ensure atomicity, consistency, isolation, and durability.
- RATIONALE:
- SQLite provides a reliable, single-file persistence layer suitable for specification documents. ACID guarantees prevent data corruption during concurrent access or system failures.
- STATUS:
- Approved
HLR-STOR-002: EAV Attribute Model
The system shall store spec object attributes using Entity-Attribute-Value pattern.
- DESCRIPTION:
- Attribute values stored in attribute_values table with polymorphic typed columns (string_value, int_value, real_value, bool_value, date_value, enum_ref). Each attribute record links to owner object via owner_ref and stores datatype for proper retrieval.
- RATIONALE:
- EAV pattern enables flexible attribute schemas without database migrations. Different spec object types (HLR, LLR, VC) have different attributes that can evolve independently.
- STATUS:
- Approved
HLR-STOR-003: Build Cache
The system shall maintain a build cache for document hash tracking.
- DESCRIPTION:
- Source file hashes stored as build_graph nodes (root_path, node_path, node_sha1), where the root document is recorded as its own node. Build cache module provides is_document_dirty() to check if document content has changed since last build. Hash comparison enables change detection.
- RATIONALE:
- Hash-based change detection allows the build system to skip unchanged documents, reducing rebuild times for large specification sets.
- STATUS:
- Approved
HLR-STOR-004: Output Cache
The system shall cache output generation state with P-IR hash and timestamps.
- DESCRIPTION:
- Output cache stored in output_cache table (spec_id, output_path, pir_hash, generated_at). P-IR (Processed Intermediate Representation) hash captures complete specification state. is_output_current() checks if output file exists and P-IR hash matches cached value.
- RATIONALE:
- Output caching avoids regenerating unchanged outputs (docx, html5). P-IR hash ensures output is regenerated when any upstream data changes, not just source file changes.
- STATUS:
- Approved
HLR-STOR-006: EAV Pivot Views for External Queries
The system shall generate per-object-type SQL views that pivot the EAV attribute model into typed columns for external BI queries.
- DESCRIPTION:
-
For each non-composite spec_object_type, a view named
view_{type_lower}_objectsis dynamically generated (e.g.,view_hlr_objects,view_vc_objects). Each view flattens the EAV join into one row per object with typed attribute columns, enabling queries likeSELECT * FROM view_hlr_objects WHERE status = 'approved'. These views are NOT used by internal pipeline queries — all internal code queries the raw EAV tables directly because it needs access to raw_value, datatype, ast, enum_ref, and other columns that the pivot views abstract away. Internal queries also frequently operate cross-type or need COUNT/EXISTS checks that the MAX()-based pivot cannot provide. - RATIONALE:
- External BI tools, ad-hoc SQL queries, and custom model scripts benefit from a flat relational interface over the EAV model. Generating views at runtime from the type system ensures the columns always match the current model configuration without manual maintenance.
- STATUS:
- Approved
HLR-STOR-005: Incremental Rebuild Support
The system shall support incremental rebuilds via build graph tracking.
- DESCRIPTION:
- Build graph stored in build_graph table (root_path, node_path, node_sha1). Records the root document and its include file dependencies as nodes. is_document_dirty() checks the root document and all includes in one node walk. update_build_graph() refreshes the file set after successful build.
- RATIONALE:
- Specification documents often include sub-files. Incremental builds must detect changes in any included file to trigger rebuild of parent document. Build graph captures this dependency structure.
- STATUS:
- Approved
2.3 Types Domain Requirements
SF-003: Type System
Dynamic type system providing typed containers for <Specification>, <Spec Object>, <Spec Float>, <Spec View>, <Spec Relation>, and <Attribute>.
- DESCRIPTION:
- Groups requirements for the six core containers that store parsed specification data plus the verification-view validation framework.
- RATIONALE:
- A typed container model enables schema validation, type-specific rendering, and data integrity checking through SQL analyze queries.
HLR-TYPE-001: Specifications Container
The type system shall provide a specifications container for registering document-level specification records.
- DESCRIPTION:
-
The
specificationstable stores metadata for each specification document parsed during <INITIALIZE Phase> phase:identifier: Unique specification ID derived from filename (e.g., “srs-main”)root_path: Source file path for the specificationlong_name: Human-readable title extracted from L1 headertype_ref: Specification type (validated againstspec_specification_types)pid: Optional PID from @PID syntax in L1 header
L1 headers register as specifications. Type validation checks
spec_specification_typestable. Invalid types fall back to default or emit warning. - RATIONALE:
- Specifications represent the top-level organizational unit for document hierarchies. Storing specification metadata enables cross-document linking and multi-document project support.
- STATUS:
- Approved
HLR-TYPE-002: Spec Objects Container
The type system shall provide a spec_objects container for hierarchical specification objects.
- DESCRIPTION:
-
The
spec_objectstable stores structured specification items extracted from L2+ headers:identifier: SHA1 hash of source path + line + title (content-addressable)specification_ref: Foreign key to parent specificationtype_ref: Object type (validated againstspec_object_types)from_file: Source file pathfile_seq: Document order sequence numberpid: Project ID from @PID syntax (e.g., “REQ-001”)title_text: Header text without type prefix or PIDlabel: Unified label for cross-referencing (format:{type_lower}:{title_slug})level: Header level (2-6)start_line,end_line: Source line rangeast: Serialized Pandoc AST (JSON) for section content
Type resolution order: explicit TYPE: prefix, implicit alias lookup, default type fallback.
- RATIONALE:
- Content-addressable identifiers enable change detection for incremental builds. PID-based anchors provide stable cross-references independent of title changes.
- STATUS:
- Approved
HLR-TYPE-003: Spec Floats Container
The type system shall provide a spec_floats container for numbered floating content (figures, tables, listings).
- DESCRIPTION:
-
The
spec_floatstable stores content blocks that receive sequential numbering:identifier: Short format “float-{8-char-sha1}” for DOCX compatibilityspecification_ref: Foreign key to parent specificationtype_ref: Float type resolved from aliases (e.g., “csv” -> “TABLE”, “puml” -> “FIGURE”)from_file: Source file pathfile_seq: Document order for numberinglabel: User-provided label for cross-referencingnumber: Sequential number within counter_group (assigned in <TRANSFORM Phase>)caption: Caption text from attributesraw_content: Original code block textraw_ast: Serialized Pandoc CodeBlock (JSON)parent_object_ref: Foreign key to containing spec_objectattributes: JSON-serialized attributes (caption, source, language)syntax_key: Original class syntax for backend matching
<Counter Group> share numbering (e.g., FIGURE, CHART, PLANTUML all increment “FIGURE” counter).
- RATIONALE:
-
Type aliasing supports user-friendly syntax (e.g.,
csv:datainstead ofTABLE:data). Counter groups enable semantic grouping of related float types under a single numbering sequence. - STATUS:
- Approved
HLR-TYPE-004: Spec Views Container
The type system shall provide a spec_views container for data-driven view definitions.
- DESCRIPTION:
-
The
spec_viewstable stores view definitions from inline view syntax (views are inline-only; a view alone in its own paragraph is transparently promoted to block output at EMIT):identifier: SHA1 hash of specification + sequence + contentspecification_ref: Foreign key to parent specificationview_type_ref: Uppercase view type (e.g., “TOC”, “SYMBOL”, “MATH”, “ABBREV”)from_file: Source file pathfile_seq: Document order sequence numberraw_ast: View definition content (symbol path, expression, parameters)
View types with
needs_external_render = 1inspec_view_typesare delegated to specialized renderers. Inline views useprefix: contentsyntax (e.g.,symbol: Class.method). The content may carrykey=valueparameters (e.g., [TOC],allocation_matrix: status=complete); the EMIT dispatcher parses the prefix, content, and parameters once and passes them to the view’s render hooks (ctx.subject.prefix/content/params). - RATIONALE:
- Separating view definitions from rendering enables format-agnostic processing. External render delegation supports complex transformations (PlantUML, charts) without core handler changes.
- STATUS:
- Approved
HLR-TYPE-005: Spec Relations Container
The type system shall provide a spec_relations container for tracking links between specification elements.
- DESCRIPTION:
-
The
spec_relationstable stores inter-element references:identifier: SHA1 hash of specification + target + type + parentspecification_ref: Foreign key to parent specificationsource_ref: Foreign key to source spec_objecttarget_text: Raw link target from syntax (e.g., “REQ-001”, “fig:diagram”)target_ref: Resolved target identifier (populated in <RESOLVE Phase> phase)type_ref: Relation type fromspec_relation_types(e.g., “TRACES”, “XREF_FIGURE”)from_file: Source file path
Link syntax:
[PID](@)for PID references,[type:label](#)for float references,[@citation]for bibliographic citations. Default relation types are determined byis_defaultandlink_selectorcolumns inspec_relation_types. - RATIONALE:
- Deferred resolution (target_text -> target_ref) enables forward references and cross-document linking. Type inference from source/target context reduces explicit markup requirements.
- STATUS:
- Approved
HLR-TYPE-006: Spec Attributes Container
The type system shall provide a spec_attributes container for structured metadata on specification objects.
- DESCRIPTION:
-
The
spec_attributestable stores typed attribute values extracted from blockquote syntax:identifier: SHA1 hash of specification + owner + name + valuespecification_ref: Foreign key to parent specificationowner_ref: Foreign key to owning spec_objectname: Attribute name (field name without colon)raw_value: Original string valuestring_value,int_value,real_value,bool_value,date_value: Type-specific columnsenum_ref: Foreign key toenum_valuesfor ENUM typesast: JSON-serialized Pandoc AST for rich content (XHTML type)datatype: Resolved datatype fromspec_attribute_types
Attribute syntax:
> name: valuein blockquotes following headers. Datatypes include STRING, INTEGER, REAL, BOOLEAN, DATE, ENUM, XHTML. Multi-line attributes use continuation blocks. - RATIONALE:
- Multi-column typed storage enables SQL queries with type-appropriate comparisons. Storing original AST preserves formatting for XHTML attributes with links, emphasis, or lists.
- STATUS:
- Approved
HLR-TYPE-007: Type Validation
The type system shall provide analyze queries that detect data integrity violations across all specification containers.
The type system described above is not fixed at compile time. The following section defines how dic:model directories extend it with custom object types, float renderers, dic:data-view generators, and style presets.
- DESCRIPTION:
-
Verification views are SQL queries registered in the <ANALYZE Phase> phase that check for constraint violations:
- Specification-level (missing required attributes, invalid types)
- Object-level (missing required, cardinality, cast failures, invalid enum/date, bounds)
- Float-level (orphans, duplicate labels, render failures, invalid types)
- Relation-level (unresolved, dangling, ambiguous)
The validation policy (configurable in project.yaml) determines severity: error, warn, or ignore.
- RATIONALE:
- Automated validation enables early detection of specification errors before document generation. Configurable severity allows projects to gradually enforce stricter quality standards.
- STATUS:
- Approved
2.4 Extension Requirements
SF-005: Extension Framework
The extension framework shall let models define types, rendering behavior, data views, verification queries, and output processing.
- DESCRIPTION:
- A model contains descriptor modules and optional format-specific components. The host loads each model without type-specific control flow.
- RATIONALE:
- Model extensions support domain-specific documents without changes to the core pipeline.
HLR-EXT-001: Type Descriptor Loading
The system shall load type descriptors from model directories.
- DESCRIPTION:
-
The host scans these directories under
models/{model}/types/:objects/forkind = "object"specifications/forkind = "specification"floats/forkind = "float"views/forkind = "view"relations/forkind = "relation"
Each Lua module returns one descriptor table. The host uses
schema.idas the type identifier. The file name does not define the identifier. - RATIONALE:
- One loading contract gives all type categories the same validation and registration behavior.
- STATUS:
- Approved
HLR-EXT-002: Model Directory Structure
The system shall use a standard model directory structure.
- DESCRIPTION:
-
A model can contain the following paths:
models/{model}/ model.yaml types/ objects/ specifications/ floats/ views/ relations/ analyze_queries/ filters/ postprocessors/ styles/ tools/Only the directories required by the model must exist. A type directory can contain a Lua file or a subdirectory with
init.lua. - RATIONALE:
- A standard structure permits deterministic discovery and keeps model-owned components together.
- STATUS:
- Approved
HLR-EXT-003: Descriptor Registration
Each extension module shall return one descriptor with kind, schema, and optional hooks fields.
- DESCRIPTION:
-
The host shall reject an unknown kind, a missing
schema.id, an invalid hook, and behavior outsidehooks. The host shall register schema data and index each behavior hook. - RATIONALE:
- A uniform descriptor removes category-specific registration interfaces.
- STATUS:
- Approved
HLR-EXT-004: Type Schema
Each descriptor shall declare the schema fields required by its kind.
- DESCRIPTION:
-
The host shall store schema data in the applicable SpecIR type tables.
Object and float schemas can declare attribute definitions. A schema can
use
extendsto inherit attributes and hooks. - RATIONALE:
- Declarative schemas support registration, validation, and inheritance without procedural setup.
- STATUS:
- Approved
HLR-EXT-005: Model Resolution and Overlay
The system shall resolve and load models as ordered overlays.
- DESCRIPTION:
-
The host shall search
$SPECCOMPILER_HOME/models/{model}first. It shall then searchmodels/{model}under the working directory. The host shall loaddefaultbefore the selected model. A later descriptor with the samekindandschema.idshall replace the earlier descriptor. A missing selected or required model shall stop the build. - RATIONALE:
- Ordered overlays let a model replace selected definitions and inherit all other default definitions.
- STATUS:
- Approved
HLR-EXT-006: External Renderer Hooks
An externally rendered float shall declare task preparation and result handling in its descriptor.
- DESCRIPTION:
-
The descriptor shall set
schema.needs_external_render = true. Itshookstable shall provideprepare_taskandhandle_result. The core shall prepare tasks, apply the render cache, run tasks, and dispatch results. A float shall not declare bothrenderand external-render hooks. - RATIONALE:
- The hook pair separates type-specific rendering from process scheduling and cache control.
- STATUS:
- Approved
HLR-EXT-007: Data View Hooks
The system shall obtain generated data from hooks on view descriptors.
- DESCRIPTION:
-
A view can declare a
datasethook for chart data. ATABLE_VIEWsubtype shall provide an inherited or localbuild_blockhook. The host shall mapinline_prefixandaliasesto view identifiers. - RATIONALE:
- Data hooks keep query logic in the model that defines the view.
- STATUS:
- Approved
HLR-EXT-008: Hook Index
The host shall index registered behavior hooks by kind, type identifier, and hook name.
- DESCRIPTION:
-
Consumers shall resolve hooks through the host index. Inherited lookup
shall follow the
schema.extendschain. Phase hooks shall use pipeline registration and shall not use the behavior-hook index. - RATIONALE:
- One hook index provides deterministic dispatch for all model types.
- STATUS:
- Approved
HLR-EXT-009: Canonical Hook Context
The host shall pass each behavior hook one frozen context table.
- DESCRIPTION:
-
The context shall contain the fields for its tier. The
subjectfield shall contain the hook-specific input. Thecapabilityfield shall identify the hook. Thectx:require(field)method shall stop execution when a required field is nil. - RATIONALE:
- One context argument prevents positional-argument drift and makes required data explicit.
- STATUS:
- Approved
HLR-EXT-010: Model Manifest
The host shall read model dependencies from model.yaml.
- DESCRIPTION:
-
The optional
requiresfield shall contain model names. The host shall load each required model before the requesting model. It shall load each model at most once. A missing manifest orrequiresfield shall define no dependencies. - RATIONALE:
- Explicit dependencies produce a deterministic overlay order.
- STATUS:
- Approved
HLR-EXT-011: Hook Validation and Phase Registration
The host shall validate hooks and register phase participation from the descriptor.
- DESCRIPTION:
-
A hook name shall be valid for the descriptor kind. A hook shall return
the value type defined by its contract. A phase hook shall use the name
on_<phase>inhooks. The host shall register phase hooks under<lowercase schema.id>_handler. The optionalschema.phase_prerequisitesfield shall define handler ordering. - RATIONALE:
- Load-time and dispatch-time checks detect invalid extensions at their source.
- STATUS:
- Approved
HLR-EXT-012: Analyze Query Descriptor
The system shall register each analysis query as a kind = "analyze" descriptor.
- DESCRIPTION:
-
The schema shall contain
id,policy_key,view,sql, and optionaldisabled. The optionalmessagehook shall format a diagnostic for one query row. A later descriptor with the samepolicy_keyshall replace the earlier descriptor in place. A descriptor withdisabled = trueshall remove that policy key. - RATIONALE:
- Analyze queries use the same descriptor validation and model overlay rules as other extensions.
- STATUS:
- Approved
HLR-CFG-001: Manifest Configuration
The system shall read build configuration from project.yaml.
- DESCRIPTION:
- Environment variables can locate the installed toolchain and support terminal detection. Model behavior and output configuration shall use the frozen project configuration.
- RATIONALE:
- One configuration source makes builds reproducible.
- STATUS:
- Approved
2.5 Output Requirements
SF-004: Multi-Format Publication
Assembles transformed content and publishes DOCX/HTML5 outputs with cache-aware emission.
- DESCRIPTION:
- Single-source, multi-target publication. Groups requirements for document assembly, float resolution/numbering, and format-specific output generation.
- RATIONALE:
- Technical documentation must be publishable in multiple formats from a single Markdown source.
HLR-OUT-001: Document Assembly
The system shall reconstruct a complete Pandoc document from <Intermediate Representation> database content for each specification, preserving document order and embedding all resolved content.
- DESCRIPTION:
-
During the <EMIT Phase> phase, the assembler queries
spec_objectsordered byfile_seq, decodes stored JSON <Abstract Syntax Tree> fragments back to Pandoc blocks, adjusts header levels for cross-file includes, and embeds:- Specification title: From
specifications.header_ast, wrapped in a title Div - Spec objects: All objects belonging to the specification, in
file_seqorder, with their rendered body AST - Spec floats: Placeholder CodeBlocks for floats at their document positions (resolved later by the float emitter)
- Spec views: Placeholder CodeBlocks for views at their document positions (expanded later by the view emitter)
The assembled document includes Pandoc metadata built from specification attributes (title, author, date). The result is a valid
pandoc.Pandocdocument suitable for format-specific output.Header-level adjustment rescales the shallowest header level to the top output level uniformly; it therefore assumes the source header levels form a well-formed tree (contiguous nesting, a single root depth). That precondition is enforced declaratively by the
object_broken_hierarchyanalyze query, which rejects skipped levels and orphaned roots before emission rather than letting a malformed hierarchy mis-render silently. - RATIONALE:
- Decoupling parsing from rendering enables format-agnostic processing through the pipeline. Database-backed assembly allows cross-document operations (shared numbering, cross-references) that sequential file processing cannot achieve.
- STATUS:
- Approved
HLR-OUT-002: Float Resolution
The system shall replace <Float> placeholder blocks in the assembled document with their rendered content, using results from the <TRANSFORM Phase> phase.
- DESCRIPTION:
-
After document assembly, the float emitter walks all blocks and replaces CodeBlock placeholders (identified by float labels) with rendered Div elements containing:
- Rendered content: The
resolved_astfromspec_floats(SVG images for PlantUML, parsed tables for CSV, chart images for ECharts) - Caption: A formatted caption with type prefix and sequential number (e.g., “Figure 1 – Diagram Title”)
- Semantic classes: CSS classes (
speccompiler-float,speccompiler-caption, type-specific class) for format-specific styling - Bookmark anchor: An identifier anchor for cross-reference navigation
Floats whose
resolved_astis NULL (failed external renders) are preserved as error placeholders. - RATIONALE:
- Separating float resolution from assembly enables parallel external rendering during TRANSFORM while maintaining correct document insertion order during EMIT.
- STATUS:
- Approved
HLR-OUT-003: Float Numbering
The system shall assign sequential numbers to <Float>s within their <Counter Group>, producing a single numbering sequence across all documents in the project.
- DESCRIPTION:
-
During the <TRANSFORM Phase> phase, the float numberer:
- Queries all floats across all specifications, ordered by
file_seq - Groups floats by their
counter_group(e.g., FIGURE, TABLE, LISTING, EQUATION) - Assigns monotonically increasing numbers within each group (starting at 1)
- Float types sharing a counter_group share the same sequence (e.g., FIGURE, CHART, and PLANTUML all increment the “FIGURE” counter)
The assigned numbers are stored in
spec_floats.numberand used for caption formatting and cross-reference display text. - RATIONALE:
- Consistent cross-document numbering prevents duplicate figure/table numbers and enables stable cross-references. Counter group sharing allows semantically related types (all visual content) to form natural sequences.
- STATUS:
- Approved
HLR-OUT-004: Multi-Format Output
The system shall generate output documents in all formats specified by the project configuration, skipping outputs whose <Processed Intermediate Representation> hash matches the cached value.
- DESCRIPTION:
-
The emitter orchestrator iterates over
config.outputs(an array of{format, path}pairs) and for each specification:- Serializes the assembled Pandoc document to an intermediate JSON file
- Checks the output cache (
is_output_current()) and skips generation when the P-IR hash matches - Applies format-specific Pandoc Lua filters (e.g.,
docx.lua,html.luafrom the model’sfilters/directory) - Invokes Pandoc for format conversion
- Runs format-specific postprocessors after Pandoc generation completes
- Cleans up intermediate JSON files
Supported output formats: DOCX, HTML5, Markdown, JSON. Multiple formats can be generated from a single pipeline execution.
- RATIONALE:
- Single-source multi-target publication eliminates content duplication. Cache-aware skipping avoids regenerating unchanged outputs, reducing build times for large specification projects.
- STATUS:
- Approved
HLR-OUT-005: DOCX Generation
The system shall generate DOCX output with style customization via preset-based reference document generation and OOXML post-processing.
- DESCRIPTION:
-
DOCX output generation follows this sequence:
- Preset loading: Loads style preset definitions from
models/{model}/styles/presets/with extends-chain merging and circular dependency detection - Reference document generation: Generates a
reference.docxfrom the resolved preset containing custom Word styles (headings, captions, code blocks, table styles) - Pandoc conversion: Invokes Pandoc with
--reference-docpointing to the generated reference and format-specific Lua filters - OOXML post-processing: Modifies the DOCX archive to apply style fixups, numbering definitions, and structural corrections that Pandoc cannot produce natively
The reference document is cached and regenerated only when the preset hash changes.
- RATIONALE:
- Preset-based styling enables consistent corporate branding without manual Word template editing. OOXML post-processing addresses Pandoc limitations for advanced Word formatting requirements.
- STATUS:
- Approved
HLR-OUT-006: HTML5 Generation
The system shall generate standalone HTML5 output with table of contents, section numbering, and embedded resources when configured.
- DESCRIPTION:
-
HTML5 output generation follows this sequence:
- Pandoc conversion: Invokes Pandoc with HTML5-specific options from project configuration (
number_sections,table_of_contents,toc_depth,standalone,embed_resources) - Resource embedding: When
embed_resourcesis enabled, all CSS, JavaScript, and image assets are embedded inline for single-file distribution - Search index: When <Full-Text Search> tables are populated, the HTML5 postprocessor bundles the search index for client-side full-text search
- Internal links: Cross-reference
(@)links resolve to#anchorURLs for in-page navigation
Configuration is specified in the
html5:section ofproject.yaml. - RATIONALE:
- Standalone HTML5 with embedded resources enables documentation distribution without web server infrastructure. FTS integration provides search capability for large specification sets.
- STATUS:
- Approved
HLR-OUT-007: Full-Text Search Indexing
The system shall populate dic:full-text-search virtual tables during the dic:emit-phase phase to enable full-text search across specification content.
Once documents are assembled and published, the system must also guarantee that its builds are reproducible and its processing is auditable. The following section addresses these integrity concerns.
- DESCRIPTION:
-
The FTS indexer creates and populates three FTS5 virtual tables with Porter stemming:
fts_objects: Indexes spec object titles and body text, keyed by identifier and spec_idfts_attributes: Indexes attribute names and string values, keyed by owner_ref and spec_idfts_floats: Indexes float captions and raw source content, keyed by identifier and spec_id
<Abstract Syntax Tree> content is converted to plain text before indexing.
- RATIONALE:
- Full-text search enables users to find specification content across large document sets. FTS5 with Porter stemming provides standard information retrieval capabilities suitable for technical documentation.
- STATUS:
- Approved
2.6 Audit & Integrity Requirements
SF-006: Audit and Integrity
Deterministic compilation, reproducible builds, and audit trail integrity.
- DESCRIPTION:
- Encompasses content-addressed hashing for incremental build detection, structured <Newline-Delimited JSON> logging for audit trails, include dependency tracking for proper cache invalidation, and structured diagnostic reporting for error traceability.
- RATIONALE:
- Certification environments require reproducible builds and auditable processing trails for traceability evidence.
HLR-AUDIT-001: Content-Addressed Hashing
The system shall compute SHA1 content hashes for all source documents and include files to enable change detection.
- DESCRIPTION:
-
The build engine computes SHA1 hashes for each document. Hashes are compared against the cached values recorded as
build_graphnodes (the root document is its own node, alongside its includes):- Every node of the document’s build graph is compared against its current file hash
- If all hashes match, the document is skipped (cached <Intermediate Representation> state is reused)
- If any hash differs, a node file is missing, or no root node is recorded, the document is rebuilt from source
- After successful rebuild (no <ANALYZE Phase> errors), the
build_graphnodes are rewritten with current hashes
This provides O(1) change detection without parsing unchanged documents.
- RATIONALE:
- Content-addressed hashing provides reliable change detection independent of filesystem timestamps. Deferred hash updates prevent cache poisoning from partial or failed builds.
- STATUS:
- Approved
HLR-AUDIT-002: Include Dependency Tracking
When a document contains include directives, the system shall track all included file dependencies in a build graph and detect circular includes.
- DESCRIPTION:
-
Before <Pipeline> execution, the include handler expands
.includecode blocks by:- Resolving include paths relative to the source file directory
- Detecting circular includes via a processed-file set (raises error on cycle)
- Recursively expanding nested includes up to a bounded maximum depth
- Recording all include paths and their SHA1 hashes in the
build_graphtable (root_path,node_path,node_sha1)
Subsequent builds use this graph to check if any included file has changed, triggering a rebuild of the root document when needed.
- RATIONALE:
- Include dependency tracking ensures that changes to sub-files correctly invalidate parent documents. Cycle detection prevents infinite recursion in include hierarchies.
- STATUS:
- Approved
HLR-AUDIT-003: Structured Diagnostic Reporting
The system shall collect and report processing errors and warnings with source location information throughout all pipeline phases.
- DESCRIPTION:
-
The diagnostics collector provides structured error/warning reporting:
- Collection: <Handler>s report issues via
diagnostics:error(file, line, code, msg)anddiagnostics:warn(file, line, code, msg) - Structured data: Each diagnostic record contains file path, line number, diagnostic key, and human-readable message
- Severity control: The
has_errors()method enables the <Pipeline> to determine abort conditions after the <ANALYZE Phase> phase - Output integration: Diagnostics are emitted through the structured logger with file and line context
Diagnostic keys are stable identifiers (e.g.,
invalid_enum,missing_required,dangling_relation) suitable for filtering and CI policy. - RATIONALE:
- Structured diagnostics with source locations enable IDE integration, CI/CD reporting, and user-friendly error resolution. Machine-parseable diagnostic keys enable automated error classification.
- STATUS:
- Approved
HLR-AUDIT-004: Structured Logging
The system shall provide <Newline-Delimited JSON> structured logging with TTY-aware output formatting.
- DESCRIPTION:
-
The logging subsystem supports two output modes selected automatically or via configuration:
- NDJSON mode (non-TTY): Outputs one JSON object per line with fields:
level,message,timestamp, and optional context. Suitable for CI/CD log aggregation andjqfiltering - Console mode (TTY): Outputs human-readable formatted messages with ANSI color coding (respects
NO_COLORenvironment variable). Includes timestamp and level indicator
Log levels: DEBUG, INFO, WARN, ERROR. Configured via
config.logging.levelwith environment overrideSPECCOMPILER_LOG_LEVEL. - RATIONALE:
- NDJSON enables machine-parseable audit trails for certification environments. TTY-aware formatting provides developer ergonomics during interactive use. The NO_COLOR standard ensures accessibility compliance.
- STATUS:
- Approved
HLR-AUDIT-005: Build Reproducibility
Given identical source files, project configuration, and tool versions, the system shall produce identical outputs.
The glossary below defines the domain vocabulary used throughout this specification. Each term corresponds to a cross-reference encountered in the requirements above and is defined here with its purpose, scope, and usage context.
- DESCRIPTION:
-
Build reproducibility is ensured through:
- Deterministic parsing: Content-addressable SHA1 identifiers ensure consistent object identity
- Deterministic ordering: <Topological Sort> with alphabetic tie-breaking produces the same <Handler> execution order
- Deterministic numbering: Float numbers assigned by
file_seqordering, which is stable across builds - Deterministic output: Pandoc invoked with the same arguments and reference documents produces identical output
Cache invalidation is based solely on content hashes, not filesystem timestamps or system state.
- RATIONALE:
- Reproducible builds are a fundamental certification requirement in aerospace and safety-critical domains. Content-addressed processing ensures that build artifacts can be independently verified.
- STATUS:
- Approved
2.7 System Concepts
TERM-COMMONSPEC: CommonSpec
A structured Markdown language for authoring typed, traceable specifications.
- DESCRIPTION:
-
Purpose: Defines the input language for SpecCompiler. Extends standard Markdown (CommonMark) with six constructs: specifications, spec objects, spec floats, attributes, spec relations, and spec views.
Architecture: CommonSpec (language) compiles into SpecIR (intermediate representation) via SpecCompiler (compiler).
Specification: See the CommonSpec Language Specification (
docs/commonspec/) for the formal definition. - DOMAIN:
- Core
- TERM:
- CommonSpec
TERM-SPECIR: SpecIR
A typed relational intermediate representation for specifications, stored in SQLite.
- ACRONYM:
- SpecIR
- DESCRIPTION:
-
Purpose: Provides a portable, queryable storage format for specification data. Compilation target for CommonSpec and interchange format for other tools (ReqIF, DOORS CSV, SQL).
Schema: Two core layers: Type System tables (metamodel) and Content tables (data). Build infrastructure and FTS tables are not part of the SpecIR standard.
Specification: See the SpecIR Schema Specification (
docs/specir/) for the formal definition. - DOMAIN:
- Core
- TERM:
- Specification Intermediate Representation
TERM-20: RESOLVE Phase
The second phase in the pipeline that resolves references and infers types.
- DESCRIPTION:
-
Purpose: Resolves cross-references between spec objects and infers missing type information.
Position: Second phase after INITIALIZE, before TRANSFORM.
TERM-30: Build Cache
SHA1 hashes for detecting document changes.
- DESCRIPTION:
-
Purpose: Stores content hashes to detect which documents have changed since last build.
Implementation: Compares current file hash against cached hash to skip unchanged files.
TERM-28: Counter Group
Float types sharing a numbering sequence.
- DESCRIPTION:
-
Purpose: Groups related float types to share sequential numbering.
Example: FIG and DIAGRAM types may share a counter, producing Figure 1, Figure 2, etc.
TERM-36: CSC (Computer Software Component)
A MIL-STD-498 architectural decomposition element representing a subsystem, layer, package, or service.
- DESCRIPTION:
-
Purpose: Groups software units into higher-level structural components for design allocation.
Examples:
src/core,src/db,src/infra.
TERM-37: CSU (Computer Software Unit)
A MIL-STD-498 implementation decomposition element representing a source file or code unit.
- DESCRIPTION:
-
Purpose: Captures file-level implementation units allocated to functional descriptions.
Examples:
src/core/pipeline.lua,src/db/manager.lua.
TERM-35: Data View
A view descriptor whose dataset data hook generates data for chart
injection.
- DESCRIPTION:
-
Purpose: Produces structured data that can be injected into chart floats.
Implementation: A
datasetDATA hook receives a frozen data context (readingsubject.params) and returns a{ source / data / links }dataset. The descriptor is resolved frommodels/{requested}/types/views/{view}with fallback tomodels/default/types/views/{view}.
TERM-EAV: EAV Model
Entity-Attribute-Value pattern for typed attribute storage.
- DESCRIPTION:
-
Purpose: Flexible schema for storing typed attributes on spec objects.
Structure: Entity (spec object), Attribute (key name), Value (typed content).
TERM-23: EMIT Phase
The final phase in the pipeline that assembles and outputs documents.
- DESCRIPTION:
-
Purpose: Assembles transformed content and writes final output documents.
Position: Final phase after ANALYZE.
TERM-04: Float
A numbered element (table, figure, diagram) with caption and cross-reference. See <Spec Float> for full definition.
TERM-34: External Renderer
Subprocess-based rendering for types like PLANTUML, CHART.
- DESCRIPTION:
-
Purpose: Delegates rendering to external tools via subprocess execution.
Examples: PlantUML JAR for diagrams, chart libraries for data visualization.
TERM-16: Handler
A named hook that a type descriptor contributes to
the pipeline, indexed by the host engine and dispatched by capability
rather than declared on a M.handler surface.
- DESCRIPTION:
-
Purpose: Encapsulates processing logic for a content type. Behaviour lives only under a descriptor’s
hookstable; the host classifies each hook by name and indexes it into the(kind, id) -> hookmap.Structure: Two kinds of contributions, both keyed by hook name:
- Phase participation —
on_<phase>functions (on_initialize,on_analyze,on_transform,on_verify,on_emit) declared inhooksbeside the behavior hooks; the host synthesizes them intopipeline:register_handlerunder the derived name<lower(id)>_handler, ordered viaschema.phase_prerequisites. Each runs once per phase with full pipeline context. - Per-item hooks — RENDER hooks (
render,render_block,render_link,message) and DATA hooks (dataset,build_block,transform,resolve,prepare_task,handle_result). The hook NAME selects one of two context tiers (a frozen render ctx or a frozen data ctx) and the return type the hook owes. Consumers resolve them viaget_hook_inherited, which walks theextendschain.
TERM-19: INITIALIZE Phase
The first phase in the pipeline that parses AST and populates IR containers.
- DESCRIPTION:
-
Purpose: Parses markdown AST and populates intermediate representation containers.
Position: First phase, entry point for document processing.
TERM-33: Model
A collection of type descriptors and styles for a
domain, overlaid onto the default
model by the host engine.
- DESCRIPTION:
-
Purpose: Bundles related type descriptors (each carrying its own
hooks) and styling for specific documentation domains. The host overlaysdefaultthen each model later-wins-by-id, so a model overrides only the type ids it redefines.Examples: SRS model for software requirements, HRS model for hardware requirements.
TERM-31: Output Cache
Timestamps for incremental output generation.
- DESCRIPTION:
-
Purpose: Tracks when outputs were last generated to enable incremental builds.
Implementation: Compares source modification time against cached output timestamp.
TERM-17: Phase
A distinct stage in document processing with specific responsibilities.
- DESCRIPTION:
-
Purpose: Separates document processing into well-defined sequential stages.
Phases: INITIALIZE, RESOLVE, TRANSFORM, ANALYZE, EMIT.
TERM-15: Pipeline
The 5-phase processing system (INITIALIZE -> RESOLVE -> TRANSFORM -> ANALYZE -> EMIT).
- DESCRIPTION:
-
Purpose: Orchestrates document processing through sequential phases.
Flow: Each phase completes for all handlers before the next phase begins.
TERM-24: Prerequisites
Handler dependencies that determine execution order.
- DESCRIPTION:
-
Purpose: Declares which handlers must complete before a given handler can execute.
Usage: Handlers declare prerequisites to ensure data dependencies are satisfied.
TERM-25: Topological Sort
Kahn’s algorithm for ordering handlers by prerequisites.
- DESCRIPTION:
-
Purpose: Determines valid execution order for handlers based on dependencies.
Algorithm: Uses Kahn’s algorithm to produce a topologically sorted handler sequence.
TERM-22: TRANSFORM Phase
The third phase in the pipeline that materializes views and rewrites content.
- DESCRIPTION:
-
Purpose: Materializes database views into content and applies content transformations.
Position: Third phase after RESOLVE, before ANALYZE.
TERM-27: Type Alias
Alternative syntax identifier for a type (e.g., “csv” -> “TABLE”).
- DESCRIPTION:
-
Purpose: Provides shorthand or alternative names for types.
Example:
csvis an alias for the TABLE type in float definitions.
TERM-38: Type Loader
The host engine (src/contract/registry.lua) that overlays
models and registers their type descriptors.
- DESCRIPTION:
-
Purpose: Discovers each model’s type descriptors and registers them with the SpecIR type tables, the data manager, and the pipeline.
Implementation: Overlays the
defaultmodel then each requested model (later-wins-by-id; resolved repo-bundled underSPECCOMPILER_HOME/models/{model}then cwd, no out-of-tree path). For eachmodels/{model}/types/{category}/file it loads the single returned descriptor{ kind, schema, [hooks] }, validates it (knownkind, presentschema.id, each hook valid for the kind, no behaviour on top-level keys), emits the type row, and eager-indexes each hook into a(kind, id) -> hookmap read viaget_hook/get_hook_inherited(which walks theextendschain).host:finalize()then propagates inherited attributes, creates the verification SQL views, and asserts required hooks.
TERM-26: Type Registry
Database tables (spec_*_types) storing type definitions.
- DESCRIPTION:
-
Purpose: Stores type definitions including attributes, aliases, and validation rules.
Tables: spec_object_types, spec_float_types, spec_attribute_types, etc.
TERM-21: ANALYZE Phase
The fourth phase in the pipeline that validates content via analyze queries.
- DESCRIPTION:
-
Purpose: Validates document content using analyze queries and constraint checking.
Position: Fourth phase after TRANSFORM, before EMIT.
TERM-AST: Abstract Syntax Tree
The tree representation of document structure produced by Pandoc.
- ACRONYM:
- AST
- DESCRIPTION:
-
Purpose: Represents document structure as a hierarchical tree of elements.
Source: Pandoc parses Markdown and produces JSON AST.
Usage: Handlers walk the AST to extract spec objects, floats, and relations.
- DOMAIN:
- Core
- TERM:
- Abstract Syntax Tree
TERM-FTS: Full-Text Search
FTS5 virtual tables enabling search across specification content.
- ACRONYM:
- FTS
- DESCRIPTION:
-
Purpose: Indexes specification text for fast full-text search queries.
Implementation: SQLite FTS5 virtual tables populated during EMIT phase.
Usage: Web application uses FTS for search functionality.
- DOMAIN:
- Database
- TERM:
- Full-Text Search
TERM-HLR: High-Level Requirement
A top-level functional or non-functional requirement that captures what the system must do or satisfy.
- ACRONYM:
- HLR
- DESCRIPTION:
-
Purpose: Defines system-level requirements that guide design and implementation.
Traceability: HLRs trace to verification cases (VC) and are realized by functional descriptions (FD).
- DOMAIN:
- Core
- TERM:
- High-Level Requirement
TERM-IR: Intermediate Representation
The database-backed representation of parsed document content.
- ACRONYM:
- IR
- DESCRIPTION:
-
Purpose: Stores parsed specification content in queryable form.
Storage: SQLite database with spec_objects, spec_floats, spec_relations tables.
Lifecycle: Populated during INITIALIZE, queried and modified through remaining phases.
- DOMAIN:
- Core
- TERM:
- Intermediate Representation
TERM-PID: Project Identifier
A unique identifier assigned to spec objects for
cross-referencing (e.g., @REQ-001).
- ACRONYM:
- PID
- DESCRIPTION:
-
Purpose: Provides unique, human-readable identifiers for traceability and cross-referencing.
Syntax: Written as
@PIDin header text (e.g.,## HLR: Requirement Title @REQ-001).Auto-generation: PIDs can be auto-generated from type prefix and sequence number.
- DOMAIN:
- Core
- TERM:
- Project Identifier
TERM-VERIFICATIONVIEW: Analyze Query
A SQL query that validates data integrity constraints during the ANALYZE phase.
- ACRONYM:
- -
- DESCRIPTION:
-
Purpose: Defines validation rules as SQL queries that detect specification errors.
Execution: Run during the ANALYZE phase; violations are reported as diagnostics.
Examples: Missing required attributes, unresolved relations, cardinality violations.
- DOMAIN:
- Core
- TERM:
- Analyze Query
TERM-SQLITE: SQLite Database
The embedded database engine storing the IR and build cache.
- ACRONYM:
- -
- DESCRIPTION:
-
Purpose: Provides persistent, portable storage for the intermediate representation.
Benefits: Single-file storage, ACID transactions, SQL query capability.
Usage: All pipeline phases read/write to SQLite via the database manager.
- DOMAIN:
- Database
- TERM:
- SQLite Database
TERM-TRACEABLE: Traceable Object
A specification object that participates in traceability relationships.
- ACRONYM:
- -
- DESCRIPTION:
-
Purpose: Base type for objects that can be linked via traceability relations.
Types: Any spec object type registered in the model (e.g., HLR, LLR, SECTION).
Relations: Model-defined relation types (e.g., XREF_FIGURE, XREF_CITATION) inferred by specificity matching.
- DOMAIN:
- Core
- TERM:
- Traceable Object
TERM-TYPE: Type
A category definition that governs behavior for objects, floats, relations, or views.
- ACRONYM:
- -
- DESCRIPTION:
-
Purpose: Defines the schema, validation rules, and
hooksbehaviour for a category of elements.Categories: Object types (HLR, SECTION), float types (FIGURE, TABLE), relation types (TRACES_TO), view types (TOC, LOF).
Registration: Each type is one descriptor (
{ kind, schema, hooks }) loaded from a model’s category directory, validated by the host engine, and emitted into the type registry. - DOMAIN:
- Core
- TERM:
- Type
TERM-VC: Verification Case
A test specification that verifies a requirement or set of requirements.
- ACRONYM:
- VC
- DESCRIPTION:
-
Purpose: Defines how requirements are verified through test procedures and expected results.
Traceability: VCs trace to HLRs via
traceabilityattribute links.Naming: VC PIDs follow the pattern
VC-{category}-{seq}(e.g.,VC-PIPE-001). - DOMAIN:
- Core
- TERM:
- Verification Case
TERM-COMPOSITE: Composite Object Type
A spec object type whose instances receive hierarchical PIDs qualified by the parent specification PID.
- DESCRIPTION:
-
Purpose: Distinguishes object types that represent document structure (e.g., SECTION) from traceable types that receive standalone PIDs (e.g., HLR, VC).
PID behavior: Composite objects get hierarchical PIDs derived from the specification PID (e.g.,
SRS-sec1.2.3). Non-composite objects get independent PIDs from theirpid_prefixandpid_format(e.g.,HLR-001).Configuration: Set via
is_composite = truein the descriptor’sschema. - DOMAIN:
- Core
- TERM:
- Composite Object Type
TERM-SELECTOR: Relation Selector
The URL scheme portion of a Markdown link that drives relation type inference.
- DESCRIPTION:
-
Purpose: Identifies what kind of relation a Markdown link represents, enabling type-driven inference.
Selectors:
@(PID reference, e.g.,[HLR-001](@)),#(label reference, e.g.,[fig:diagram](#)),@cite(bibliographic citation).Configuration: Each relation type declares a
link_selectorvalue inspec_relation_types. Selectors are model-defined, not hardcoded. - DOMAIN:
- Core
- TERM:
- Relation Selector
TERM-SPECIFICITY: Specificity Scoring
The constraint-matching score used to select the best relation type during type inference.
- DESCRIPTION:
-
Purpose: Resolves ambiguity when multiple relation types match a given link by selecting the most specific type.
Algorithm: Each non-NULL constraint match across four dimensions (selector, source_attribute, source_type, target_type) adds one point. The highest total score wins. Ties mark the relation as ambiguous.
Example: A relation type with constraints on selector + source_type + target_type (score 3) wins over one with only selector (score 1).
- DOMAIN:
- Core
- TERM:
- Specificity Scoring
TERM-PIR: Processed Intermediate Representation
The complete specification state after all pipeline phases have executed, captured as a hash for output cache invalidation.
- ACRONYM:
- P-IR
- DESCRIPTION:
-
Purpose: Provides a single hash that represents the fully processed state of a specification, including all resolved relations, materialized views, and transformed content.
Usage: The output cache stores the P-IR hash alongside each generated output file. When rebuilding, the system compares the current P-IR hash to the cached hash to determine if output regeneration is needed.
Distinction: Unlike the build cache (which tracks source file hashes), the P-IR hash captures the post-processing state, detecting changes from cross-document operations.
- DOMAIN:
- Core
- TERM:
- Processed Intermediate Representation
TERM-NDJSON: Newline-Delimited JSON
A text format where each line is a valid JSON object, used for structured log output.
- ACRONYM:
- NDJSON
- DESCRIPTION:
-
Purpose: Provides machine-parseable structured logging suitable for CI/CD log aggregation and filtering with tools like
jq.Format: One JSON object per line with fields:
level,message,timestamp, and optional context fields.Usage: The logger emits NDJSON when output is not connected to a TTY (e.g., piped to a file or running in CI).
- DOMAIN:
- Infrastructure
- TERM:
- Newline-Delimited JSON
TERM-VALIDATIONPOLICY: Validation Policy
A configuration mapping from analyze query policy_key to severity level,
controlling which violations are reported and at what severity.
- DESCRIPTION:
-
Purpose: Allows projects to control validation strictness by mapping each analyze query to a severity level.
Severity levels:
error(blocks output generation),warn(reported but build continues),ignore(suppressed).Configuration: Set in the
validation:section ofproject.yaml(e.g.,traceability_hlr_to_vc: warn).Default: When a policy_key is not configured, the system applies its built-in default severity.
- DOMAIN:
- Core
- TERM:
- Validation Policy
TERM-DIAGNOSTIC: Diagnostic Record
- DESCRIPTION:
-
Purpose: Provides machine-parseable and human-readable feedback on specification errors and warnings throughout all pipeline phases.
Fields: Each record contains
file(source path),line(source line number),code(stable diagnostic key, usually the analyze querypolicy_key, e.g.,dangling_relation), andmsg(human-readable description).Severity: Errors trigger abort after ANALYZE Phase phase; warnings are reported but do not block output generation.
- DOMAIN:
- Core
- TERM:
- Diagnostic Record
TERM-BUILDGRAPH: Build Graph
A dependency tracking structure recording include file hierarchies for incremental rebuild support.
- DESCRIPTION:
-
Purpose: Records the full file set of each document build — the root document itself and every included file — enabling change detection across include hierarchies with a single node walk.
Storage: Stored in the
build_graphtable with columnsroot_path(the document being built),node_path(a file that build read: the root itself or an include), andnode_sha1(content hash at build time).Usage: Queried by Build Cache
is_document_dirty()to determine if the root or any included file has changed since the last successful build. - DOMAIN:
- Database
- TERM:
- Build Graph
TERM-PLACEHOLDERBLOCK: Placeholder Block
A CodeBlock marker inserted during document assembly for deferred Spec Float and Spec View resolution.
- DESCRIPTION:
-
Purpose: Marks positions in the assembled Pandoc document where floats and views will be substituted during the EMIT Phase phase.
Mechanism: During assembly, sdd: Document Assembler inserts CodeBlock elements at the correct
file_seqpositions. Downstream handlers (sdd: Float Emitter for floats, sdd: View Emitter for views) match these placeholders by label and replace them with rendered content.Lifecycle: Created during assembly, consumed during float/view emission, never present in final output.
- DOMAIN:
- Pipeline
- TERM:
- Placeholder Block
SpecCompiler Core Verification
1 Scope
This document defines verification cases for SpecCompiler Core requirements.
2 Verification Strategy
Each VC uses one of four methods:
- Test: Automated or manual test execution
- Analysis: Code review or static analysis
- Inspection: Document or artifact review
- Demonstration: Live system demonstration
2.1 Test Execution Matrix
This matrix is autogenerated from VC objects and relations in SpecIR during rendering. Do not manually maintain matrix rows in this document.
2.2 Test Results Matrix
| VC ID | VC Title | TR ID | Result |
|---|---|---|---|
| VC-002 | Handler Registration | TR-002-01 | PASS |
| VC-006 | Context Propagation | TR-006-01 | PASS |
| VC-007 | SQLite Persistence | TR-007-01 | PASS |
| VC-008 | EAV Attribute Model | TR-008-01 | PASS |
| VC-008 | EAV Attribute Model | TR-008-02 | PASS |
| VC-009 | Build Cache | TR-009-01 | PASS |
| VC-010 | Output Cache | TR-010-01 | PASS |
| VC-013 | Spec Objects Container | TR-013-01 | PASS |
| VC-013 | Spec Objects Container | TR-013-02 | PASS |
| VC-014 | Spec Floats Container | TR-014-01 | PASS |
| VC-014 | Spec Floats Container | TR-014-02 | PASS |
| VC-014 | Spec Floats Container | TR-014-03 | PASS |
| VC-014 | Spec Floats Container | TR-014-04 | PASS |
| VC-014 | Spec Floats Container | TR-014-05 | PASS |
| VC-014 | Spec Floats Container | TR-014-06 | PASS |
| VC-014 | Spec Floats Container | TR-014-07 | PASS |
| VC-014 | Spec Floats Container | TR-014-08 | PASS |
| VC-014 | Spec Floats Container | TR-014-09 | PASS |
| VC-014 | Spec Floats Container | TR-014-10 | PASS |
| VC-015 | Spec Relations Container | TR-015-01 | PASS |
| VC-015 | Spec Relations Container | TR-015-02 | PASS |
| VC-015 | Spec Relations Container | TR-015-03 | PASS |
| VC-015 | Spec Relations Container | TR-015-04 | PASS |
| VC-015 | Spec Relations Container | TR-015-05 | PASS |
| VC-015 | Spec Relations Container | TR-015-06 | PASS |
| VC-015 | Spec Relations Container | TR-015-07 | PASS |
| VC-015 | Spec Relations Container | TR-015-08 | PASS |
| VC-015 | Spec Relations Container | TR-015-09 | PASS |
| VC-015 | Spec Relations Container | TR-015-10 | PASS |
| VC-016 | Spec Views Container | TR-016-01 | PASS |
| VC-016 | Spec Views Container | TR-016-02 | PASS |
| VC-016 | Spec Views Container | TR-016-03 | PASS |
| VC-016 | Spec Views Container | TR-016-04 | PASS |
| VC-016 | Spec Views Container | TR-016-05 | PASS |
| VC-017 | Spec Attributes Container | TR-017-01 | PASS |
| VC-017 | Spec Attributes Container | TR-017-02 | PASS |
| VC-017 | Spec Attributes Container | TR-017-03 | PASS |
| VC-017 | Spec Attributes Container | TR-017-04 | PASS |
| VC-018 | Type Validation | TR-018-01 | PASS |
| VC-018 | Type Validation | TR-018-02 | PASS |
| VC-018 | Type Validation | TR-018-03 | PASS |
| VC-018 | Type Validation | TR-018-04 | PASS |
| VC-018 | Type Validation | TR-018-05 | PASS |
| VC-018 | Type Validation | TR-018-07 | PASS |
| VC-018 | Type Validation | TR-018-09 | PASS |
| VC-018 | Type Validation | TR-018-10 | PASS |
| VC-018 | Type Validation | TR-018-11 | PASS |
| VC-018 | Type Validation | TR-018-12 | PASS |
| VC-018 | Type Validation | TR-018-13 | PASS |
| VC-018 | Type Validation | TR-018-14 | PASS |
| VC-019 | Model Type Loading | TR-019-01 | PASS |
| VC-019 | Model Type Loading | TR-019-02 | PASS |
| VC-019 | Model Type Loading | TR-019-03 | PASS |
| VC-019 | Model Type Loading | TR-019-04 | PASS |
| VC-019 | Model Type Loading | TR-019-05 | PASS |
| VC-019 | Model Type Loading | TR-019-06 | PASS |
| VC-020 | Model Directory Structure | TR-020-01 | PASS |
| VC-021 | Descriptor Registration | TR-021-01 | PASS |
| VC-022 | Type Definition Schema | TR-022-01 | PASS |
| VC-023 | Model Path Resolution | TR-023-01 | PASS |
| VC-024 | External Renderer Registration | TR-024-01 | PASS |
| VC-025 | Data View Generator Loading | TR-025-02 | PASS |
| VC-025 | Data View Generator Loading | TR-025-03 | PASS |
| VC-025 | Data View Generator Loading | TR-025-04 | PASS |
| VC-025 | Data View Generator Loading | TR-025-05 | PASS |
| VC-025 | Data View Generator Loading | TR-025-06 | PASS |
| VC-025 | Data View Generator Loading | TR-025-07 | PASS |
| VC-025 | Data View Generator Loading | TR-025-08 | PASS |
| VC-025 | Data View Generator Loading | TR-025-09 | PASS |
| VC-025 | Data View Generator Loading | TR-025-10 | PASS |
| VC-027 | Float Numbering | TR-027-01 | PASS |
| VC-028 | Multi-Format Output | TR-028-01 | PASS |
| VC-028 | Multi-Format Output | TR-028-02 | PASS |
| VC-029 | DOCX Generation | TR-029-01 | PASS |
| VC-029 | DOCX Generation | TR-029-02 | PASS |
| VC-029 | DOCX Generation | TR-029-03 | PASS |
| VC-029 | DOCX Generation | TR-029-04 | PASS |
| VC-029 | DOCX Generation | TR-029-05 | PASS |
| VC-029 | DOCX Generation | TR-029-06 | PASS |
| VC-029 | DOCX Generation | TR-029-07 | PASS |
| VC-030 | HTML5 Generation | TR-030-01 | PASS |
| VC-030 | HTML5 Generation | TR-030-02 | PASS |
| VC-030 | HTML5 Generation | TR-030-03 | PASS |
| VC-031 | Document Assembly | TR-031-01 | PASS |
| VC-032 | Float Resolution | TR-032-01 | PASS |
| VC-033 | EAV Pivot Views | TR-033-01 | PASS |
| VC-CFG-001 | Manifest-Only Configuration | TR-CFG-001-01 | PASS |
| VC-EXT-009 | Canonical Hook Context | TR-EXT-009-01 | PASS |
| VC-EXT-011 | Descriptor and Hook Validation | TR-EXT-011-01 | PASS |
| VC-EXT-011 | Descriptor and Hook Validation | TR-EXT-011-02 | PASS |
| VC-EXT-011 | Descriptor and Hook Validation | TR-EXT-011-03 | PASS |
| VC-EXT-011 | Descriptor and Hook Validation | TR-EXT-011-04 | PASS |
| VC-EXT-011 | Descriptor and Hook Validation | TR-EXT-011-05 | PASS |
| VC-EXT-012 | Analyze Query Descriptor | TR-EXT-012-01 | PASS |
| VC-INT-016 | UTF-8 Label Slugification | TR-INT-016-01 | PASS |
| VC-OUT-001 | Document Assembly | TR-OUT-001-01 | PASS |
| VC-OUT-004 | Render Decoration | TR-OUT-004-01 | PASS |
| VC-OUT-005 | Spec Object Render Handler | TR-OUT-005-01 | PASS |
| VC-OUT-008 | Heading Hierarchy Well-formedness | TR-OUT-008-01 | PASS |
| VC-OUT-008 | Heading Hierarchy Well-formedness | TR-OUT-008-02 | PASS |
| VC-OUT-009 | Section Scope Termination | TR-OUT-009-01 | PASS |
| VC-OUT-010 | Cross-Format Heading Consistency | TR-OUT-010-01 | PASS |
| VC-OUT-011 | Include Heading Level Shift | TR-OUT-011-01 | PASS |
| VC-OUT-011 | Include Heading Level Shift | TR-OUT-011-02 | PASS |
| VC-OUT-011 | Include Heading Level Shift | TR-OUT-011-03 | PASS |
| VC-PIPE-007 | Sourcepos Normalization | TR-PIPE-007-01 | PASS |
| VC-PIPE-012 | Prerequisite-Not-Found Diagnostic | TR-PIPE-012-01 | PASS |
| VC-PIPE-013 | Incremental Stale Relation Rebind | TR-PIPE-013-01 | PASS |
| VC-PIPE-014 | Incremental Cross-Document View Freshness | TR-PIPE-014-01 | PASS |
| VC-PIPE-014 | Incremental Cross-Document View Freshness | TR-PIPE-014-02 | PASS |
2.3 Traceability Matrix
| HLR ID | HLR Title | VC ID | VC Title | Result |
|---|---|---|---|---|
| HLR-AUDIT-001 | Content-Addressed Hashing | VC-AUDIT-001 | Content-Addressed Hashing | — Not Run |
| HLR-AUDIT-002 | Include Dependency Tracking | VC-AUDIT-002 | Include Dependency Tracking | — Not Run |
| HLR-AUDIT-003 | Structured Diagnostic Reporting | VC-AUDIT-003 | Structured Diagnostic Reporting | — Not Run |
| HLR-AUDIT-004 | Structured Logging | VC-AUDIT-004 | Structured Logging | — Not Run |
| HLR-AUDIT-005 | Build Reproducibility | VC-AUDIT-005 | Build Reproducibility | — Not Run |
| HLR-CFG-001 | Manifest Configuration | VC-CFG-001 | Manifest-Only Configuration | ✓ Pass |
| HLR-EXT-001 | Type Descriptor Loading | VC-019 | Model Type Loading | ✓ Pass |
| HLR-EXT-001 | Type Descriptor Loading | VC-019 | Model Type Loading | ✓ Pass |
| HLR-EXT-001 | Type Descriptor Loading | VC-019 | Model Type Loading | ✓ Pass |
| HLR-EXT-001 | Type Descriptor Loading | VC-019 | Model Type Loading | ✓ Pass |
| HLR-EXT-001 | Type Descriptor Loading | VC-019 | Model Type Loading | ✓ Pass |
| HLR-EXT-001 | Type Descriptor Loading | VC-019 | Model Type Loading | ✓ Pass |
| HLR-EXT-001 | Type Descriptor Loading | VC-OUT-005 | Spec Object Render Handler | ✓ Pass |
| HLR-EXT-002 | Model Directory Structure | VC-020 | Model Directory Structure | ✓ Pass |
| HLR-EXT-003 | Descriptor Registration | VC-021 | Descriptor Registration | ✓ Pass |
| HLR-EXT-004 | Type Schema | VC-022 | Type Definition Schema | ✓ Pass |
| HLR-EXT-005 | Model Resolution and Overlay | VC-023 | Model Path Resolution | ✓ Pass |
| HLR-EXT-006 | External Renderer Hooks | VC-024 | External Renderer Registration | ✓ Pass |
| HLR-EXT-007 | Data View Hooks | VC-025 | Data View Generator Loading | ✓ Pass |
| HLR-EXT-007 | Data View Hooks | VC-025 | Data View Generator Loading | ✓ Pass |
| HLR-EXT-007 | Data View Hooks | VC-025 | Data View Generator Loading | ✓ Pass |
| HLR-EXT-007 | Data View Hooks | VC-025 | Data View Generator Loading | ✓ Pass |
| HLR-EXT-007 | Data View Hooks | VC-025 | Data View Generator Loading | ✓ Pass |
| HLR-EXT-007 | Data View Hooks | VC-025 | Data View Generator Loading | ✓ Pass |
| HLR-EXT-007 | Data View Hooks | VC-025 | Data View Generator Loading | ✓ Pass |
| HLR-EXT-007 | Data View Hooks | VC-025 | Data View Generator Loading | ✓ Pass |
| HLR-EXT-007 | Data View Hooks | VC-025 | Data View Generator Loading | ✓ Pass |
| HLR-EXT-008 | Hook Index | VC-026 | Hook Index | — Not Run |
| HLR-EXT-009 | Canonical Hook Context | VC-EXT-009 | Canonical Hook Context | ✓ Pass |
| HLR-EXT-010 | Model Manifest | VC-EXT-010 | Model Manifest | — Not Run |
| HLR-EXT-011 | Hook Validation and Phase Registration | VC-EXT-011 | Descriptor and Hook Validation | ✓ Pass |
| HLR-EXT-011 | Hook Validation and Phase Registration | VC-EXT-011 | Descriptor and Hook Validation | ✓ Pass |
| HLR-EXT-011 | Hook Validation and Phase Registration | VC-EXT-011 | Descriptor and Hook Validation | ✓ Pass |
| HLR-EXT-011 | Hook Validation and Phase Registration | VC-EXT-011 | Descriptor and Hook Validation | ✓ Pass |
| HLR-EXT-011 | Hook Validation and Phase Registration | VC-EXT-011 | Descriptor and Hook Validation | ✓ Pass |
| HLR-EXT-012 | Analyze Query Descriptor | VC-EXT-012 | Analyze Query Descriptor | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-031 | Document Assembly | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-001 | Document Assembly | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-004 | Render Decoration | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-005 | Spec Object Render Handler | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-008 | Heading Hierarchy Well-formedness | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-008 | Heading Hierarchy Well-formedness | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-009 | Section Scope Termination | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-010 | Cross-Format Heading Consistency | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-011 | Include Heading Level Shift | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-011 | Include Heading Level Shift | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-OUT-011 | Include Heading Level Shift | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-PIPE-014 | Incremental Cross-Document View Freshness | ✓ Pass |
| HLR-OUT-001 | Document Assembly | VC-PIPE-014 | Incremental Cross-Document View Freshness | ✓ Pass |
| HLR-OUT-002 | Float Resolution | VC-032 | Float Resolution | ✓ Pass |
| HLR-OUT-003 | Float Numbering | VC-027 | Float Numbering | ✓ Pass |
| HLR-OUT-004 | Multi-Format Output | VC-028 | Multi-Format Output | ✓ Pass |
| HLR-OUT-004 | Multi-Format Output | VC-028 | Multi-Format Output | ✓ Pass |
| HLR-OUT-004 | Multi-Format Output | VC-OUT-010 | Cross-Format Heading Consistency | ✓ Pass |
| HLR-OUT-004 | Multi-Format Output | VC-PIPE-014 | Incremental Cross-Document View Freshness | ✓ Pass |
| HLR-OUT-004 | Multi-Format Output | VC-PIPE-014 | Incremental Cross-Document View Freshness | ✓ Pass |
| HLR-OUT-005 | DOCX Generation | VC-029 | DOCX Generation | ✓ Pass |
| HLR-OUT-005 | DOCX Generation | VC-029 | DOCX Generation | ✓ Pass |
| HLR-OUT-005 | DOCX Generation | VC-029 | DOCX Generation | ✓ Pass |
| HLR-OUT-005 | DOCX Generation | VC-029 | DOCX Generation | ✓ Pass |
| HLR-OUT-005 | DOCX Generation | VC-029 | DOCX Generation | ✓ Pass |
| HLR-OUT-005 | DOCX Generation | VC-029 | DOCX Generation | ✓ Pass |
| HLR-OUT-005 | DOCX Generation | VC-029 | DOCX Generation | ✓ Pass |
| HLR-OUT-006 | HTML5 Generation | VC-030 | HTML5 Generation | ✓ Pass |
| HLR-OUT-006 | HTML5 Generation | VC-030 | HTML5 Generation | ✓ Pass |
| HLR-OUT-006 | HTML5 Generation | VC-030 | HTML5 Generation | ✓ Pass |
| HLR-OUT-007 | Full-Text Search Indexing | VC-OUT-007 | Full-Text Search Indexing | — Not Run |
| HLR-PIPE-001 | Five-Phase Lifecycle | VC-001 | Five-Phase Lifecycle | — Not Run |
| HLR-PIPE-002 | Handler Registration and Prerequisites | VC-002 | Handler Registration | ✓ Pass |
| HLR-PIPE-003 | Topological Ordering via Kahn’s Algorithm | VC-003 | Topological Ordering | — Not Run |
| HLR-PIPE-004 | Phase Abort on ANALYZE Errors | VC-004 | Phase Abort on Errors | — Not Run |
| HLR-PIPE-005 | Batch Dispatch for All Phases | VC-005 | Batch Dispatch Across All Phases | — Not Run |
| HLR-PIPE-006 | Context Creation and Propagation | VC-006 | Context Propagation | ✓ Pass |
| HLR-PIPE-007 | CommonSpec Input Parsing | VC-PIPE-007 | Sourcepos Normalization | ✓ Pass |
| HLR-PIPE-007 | CommonSpec Input Parsing | VC-PIPE-008 | CommonSpec Input Parsing | — Not Run |
| HLR-PIPE-008 | Include File Expansion | VC-OUT-008 | Heading Hierarchy Well-formedness | ✓ Pass |
| HLR-PIPE-008 | Include File Expansion | VC-OUT-008 | Heading Hierarchy Well-formedness | ✓ Pass |
| HLR-PIPE-008 | Include File Expansion | VC-OUT-011 | Include Heading Level Shift | ✓ Pass |
| HLR-PIPE-008 | Include File Expansion | VC-OUT-011 | Include Heading Level Shift | ✓ Pass |
| HLR-PIPE-008 | Include File Expansion | VC-OUT-011 | Include Heading Level Shift | ✓ Pass |
| HLR-PIPE-008 | Include File Expansion | VC-PIPE-009 | Include File Expansion | — Not Run |
| HLR-PIPE-009 | PID Auto-Generation | VC-PIPE-010 | PID Auto-Generation | — Not Run |
| HLR-PIPE-010 | Relation Type Inference | VC-PIPE-011 | Relation Type Inference | — Not Run |
| HLR-PIPE-010 | Relation Type Inference | VC-PIPE-013 | Incremental Stale Relation Rebind | ✓ Pass |
| HLR-PIPE-011 | Prerequisite-Not-Found Diagnostic | VC-PIPE-012 | Prerequisite-Not-Found Diagnostic | ✓ Pass |
| HLR-PIPE-012 | Section Scope Termination | VC-OUT-009 | Section Scope Termination | ✓ Pass |
| HLR-STOR-001 | SQLite Persistence | VC-007 | SQLite Persistence | ✓ Pass |
| HLR-STOR-002 | EAV Attribute Model | VC-008 | EAV Attribute Model | ✓ Pass |
| HLR-STOR-002 | EAV Attribute Model | VC-008 | EAV Attribute Model | ✓ Pass |
| HLR-STOR-003 | Build Cache | VC-009 | Build Cache | ✓ Pass |
| HLR-STOR-004 | Output Cache | VC-010 | Output Cache | ✓ Pass |
| HLR-STOR-004 | Output Cache | VC-PIPE-014 | Incremental Cross-Document View Freshness | ✓ Pass |
| HLR-STOR-004 | Output Cache | VC-PIPE-014 | Incremental Cross-Document View Freshness | ✓ Pass |
| HLR-STOR-005 | Incremental Rebuild Support | VC-011 | Incremental Rebuild | — Not Run |
| HLR-STOR-006 | EAV Pivot Views for External Queries | VC-033 | EAV Pivot Views | ✓ Pass |
| HLR-TYPE-001 | Specifications Container | VC-012 | Specifications Container | — Not Run |
| HLR-TYPE-002 | Spec Objects Container | VC-013 | Spec Objects Container | ✓ Pass |
| HLR-TYPE-002 | Spec Objects Container | VC-013 | Spec Objects Container | ✓ Pass |
| HLR-TYPE-002 | Spec Objects Container | VC-INT-016 | UTF-8 Label Slugification | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-003 | Spec Floats Container | VC-014 | Spec Floats Container | ✓ Pass |
| HLR-TYPE-004 | Spec Views Container | VC-016 | Spec Views Container | ✓ Pass |
| HLR-TYPE-004 | Spec Views Container | VC-016 | Spec Views Container | ✓ Pass |
| HLR-TYPE-004 | Spec Views Container | VC-016 | Spec Views Container | ✓ Pass |
| HLR-TYPE-004 | Spec Views Container | VC-016 | Spec Views Container | ✓ Pass |
| HLR-TYPE-004 | Spec Views Container | VC-016 | Spec Views Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-005 | Spec Relations Container | VC-015 | Spec Relations Container | ✓ Pass |
| HLR-TYPE-006 | Spec Attributes Container | VC-017 | Spec Attributes Container | ✓ Pass |
| HLR-TYPE-006 | Spec Attributes Container | VC-017 | Spec Attributes Container | ✓ Pass |
| HLR-TYPE-006 | Spec Attributes Container | VC-017 | Spec Attributes Container | ✓ Pass |
| HLR-TYPE-006 | Spec Attributes Container | VC-017 | Spec Attributes Container | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
| HLR-TYPE-007 | Type Validation | VC-018 | Type Validation | ✓ Pass |
2.3.1 Deterministic Enforcement in ANALYZE
traceability_vc_to_hlr: VC must trace to at least one HLR.traceability_tr_to_vc: TR must trace to at least one VC.traceability_hlr_to_vc: HLR must be covered by at least one VC (when VCs exist).traceability_fd_to_csc: FD must trace to at least one CSC when CSC entries exist.traceability_fd_to_csu: FD must trace to at least one CSU when CSU entries exist.
Projects control severity via project.yaml validation policy (error, warn, ignore) without custom check scripts. TP
filename-to-VC mapping is also enforced by the test runner naming
convention (vc_*_<seq>_*.md).
2.4 Pipeline Verification Cases
VC-001: Five-Phase Lifecycle
Verify that the <Pipeline> executes all five phases in correct order.
- OBJECTIVE:
- Confirm <INITIALIZE Phase> , <RESOLVE Phase> , <TRANSFORM Phase> , <ANALYZE Phase> , <EMIT Phase> execute sequentially
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- All 5 phases execute for every document
- Phase order is always INITIALIZE < RESOLVE < TRANSFORM < ANALYZE < EMIT
- APPROACH:
-
- Register handlers for all 5 phases that record execution timestamps
- Execute pipeline with test document
- Verify timestamps show strict ordering
- TRACEABILITY:
- srs: HLR-PIPE-001 , sdd: LLR-020 , sdd: LLR-021 , sdd: LLR-022
VC-002: Handler Registration
Verify that <Handler> are registered with required fields.
- OBJECTIVE:
- Confirm handler registration validates name and <Prerequisites>
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Missing name throws “Handler must have a ‘name’ field”
- Missing prerequisites throws “Handler must have a ‘prerequisites’ field”
- Duplicate name throws “Handler already registered”
- APPROACH:
-
- Attempt to register handler without name field
- Attempt to register handler without prerequisites field
- Attempt to register duplicate handler
- Verify each case throws appropriate error
- TRACEABILITY:
- srs: HLR-PIPE-002 , sdd: LLR-PIPE-002-01 , sdd: LLR-PIPE-002-02 , sdd: LLR-PIPE-002-03
VC-003: Topological Ordering
Verify <Handler> execute in dependency order.
- OBJECTIVE:
- Confirm <Topological Sort> produces correct execution order
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Handlers execute after all prerequisites complete
- Alphabetical tiebreaker when multiple handlers have same in-degree
- Cycle detection reports error
- APPROACH:
-
- Register handlers A, B, C where B depends on A, C depends on B
- Execute phase and record execution order
- Verify order is A, B, C
- TRACEABILITY:
- srs: HLR-PIPE-003 , sdd: LLR-023 , sdd: LLR-024 , sdd: LLR-025
VC-004: Phase Abort on Errors
Verify pipeline stops before EMIT if errors exist.
- OBJECTIVE:
- Confirm EMIT is skipped when verification fails
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- diagnostics.has_errors() returns true after ANALYZE
- TRANSFORM phase has already completed before ANALYZE
- EMIT phase handlers never called
- APPROACH:
-
- Create document with validation errors (missing required attribute)
- Execute pipeline
- Verify EMIT handlers are not invoked after ANALYZE errors are reported
- TRACEABILITY:
- srs: HLR-PIPE-004 , sdd: LLR-026 , sdd: LLR-027
VC-005: Batch Dispatch Across All Phases
Verify that every phase uses batch-dispatched on_{phase} hooks.
- OBJECTIVE:
- Confirm each handler hook receives the full contexts array for INITIALIZE, RESOLVE, TRANSFORM, ANALYZE, and EMIT
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Each
on_{phase}hook is called exactly once per phase - Every hook receives the full contexts array
- No
on_{phase}_batchhooks are required
- APPROACH:
-
- Create 3 test documents
- Register handler with
on_initialize,on_analyze,on_transform,on_verify, andon_emithooks that record call counts and context sizes - Execute pipeline
- Verify each phase hook receives array with 3 contexts
- TRACEABILITY:
- srs: HLR-PIPE-005 , sdd: LLR-028 , sdd: LLR-029
VC-006: Context Propagation
Verify context object contains required fields.
- OBJECTIVE:
- Confirm handlers receive complete context
- VERIFICATION METHOD:
- Inspection
- PASS CRITERIA:
-
- context.doc contains DocumentWalker instance
- context.spec_id contains document identifier
- context.config contains preset configuration
- context.output_format contains primary format
- context.outputs contains format/path pairs
- APPROACH:
-
- Examine context creation in pipeline.execute()
- Verify all documented fields are populated
- Check context passed to each handler
- TRACEABILITY:
- srs: HLR-PIPE-006 , sdd: LLR-PIPE-006-01 , sdd: LLR-PIPE-006-02 , sdd: LLR-PIPE-006-03
VC-PIPE-007: Sourcepos Normalization
Verify inline tracking spans are stripped from AST while preserving block-level data-pos.
- OBJECTIVE:
- Confirm that Pandoc sourcepos tracking spans (data-pos, wrapper attributes) are removed from inline content across all container types while Link elements receive transferred data-pos for diagnostic reporting.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- No inline tracking spans with data-pos remain in output AST
- Text content (bold, italic) preserved without wrapper spans
- Adjacent Str tokens merged after span removal
- Block-level data-pos attributes preserved for diagnostics
- APPROACH:
-
- Process test document with bold, italic, and linked text that generates tracking spans
- Execute pipeline through all five phases with JSON output
- Oracle verifies no tracking spans remain, text content preserved, adjacent Str tokens merged
- TRACEABILITY:
- srs: HLR-PIPE-007 , sdd: LLR-030 , sdd: LLR-031 , sdd: LLR-032 , sdd: LLR-033 , sdd: LLR-034 , sdd: LLR-035
VC-PIPE-008: CommonSpec Input Parsing
Verify that each <CommonSpec> annotation type produces the correct <Intermediate Representation> record.
- OBJECTIVE:
- Confirm that H1 headers, H2-H6 headers, blockquote attributes, fenced code blocks, Markdown links, and inline code are lowered into the correct SpecIR content tables
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- H1 headers produce exactly one
specificationsrecord with correct type_ref and pid - H2-H6 headers produce
spec_objectsrecords with correct type inference (explicit, implicit alias, default) - Blockquote lines produce
spec_attribute_valuesrecords with correct name, value, and datatype - Fenced code blocks with type class produce
spec_floatsrecords with correct type_ref and raw_content - Links with
(@)targets producespec_relationsrecords with correct target_text - Inline code with
type:prefix producesspec_viewsrecords with correct view_type_ref
- APPROACH:
-
- Process a test document containing all six annotation types
- Query each content table (specifications, spec_objects, spec_floats, spec_attribute_values, spec_relations, spec_views)
- Verify correct record count and field values for each annotation type
- TRACEABILITY:
- srs: HLR-PIPE-007 , sdd: LLR-030 , sdd: LLR-031 , sdd: LLR-032 , sdd: LLR-033 , sdd: LLR-034 , sdd: LLR-035
VC-PIPE-009: Include File Expansion
Verify that .include code
blocks are expanded with correct content and that circular includes are
detected.
- OBJECTIVE:
- Confirm recursive include expansion, path resolution, and cycle detection
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Content from all included files appears in correct document order
- Include paths resolve relative to the including file, not the project root
- Circular includes produce a diagnostic error
- Source position tracking attributes are present on included content
- APPROACH:
-
- Create a document with nested includes (A includes B, B includes C)
- Execute pipeline and verify all three files’ content appears in the specification
- Create a circular include and verify error is reported
- Verify include paths resolve relative to the including file’s directory
- TRACEABILITY:
- srs: HLR-PIPE-008 , sdd: LLR-036 , sdd: LLR-037 , sdd: LLR-038
VC-PIPE-010: PID Auto-Generation
Verify that spec objects without explicit @PID receive auto-generated PIDs.
- OBJECTIVE:
- Confirm PID generation format, collision avoidance, and composite hierarchy
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Auto-generated PIDs match the type’s
pid_prefixandpid_format(e.g., “HLR-001”) - <Composite Object Type> objects receive hierarchical PIDs (e.g., “SRS-sec1.2”)
- Explicit
@PIDannotations are never overwritten - No duplicate PIDs exist across all specifications
- APPROACH:
-
- Create a document with typed objects lacking
@PIDannotations - Execute pipeline through RESOLVE phase
- Query
spec_objects.pidvalues and verify format matches type definition - Create a document with both explicit and auto-generated PIDs; verify no collisions
- TRACEABILITY:
- srs: HLR-PIPE-009 , sdd: LLR-039 , sdd: LLR-040 , sdd: LLR-041 , sdd: LLR-042
VC-PIPE-011: Relation Type Inference
Verify that relations are resolved with correct type inference and <Specificity Scoring> scoring.
- OBJECTIVE:
- Confirm constraint-based matching, same-spec preference, and ambiguity detection
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Relations resolve to the most specific matching type (highest constraint score)
- Same-specification targets are preferred over cross-specification targets
- Ambiguous relations (tied specificity) have
is_ambiguous = 1 - Unresolved relations have
is_unresolved = 1with NULL target_ref
- APPROACH:
-
- Create documents with relations matching different specificity levels
- Execute pipeline through RESOLVE phase
- Query
spec_relationsfor resolvedtype_refandtarget_refvalues - Create an ambiguous case (two types with equal specificity) and verify ambiguity flag
- TRACEABILITY:
- srs: HLR-PIPE-010 , sdd: LLR-043 , sdd: LLR-044 , sdd: LLR-045 , sdd: LLR-046
VC-PIPE-012: Prerequisite-Not-Found Diagnostic
Verify the pipeline distinguishes a handler prerequisite that resolves to another phase from one that resolves to no registered handler, emitting a diagnostic only for the latter.
- OBJECTIVE:
-
Confirm
Pipeline:validate_prerequisites()flags only a prerequisite registered in NO phase, stays silent for a legitimate cross-phase prerequisite, and only considers phase handlers. - VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- A cross-phase prerequisite produces no diagnostic (cross-phase ordering is dropped by design)
- A truly-unresolvable prerequisite produces exactly one
prerequisite_not_founddiagnostic - Only phase handlers (those declaring an
on_<phase>hook) are checked
- APPROACH:
-
- Register a phase handler whose
prerequisitesname a handler registered in ANOTHER phase; run validation and confirm no diagnostic - Register a phase handler whose
prerequisitesname a handler registered in NO phase; confirm aprerequisite_not_founddiagnostic - Confirm a decorated per-item callback’s
prerequisitesfield is inert (not flagged)
- TRACEABILITY:
- srs: HLR-PIPE-011
VC-PIPE-013: Incremental Stale Relation Rebind
Verify that incremental rebuilds remove stale relation bindings when a target specification changes.
- OBJECTIVE:
- Confirm relation resolution is recomputed from current database state instead of preserving stale target references across incremental builds.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- The old target binding is removed
- The relation is either rebound to the current valid target or marked unresolved
- No stale
target_refsurvives the rebuild
- APPROACH:
-
- Build a two-document project with a relation from one document to a target object in another document
- Modify the target document so the previous target is no longer valid
- Rebuild incrementally and query
spec_relations
- TRACEABILITY:
- srs: HLR-PIPE-010 , sdd: LLR-043 , sdd: LLR-044 , sdd: LLR-045 , sdd: LLR-046
VC-PIPE-014: Incremental Cross-Document View Freshness
Verify that cross-document view output is regenerated when source data in another document changes.
- OBJECTIVE:
- Confirm output cache validation uses the assembled render input, including live view data, so cross-document view changes cannot serve stale output.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- The affected output is regenerated
- The rendered view reflects the updated cross-document data
- The output cache does not suppress emission when the assembled render input changes
- Views render live at EMIT; no view serves a stale precomputed AST across builds
- APPROACH:
-
- Build a multi-document project containing a view whose rendered content depends on another document
- Modify the source document data used by the view
- Rebuild incrementally and compare the emitted output
- TRACEABILITY:
- srs: HLR-OUT-001 , srs: HLR-OUT-004 , srs: HLR-STOR-004 , sdd: LLR-049
2.5 Storage Verification Cases
VC-007: SQLite Persistence
Verify data persists correctly in <SQLite Database> database.
- OBJECTIVE:
- Confirm all content tables store and retrieve data accurately
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Inserted data matches queried data exactly
- Foreign keys resolve to valid parent records
- Database survives process restart
- APPROACH:
-
- Insert test data into specifications, spec_objects, spec_floats tables
- Query data back and compare with original
- Verify foreign key relationships are maintained
- TRACEABILITY:
- srs: HLR-STOR-001 , sdd: LLR-DB-007-01 , sdd: LLR-DB-007-02
VC-008: EAV Attribute Model
Verify attributes store in correct typed columns.
- OBJECTIVE:
- Confirm <EAV Model> pattern correctly routes values to typed columns
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- STRING values populate string_value column only
- INTEGER values populate int_value column only
- ENUM values populate enum_ref column only
- Exactly one typed column is non-NULL per row
- Invalid values leave typed columns NULL for verification-view diagnostics
- APPROACH:
-
- Run markdown-driven attribute probe through
test_covtemplate - Cast attributes across STRING, INTEGER, REAL, BOOLEAN, DATE, ENUM, XHTML
- Exercise
cast_all()on pending rows with mixed valid/invalid values - Verify only the appropriate typed columns are populated
- TRACEABILITY:
- srs: HLR-STOR-002 , sdd: LLR-DB-008-01
VC-009: Build Cache
Verify <Build Cache> tracks document changes.
- OBJECTIVE:
- Confirm changed documents are rebuilt, unchanged are skipped
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- is_document_dirty() returns true for changed documents
- is_document_dirty() returns false for unchanged documents
- Include file changes propagate to root documents
- APPROACH:
-
- Build project with 2 documents
- Modify one document
- Rebuild and verify only modified document is reprocessed
- TRACEABILITY:
- srs: HLR-STOR-003 , sdd: LLR-047 , sdd: LLR-048
VC-010: Output Cache
Verify <Output Cache> prevents redundant generation.
- OBJECTIVE:
- Confirm unchanged outputs are not regenerated
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- is_output_current() returns true when input hash matches
- Pandoc invocation count is zero for unchanged outputs
- Cache updates after successful generation
- APPROACH:
-
- Build project generating DOCX output
- Rebuild without changes
- Verify pandoc is not invoked for unchanged outputs
- TRACEABILITY:
- srs: HLR-STOR-004 , sdd: LLR-049 , sdd: LLR-050
VC-011: Incremental Rebuild
Verify incremental rebuild reduces processing time.
- OBJECTIVE:
- Confirm partial rebuilds are faster than full rebuilds
- VERIFICATION METHOD:
- Demonstration
- PASS CRITERIA:
-
- Incremental build processes only changed documents
- Build time scales with changes, not project size
- Include graph correctly identifies dependencies
- APPROACH:
-
- Build project with 10 documents (measure time T1)
- Modify 1 document
- Rebuild (measure time T2)
- Compare T2 << T1
- TRACEABILITY:
- srs: HLR-STOR-005 , sdd: LLR-051 , sdd: LLR-052
VC-033: EAV Pivot Views
Verify per-object-type SQL views pivot <EAV Model> attributes into typed columns.
- OBJECTIVE:
- Confirm eav_pivot module generates correct views for all datatypes used by model types, enabling external BI queries against flat relational views.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- ENUM values resolve to human-readable keys via enum_values join
- STRING values accessible via pivoted string column
- XHTML values accessible via pivoted string column
- Sparse attributes produce NULL for missing values
- Objects with no attributes show NULL for all attribute columns
- WHERE filtering works on ENUM, STRING columns
- Different object types produce separate views with type-specific columns
- View naming follows view_{type_lower}_objects convention
- APPROACH:
-
- Process a rich markdown fixture through the sw_docs pipeline
- Open the pipeline database after processing
- Query pivot views (view_hlr_objects, view_nfr_objects, etc.)
- Validate column mapping, NULL handling, enum resolution, WHERE filtering
- TRACEABILITY:
- srs: HLR-STOR-006 , sdd: LLR-053 , sdd: LLR-054
2.6 Types Verification Cases
VC-012: Specifications Container
Verify specifications table stores document metadata.
- OBJECTIVE:
- Confirm root documents are correctly stored
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- identifier is SHA1 of root_path
- long_name extracted from H1 header text
- type_ref matches header type prefix
- pid extracted from @PID syntax
- APPROACH:
-
- Process document with H1 header containing type and PID
- Query specifications table
- Verify all fields populated correctly
- TRACEABILITY:
- srs: HLR-TYPE-001 , sdd: LLR-055 , sdd: LLR-056
VC-013: Spec Objects Container
Verify spec_objects table stores header-based content.
- OBJECTIVE:
- Confirm H2+ headers create spec_object records
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Each H2+ header creates one record
- level matches header level (2 for H2, 3 for H3)
- file_seq preserves document order
- ast contains body content as JSON
- APPROACH:
-
- Process document with H2, H3 headers
- Query spec_objects table
- Verify level, title_text, ast fields
- TRACEABILITY:
- srs: HLR-TYPE-002 , sdd: LLR-057 , sdd: LLR-058 , sdd: LLR-059
VC-014: Spec Floats Container
Verify spec_floats table stores numbered elements.
- OBJECTIVE:
- Confirm code blocks create spec_float records
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Each code block with type prefix creates one record
- label extracted from syntax (e.g., “fig:label”)
- number assigned during <EMIT Phase> phase
- parent_object_ref links to containing object
- APPROACH:
-
- Process document with figure, table, plantuml code blocks
- Query spec_floats table
- Verify label, type_ref, raw_ast fields
- TRACEABILITY:
- srs: HLR-TYPE-003 , sdd: LLR-060 , sdd: LLR-061
VC-015: Spec Relations Container
Verify spec_relations table stores traceability links.
- OBJECTIVE:
- Confirm @PID and #label links create relation records
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Each link creates one relation record
- source_ref points to containing object
- target_text contains original link text
- target_ref populated during <RESOLVE Phase> phase
- APPROACH:
-
- Process links with normalized/object-header syntax (
[@PID](@),[#PID](@)) - Query spec_relations table
- Verify source_ref, target_text, type_ref fields
- TRACEABILITY:
- srs: HLR-TYPE-005 , sdd: LLR-064 , sdd: LLR-065
VC-016: Spec Views Container
Verify spec_views table stores view definitions and views render from live data.
- OBJECTIVE:
- Confirm view code blocks create spec_view records and render at EMIT
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Each inline view creates one record
- view_type_ref matches view type
- raw_ast preserves the view definition content
- View content is rendered live at EMIT from current database state (spec_views.resolved_ast is reserved for views that declare external rendering; no in-tree view precomputes its output)
- Inline
key=valueparameters are parsed once at EMIT dispatch and honored by the view (e.g., a depth-limited TOC)
- APPROACH:
-
- Process document with standalone inline views ([TOC], [LOF]) and parameterized inline views ([TOC])
- Query spec_views table
- Verify view_type_ref, raw_ast fields
- Verify the emitted output contains the rendered view content
- Verify
key=valueparameters survive block promotion and are honored
- TRACEABILITY:
- srs: HLR-TYPE-004 , sdd: LLR-062 , sdd: LLR-063
VC-017: Spec Attributes Container
Verify spec_attribute_values table stores object properties.
- OBJECTIVE:
- Confirm blockquote attributes create attribute_value records
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Each attribute line creates one record
- owner_ref links to parent object
- datatype matches attribute definition
- Value stored in correct typed column
- APPROACH:
-
- Process document with > status: draft, > priority: 1 attributes
- Query spec_attribute_values table
- Verify name, datatype, typed value columns
- TRACEABILITY:
- srs: HLR-TYPE-006 , sdd: LLR-066 , sdd: LLR-067
VC-018: Type Validation
Verify analyze queries detect data integrity violations.
- OBJECTIVE:
- Confirm validation catches invalid data
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
invalid_enumorinvalid_castviolation reported for invalid enum inputmissing_requiredviolation reported for missing required datadangling_relationviolation reported for dangling referencestraceability_vc_to_hlr,traceability_tr_to_vc, andtraceability_hlr_to_vcare reported deterministically for broken HLR-VC-TR chains (sw_docs model)traceability_fd_to_cscviolation is reported when an FD has no traceability link to a CSCtraceability_fd_to_csuviolation is reported when an FD has no traceability link to a CSU- Error messages include file path and line number
- APPROACH:
-
- Create document with invalid enum value (
invalid_enum/invalid_cast) - Create document with missing required attribute (
missing_required) - Create document with dangling relation (
dangling_relation) - Run ANALYZE phase, check diagnostics
- TRACEABILITY:
- srs: HLR-TYPE-007 , sdd: LLR-068 , sdd: LLR-069
VC-INT-016: UTF-8 Label Slugification
Verify that generated object labels transliterate UTF-8 titles into stable ASCII slugs.
- OBJECTIVE:
- Confirm object label generation produces deterministic cross-reference labels for titles containing accents, punctuation, and non-ASCII characters.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Accented characters are transliterated consistently
- Punctuation and whitespace normalize to stable slug separators
- Generated labels remain usable as
(#)cross-reference targets
- APPROACH:
-
- Process a document with typed headings containing UTF-8 characters
- Execute the pipeline through initialization and resolution
- Query generated
spec_objects.labelvalues
- TRACEABILITY:
- srs: HLR-TYPE-002 , sdd: LLR-057 , sdd: LLR-058 , sdd: LLR-059
2.7 Extension Verification Cases
VC-019: Model Type Loading
Verify <Type Loader> discovers and loads model types.
- OBJECTIVE:
- Confirm types from models/{model}/types/ are registered
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- All .lua files in types/ directories are loaded
- Type definitions inserted into correct tables
- Errors logged for invalid type modules
- APPROACH:
-
- Create test model with object, float, relation types
- Call TypeLoader.load_model()
- Query type tables for registered types
- TRACEABILITY:
- srs: HLR-EXT-001 , sdd: LLR-094
VC-020: Model Directory Structure
Verify <Type Loader> recognizes all type categories.
- OBJECTIVE:
- Confirm KNOWN_CATEGORIES are all scanned
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- specifications/ types load to spec_specification_types
- objects/ types load to spec_object_types
- floats/ types load to spec_float_types
- relations/ types load to spec_relation_types
- views/ types load to spec_view_types
- APPROACH:
-
- Examine TypeLoader.KNOWN_CATEGORIES constant
- Create types in each category directory
- Verify all are loaded
- TRACEABILITY:
- srs: HLR-EXT-002 , sdd: LLR-EXT-020-01
VC-021: Descriptor Registration
Verify that the host registers descriptor hooks.
- OBJECTIVE:
- Confirm the host indexes behavior hooks and registers phase hooks with the pipeline.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- The behavior hook is available from the host index
- The phase hook is registered under the derived handler name
schema.phase_prerequisitescontrols handler order
- APPROACH:
-
- Create a descriptor with a behavior hook and an
on_<phase>hook - Load the model
- Inspect the host hook index and pipeline handlers
- TRACEABILITY:
- srs: HLR-EXT-003 , sdd: LLR-EXT-021-01 , sdd: LLR-EXT-021-02
VC-022: Type Definition Schema
Verify type modules follow required schema.
- OBJECTIVE:
- Confirm descriptor schemas contain the required fields.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Valid types are inserted into category tables
- A missing
schema.idstops model loading - Category defaults are applied (for example float long_name/counter_group)
- Enum attribute values are persisted
- APPROACH:
-
- Create valid and invalid type modules in a temporary model
- Load model through TypeLoader.load_model()
- Verify that valid schemas register and invalid schemas stop model loading
- TRACEABILITY:
- srs: HLR-EXT-004 , sdd: LLR-EXT-022-01
VC-023: Model Path Resolution
Verify model paths resolve correctly.
- OBJECTIVE:
- Confirm SPECCOMPILER_HOME and project root are checked
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- SPECCOMPILER_HOME/models/{model}/ checked first
- Project root models/{model}/ checked second
- Error if model not found in either location
- APPROACH:
-
- Set SPECCOMPILER_HOME to custom directory with model
- Call TypeLoader.load_model() with model present in both home and cwd
- Verify model found in SPECCOMPILER_HOME
- TRACEABILITY:
- srs: HLR-EXT-005 , sdd: LLR-EXT-023-01 , sdd: LLR-EXT-023-02
VC-024: External Renderer Registration
Verify float types can declare external rendering needs.
- OBJECTIVE:
-
Confirm chart/renderer integration executes and injects view data via
core.data_loaderbefore rendering. - VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Floats with needs_external_render are queued for rendering
- External tools (PlantUML, ECharts) are invoked
viewdata is injected into chart config for standard dataset and sankey flows- Missing/invalid views do not abort render and leave input config intact
- Omitted
viewattributes preserve chart config with no injection side effects
- APPROACH:
-
- Process markdown chart blocks with
view=...attributes - Verify model fallback (
model=sw_docs-> defaultgauss) is applied - Verify dataset and sankey injection paths mutate chart JSON before render
- Verify invalid/missing views preserve original chart config while rendering continues
- Verify no-view and unknown-view-result paths return unchanged config without aborting EMIT
- TRACEABILITY:
- srs: HLR-EXT-006 , sdd: LLR-EXT-024-01 , sdd: LLR-EXT-024-02 , sdd: LLR-EXT-024-03
VC-025: Data View Generator Loading
Verify <Data View> generators are loaded from model directories and injected into chart rendering.
- OBJECTIVE:
- Confirm that data view modules in models/{model}/types/views/ are discovered and their data hooks produce data for chart and table consumers.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- View modules loaded from models/{model}/types/views/
- Resolution uses the host hook index (default overlaid by template model)
- Data hooks receive dctx with subject.params and data (DataManager)
- Return value used as chart data source
allocation_matrix: status=filters the allocation chain rows (inline view params delivered end-to-end)
- APPROACH:
-
- Examine data_loader.load_view() resolution logic (host
datasethook index, loose-module fallback for fixture views) - Verify data hooks receive the frozen DATA ctx (dctx.subject.params, dctx.data)
- Confirm returned dataset is passed to chart float rendering
- Verify inline view params reach table-view
build_blockhooks (e.g.,allocation_matrix: status=completefilters to complete chains)
- TRACEABILITY:
- srs: HLR-EXT-007 , sdd: LLR-095
VC-026: Hook Index
Verify that the host indexes hooks for deterministic dispatch.
- OBJECTIVE:
- Confirm hook lookup uses kind, type identifier, hook name, and the inheritance chain.
- VERIFICATION METHOD:
- Inspection
- PASS CRITERIA:
-
- Direct lookup returns the registered hook
- Inherited lookup returns the nearest hook in the
extendschain - An absent hook returns nil
- Phase hooks do not appear in the behavior-hook index
- APPROACH:
-
- Register a descriptor with a behavior hook
- Query the hook with
get_hook - Register a subtype and query the hook with
get_hook_inherited - Query an absent hook
- TRACEABILITY:
- srs: HLR-EXT-008 , sdd: LLR-096
VC-EXT-009: Canonical Hook Context
Verify that each behavior hook receives one frozen context for its tier.
- OBJECTIVE:
- Confirm render hooks receive a render context and data hooks receive a data context.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Each hook receives one frozen context table
- Render hooks receive Pandoc and format fields
- Data hooks receive the fields required for data processing
- An invalid hook for the descriptor kind stops registration
- APPROACH:
-
- Build a model whose object, view, float, relation, and analyze hooks read
ctx.subject - Exercise one render hook and one data hook
- Confirm
ctx:require(field)raises on nil
- TRACEABILITY:
- srs: HLR-EXT-009
VC-EXT-010: Model Manifest
Verify that the host loads manifest dependencies before the selected model.
- OBJECTIVE:
-
Confirm
model.yamldependencies define a deterministic load order. - VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Required models load before the requesting model
- Each model loads at most once
- An absent selected or required model stops the build
- APPROACH:
-
- Load a model whose
model.yamldeclaresrequires: [base_model] - Verify that the host loads
base_modelbefore the selected model - Request an absent model
- TRACEABILITY:
- srs: HLR-EXT-010
VC-EXT-011: Descriptor and Hook Validation
Verify descriptor and hook validation during registration.
- OBJECTIVE:
- Confirm the host indexes valid hooks and rejects invalid descriptors.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- A well-formed descriptor registers and its hooks are reachable via
get_hook/get_hook_inherited - Unknown kind, missing id, and an invalid-for-kind hook each abort at registration
- A function smuggled onto a top-level descriptor key is rejected (behavior must live in
hooks) - A view extending TABLE_VIEW with no
build_blockis rejected atfinalize()
- APPROACH:
-
- Register descriptors of each kind and query the host hook index
- Register malformed descriptors: unknown kind, missing
schema.id, a hook not valid for the kind, a top-level function key, a TABLE_VIEW subtype with nobuild_block - Confirm each malformed case is a register-time (or finalize-time) error
- TRACEABILITY:
- srs: HLR-EXT-011
VC-EXT-012: Analyze Query Descriptor
Verify that a kind = "analyze"
descriptor enters the ordered policy registry.
- OBJECTIVE:
-
Confirm
{schema = {policy_key, view, sql, disabled}, hooks = {message}}descriptors feed the ordered registry, that a later model overrides an earlier policy_key in place, and thatdisabled=trueremoves it. - VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Analyze descriptors use the same descriptor registration path as type modules
- A repeated policy key replaces its entry without changing its position
- A disabled descriptor removes its policy key
- ANALYZE uses the descriptor’s
messagehook for diagnostics
- APPROACH:
-
- Register two analyze descriptors with the same
policy_key - Register an analyze descriptor with
disabled = true - Run ANALYZE and inspect diagnostics from active queries
- TRACEABILITY:
- srs: HLR-EXT-012
VC-CFG-001: Manifest-Only Configuration
Verify that build options come from the frozen project configuration.
- OBJECTIVE:
- Confirm environment variables do not replace project build options.
- VERIFICATION METHOD:
- Analysis
- PASS CRITERIA:
-
- No
os.getenvread sources a build configuration value project.yamlis authoritative for build options- The host freezes the context configuration
- Environment reads only locate tools or detect runtime conditions
- APPROACH:
-
- Inspect project configuration loading
- Inspect environment-variable reads for toolchain paths and terminal detection
- Confirm the config slice threaded onto
ctx.configis frozen
- TRACEABILITY:
- srs: HLR-CFG-001
2.8 Output Verification Cases
VC-031: Document Assembly
Verify documents are correctly assembled from database.
- OBJECTIVE:
- Confirm Assembler reconstructs complete document
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Document title from specifications.header_ast
- All objects in file_seq order
- Floats embedded at correct positions
- Views materialized with resolved content
- APPROACH:
-
- Process document through TRANSFORM phase
- Call Assembler.assemble_document()
- Verify output contains all spec_objects and spec_floats in order
- TRACEABILITY:
- srs: HLR-OUT-001 , sdd: LLR-070 , sdd: LLR-071 , sdd: LLR-072
VC-032: Float Resolution
Verify floats are resolved with rendered content.
- OBJECTIVE:
- Confirm raw_ast replaced with resolved_ast
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- PlantUML code blocks converted to SVG images
- ECharts blocks converted to PNG images
- Math blocks converted to OMML or MathML
- resolved_ast non-NULL after resolution
- Resolved floats wrapped in Div with semantic classes (
speccompiler-float, type-specific class) - Bookmark anchors present on resolved float Divs
- Captions include type prefix and sequential number
- APPROACH:
-
- Process document with PlantUML float
- Run float_resolver
- Verify resolved_ast contains SVG image
- TRACEABILITY:
- srs: HLR-OUT-002 , sdd: LLR-073 , sdd: LLR-074 , sdd: LLR-075
VC-027: Float Numbering
Verify floats receive sequential numbers.
- OBJECTIVE:
- Confirm <Counter Group> share numbering
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Numbers assigned sequentially within counter_group
- FIGURE and CHART share same counter (both FIGURE group)
- TABLE has separate counter
- Numbers span across documents
- APPROACH:
-
- Process 2 documents with figures and charts
- Run float_numbering
- Query spec_floats.number values
- TRACEABILITY:
- srs: HLR-OUT-003 , sdd: LLR-076 , sdd: LLR-077
VC-028: Multi-Format Output
Verify multiple output formats generated.
- OBJECTIVE:
- Confirm DOCX and HTML5 both produced
- VERIFICATION METHOD:
- Demonstration
- PASS CRITERIA:
-
- DOCX file generated at configured path
- HTML5 file generated at configured path
- Both contain same content
- Output cache tracks each format separately
- APPROACH:
-
- Configure project with outputs: [{format: docx}, {format: html5}]
- Build project
- Verify both files created in build directory
- TRACEABILITY:
- srs: HLR-OUT-004 , sdd: LLR-078 , sdd: LLR-079
VC-029: DOCX Generation
Verify DOCX output uses reference document.
- OBJECTIVE:
- Confirm styles applied from reference.docx
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Preset files load and merge according to extends-chain precedence
- Circular and missing-base extends chains fail with deterministic errors
- Heading styles match reference document
- Custom styles (Caption, Code) applied correctly
- Page layout matches reference
- Editing an inherited base preset invalidates the cached reference.docx
- First-row table cells are top-aligned and unrelated vertical alignment remains unchanged
- OOXML postprocessing applied
- No hyperlink anchor or field reference dangles without a matching bookmark
- LibreOffice finalization (docx.update_fields / docx.export_pdf) updates fields in place and produces a valid PDF
- APPROACH:
-
- Execute markdown-driven preset loader probe with layered DOCX preset files
- Verify extends-chain merge, optional format styles, and validation behavior
- Verify preset lookup and style resolution for DOCX float/object rendering paths
- Verify reference caching hashes the complete preset extends chain
- Verify generated reference.docx table headers are top-aligned without changing unrelated styles
- Unzip postprocessed DOCX and verify every hyperlink anchor and PAGEREF/REF field resolves to a bookmark
- When LibreOffice/UNO is available, round-trip the DOCX through field update and PDF export and re-verify bookmark integrity
- TRACEABILITY:
- srs: HLR-OUT-005 , sdd: LLR-OUT-029-01
VC-030: HTML5 Generation
Verify HTML5 output is web-ready.
- OBJECTIVE:
- Confirm HTML5 includes navigation and styling
- VERIFICATION METHOD:
- Demonstration
- PASS CRITERIA:
-
- HTML5 file renders correctly in browser
- Internal links (#anchors) navigate correctly
- CSS styles applied
- Search index generated if configured
- APPROACH:
-
- Generate HTML5 output
- Open in browser
- Verify navigation, styling, and cross-references work
- TRACEABILITY:
- srs: HLR-OUT-006 , sdd: LLR-080 , sdd: LLR-081
VC-OUT-001: Document Assembly
Verify document structure, ordering, and float/view inclusion in assembled output.
- OBJECTIVE:
- Confirm that the assembler produces a Pandoc document with correct specification title Div, section headers in document order, float captions, and consumed attribute blockquotes.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- First block is spec title Div with correct PID
- Section headers appear in document order
- Float caption with class “speccompiler-caption” present
- Attribute-pattern blockquotes consumed by TRANSFORM
- APPROACH:
-
- Process test document with specification header, two sections, a float with caption, and an attribute blockquote
- Execute pipeline through all five phases with JSON output
- Oracle verifies spec title Div, header order, caption presence, and attribute consumption
- TRACEABILITY:
- srs: HLR-OUT-001 , sdd: LLR-070 , sdd: LLR-071 , sdd: LLR-072
VC-OUT-004: Render Decoration
Verify header classes, bookmarks, and structural decorations in rendered output.
- OBJECTIVE:
- Confirm that render utilities apply correct CSS classes, bookmark anchors, and structural decorations to spec objects during EMIT phase.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Headers receive appropriate Div wrappers with type-based classes
- Bookmark anchors inserted for cross-reference navigation
- Structural decoration preserves document semantics
- APPROACH:
-
- Process test document with typed spec objects
- Execute pipeline through all five phases with JSON output
- Oracle verifies Div wrappers, classes, and bookmark anchors
- TRACEABILITY:
- srs: HLR-OUT-001 , sdd: LLR-070 , sdd: LLR-071 , sdd: LLR-072
VC-OUT-005: Spec Object Render Handler
Verify that object type handlers are loaded and dispatched during TRANSFORM phase, and that composite object heading IDs are patched.
- OBJECTIVE:
- Confirm that load_type_handler loads object type modules, on_render_SpecObject dispatches to type-specific renderers producing semantic output, and composite heading IDs are patched to match their PIDs.
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- COVER type handler invoked: cover-title, cover-subtitle, cover-author, cover-date, cover-docid, cover-version Divs present
- Cover section markers (RawBlocks) emitted
- Composite objects (EXEC_SUMMARY, SECTION) retain headers after heading ID patching
- APPROACH:
-
- Process test document with COVER, EXEC_SUMMARY, and SECTION objects
- Execute pipeline through all five phases with JSON output
- Oracle verifies cover semantic Divs, section markers, and composite heading presence
- TRACEABILITY:
- srs: HLR-EXT-001 , srs: HLR-OUT-001 , sdd: LLR-094
VC-OUT-007: Full-Text Search Indexing
Verify that <Full-Text Search> virtual tables are populated with specification content during the <EMIT Phase> phase.
- OBJECTIVE:
- Confirm FTS5 tables contain indexed content from spec objects, attributes, and floats
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
fts_objectscontains entries for all spec object titles and body textfts_attributescontains entries for all string attribute valuesfts_floatscontains entries for float captions and raw content- FTS5 MATCH queries return correct results for known content
- AST content is converted to plain text before indexing (no JSON fragments)
- APPROACH:
-
- Process a document with spec objects, attributes, and floats
- Execute pipeline through EMIT phase
- Query
fts_objects,fts_attributes, andfts_floatstables - Verify search queries return expected results
- TRACEABILITY:
- srs: HLR-OUT-007 , sdd: LLR-082 , sdd: LLR-083
VC-OUT-008: Heading Hierarchy Well-formedness
Verify that header levels assembled across cross-file includes form a well-formed tree, that the renderer maps them to the correct heading depth, and that structurally invalid hierarchies are rejected before emission.
- OBJECTIVE:
-
Confirm that the
object_broken_hierarchyanalyze query rejects skipped heading levels and orphaned roots, that heading levels shifted by include expansion form a well-formed tree across deep include nesting, and that the assembler maps valid levels to the correct DOCX Heading style (siblings share a style, children nest one deeper, ascending returns to the shallower style). - VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Include expansion shifts each included file’s headings by the level at its include point (see VC-OUT-011); the shifted levels form a contiguous tree across the whole chain
- Valid hierarchy maps to
Heading1..5so that siblings share a style, each child is exactly one level deeper, and an ascent returns to the shallower style - A skipped level raises an
object_broken_hierarchyerror naming the skipped level - An orphaned root raises an
object_broken_hierarchyerror, including when the parent chapter is one include deep - The contiguous control raises no
object_broken_hierarchydiagnostic
- APPROACH:
-
- Build a five-file-deep include chain of standalone files (each starting at
#) mixing descents, an ascent back to a shallower level, and sibling chapters; generate DOCX and assert thew:pStyleof each heading in document order - Build fixtures with a skipped level (
##then####) and with an orphaned root (a document opening at level 3 with a shallower level-2 heading later, including the case where the chapter is one include deeper than the section) - Build a contiguous multi-level control with an ascent
- TRACEABILITY:
- srs: HLR-OUT-001 , srs: HLR-PIPE-008
VC-OUT-009: Section Scope Termination
Verify that a ---- thematic
break closes the current section’s scope, is consumed from output, and
that empty headings are rejected.
- OBJECTIVE:
-
Confirm that a
----truncates the enclosing spec object’send_line(so trailing content/floats are contained by the parent), that the marker produces no horizontal rule in the DOCX, that content after the marker keeps its document position, and that an empty heading is reported byobject_broken_hierarchy. - VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- The section’s
end_lineends at the last block before the----, not at the next header - The DOCX contains no horizontal-rule paragraph for the consumed marker
- Content following the
----renders in its original position - An empty heading raises
object_broken_hierarchyand the message directs the author to use----
- APPROACH:
-
- Build a section containing body, a
----, and trailing content; queryspec_objects.end_lineand assert it truncates at the marker - Generate DOCX and assert no horizontal-rule border is emitted and the trailing content is still present in document order
- Build a fixture with an empty
##heading and assert anobject_broken_hierarchyerror is raised
- TRACEABILITY:
- srs: HLR-PIPE-012 , srs: HLR-OUT-001
VC-OUT-010: Cross-Format Heading Consistency
Verify that LaTeX and DOCX render the same heading at the same depth, since both are produced from one assembled IR.
- OBJECTIVE:
-
Confirm that a heading maps to the same depth in every output format — a
section is
\sectionin LaTeX and Heading2 in DOCX, never one nesting level deeper in one format than the other. - VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- The number of headings matches across formats
- Each heading’s depth is identical in LaTeX and DOCX
- APPROACH:
-
- Build one multi-level fixture (chapter / section / subsection) to both LaTeX and DOCX
- Extract the ordered (depth, title) sequence from each: LaTeX
\chapter/\section/\subsection-> 1/2/3; DOCX Heading1/2/3 -> 1/2/3 - Assert the two sequences are identical
- TRACEABILITY:
- srs: HLR-OUT-001 , srs: HLR-OUT-004
VC-OUT-011: Include Heading Level Shift
Verify that include expansion places the shallowest included heading one level below the active heading. Verify source files that start at different heading levels.
- OBJECTIVE:
-
Confirm that the shallowest included heading nests one level below the
section containing the include directive, that relative depths and
malformed gaps are preserved, that nested includes compose their shifts,
and that a
----section close pops the include context back to the parent level. - VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- An included
#under a##section renders one level deeper than the section (###), and its##renders as#### - A file included under the first file’s
##composes both shifts (its#renders at level 5) - After a
----, the included#renders at the closed section’s own level (a sibling) - Headings authored in the including file keep their literal level
- All paths in one include block share the include point’s shift; spliced content never changes the context for a later directive in the same file
- A
----inside an included file pops that file’s own context before a nested include - Files whose shallowest heading is
##or###normalize that heading to one level below the include point without changing their source Markdown - A skipped relative level inside an included file remains skipped and raises an
object_broken_hierarchydiagnostic - Computed levels 7 and 8 remain distinct in SpecIR; whole-document normalization preserves their relative depths and DOCX renders the deepest result with
Heading7rather than clamping it toHeading6
- APPROACH:
-
- Build a document with an include under a level-2 section whose included file contains
#and##headings, itself including a third file under its own##; generate DOCX and assert thew:pStyleof each heading in document order - After a
----that closes the level-2 section, include a further standalone file and assert its#lands as a sibling of the level-2 sections - Build a combination document: a multi-section included file with internal multi-level structure and ascents, several paths in one include block, a sibling include after deep spliced content, an include under a level-3 heading, single and double
----pops, a prose-only include, and an included file that closes its own section with----before nesting a further include - Build compatibility fixtures whose included files start at
##and###, a malformed relative-gap fixture, and a deep include fixture whose computed levels reach 7 and 8
- TRACEABILITY:
- srs: HLR-OUT-001 , srs: HLR-PIPE-008 , sdd: LLR-071
2.9 Audit & Integrity Verification Cases
VC-AUDIT-001: Content-Addressed Hashing
Verify that SHA1 content hashing correctly detects document changes and skips unchanged documents.
- OBJECTIVE:
-
Confirm that the build engine computes SHA1 hashes, caches them as
build_graphnodes, and correctly distinguishes dirty from clean documents - VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Unchanged documents produce cache hits (no re-parsing)
- Modified documents produce cache misses (full reprocessing)
- Hash values in
build_graphnodes match actual file content SHA1 - Hashes are not updated when ANALYZE phase produces errors
- APPROACH:
-
- Build a project with two documents
- Rebuild without changes; verify both documents are skipped (cache hit)
- Modify one document; rebuild and verify only the modified document is reprocessed
- Verify the
build_graphroot node contains the updated hash after successful build
- TRACEABILITY:
- srs: HLR-AUDIT-001 , sdd: LLR-084 , sdd: LLR-085
VC-AUDIT-002: Include Dependency Tracking
Verify that include file changes trigger parent document rebuilds and that circular includes are detected.
- OBJECTIVE:
- Confirm that the build graph tracks include dependencies and detects cycles
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
build_graphtable contains entries for root document and all included files- Modifying an included file triggers rebuild of the root document
- Circular includes produce a diagnostic error before pipeline execution
- Include paths are resolved relative to the including file’s directory
- APPROACH:
-
- Build a project where document A includes file B
- Modify file B without changing document A; rebuild
- Verify document A is rebuilt due to include dependency
- Create a circular include (A includes B, B includes A)
- Verify circular include produces an error diagnostic
- TRACEABILITY:
- srs: HLR-AUDIT-002 , sdd: LLR-086 , sdd: LLR-087
VC-AUDIT-003: Structured Diagnostic Reporting
Verify that the diagnostics system collects errors and warnings with source location information.
- OBJECTIVE:
- Confirm that diagnostic collection, severity control, and abort behavior work correctly
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Each diagnostic contains non-empty file, line, code, and message fields
has_errors()returns true when errors exist, false for warnings only- Pipeline does not execute EMIT phase when
has_errors()is true - Warnings are reported but do not prevent output generation
- APPROACH:
-
- Process a document with known validation errors (missing required attribute, invalid enum)
- Verify each error includes file path, line number, diagnostic code, and message
- Verify
has_errors()returns true after error collection - Verify pipeline aborts before EMIT when errors exist
- Process a document with warnings only; verify pipeline continues to EMIT
- TRACEABILITY:
- srs: HLR-AUDIT-003 , sdd: LLR-088 , sdd: LLR-089
VC-AUDIT-004: Structured Logging
Verify that the logger produces correctly formatted output in both NDJSON and console modes.
- OBJECTIVE:
- Confirm TTY-aware mode selection, NDJSON format compliance, and NO_COLOR support
- VERIFICATION METHOD:
- Inspection
- PASS CRITERIA:
-
- Non-TTY output consists of valid JSON objects, one per line
- Each JSON object contains at minimum: level, message, timestamp
- TTY output includes ANSI color codes for level indicators
- Setting NO_COLOR environment variable suppresses ANSI codes
- Messages below configured log level are not emitted
- APPROACH:
-
- Inspect logger output in non-TTY mode (piped to file)
- Verify each line is valid JSON with required fields (level, message, timestamp)
- Inspect logger output in TTY mode
- Verify ANSI color codes are present in normal mode and absent when NO_COLOR is set
- Verify log level filtering respects configured level
- TRACEABILITY:
- srs: HLR-AUDIT-004 , sdd: LLR-090 , sdd: LLR-091
VC-AUDIT-005: Build Reproducibility
Verify that identical inputs produce identical outputs across separate build invocations.
- OBJECTIVE:
- Confirm deterministic compilation from source to output
- VERIFICATION METHOD:
- Test
- PASS CRITERIA:
-
- Output files from both builds have identical SHA1 hashes
- Float numbering is identical across builds
- Cross-reference link targets are identical across builds
- Handler execution order is identical across builds (verified via debug logging)
- APPROACH:
-
- Build a project with multiple documents, floats, and cross-references
- Record SHA1 hashes of all output files (DOCX, HTML5)
- Delete build cache and rebuild from scratch
- Compare output file hashes against the first build
- TRACEABILITY:
- srs: HLR-AUDIT-005 , sdd: LLR-092 , sdd: LLR-093
2.10 SpecCompiler Core Test Results
version: 1.0
2.10.1 Scope
This document contains test result objects generated from automated e2e test execution. Each TR traces to a Verification Case (VC) defined in the SVC.
TR-002-01: 002 01 Handler Registration
- DURATION MS:
- 50
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/pipeline/vc_002_01_handler_registration.md
- TRACEABILITY:
- VC-002
TR-006-01: 006 01 Context Propagation
- DURATION MS:
- 54
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/pipeline/vc_006_01_context_propagation.md
- TRACEABILITY:
- VC-006
TR-PIPE-007-01: Pipe 007 01 Sourcepos Compat
- DURATION MS:
- 47
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_pipe_007_01_sourcepos_compat.md
- TRACEABILITY:
- VC-PIPE-007
TR-PIPE-012-01: Pipe 012 01 Prereq Not Found
- DURATION MS:
- 40
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/pipeline/vc_pipe_012_01_prereq_not_found.md
- TRACEABILITY:
- VC-PIPE-012
TR-PIPE-013-01: Pipe 013 01 Stale Relation Rebind
- DURATION MS:
- 183
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/pipeline/vc_pipe_013_01_stale_relation_rebind.md
- TRACEABILITY:
- VC-PIPE-013
TR-PIPE-014-01: Pipe 014 01 Stale View Cross Doc
- DURATION MS:
- 249
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/pipeline/vc_pipe_014_01_stale_view_cross_doc.md
- TRACEABILITY:
- VC-PIPE-014
TR-PIPE-014-02: Pipe 014 02 Stale Allocation View
- DURATION MS:
- 231
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/pipeline/vc_pipe_014_02_stale_allocation_view.md
- TRACEABILITY:
- VC-PIPE-014
TR-007-01: 007 01 Db Persistence
- DURATION MS:
- 102
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/database/vc_007_01_db_persistence.md
- TRACEABILITY:
- VC-007
TR-008-01: 008 01 Cast Datatype Matrix
- DURATION MS:
- 82
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/casting/vc_008_01_cast_datatype_matrix.md
- TRACEABILITY:
- VC-008
TR-008-02: 008 02 Cast Negative
- DURATION MS:
- 76
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/casting_negative/vc_008_02_cast_negative.md
- TRACEABILITY:
- VC-008
TR-009-01: 009 01 Incremental Cache
- DURATION MS:
- 287
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/pipeline/vc_009_01_incremental_cache.md
- TRACEABILITY:
- VC-009
TR-010-01: 010 01 Incremental Multi Emit
- DURATION MS:
- 728
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/pipeline/vc_010_01_incremental_multi_emit.md
- TRACEABILITY:
- VC-010
TR-033-01: 033 01 Eav Views
- DURATION MS:
- 166
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/pivot/vc_033_01_eav_views.md
- TRACEABILITY:
- VC-033
TR-013-01: 013 01 Document Walker
- DURATION MS:
- 78
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_013_01_document_walker.md
- TRACEABILITY:
- VC-013
TR-013-02: 013 02 Syntax Parsing
- DURATION MS:
- 109
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/syntax/vc_013_02_syntax_parsing.md
- TRACEABILITY:
- VC-013
TR-014-01: 014 01 Float Syntax
- DURATION MS:
- 98
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/floats/vc_014_01_float_syntax.md
- TRACEABILITY:
- VC-014
TR-014-02: 014 02 Float Tables
- DURATION MS:
- 68
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/floats/vc_014_02_float_tables.md
- TRACEABILITY:
- VC-014
TR-014-03: 014 03 Float Figures
- DURATION MS:
- 46
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/floats/vc_014_03_float_figures.md
- TRACEABILITY:
- VC-014
TR-014-04: 014 04 Float Base
- DURATION MS:
- 43
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_014_04_float_base.md
- TRACEABILITY:
- VC-014
TR-014-05: 014 05 Spec Floats
- DURATION MS:
- 43
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_014_05_spec_floats.md
- TRACEABILITY:
- VC-014
TR-014-06: 014 06 Float Utilities
- DURATION MS:
- 61
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_014_06_float_utilities.md
- TRACEABILITY:
- VC-014
TR-014-07: 014 07 Emit Float
- DURATION MS:
- 50
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_014_07_emit_float.md
- TRACEABILITY:
- VC-014
TR-014-08: 014 08 Logger Paths
- DURATION MS:
- 49
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_014_08_logger_paths.md
- TRACEABILITY:
- VC-014
TR-014-09: 014 09 Figure Copy
- DURATION MS:
- 51
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/floats/vc_014_09_figure_copy.md
- TRACEABILITY:
- VC-014
TR-014-10: 014 10 Figure Include From File
- DURATION MS:
- 47
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/floats/vc_014_10_figure_include_from_file.md
- TRACEABILITY:
- VC-014
TR-015-01: 015 01 Relation Resolver
- DURATION MS:
- 53
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_015_01_relation_resolver.md
- TRACEABILITY:
- VC-015
TR-015-02: 015 02 Relation Edges
- DURATION MS:
- 58
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_015_02_relation_edges.md
- TRACEABILITY:
- VC-015
TR-015-03: 015 03 Links
- DURATION MS:
- 103
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/relations/vc_015_03_links.md
- TRACEABILITY:
- VC-015
TR-015-04: 015 04 Xref
- DURATION MS:
- 59
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/relations/vc_015_04_xref.md
- TRACEABILITY:
- VC-015
TR-015-05: 015 05 Citations
- DURATION MS:
- 49
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/relations/vc_015_05_citations.md
- TRACEABILITY:
- VC-015
TR-015-06: 015 06 Scoped Resolution
- DURATION MS:
- 50
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/relations/vc_015_06_scoped_resolution.md
- TRACEABILITY:
- VC-015
TR-015-07: 015 07 Attribute Scope Prefixes
- DURATION MS:
- 69
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/relations/vc_015_07_attribute_scope_prefixes.md
- TRACEABILITY:
- VC-015
TR-015-08: 015 08 Scoped Label Resolution
- DURATION MS:
- 63
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/relations/vc_015_08_scoped_label_resolution.md
- TRACEABILITY:
- VC-015
TR-015-09: 015 09 Section Xrefs
- DURATION MS:
- 51
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/relations/vc_015_09_section_xrefs.md
- TRACEABILITY:
- VC-015
TR-015-10: 015 10 Type Inference
- DURATION MS:
- 63
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/relations/vc_015_10_type_inference.md
- TRACEABILITY:
- VC-015
TR-016-01: 016 01 View Render
- DURATION MS:
- 45
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_016_01_view_render.md
- TRACEABILITY:
- VC-016
TR-016-02: 016 02 View Utils
- DURATION MS:
- 40
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_016_02_view_utils.md
- TRACEABILITY:
- VC-016
TR-016-03: 016 03 Inline Views
- DURATION MS:
- 88
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/views/vc_016_03_inline_views.md
- TRACEABILITY:
- VC-016
TR-016-04: 016 04 View Render Characterization
- DURATION MS:
- 45
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/views/vc_016_04_view_render_characterization.md
- TRACEABILITY:
- VC-016
TR-016-05: 016 05 View Params
- DURATION MS:
- 38
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/views/vc_016_05_view_params.md
- TRACEABILITY:
- VC-016
TR-017-01: 017 01 Attribute Caster
- DURATION MS:
- 43
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_017_01_attribute_caster.md
- TRACEABILITY:
- VC-017
TR-017-02: 017 02 Attribute Para Utils
- DURATION MS:
- 44
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_017_02_attribute_para_utils.md
- TRACEABILITY:
- VC-017
TR-017-03: 017 03 Attr Dedup
- DURATION MS:
- 129
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs_types/vc_017_03_attr_dedup.md
- TRACEABILITY:
- VC-017
TR-017-04: 017 04 Syntax Attributes
- DURATION MS:
- 120
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/syntax/vc_017_04_syntax_attributes.md
- TRACEABILITY:
- VC-017
TR-018-01: 018 01 Db Validation
- DURATION MS:
- 59
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/database/vc_018_01_db_validation.md
- TRACEABILITY:
- VC-018
TR-018-02: 018 02 Verify Object Attrs
- DURATION MS:
- 155
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_02_verify_object_attrs.md
- TRACEABILITY:
- VC-018
TR-018-03: 018 03 Verify Floats
- DURATION MS:
- 117
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_03_verify_floats.md
- TRACEABILITY:
- VC-018
TR-018-04: 018 04 Verify Relations
- DURATION MS:
- 110
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_04_verify_relations.md
- TRACEABILITY:
- VC-018
TR-018-05: 018 05 Verify Views
- DURATION MS:
- 89
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_05_verify_views.md
- TRACEABILITY:
- VC-018
TR-018-07: 018 07 Verify Invalid Spec Type
- DURATION MS:
- 49
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_07_verify_invalid_spec_type.md
- TRACEABILITY:
- VC-018
TR-018-09: 018 09 Verify Inherited Enum
- DURATION MS:
- 52
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_09_verify_inherited_enum.md
- TRACEABILITY:
- VC-018
TR-018-10: 018 10 Verify Cast Failures
- DURATION MS:
- 54
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_10_verify_cast_failures.md
- TRACEABILITY:
- VC-018
TR-018-11: 018 11 Verify Duplicate Pid
- DURATION MS:
- 61
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_11_verify_duplicate_pid.md
- TRACEABILITY:
- VC-018
TR-018-12: 018 12 Verify Traceability Csu Fd
- DURATION MS:
- 68
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_12_verify_traceability_csu_fd.md
- TRACEABILITY:
- VC-018
TR-018-13: 018 13 Verify Cast Multitype
- DURATION MS:
- 74
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_13_verify_cast_multitype.md
- TRACEABILITY:
- VC-018
TR-018-14: 018 14 Verify Float Last Section
- DURATION MS:
- 82
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/verify/vc_018_14_verify_float_last_section.md
- TRACEABILITY:
- VC-018
TR-019-01: 019 01 Preset Load Chain
- DURATION MS:
- 73
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/preset/vc_019_01_preset_load_chain.md
- TRACEABILITY:
- VC-019
TR-019-02: 019 02 Sf Type
- DURATION MS:
- 105
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs_types/vc_019_02_sf_type.md
- TRACEABILITY:
- VC-019
TR-019-03: 019 03 Nfr Type
- DURATION MS:
- 111
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs_types/vc_019_03_nfr_type.md
- TRACEABILITY:
- VC-019
TR-019-04: 019 04 Realizes Relation
- DURATION MS:
- 109
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs_types/vc_019_04_realizes_relation.md
- TRACEABILITY:
- VC-019
TR-019-05: 019 05 Xref Decomposition
- DURATION MS:
- 81
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs_types/vc_019_05_xref_decomposition.md
- TRACEABILITY:
- VC-019
TR-019-06: 019 06 Xref Dic
- DURATION MS:
- 85
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs_types/vc_019_06_xref_dic.md
- TRACEABILITY:
- VC-019
TR-020-01: 020 01 Model Directory Structure
- DURATION MS:
- 69
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_020_01_model_directory_structure.md
- TRACEABILITY:
- VC-020
TR-021-01: 021 01 Handler Registration Interface
- DURATION MS:
- 35
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_021_01_handler_registration_interface.md
- TRACEABILITY:
- VC-021
TR-022-01: 022 01 Type Definition Schema
- DURATION MS:
- 35
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_022_01_type_definition_schema.md
- TRACEABILITY:
- VC-022
TR-023-01: 023 01 Model Path Resolution
- DURATION MS:
- 36
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_023_01_model_path_resolution.md
- TRACEABILITY:
- VC-023
TR-024-01: 024 01 Plantuml
- DURATION MS:
- 58
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/floats/vc_024_01_plantuml.md
- TRACEABILITY:
- VC-024
TR-025-02: 025 02 View Registration
- DURATION MS:
- 76
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/views/vc_025_02_view_registration.md
- TRACEABILITY:
- VC-025
TR-025-03: 025 03 Traceability Matrix
- DURATION MS:
- 141
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs-tests/vc_025_03_traceability_matrix.md
- TRACEABILITY:
- VC-025
TR-025-04: 025 04 Test Results Matrix
- DURATION MS:
- 87
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs-tests/vc_025_04_test_results_matrix.md
- TRACEABILITY:
- VC-025
TR-025-05: 025 05 Traceability Matrix Block Empty
- DURATION MS:
- 50
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs-tests/vc_025_05_traceability_matrix_block_empty.md
- TRACEABILITY:
- VC-025
TR-025-06: 025 06 Traceability Matrix Textblock Empty
- DURATION MS:
- 72
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs-tests/vc_025_06_traceability_matrix_textblock_empty.md
- TRACEABILITY:
- VC-025
TR-025-07: 025 07 Test Results Matrix Block Empty
- DURATION MS:
- 62
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs-tests/vc_025_07_test_results_matrix_block_empty.md
- TRACEABILITY:
- VC-025
TR-025-08: 025 08 Test Results Matrix Textblock Empty
- DURATION MS:
- 59
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs-tests/vc_025_08_test_results_matrix_textblock_empty.md
- TRACEABILITY:
- VC-025
TR-025-09: 025 09 Test Execution Matrix
- DURATION MS:
- 66
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs-tests/vc_025_09_test_execution_matrix.md
- TRACEABILITY:
- VC-025
TR-025-10: 025 10 Allocation Matrix Param
- DURATION MS:
- 106
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/sw_docs-tests/vc_025_10_allocation_matrix_param.md
- TRACEABILITY:
- VC-025
TR-EXT-009-01: Ext 009 01 Canonical Ctx
- DURATION MS:
- 39
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_ext_009_01_canonical_ctx.md
- TRACEABILITY:
- VC-EXT-009
TR-EXT-011-01: Ext 011 01 Host Registry
- DURATION MS:
- 37
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_ext_011_01_host_registry.md
- TRACEABILITY:
- VC-EXT-011
TR-EXT-011-02: Ext 011 02 Inherited Card Render
- DURATION MS:
- 48
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_ext_011_02_inherited_card_render.md
- TRACEABILITY:
- VC-EXT-011
TR-EXT-011-03: Ext 011 03 Float Render Index
- DURATION MS:
- 49
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_ext_011_03_float_render_index.md
- TRACEABILITY:
- VC-EXT-011
TR-EXT-011-04: Ext 011 04 External Float Hooks
- DURATION MS:
- 50
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_ext_011_04_external_float_hooks.md
- TRACEABILITY:
- VC-EXT-011
TR-EXT-011-05: Ext 011 05 Hook Return Contracts
- DURATION MS:
- 50
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_ext_011_05_hook_return_contracts.md
- TRACEABILITY:
- VC-EXT-011
TR-EXT-012-01: Ext 012 01 Verification Descriptor
- DURATION MS:
- 52
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/extension/vc_ext_012_01_verification_descriptor.md
- TRACEABILITY:
- VC-EXT-012
TR-027-01: 027 01 Float Numbering
- DURATION MS:
- 54
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_027_01_float_numbering.md
- TRACEABILITY:
- VC-027
TR-028-01: 028 01 Output Formats
- DURATION MS:
- 107
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/output/vc_028_01_output_formats.md
- TRACEABILITY:
- VC-028
TR-028-02: 028 02 Bibliography
- DURATION MS:
- 50
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/output/vc_028_02_bibliography.md
- TRACEABILITY:
- VC-028
TR-029-01: 029 01 Ooxml Schema Validation
- DURATION MS:
- 297
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/ooxml/vc_029_01_ooxml_schema_validation.md
- TRACEABILITY:
- VC-029
TR-029-02: 029 02 Ooxml Validator Selftest
- DURATION MS:
- 168
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/ooxml/vc_029_02_ooxml_validator_selftest.md
- TRACEABILITY:
- VC-029
TR-029-03: 029 03 Caption Seq Cache
- DURATION MS:
- 176
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/ooxml/vc_029_03_caption_seq_cache.md
- TRACEABILITY:
- VC-029
TR-029-04: 029 04 Bookmark Resolution
- DURATION MS:
- 209
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/ooxml/vc_029_04_bookmark_resolution.md
- TRACEABILITY:
- VC-029
TR-029-05: 029 05 Libreoffice Roundtrip
- DURATION MS:
- 201
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/ooxml/vc_029_05_libreoffice_roundtrip.md
- TRACEABILITY:
- VC-029
TR-029-06: 029 06 Reference Cache Chain
- DURATION MS:
- 34
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/preset/vc_029_06_reference_cache_chain.md
- TRACEABILITY:
- VC-029
TR-029-07: 029 07 Reference Table Header
- DURATION MS:
- 121
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/ooxml/vc_029_07_reference_table_header.md
- TRACEABILITY:
- VC-029
TR-030-01: 030 01 Html Options
- DURATION MS:
- 35
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/output/vc_030_01_html_options.md
- TRACEABILITY:
- VC-030
TR-030-02: 030 02 Web Generation
- DURATION MS:
- 80
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/webapp/vc_030_02_web_generation.md
- TRACEABILITY:
- VC-030
TR-030-03: 030 03 Web Search
- DURATION MS:
- 52
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/webapp/vc_030_03_web_search.md
- TRACEABILITY:
- VC-030
TR-031-01: 031 01 Assembler
- DURATION MS:
- 41
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_031_01_assembler.md
- TRACEABILITY:
- VC-031
TR-032-01: 032 01 Caption Structure
- DURATION MS:
- 77
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/floats/vc_032_01_caption_structure.md
- TRACEABILITY:
- VC-032
TR-OUT-001-01: Out 001 01 Assembly Order
- DURATION MS:
- 90
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/assembly/vc_out_001_01_assembly_order.md
- TRACEABILITY:
- VC-OUT-001
TR-OUT-004-01: Out 004 01 Render Utils
- DURATION MS:
- 46
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_out_004_01_render_utils.md
- TRACEABILITY:
- VC-OUT-004
TR-OUT-005-01: Out 005 01 Render Handler
- DURATION MS:
- 55
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_out_005_01_render_handler.md
- TRACEABILITY:
- VC-OUT-005
TR-OUT-008-01: Out 008 01 Heading Hierarchy
- DURATION MS:
- 174
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/assembly/vc_out_008_01_heading_hierarchy.md
- TRACEABILITY:
- VC-OUT-008
TR-OUT-008-02: Out 008 02 Broken Hierarchy
- DURATION MS:
- 221
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/assembly/vc_out_008_02_broken_hierarchy.md
- TRACEABILITY:
- VC-OUT-008
TR-OUT-009-01: Out 009 01 Section Close
- DURATION MS:
- 144
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/assembly/vc_out_009_01_section_close.md
- TRACEABILITY:
- VC-OUT-009
TR-OUT-010-01: Out 010 01 Cross Format Levels
- DURATION MS:
- 186
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/assembly/vc_out_010_01_cross_format_levels.md
- TRACEABILITY:
- VC-OUT-010
TR-OUT-011-01: Out 011 01 Include Level Shift
- DURATION MS:
- 208
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/assembly/vc_out_011_01_include_level_shift.md
- TRACEABILITY:
- VC-OUT-011
TR-OUT-011-02: Out 011 02 Include Level Combos
- DURATION MS:
- 313
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/assembly/vc_out_011_02_include_level_combos.md
- TRACEABILITY:
- VC-OUT-011
TR-OUT-011-03: Out 011 03 Include Level Guards
- DURATION MS:
- 382
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/assembly/vc_out_011_03_include_level_guards.md
- TRACEABILITY:
- VC-OUT-011
TR-INT-016-01: Int 016 01 Label Slugify
- DURATION MS:
- 46
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_int_016_01_label_slugify.md
- TRACEABILITY:
- VC-INT-016
TR-CFG-001-01: Cfg 001 01 Manifest Over Env
- DURATION MS:
- 42
- EXECUTED BY:
- E2E Test Runner
- EXECUTION DATE:
- 2026-08-18
- RESULT:
- Pass
- TEST FILE:
- tests/e2e/internals/vc_cfg_001_01_manifest_over_env.md
- TRACEABILITY:
- VC-CFG-001