SpecCompiler Core Design

1 Scope

This document describes the software architecture and design of SpecCompiler Core.

2 Pipeline Architecture

2.1 Overview

SpecCompiler uses a layered architecture with the engine orchestrating a five-phase Pipeline that processes documents through registered Handler.

2.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.

Layer CSC CSUs Responsibility
Core Runtime CSC-001 Core Runtime CSU-001 Pandoc Filter Entry Point, CSU-002 Configuration Parser, CSU-003 Data Loader, CSU-004 Diagnostics Collector, CSU-005 Build Engine, CSU-006 Pipeline Orchestrator, CSU-007 Proof Loader, CSU-008 Type Loader, CSU-009 Validation Policy Pipeline orchestration, metadata/config extraction, model loading, proof loading, validation policy, and runtime control.
Database Persistence CSC-002 Database Persistence CSU-010 Build Cache, CSU-011 Database Handler, CSU-012 Data Manager, CSU-013 Output Cache, CSU-014 Proof View Definitions Canonical insert/query API for SpecIR, transaction handling, build cache, output cache, and proof view definitions.
CSC-005 DB Queries CSU-015 Build Queries, CSU-016 Content Queries, CSU-017 Query Aggregator, CSU-018 Resolution Queries, CSU-019 Search Queries, CSU-020 Type Queries SQL query string modules for all database operations across content, types, build, search, and resolution domains.
CSC-006 DB Schema CSU-021 Build Schema, CSU-022 Content Schema, CSU-023 Schema Aggregator, CSU-024 Search Schema, CSU-025 Type System Schema DDL table creation statements for content, types, build infrastructure, and search tables.
CSC-007 DB Views CSU-026 EAV Pivot Views, CSU-027 Views Aggregator, CSU-028 Public API Views, CSU-029 Resolution Views SQL view definitions for EAV pivots, public API, and resolution helpers.
Pipeline Handlers CSC-003 Pipeline Handlers CSU-030 Include Expansion Filter, CSU-031 Verify Handler Phase handlers implementing initialize, analyze, transform, verify, and emit behavior across five pipeline phases.
CSC-008 Analyze Handlers CSU-032 Attribute Caster, CSU-033 Relation Resolver, CSU-161 Relation Type Inferrer ANALYZE phase handlers for relation resolution, relation type inference, and attribute casting.
CSC-009 Emit Handlers CSU-034 Document Assembler, CSU-035 Float Emitter, CSU-036 View Emitter, CSU-037 Emitter Orchestrator, CSU-038 Float Handler Dispatcher, CSU-039 Float Numbering, CSU-040 Float Resolver, CSU-041 FTS Indexer, CSU-042 Inline Handler Dispatcher, CSU-043 View Handler Dispatcher EMIT phase handlers for document assembly, float resolution, view rendering, FTS indexing, and output generation.
CSC-010 Initialize Handlers CSU-044 Attribute Parser, CSU-046 Float Parser, CSU-047 Object Parser, CSU-048 Relation Parser, CSU-049 View Parser, CSU-050 Specification Parser INITIALIZE phase handlers that parse document AST and populate all SpecIR container tables.
CSC-011 Shared Pipeline Utilities CSU-045 Include Handler, CSU-051 Attribute Paragraph Utilities, CSU-052 Float Base, CSU-053 Include Utilities, CSU-054 Math Render Utilities, CSU-055 Render Utilities, CSU-056 Source Position Compatibility, CSU-057 Specification Base, CSU-058 Spec Object Base, CSU-059 View Utilities Shared infrastructure modules providing base handlers, rendering utilities, and view helpers used across pipeline phases.
CSC-012 Transform Handlers CSU-060 External Render Handler, CSU-061 Float Transformer, CSU-062 Object Render Handler, CSU-063 Specification Render Handler, CSU-064 View Materializer, CSU-162 Relation Link Rewriter TRANSFORM phase handlers for view materialization, external rendering, and spec object/specification rendering.
Infrastructure CSC-004 Infrastructure CSU-065 Hash Utilities, CSU-066 JSON Utilities, CSU-067 Logger, CSU-068 Reference Cache, CSU-069 MathML to OMML Converter Output toolchain integration, hashing, logging, JSON utilities, reference cache management, and external tool wrappers.
CSC-013 Format Utilities CSU-070 Format Writer, CSU-071 XML Utilities, CSU-072 ZIP Utilities Writer adapters, XML utilities, and ZIP archive operations for format-specific output generation.
CSC-014 DOCX Generation CSU-073 OOXML Builder, CSU-074 Preset Loader, CSU-075 Reference Generator, CSU-076 Style Builder OOXML builder, preset loader, reference generator, and style builder for Word document output.
CSC-015 I/O Utilities CSU-077 Document Walker, CSU-078 File Walker AST traversal with source position tracking and basic file I/O operations.
CSC-016 Process Management CSU-079 Pandoc CLI Builder, CSU-080 Task Runner External process spawning via luv and Pandoc command-line argument building.
Default Model CSC-017 Default Model CSU-081 SECTION Object Type, CSU-082 SPEC Specification Type Foundational type model providing base object, float, relation, and view types that all other models extend.
CSC-018 Default Filters CSU-083 DOCX Filter, CSU-084 HTML Filter, CSU-085 Markdown Filter Format-specific Pandoc Lua filters that convert speccompiler markers to native output elements.
CSC-019 Default Postprocessors CSU-086 DOCX Postprocessor, CSU-087 LaTeX Postprocessor Format-specific post-processing applied after Pandoc output generation.
CSC-020 Default Proof Views CSU-089 Spec Missing Required, CSU-090 Spec Invalid Type, CSU-091 Object Missing Required, CSU-092 Object Cardinality Over, CSU-093 Object Cast Failures, CSU-094 Object Invalid Enum, CSU-095 Object Invalid Date, CSU-096 Object Bounds Violation, CSU-097 Float Orphan, CSU-098 Float Duplicate Label, CSU-099 Float Render Failure, CSU-100 Float Invalid Type, CSU-101 Relation Unresolved, CSU-102 Relation Dangling, CSU-103 Relation Ambiguous, CSU-104 View Materialization Failure SQL proof view queries for detecting constraint violations across specifications, objects, floats, relations, and views.
CSC-021 Default Styles CSU-106 DOCX Style Preset, CSU-107 HTML Style Preset Style presets defining page layout, typography, and formatting for DOCX and HTML output.
CSC-022 Default Float Types CSU-108 CHART Float Type, CSU-109 FIGURE Float Type, CSU-110 LISTING Float Type, CSU-111 MATH Float Type, CSU-112 PLANTUML Float Type, CSU-113 TABLE Float Type Float type definitions for numbered content blocks including images, tables, code listings, diagrams, charts, and equations.
CSC-023 Default Relation Types CSU-114 XREF_CITATION Relation Type, CSU-115 XREF_FIGURE Relation Type, CSU-116 XREF_LISTING Relation Type, CSU-117 XREF_MATH Relation Type, CSU-118 XREF_TABLE Relation Type Cross-reference relation type definitions mapping link selectors to target float types.
CSC-024 Default View Types CSU-119 ABBREV View Type, CSU-120 ABBREV_LIST View Type, CSU-121 GAUSS View Type, CSU-122 LOF View Type, CSU-123 MATH_INLINE View Type, CSU-124 TOC View Type View type definitions for inline and block-level data-driven content rendering.
SW Docs Model CSC-025 SW Docs Model CSU-125 HTML5 Postprocessor Domain model for software documentation providing traceable object types, domain-specific proof views, specification types, relation types, and views.
CSC-026 SW Docs Proof Views CSU-126 VC Missing HLR Traceability, CSU-127 TR Missing VC Traceability, CSU-128 HLR Missing VC Coverage, CSU-131 FD Missing CSC Traceability, CSU-132 FD Missing CSU Traceability, CSU-163 CSC Missing FD Allocation, CSU-164 CSU Missing FD Allocation Domain-specific proof view queries for software documentation traceability and naming convention enforcement.
CSC-027 SW Docs Object Types CSU-133 CSC Object Type, CSU-134 CSU Object Type, CSU-135 DD Object Type, CSU-136 DIC Object Type, CSU-137 FD Object Type, CSU-138 HLR Object Type, CSU-139 LLR Object Type, CSU-140 NFR Object Type, CSU-141 SF Object Type, CSU-142 SYMBOL Object Type, CSU-143 TR Object Type, CSU-144 TRACEABLE Base Object Type, CSU-145 VC Object Type Domain object type definitions for traceable specification items including requirements, design decisions, verification cases, and MIL-STD-498 architectural elements.
CSC-028 SW Docs Relation Types CSU-146 BELONGS Relation Type, CSU-147 REALIZES Relation Type, CSU-148 TRACES_TO Relation Type, CSU-149 XREF_DIC Relation Type Domain relation type definitions for traceability links between software documentation elements.
CSC-029 SW Docs Specification Types CSU-150 SDD Specification Type, CSU-151 SRS Specification Type, CSU-152 SUM Specification Type, CSU-153 SVC Specification Type, CSU-154 TRR Specification Type Specification type definitions for SDN document types (SRS, SDD, SVC, SUM, TRR).
CSC-030 SW Docs View Types CSU-155 Coverage Summary View, CSU-156 Requirements Summary View, CSU-157 Test Execution Matrix View, CSU-158 Test Results Matrix View, CSU-159 Traceability Matrix View Domain view type definitions for traceability matrices, test results, and coverage summaries.

3 Type System Architecture

3.1 Overview

SpecCompiler uses a dynamic type system where models define available types for objects, Float, relations, and views.

Figure Type System Architecture (COMP-002)

3.2 Type Module Structure

Each type module exports a category-specific definition:

-- Example: models/default/types/objects/hlr.lua
local M = {}

M.object = {
    id = "HLR",
    long_name = "High-Level Requirement",
    description = "System-level requirement",
    extends = "TEXTUAL",
    attributes = {
        { name = "status", datatype = "STATUS_ENUM", min_occurs = 1 },
        { name = "rationale", datatype = "STRING" }
    }
}

-- Optional handler for custom rendering
M.handler = {
    name = "hlr_render",
    prerequisites = { "spec_objects" },
    on_transform = function(data, ctx, diag) ... end
}

return M

3.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, materializer_type, counter_group

3.4 Loading Process

  1. Type Loader scans models/{model}/types/{category}/
  2. Each .lua file is loaded and checked for exports
  3. Type definitions registered in corresponding DB tables
  4. Handlers registered with pipeline if present

4 SpecIR Database Schema

4.1 Overview

The Specification Intermediate Representation (SpecIR) is implemented as a SQLite Database schema composed from:

  • src/db/schema/types.lua
  • src/db/schema/content.lua
  • src/db/schema/build.lua
  • src/db/schema/search.lua
  • src/db/schema/init.lua (combines all schema modules, initializes EAV pivot views)

The schema has four domains:

Table Schema 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, source_files, output_cache
Search (FTS5) fts_objects, fts_attributes, fts_floats

4.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).

5 Pipeline Design

FD-001: Pipeline Execution Orchestration

Allocation: Realized by CSC Core Runtime (Core Runtime) through CSU Build Engine (Build Engine) and CSU Pipeline Orchestrator (Pipeline Orchestrator), with handlers registered via CSC Pipeline Handlers (Pipeline Handlers). Phase-specific handlers are organized in CSC Analyze Handlers (Analyze Handlers), CSC Initialize Handlers (Initialize Handlers), and CSC-012 (Transform Handlers), with shared utilities in CSC 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 (CSU Build Engine) hooks into the Pandoc Meta callback, extracts project metadata via CSU-009, and invokes the build engine. The engine creates the database, initializes the data manager, loads the model via CSU-008, processes document files (with Build Cache checks), and delegates to the pipeline orchestrator.

Handler Registration: During model loading, CSU-008 registers each handler with the Pipeline Orchestrator CSU Pipeline Orchestrator, which enforces the registration contract by validating that every handler declares both a name and a [TERM-24](@) 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 CSU 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), and spec_floats (prerequisite: specifications) — the sort produces [specifications, spec_floats, spec_objects], with spec_floats and spec_objects ordered alphabetically since both depend only on specifications.

Phase Execution: The pipeline executes five phases in order:

  1. INITIALIZE Phase — Parse Pandoc Abstract Syntax Tree into Intermediate Representation database tables (specifications, spec_objects, attributes, spec_floats, spec_views, spec_relations)
  2. ANALYZE Phase — Resolve cross-references and infer relation types
  3. TRANSFORM Phase — Render content, materialize views, execute external renderers
  4. VERIFY Phase — Run proof views and collect diagnostics
  5. EMIT Phase — Assemble documents and generate output files

All phases use the same dispatch model: for each handler in sorted order, the Pipeline Orchestrator CSU 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 VERIFY, the Pipeline Orchestrator CSU 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 proof views 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 materialization. CSU Source Position Compatibility (Source Position Compatibility) normalizes Pandoc source position data across API versions.

Figure Pipeline Execution Orchestration


TRACEABILITY:
SF-001

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 proof views 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, ANALYZE, TRANSFORM, VERIFY, EMIT) for document processing.


RATIONALE:

Five phases separate concerns and enable verification before output:

  • INITIALIZE parses AST into normalized relational IR before any resolution
  • ANALYZE resolves cross-references and infers types on the complete IR, not partial state
  • TRANSFORM renders content and materializes views with all references resolved
  • VERIFY runs proof views after TRANSFORM so it can check transform results (e.g., float render failures, view materialization)
  • EMIT generates output only after verification passes, preventing invalid documents
  • VERIFY-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

6 Type Discovery Design

FD-002: Type Model Discovery and Registration

Allocation: Realized by CSC Core Runtime (Core Runtime) through CSU Type Loader (Type Loader). The foundational type definitions are provided by CSC Default Model (Default Model), which all domain models extend.

The type model discovery function loads model definitions from the filesystem and registers them with the Pipeline and data manager. It enables domain-specific extensibility by allowing models to define custom specification types, object types, float types, relation types, view types, and pipeline handlers.

Model Path Resolution: The Type Loader (CSU Type Loader) resolves the model directory by checking SPECCOMPILER_HOME/models/{model} first, then falling back to the project root. This two-stage resolution allows global model installation while supporting project-local overrides.

Directory Scanning: The loader scans models/{model}/types/ for category directories matching the five type categories:

Category Directory Export Field Database Table
Specifications specifications/ M.specification spec_specification_types
Objects objects/ M.object spec_object_types
Floats floats/ M.float spec_float_types
Relations relations/ M.relation spec_relation_types
Views views/ M.view spec_view_types

A typical model directory layout for the default model:

models/default/types/
├── specifications/
│   └── srs.lua        -- exports M.specification
├── objects/
│   ├── hlr.lua        -- exports M.object
│   └── section.lua    -- exports M.object
├── floats/
│   ├── figure.lua     -- exports M.float
│   └── plantuml.lua   -- exports M.float + M.handler
├── relations/
│   └── traces_to.lua  -- exports M.relation
└── views/
    └── toc.lua        -- exports M.view

Module Loading: Each .lua file in a category directory is loaded via require(). The loader inspects the module’s export fields to determine the type category and calls the appropriate registration method on the data manager. If a module exports M.handler, the handler is also registered with the pipeline for phase-specific processing.

Attribute Registration: Object and float types may declare attributes tables describing their data schema. The loader registers these with the data manager, creating datatype definitions and attribute constraints (name, datatype, min/max occurs, enum values, bounds) in the spec_attribute_defs and spec_datatype_defs tables.

Handler Registration: Type modules may export a M.handler table with phase hooks. These handlers extend the pipeline’s processing capabilities with type-specific logic (e.g., PlantUML float rendering, traceability matrix view materialization). Handlers declare Prerequisites to control execution ordering via Topological Sort.

Base Types: Relation type modules may export M.base instead of M.relation to act as base types that own resolution logic. Base types are not registered in the database. The type loader registers their M.resolve function into _selector_resolvers (keyed by M.base.link_selector), which the relation resolver dispatches to during the ANALYZE phase. Concrete relation types use M.extend(overrides) to inherit base properties (e.g., link_selector) while adding their own constraints. This follows the same delegation pattern as float type modules (src/pipeline/transform/spec_floats.lua).

Custom Display Text: Relation types that need custom link display text (e.g., showing title instead of PID) export a standard M.handler with on_transform using the shared link_rewrite_utils.rewrite_display_for_type() utility.

Component Interaction

The type discovery function is realized by the core type loader and the default model that provides foundational type definitions.

CSC Core Runtime (Core Runtime) provides CSU Type Loader (Type Loader), which drives the entire model discovery lifecycle — resolving model paths, scanning category directories, loading modules via require(), registering types and handlers with the data manager and pipeline, and propagating inherited attributes and relation properties.

CSC Default Model (Default Model) provides the two foundational types that every domain model inherits. CSU SECTION Object Type (SECTION Object Type) defines the implicit structural type for untitled content sections, enabling document structure representation without requiring explicit type declarations. CSU SPEC Specification Type (SPEC Specification Type) defines the base specification type with version, status, and date attributes that all domain-specific specification types extend.

Figure Type Model Discovery and Registration


TRACEABILITY:
SF-005

DD-CORE-006: Lua-Based Type System with Inheritance

Selected Lua modules with extends chains for type definitions.

RATIONALE:

Lua modules as type definitions enable:

  • Type definitions are executable code, supporting computed defaults and complex attribute constraints
  • extends field enables single-inheritance (e.g., HLR extends TRACEABLE) with automatic attribute propagation
  • Module exports (M.object, M.float, M.handler) co-locate type definition with optional handler registration
  • require() loading reuses Pandoc’s built-in Lua module system without additional dependency
  • Layered model loading (default first, then domain model) with ID-based override enables extension without forking the default model
  • Alternative of YAML/JSON config rejected: no computed defaults, no handler co-location

7 Storage Design

FD-003: SpecIR Persistence and Cache Coherency

Allocation: Realized by CSC Database Persistence (Database Persistence) through CSU Data Manager (Data Manager) and CSU Build Cache (Build Cache). The database schema is defined in CSC DB Schema (DB Schema), queries in CSC DB Queries (DB Queries), and materialized views in CSC 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 (CSU 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 (CSU Output Cache) defines the core entity tables:

  • specifications — Document-level containers with header AST and metadata
  • spec_objects — Typed content blocks with AST, file position, and specification scope
  • spec_floats — Embedded figures, listings, tables with render state
  • spec_views — Materialized data views (TOC, LOF, traceability matrices)
  • spec_relations — Links between objects with type inference results
  • spec_attribute_values — EAV-model attribute storage for object and float properties

The type schema (CSU Proof View 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 (CSU Build Cache) tracks document content hashes in the source_files table. Before parsing a document, the engine computes its SHA1 hash and compares against the stored value. Unchanged documents skip parsing entirely and reuse their cached SpecIR state. To support incremental builds, the build_graph table tracks include dependencies so that changes to included files also trigger rebuilds. When the document hash matches, the Build Engine (CSU-005) queries the build_graph table for all include dependencies recorded during the previous build. It then computes a SHA1 hash for each include file via the Hash Utilities (CSU-065). If an include file is missing, the hash returns nil, which forces a cache miss and a full document rebuild. The resulting path-to-hash map is compared against the stored values; any mismatch invalidates the cache and triggers reparsing of the root document.

Output Cache: The output cache tracks generated output files and their input hashes. Before generating an output file, the emitter checks whether the input hash matches the stored value. If current, the output generation is skipped. This provides incremental output generation independent of the build cache.

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 ANALYZE, and reading assembled content during EMIT. CSU Build Cache (Build Cache) queries source_files and build_graph to detect changed documents via SHA1 comparison. CSU Output Cache (Output Cache) tracks generated output files and their input hashes to skip redundant generation. CSU Proof View Definitions (Proof View Definitions) materializes SQL proof views at build time for the VERIFY 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.

Figure SpecIR Persistence and Cache Coherency


TRACEABILITY:
SF-002

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
  • Include dependency tracking via build_graph table ensures changes to included files trigger rebuilds
  • 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
  • Output cache tracks generated files independently, enabling incremental output generation
  • Uses Pandoc’s built-in pandoc.sha1() when available, falling back to vendor/sha2.lua in standalone mode
  • Alternative of file timestamps rejected: unreliable across platforms (git checkout, copy, WSL2 clock skew)

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

8 Output Design

FD-004: Multi-Format Publication

Allocation: Realized by CSC Transform Handlers (Transform Handlers) and CSC Emit Handlers (Emit Handlers) through CSU External Render Handler (External Render Handler) and CSU Emitter Orchestrator (Emitter Orchestrator). Output infrastructure is provided by CSC Infrastructure (Infrastructure), with format-specific utilities in CSC Format Utilities (Format Utilities), DOCX generation in CSC DOCX Generation (DOCX Generation), I/O operations in CSC I/O Utilities (I/O Utilities), and external process management in CSC Process Management (Process Management).

The multi-format publication function encompasses the TRANSFORM and EMIT pipeline phases, covering content rendering, view materialization, external subprocess rendering, document assembly from the Intermediate Representation database, Float numbering and resolution, and parallel output generation via Pandoc.

TRANSFORM Phase: Prepares content for output through four handler stages:

  • CSU View Materializer: Pre-computes view data (table of contents, list of figures/tables, abbreviation lists) and stores as JSON in spec_views.resolved_data. Dispatches by view type: toc queries spec_objects ordered by file_seq, lof/lot queries floats by counter_group, abbrev_list queries view content.

  • CSU Float Transformer: Resolves float content that does not require external rendering (e.g., CSV parsing, text processing) and updates spec_floats.resolved_ast.

  • CSU 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 update resolved_ast with output paths.

  • CSU Object Render Handler: Invokes type-specific handlers for each spec_object (ordered by file_seq). Type handlers provide header() and body() functions dispatched through the base handler wrapper. Rendered AST is merged back to spec_objects.ast.

  • CSU 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:

  • CSU 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.

  • CSU 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 complete pandoc.Pandoc document.

  • CSU Float Resolver: Builds a lookup map of rendered float results (ast, number, caption, type_ref) from spec_floats with resolved_ast. The resolver queries the database for all floats belonging to the current specification and indexes them for efficient lookup during document traversal.

  • CSU 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.

  • CSU 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.

  • CSU Inline Handler Dispatcher: Processes inline elements during emit - resolves (@) links to #anchor references, processes citations, and renders inline math expressions.

  • CSU 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) checks output_cache for 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 (CSU Pandoc CLI Builder) builds command arguments for multiple output formats (docx, html5, markdown, json) with reference document, bibliography, and filter support. The reference generator (CSU 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 View Materializer (View Materializer) pre-computes view data as JSON. 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.

Figure Transform and Emit Pipeline


TRACEABILITY:
SF-004

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.level with env override SPECCOMPILER_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-doc support enables DOCX style customization via generated reference.docx
  • --lua-filter support enables format-specific transformations (docx.lua, html.lua)
  • Native bibliography support (–bibliography, –csl) for citation processing
  • Broad ecosystem adoption provides stability and community support

9 Model Design

FD-005: Type System and Domain Model Definition

Allocation: Realized by CSC Default Filters (Default Filters), CSC Default Postprocessors (Default Postprocessors), CSC Default Styles (Default Styles), CSC Default Float Types (Default Float Types), CSC Default Relation Types (Default Relation Types), and CSC Default View Types (Default View Types).

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 loaded by the Type Loader (CSU-008) during the model discovery phase described in FD-002 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. The default model (models/default/) establishes baseline definitions for all five type categories.

Type Definitions: CSC Default Float Types defines float types (FIGURE, TABLE, LISTING, PLANTUML, CHART, MATH) with counter groups for shared numbering. CSC Default Relation Types defines cross-reference relation types (XREF_FIGURE, XREF_TABLE, XREF_LISTING, XREF_MATH, XREF_CITATION) that map # link selectors to target float types. CSC Default View Types defines view types (TOC, LOF, ABBREV, ABBREV_LIST, GAUSS, MATH_INLINE) with inline prefix syntax and materializer strategies.

Format Processing: CSC Default Filters 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 Default Postprocessors applies format-specific post-processing after Pandoc output generation, loading template-specific fixup modules for DOCX and LaTeX. CSC Default Styles 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 cross-reference relations that resolve # link selectors to float targets. 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.

Figure Type System and Domain Model Definition


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
  • Proof views follow the same pattern: domain proofs 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

10 Audit & Integrity Design

FD-006: Audit and Integrity

Allocation: Realized by CSC Core Runtime (Core Runtime) and CSC Default Proof Views (Default Proof Views) through CSU Verify Handler (Verify Handler) and CSU-065 (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 (CSU 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 source_files table. Unchanged documents (same content hash and include hashes) 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 Verify Handler CSU Verify Handler executes in batch mode during the VERIFY phase. It iterates over all registered proof views, querying each via the Data Manager CSU Data Manager. For each violation row returned, the handler consults the Validation Policy CSU Validation Policy to determine the configured severity level. Error-level violations are emitted as structured diagnostics via the Diagnostics Collector CSU Diagnostics Collector. Violations at the ignore level are suppressed entirely. Each proof view 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 CSU Pipeline Orchestrator checks for errors after VERIFY and aborts before EMIT if any exist.

Proof Views — Entity-Based Taxonomy

Proof views follow the SpecIR 5-tuple: S (Specification), O (Object), F (Float), R (Relation), V (View). Each proof is identified by its policy_key.

Specification Proofs (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 Proofs (O)

Policy Key View Name Validates
object_missing_required view_object_missing_required Required object attributes present
object_cardinality_over view_object_cardinality_over Attribute count <= max_occurs
object_cast_failures view_object_cast_failures Attribute value casts to declared type
object_invalid_enum view_object_invalid_enum Enum value exists in enum_values
object_invalid_date view_object_invalid_date Date format is YYYY-MM-DD
object_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 Proofs (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 Proofs (R)

Policy Key View Name Validates
relation_unresolved view_relation_unresolved Link target resolves
relation_dangling view_relation_dangling Target ref points to existing object
relation_ambiguous view_relation_ambiguous Float reference is unambiguous

Spec View Proofs (V)

Policy Key View Name Validates
view_materialization_failure view_view_materialization_failure View materialization succeeded

Component Interaction

The audit subsystem is realized through core runtime components and the default proof 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 Proof Loader (Proof Loader) discovers and loads proof view modules from model directories, registering them with the data manager for VERIFY phase execution. CSU Validation Policy (Validation Policy) maps proof policy_key values to configured severity levels (error, warn, ignore) from project.yaml. CSU Verify Handler (Verify Handler) iterates over registered proof views during VERIFY, 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 VERIFY and aborts before EMIT if errors exist.

CSC Default Proof Views (Default Proof Views) provides the baseline verification rules organized by the SpecIR 5-tuple. Specification proofs: 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 proofs: 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 proofs: 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 proofs: 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. View proofs: CSU View Materialization Failure (View Materialization Failure) detects failed view computations.

Figure Audit and Integrity: Build Caching and Verification

TRACEABILITY:
SF-006

11 SW Docs Model Design

FD-007: Software Documentation Domain Model

Allocation: Realized by CSC SW Docs Model (SW Docs Model), with domain proof views in CSC SW Docs Proof Views (SW Docs Proof Views), object types in CSC SW Docs Object Types (SW Docs Object Types), relation types in CSC SW Docs Relation Types (SW Docs Relation Types), specification types in CSC SW Docs Specification Types (SW Docs Specification Types), and view types in CSC 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: CSC 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 type declares its own attributes, PID prefix, and inheritance chain through the extends field.

Relation Types: CSC 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: CSC 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: CSC 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).

Proof Views: CSC SW Docs Proof Views provides domain-specific proof view 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. CSC 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, verification views, and proof 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 Proof Views (SW Docs Proof Views) 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.

Figure Software Documentation Domain Model

12 Low-Level Requirements

The following LLRs define implementation-level contracts that are directly verified by executable tests.

LLR-PIPE-002-01: Handler Registration Requires Name

DESCRIPTION:
Pipeline handler registration shall reject handlers that do not provide a non-empty name field.
TRACEABILITY:
HLR-PIPE-002
VERIFICATION METHOD:
Test

LLR-PIPE-002-02: Handler Registration Requires Prerequisites

DESCRIPTION:
Pipeline handler registration shall reject handlers that do not provide a prerequisites array.
TRACEABILITY:
HLR-PIPE-002
VERIFICATION METHOD:
Test

LLR-PIPE-002-03: Duplicate Handler Names Are Rejected

DESCRIPTION:
Pipeline handler registration shall reject duplicate handler names within the same pipeline instance.
TRACEABILITY:
HLR-PIPE-002
VERIFICATION METHOD:
Test

LLR-PIPE-006-01: Base Context Fields Are Propagated

DESCRIPTION:
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:
HLR-PIPE-006
VERIFICATION METHOD:
Test

LLR-PIPE-006-02: Document Context Is Attached Per Document

DESCRIPTION:
Pipeline execution shall attach doc and spec_id for each processed document context passed to handlers.
TRACEABILITY:
HLR-PIPE-006
VERIFICATION METHOD:
Test

LLR-PIPE-006-03: Project Context Exists Without Documents

DESCRIPTION:
Pipeline execution shall create a fallback project context when the document list is empty, with doc=nil and a derived spec_id.
TRACEABILITY:
HLR-PIPE-006
VERIFICATION METHOD:
Test

LLR-EXT-020-01: Known Type Categories Are Scanned

DESCRIPTION:
Type loading shall scan each known category directory (objects, floats, views, relations, specifications) and register discovered modules.
TRACEABILITY:
HLR-EXT-002
VERIFICATION METHOD:
Test

LLR-EXT-021-01: Exported Handlers Are Registered

DESCRIPTION:
When a type module exports handler, model loading shall call pipeline:register_handler(handler) and propagate registration errors.
TRACEABILITY:
HLR-EXT-003
VERIFICATION METHOD:
Test

LLR-EXT-021-02: Handler attr_order Controls Attribute Display Sequence

DESCRIPTION:
When a type handler is created with an attr_order array in its options, the handler shall render attributes in the specified sequence first; any remaining attributes not listed in attr_order shall be appended alphabetically. When attr_order is absent, all attributes shall render alphabetically.
TRACEABILITY:
HLR-EXT-003
VERIFICATION METHOD:
Test

LLR-EXT-022-01: Schemas Without Identifier Are Ignored

DESCRIPTION:
Category registration helpers shall ignore schema tables that do not provide id; valid schemas shall receive category defaults and attribute enum values shall be registered.
TRACEABILITY:
HLR-EXT-004
VERIFICATION METHOD:
Test

LLR-EXT-023-01: Model Path Resolution Order

DESCRIPTION:
Model path resolution shall check SPECCOMPILER_HOME/models/{model} before checking {cwd}/models/{model}.
TRACEABILITY:
HLR-EXT-005
VERIFICATION METHOD:
Test

LLR-EXT-023-02: Missing Model Paths Fail Fast

DESCRIPTION:
Model loading shall raise an error when the model cannot be located in either SPECCOMPILER_HOME or project-root models/.
TRACEABILITY:
HLR-EXT-005
VERIFICATION METHOD:
Test

LLR-EXT-024-01: Data Views Resolve With Default Fallback

DESCRIPTION:
Chart data view loading shall resolve models.{requested}.types.views.{view} first and fallback to models.default.types.views.{view} when the requested model module is missing.
TRACEABILITY:
HLR-EXT-006
VERIFICATION METHOD:
Test

LLR-EXT-024-02: Sankey Views Inject Series Data And Clear Dataset

DESCRIPTION:
When a chart contains a sankey series and view output returns data/links, injection shall write to series[1].data and series[1].links, and clear dataset to prevent conflicts.
TRACEABILITY:
HLR-EXT-006
VERIFICATION METHOD:
Test

LLR-DB-007-01: DataManager Rollback Cancels Staged Inserts

DESCRIPTION:
DataManager.begin_transaction() followed by facade insert calls and DataManager.rollback() shall leave no persisted staged rows.
TRACEABILITY:
HLR-STOR-001
VERIFICATION METHOD:
Test

LLR-DB-007-02: DataManager CRUD Facade Persists Canonical IR Rows

DESCRIPTION:
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:
HLR-STOR-001
VERIFICATION METHOD:
Test

LLR-DB-008-01: Attribute Casting Persists Typed Columns For Valid Pending Rows

DESCRIPTION:
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:
HLR-STOR-002
VERIFICATION METHOD:
Test

LLR-EXT-024-03: Chart Injection Leaves Config Intact For No-View Or Unsupported View Data

DESCRIPTION:
Chart data injection shall preserve input chart configuration when no view is provided or when view output does not match supported shapes (source or data+links for sankey).
TRACEABILITY:
HLR-EXT-006
VERIFICATION METHOD:
Test

LLR-OUT-029-01: DOCX Preset Loader Resolves, Merges, And Validates Preset Chains

DESCRIPTION:
DOCX preset loading shall resolve preset paths, merge extends chains deterministically, and reject malformed or cyclic preset definitions.
TRACEABILITY:
HLR-OUT-005
VERIFICATION METHOD:
Test

13 Software Decomposition

This chapter defines decomposition and design allocation using MIL-STD-498 nomenclature:

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.

13.1 Core Software Components

13.1.1 Core Runtime Layer

CSC-001: Core Runtime

COMPONENT TYPE:
Layer
DESCRIPTION:
Pipeline orchestration, metadata/config extraction, model loading, proof 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 generate() function 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, ANALYZE, TRANSFORM, VERIFY, EMIT) execution model with declarative handler prerequisites and topological sorting.
FILE PATH:
src/core/pipeline.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-001
CSU-007: Proof Loader
DESCRIPTION:
Discovers, loads, and registers proof view modules from models/{model}/proofs/, maintaining an in-memory registry of proof definitions used for verification policies.
FILE PATH:
src/core/proof_loader.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-001
CSU-008: Type Loader
DESCRIPTION:
Loads type modules (objects, floats, views, relations, specifications) from models/{model}/types/ directories and populates the SpecIR type system tables in the database.
FILE PATH:
src/core/type_loader.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-001
CSU-009: Validation Policy
DESCRIPTION:
Manages configurable validation severity levels (error/warn/ignore) for proof codes, building default policies from loaded proof definitions and allowing project-level overrides.
FILE PATH:
src/core/validation_policy.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-001

13.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 proof view 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: Proof View Definitions
DESCRIPTION:
Defines SQL CREATE VIEW statements for all proof views used in the VERIFY phase, organized by entity type (specifications, objects, floats, relations, views).
FILE PATH:
src/db/proof_views.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-002

13.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

13.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, source_files, 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

13.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

13.1.3 Pipeline Handlers Layer

CSC-003: Pipeline Handlers

COMPONENT TYPE:
Layer
DESCRIPTION:
Phase handlers implementing initialize, analyze, transform, verify, 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: Verify Handler
DESCRIPTION:
VERIFY phase handler that iterates over all registered proof views, queries each for violations, and emits structured diagnostics based on validation policy.
FILE PATH:
src/pipeline/verify/verify_handler.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-003

13.1.3.1 Analyze Handlers Package

CSC-008: Analyze Handlers

COMPONENT TYPE:
Package
DESCRIPTION:
ANALYZE phase handlers for relation resolution, relation type inference, and attribute casting.
PATH:
src/pipeline/analyze/
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/analyze/attribute_caster.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-008
CSU-033: Relation Resolver
DESCRIPTION:
ANALYZE 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/analyze/relation_resolver.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-008
CSU-161: Relation Type Inferrer
DESCRIPTION:
ANALYZE 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/analyze/relation_type_inferrer.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-008

13.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, dispatching to view type handlers 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 queries spec_float_types to discover and cache float handler modules, then dispatches on_render_CodeBlock calls to type-specific handlers.
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 queries spec_view_types to discover and cache inline view handler modules, then dispatches on_render_Code calls by matching inline prefixes.
FILE PATH:
src/pipeline/emit/inline_handlers.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-009
CSU-043: View Handler Dispatcher
DESCRIPTION:
Model-agnostic dispatch layer that queries spec_view_types to discover and cache block-level view handler modules, then dispatches on_render_CodeBlock calls for views.
FILE PATH:
src/pipeline/emit/view_handlers.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-009

13.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 (ANALYZE) 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

13.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 type handlers (HLR, FD, VC, etc.), providing styled headers with PID prefixes, attribute display, and an extensible create_handler() factory.
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

13.1.3.5 Transform Handlers Package

CSC-012: Transform Handlers

COMPONENT TYPE:
Package
DESCRIPTION:
TRANSFORM phase handlers for view materialization, 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 dynamically loading type-specific modules; 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 loads object type modules and invokes their on_render_SpecObject 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 loads specification type modules and invokes their on_render_Specification to generate the document title header.
FILE PATH:
src/pipeline/transform/specification_render_handler.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-012
CSU-064: View Materializer
DESCRIPTION:
TRANSFORM phase handler that pre-computes view data (TOC, traceability matrices, etc.) by querying the database and storing structured JSON in spec_views.resolved_data.
FILE PATH:
src/pipeline/transform/view_materializer.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-012

13.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

13.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

13.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

13.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

13.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

13.2 Default Model Components

13.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

13.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

13.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

13.2.1.3 Default Proof Views Package

CSC-020: Default Proof Views

COMPONENT TYPE:
Package
DESCRIPTION:
SQL proof view queries for detecting constraint violations across specifications, objects, floats, relations, and views.
PATH:
models/default/proofs/
CSU-089: Spec Missing Required
DESCRIPTION:
Proof view detecting specifications missing required attributes.
FILE PATH:
models/default/proofs/sd_101_spec_missing_required.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-090: Spec Invalid Type
DESCRIPTION:
Proof view detecting specifications whose type_ref does not match any registered specification type.
FILE PATH:
models/default/proofs/sd_102_spec_invalid_type.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-091: Object Missing Required
DESCRIPTION:
Proof view detecting spec objects missing required attributes.
FILE PATH:
models/default/proofs/sd_201_object_missing_required.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-092: Object Cardinality Over
DESCRIPTION:
Proof view detecting spec object attributes exceeding their declared max_occurs cardinality.
FILE PATH:
models/default/proofs/sd_202_object_cardinality_over.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-093: Object Cast Failures
DESCRIPTION:
Proof view detecting spec object attributes whose raw values failed to cast to their declared datatype.
FILE PATH:
models/default/proofs/sd_203_object_cast_failures.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-094: Object Invalid Enum
DESCRIPTION:
Proof view detecting spec object ENUM attributes with values not matching any entry in enum_values.
FILE PATH:
models/default/proofs/sd_204_object_invalid_enum.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-095: Object Invalid Date
DESCRIPTION:
Proof view detecting spec object DATE attributes not matching the YYYY-MM-DD format.
FILE PATH:
models/default/proofs/sd_205_object_invalid_date.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-096: Object Bounds Violation
DESCRIPTION:
Proof view detecting numeric attributes falling outside declared min_value/max_value bounds.
FILE PATH:
models/default/proofs/sd_206_object_bounds_violation.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-097: Float Orphan
DESCRIPTION:
Proof view detecting floats with no parent object despite objects existing in the same specification.
FILE PATH:
models/default/proofs/sd_301_float_orphan.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-098: Float Duplicate Label
DESCRIPTION:
Proof view detecting floats sharing the same label within a specification.
FILE PATH:
models/default/proofs/sd_302_float_duplicate_label.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-099: Float Render Failure
DESCRIPTION:
Proof view detecting floats requiring external rendering but with NULL resolved_ast.
FILE PATH:
models/default/proofs/sd_303_float_render_failure.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-100: Float Invalid Type
DESCRIPTION:
Proof view detecting floats whose type_ref does not match any registered float type.
FILE PATH:
models/default/proofs/sd_304_float_invalid_type.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-101: Relation Unresolved
DESCRIPTION:
Proof view detecting relations with target_text but no resolved target_ref.
FILE PATH:
models/default/proofs/sd_401_relation_unresolved.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-102: Relation Dangling
DESCRIPTION:
Proof view detecting relations whose target_ref points to a non-existent identifier.
FILE PATH:
models/default/proofs/sd_402_relation_dangling.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-103: Relation Ambiguous
DESCRIPTION:
Proof view detecting relations flagged as ambiguous where the float reference matched multiple targets.
FILE PATH:
models/default/proofs/sd_407_relation_ambiguous.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020
CSU-104: View Materialization Failure
DESCRIPTION:
Proof view detecting views whose materialization failed, leaving both resolved_ast and resolved_data as NULL.
FILE PATH:
models/default/proofs/sd_501_view_materialization_failure.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-020

13.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

13.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

13.2.1.6 Default Relation Types Package

CSC-023: Default Relation Types

COMPONENT TYPE:
Package
DESCRIPTION:
Cross-reference relation type definitions mapping link selectors to target float types.
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

13.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

13.3 SW Docs Model Components

13.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 proof views, 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

13.3.1.1 SW Docs Proof Views Package

CSC-026: SW Docs Proof Views

COMPONENT TYPE:
Package
DESCRIPTION:
Domain-specific proof view queries for software documentation traceability and naming convention enforcement.
PATH:
models/sw_docs/proofs/
CSU-126: VC Missing HLR Traceability
DESCRIPTION:
Proof view detecting verification cases with no traceability link to any high-level requirement.
FILE PATH:
models/sw_docs/proofs/sd_601_vc_missing_hlr_traceability.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-026
CSU-127: TR Missing VC Traceability
DESCRIPTION:
Proof view detecting test results with no traceability link to any verification case.
FILE PATH:
models/sw_docs/proofs/sd_602_tr_missing_vc_traceability.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-026
CSU-128: HLR Missing VC Coverage
DESCRIPTION:
Proof view detecting high-level requirements not covered by any verification case.
FILE PATH:
models/sw_docs/proofs/sd_603_hlr_missing_vc_coverage.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-026
CSU-131: FD Missing CSC Traceability
DESCRIPTION:
Proof view detecting functional descriptions with no traceability link to any Computer Software Component.
FILE PATH:
models/sw_docs/proofs/sd_606_fd_missing_csc_traceability.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-026
CSU-132: FD Missing CSU Traceability
DESCRIPTION:
Proof view detecting functional descriptions with no traceability link to any Computer Software Unit.
FILE PATH:
models/sw_docs/proofs/sd_607_fd_missing_csu_traceability.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-026
CSU-163: CSC Missing FD Allocation
DESCRIPTION:
Proof view detecting Computer Software Components with no functional description (FD) allocated to them.
FILE PATH:
models/sw_docs/proofs/csc_missing_fd_allocation.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-026
CSU-164: CSU Missing FD Allocation
DESCRIPTION:
Proof view detecting Computer Software Units with no functional description (FD) allocated to them.
FILE PATH:
models/sw_docs/proofs/csu_missing_fd_allocation.lua
LANGUAGE:
Lua
TRACEABILITY:
CSC-026

13.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

13.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

13.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

13.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

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 (SF-001 through SF-006), each decomposed into High-Level Requirements.

2 SpecIR Types

SpecIR (see sdd: Type + Content (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.

2.1 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.

2.1.1 Declaration

A Specification is formally defined as a tuple S=(τ,n,pid,A,O) where:

  • τΓ.S is the specification type (defined by the environment, e.g. SRS, SDD, SVC, TRR).
  • nString is the document title (from the H1 header).
  • pidString is the global project identifier (auto-generated from τ when not explicit).
  • ASpecAttribute is the set of typed attributes (version, status, date, etc.).
  • OSpecObject is the set of child spec objects.

2.1.2 Syntax

Figure Document and Specification productions

2.2 Spec Object

A Spec Object represents a traceable element in a specification document, created from H2-H6 headers. Objects can be requirements (HLR, LLR), non-functional requirements (NFR), or structural sections (SECTION). Each object has a type, PID and can contain attributes and body content.

2.2.1 Declaration

A Spec Object is formally defined as a tuple O=(τ,title,pid,β,A,F,R,V,O) where:

  • τΓ.O is the object type (e.g., HLR, NFR, SECTION).
  • titString is the plain-text title from the header.
  • pidString is the project identifier for cross-referencing (auto-generated when not explicit).
  • β is the accumulated body content (Pandoc AST).
  • ASpecAttribute is the set of typed attributes attached to this object.
  • FSpecFloat is the set of child floats contained in this object.
  • RSpecRelations is the set of child relations contained in β".
  • VSpecViews is the set of child views contained in this object.
  • OSpecObject is the set of child objects contained in this object.

2.2.2 Syntax

Figure Spec Object productions

2.3 Spec Float

A Spec Float represents a floating element like a figure, table, or diagram. Floats are created from fenced code blocks with a syntax: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).

2.3.1 Declaration

A Spec Float is formally defined as a tuple F=(τ,label,kv,content) where:

  • τΓ.F is the float type (e.g., FIGURE, TABLE, PLANTUML, MATH).
  • labelString is the label used for cross-referencing (normalized to {type_prefix}:{user_label}).
  • kvFloatAttribute is the set of untyped metadata.
  • content is raw payload paased to the float handler.

2.3.2 Syntax

Figure Spec Float productions

2.4 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.

2.4.1 Declaration

A Spec Attribute is a triple A=(τ,β,R) where:

  • τΓ.A is the attribute type (e.g., “status”, “priority”, “rationale”).
  • β is the nested blockquote content (Pandoc AST).
  • RSpecRelations is the set of child relations.

2.4.2 Syntax

Figure Attribute productions

2.5 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 from the selector, the source context, and the resolved target. Resolution is type-driven: the extends chain of the inferred type determines how targets are resolved.

2.5.1 Declaration

A Spec Relation is a 4-tuple R=(s,t,σ,α) where:

  • sO is the source object.
  • t(OF) is the target element (object or float).
  • σString is the link selector.
  • αString{} is the source attribute containing the link, or when the link appears in body text.

The relation type ρΓ.R is inferred ρ=infer(σ,α,τs,τt)

2.5.2 Syntax

Figure Spec Relation productions

3 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.

3.1 Declaration

A Spec View is formally defined as a pair V=(τ,ω) where:

  • τΓ.V is the view type (e.g., TOC, LOF, TRACEABILITY_MATRIX, ABBREV).
  • ω is a raw string passed as a parameter to the view handler.

3.2 Syntax

Figure Spec View productions

4 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 Requirements that state what the system shall do.

5 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 , ANALYZE Phase , TRANSFORM Phase , VERIFY 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, ANALYZE, TRANSFORM, VERIFY, EMIT.

BELONGS TO:
SF-001
DESCRIPTION:

Each phase serves a distinct purpose in document processing:

  1. INITIALIZE: Parse document AST and populate database with specifications, spec_objects, floats, relations, views, and attributes
  2. ANALYZE: Resolve relations between objects (link target resolution, type inference)
  3. TRANSFORM: Pre-compute views, render external content (PlantUML, charts), prepare for output
  4. VERIFY: Run proof views to validate data integrity, type constraints, cardinality rules
  5. 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.

BELONGS TO:
SF-001
DESCRIPTION:

Handlers register via register_handler(handler) with required fields:

  • name: Unique string identifier for the handler
  • prerequisites: 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.

BELONGS TO:
SF-001
DESCRIPTION:

For each phase, the pipeline:

  1. Identifies handlers participating in the phase (those with on_{phase} hooks)
  2. Builds dependency graph from prerequisites (only for participating handlers)
  3. Executes Kahn’s algorithm to produce execution order
  4. Sorts alphabetically at each level for deterministic output
  5. 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 VERIFY Errors

The pipeline shall abort execution after VERIFY phase if any errors are recorded.

BELONGS TO:
SF-001
DESCRIPTION:
After running VERIFY 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 VERIFY 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.

BELONGS TO:
SF-001
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 via run_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.

BELONGS TO:
SF-001
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 filename
  • config: Preset configuration (styles, captions, validation)
  • build_dir: Output directory path
  • output_format: Target format (docx, html5, etc.)
  • template: Template name for model loading
  • reference_doc: Path to reference.docx for styling
  • docx, html5: Format-specific configuration
  • outputs: Array of {format, path} for multi-format output
  • bibliography, csl: Citation configuration
  • project_root: Root directory for resolving relative paths

Context flows through all phases, enriched by handlers (e.g., verification results in VERIFY 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

6 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.

BELONGS TO:
SF-002
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.

BELONGS TO:
SF-002
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.

BELONGS TO:
SF-002
DESCRIPTION:
Source file hashes stored in source_files table (path, sha1). 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.

BELONGS TO:
SF-002
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.

BELONGS TO:
SF-002
DESCRIPTION:
For each non-composite spec_object_type, a view named view_{type_lower}_objects is 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 like SELECT * 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.

BELONGS TO:
SF-002
DESCRIPTION:
Build graph stored in build_graph table (root_path, node_path, node_sha1). Tracks include file dependencies for each root document. is_document_dirty_with_includes() checks root document and all includes. update_build_graph() refreshes dependency tree 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

7 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 proof-view validation framework.
RATIONALE:
A typed container model enables schema validation, type-specific rendering, and data integrity checking through SQL proof views.

HLR-TYPE-001: Specifications Container

The type system shall provide a specifications container for registering document-level specification records.

BELONGS TO:
SF-003
DESCRIPTION:

The specifications table 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 specification
  • long_name: Human-readable title extracted from L1 header
  • type_ref: Specification type (validated against spec_specification_types)
  • pid: Optional PID from @PID syntax in L1 header

L1 headers register as specifications. Type validation checks spec_specification_types table. 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.

BELONGS TO:
SF-003
DESCRIPTION:

The spec_objects table stores structured specification items extracted from L2+ headers:

  • identifier: SHA1 hash of source path + line + title (content-addressable)
  • specification_ref: Foreign key to parent specification
  • type_ref: Object type (validated against spec_object_types)
  • from_file: Source file path
  • file_seq: Document order sequence number
  • pid: Project ID from @PID syntax (e.g., “REQ-001”)
  • title_text: Header text without type prefix or PID
  • label: Unified label for cross-referencing (format: {type_lower}:{title_slug})
  • level: Header level (2-6)
  • start_line, end_line: Source line range
  • ast: 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).

BELONGS TO:
SF-003
DESCRIPTION:

The spec_floats table stores content blocks that receive sequential numbering:

  • identifier: Short format “float-{8-char-sha1}” for DOCX compatibility
  • specification_ref: Foreign key to parent specification
  • type_ref: Float type resolved from aliases (e.g., “csv” -> “TABLE”, “puml” -> “FIGURE”)
  • from_file: Source file path
  • file_seq: Document order for numbering
  • label: User-provided label for cross-referencing
  • number: Sequential number within counter_group (assigned in TRANSFORM Phase)
  • caption: Caption text from attributes
  • raw_content: Original code block text
  • raw_ast: Serialized Pandoc CodeBlock (JSON)
  • parent_object_ref: Foreign key to containing spec_object
  • attributes: 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:data instead of TABLE: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.

BELONGS TO:
SF-003
DESCRIPTION:

The spec_views table stores view definitions from code blocks and inline syntax:

  • identifier: SHA1 hash of specification + sequence + content
  • specification_ref: Foreign key to parent specification
  • view_type_ref: Uppercase view type (e.g., “SELECT”, “SYMBOL”, “MATH”, “ABBREV”)
  • from_file: Source file path
  • file_seq: Document order sequence number
  • raw_ast: View definition content (SQL query, symbol path, expression)

View types with needs_external_render = 1 in spec_view_types are delegated to specialized renderers. Inline views use type: content syntax (e.g., symbol: Class.method).

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.

BELONGS TO:
SF-003
DESCRIPTION:

The spec_relations table stores inter-element references:

  • identifier: SHA1 hash of specification + target + type + parent
  • specification_ref: Foreign key to parent specification
  • source_ref: Foreign key to source spec_object
  • target_text: Raw link target from syntax (e.g., “REQ-001”, “fig:diagram”)
  • target_ref: Resolved target identifier (populated in ANALYZE Phase phase)
  • type_ref: Relation type from spec_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 by is_default and link_selector columns in spec_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.

BELONGS TO:
SF-003
DESCRIPTION:

The spec_attributes table stores typed attribute values extracted from blockquote syntax:

  • identifier: SHA1 hash of specification + owner + name + value
  • specification_ref: Foreign key to parent specification
  • owner_ref: Foreign key to owning spec_object
  • name: Attribute name (field name without colon)
  • raw_value: Original string value
  • string_value, int_value, real_value, bool_value, date_value: Type-specific columns
  • enum_ref: Foreign key to enum_values for ENUM types
  • ast: JSON-serialized Pandoc AST for rich content (XHTML type)
  • datatype: Resolved datatype from spec_attribute_types

Attribute syntax: > name: value in 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 proof views 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 TERM-33 directories extend it with custom object types, float renderers, TERM-35 generators, and style presets.

BELONGS TO:
SF-003
DESCRIPTION:

Proof views are SQL queries registered in the VERIFY 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)
  • View-level (materialization failures, query errors)

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

8 Extension Requirements

SF-005: Extension Framework

Model-based extensibility for type Handler, renderers, and Data View.

DESCRIPTION:
Groups requirements for the extension mechanism that enables custom models to provide type handlers, External Renderer , data view generators, and style presets.
RATIONALE:
Extensibility through model directories enables domain-specific customization without modifying the core pipeline.

HLR-EXT-001: Model-Specific Type Handler Loading

The system shall load type-specific handlers from model directories.

BELONGS TO:
SF-005
DESCRIPTION:

Type handlers control how specification content is rendered during the TRANSFORM Phase phase. The loading mechanism supports:

  • Object types: Loaded from models/{model}/types/objects/{type}.lua
  • Specification types: Loaded from models/{model}/types/specifications/{type}.lua
  • Float types: Loaded from models/{model}/types/floats/{type}.lua
  • View types: Loaded from models/{model}/types/views/{type}.lua

Module loading uses require() with path models.{model}.types.{category}.{type}. Type names are converted to lowercase for file lookup (e.g., “HLR” -> “hlr.lua”).

RATIONALE:
Separating type handlers into model directories enables domain-specific customization. Organizations can define their own requirement types, document types, and rendering behavior without modifying core code.
STATUS:
Approved

HLR-EXT-002: Model Directory Structure

The system shall organize model content in a standardized directory hierarchy.

BELONGS TO:
SF-005
DESCRIPTION:

Each model follows this structure:

models/{model_name}/
  types/
    objects/       -- Spec object type handlers (HLR, LLR, VC, etc.)
    specifications/-- Specification type handlers (SRS, SDD, SVC)
    floats/        -- Float type handlers (TABLE, PLANTUML, CHART)
    views/         -- View type handlers (ABBREV, SYMBOL, MATH)
    relations/     -- Relation type definitions (TRACES_TO, etc.)
  data_views/      -- Data view generators for chart data injection
  filters/         -- Pandoc filters (docx.lua, html.lua, markdown.lua)
  postprocessors/  -- Format-specific postprocessors
  styles/          -- Style presets and templates

Model names are referenced via project configuration template field or context model_name. The “default” model provides base implementations with fallback behavior.

RATIONALE:
Standardized structure enables consistent discovery of type modules across models and provides clear extension points for each content category.
STATUS:
Approved

HLR-EXT-003: Handler Registration Interface

Type handlers shall provide standardized registration interfaces for pipeline integration.

BELONGS TO:
SF-005
DESCRIPTION:

Each handler category defines specific interfaces:

Object Type Handlers export:

  • M.object: Type schema with id, long_name, description, attributes
  • M.handler.on_render_SpecObject(obj, ctx): Render function returning Pandoc blocks

Specification Type Handlers export:

  • M.specification: Type schema with id, long_name, attributes
  • M.handler.on_render_Specification(ctx, pandoc, data): Render document title

Float Type Handlers export:

  • M.float: Type schema with id, caption_format, counter_group, aliases, needs_external_render
  • M.transform(raw_content, type_ref, log): For internal transforms (TABLE, CSV)
  • external_render.register_renderer(type_ref, callbacks): For external renders (PLANTUML, CHART)

View Type Handlers export:

  • M.view: Type schema with id, inline_prefix, aliases
  • M.handler.on_render_Code(code, ctx): Inline code rendering
RATIONALE:
Consistent interfaces enable the core pipeline to discover and invoke handlers without knowledge of specific type implementations. This separation maintains extensibility.
STATUS:
Approved

HLR-EXT-004: Type Definition Schema

Type definitions shall declare metadata schema that controls registration and behavior.

BELONGS TO:
SF-005
DESCRIPTION:

Type schemas provide metadata stored in registry tables:

Object Types (spec_object_types):

M.object = {
    id = "HLR",                    -- Unique identifier (uppercase)
    long_name = "High-Level Requirement",
    description = "A top-level system requirement",
    extends = "TRACEABLE",         -- Base type for inheritance
    header_unnumbered = true,      -- Exclude from section numbering
    header_style_id = "Heading2",  -- Custom-style for headers
    body_style_id = "Normal",      -- Custom-style for body
    attributes = {                 -- Attribute definitions
        { name = "status", type = "ENUM", values = {...}, min_occurs = 1 },
        { name = "rationale", type = "XHTML" },
        { name = "created", type = "DATE" },
    }
}

Float Types (spec_float_types):

M.float = {
    id = "CHART",
    caption_format = "Figure",     -- Caption prefix
    counter_group = "FIGURE",      -- Counter sharing (FIGURE, CHART, PLANTUML)
    aliases = { "echarts" },       -- Alternative syntax identifiers
    needs_external_render = true,  -- Requires external tool
}

View Types (spec_view_types):

M.view = {
    id = "ABBREV",
    inline_prefix = "abbrev",      -- Syntax: `abbrev: content`
    aliases = { "sigla", "acronym" },
    needs_external_render = false,
}
RATIONALE:
Declarative schemas enable automatic registration into database tables during initialization, provide validation rules for content, and configure rendering behavior without procedural code.
STATUS:
Approved

HLR-EXT-005: Model Path Resolution

The system shall resolve model paths using environment configuration with fallback.

BELONGS TO:
SF-005
DESCRIPTION:

Model path resolution follows this order:

  1. Check SPECCOMPILER_HOME environment variable: $SPECCOMPILER_HOME/models/{model}
  2. Fall back to current working directory: ./models/{model}

For type modules not found in the specified model, the system falls back to the “default” model:

-- Try model-specific path first
local module = require("models." .. model_name .. ".types.floats.table")
-- Fallback to default model
local module = require("models.default.types.floats.table")

This enables partial model customization where models only override specific types.

RATIONALE:
Environment-based configuration supports deployment flexibility. Fallback to default model reduces duplication by allowing models to inherit base implementations.
STATUS:
Approved

HLR-EXT-006: External Renderer Registration

External renderers shall register callbacks for task preparation and result handling.

BELONGS TO:
SF-005
DESCRIPTION:

Float types requiring external tools (PlantUML, ECharts, etc.) register with the external render handler:

external_render.register_renderer("PLANTUML", {
    prepare_task = function(float, build_dir, log, data, model_name)
        -- Return task descriptor with cmd, args, output_path, context
    end,
    handle_result = function(task, success, stdout, stderr, data, log)
        -- Update resolved_ast in database
    end
})

The core orchestrates: query items -> prepare tasks -> cache filter -> batch spawn -> dispatch results. This enables parallel execution across all external renders.

RATIONALE:
Registration pattern decouples type-specific rendering logic from core orchestration. Callbacks enable types to control task preparation and result interpretation while core handles parallelization and caching.
STATUS:
Approved

HLR-EXT-007: Data View Generator Loading

The system shall load data view generators from model directories for chart data injection.

BELONGS TO:
SF-005
DESCRIPTION:

Data views are Lua modules that generate data for charts:

-- models/{model}/data_views/{view_name}.lua
local M = {}

function M.generate(params, data)
    -- params: user parameters from code block attributes
    -- data: DataManager instance for SQL queries
    return { source = { {"x", "y"}, {1, 10}, {2, 20} } }
end

return M

Views are loaded via data_loader.load_view(view_name, model_name, data, params). Resolution tries the specified model first, then falls back to default.

Usage in code blocks:

```chart:gaussian{view="gaussian" sigma=2.0}
{...echarts config...}
RATIONALE:
Data views separate data generation from chart configuration. This enables reusable data sources and database-driven visualizations without embedding SQL in markdown.
STATUS:
Approved

HLR-EXT-008: Handler Caching

The system shall cache loaded type handlers to avoid repeated module loading.

BELONGS TO:
SF-005
DESCRIPTION:

Each handler loader maintains a cache keyed by {model}:{type_ref}:

local type_handlers = {}

local function load_type_handler(type_ref, model_name)
    local cache_key = model_name .. ":" .. type_ref
    if type_handlers[cache_key] ~= nil then
        return type_handlers[cache_key]
    end

    -- Load module via require()
    local ok, module = pcall(require, module_path)
    if ok and module then
        type_handlers[cache_key] = module.handler
        return module.handler
    end

    type_handlers[cache_key] = false  -- Cache negative result
    return nil
end

Cache stores false for failed lookups to avoid repeated require() calls for non-existent modules.

RATIONALE:
Caching improves performance for documents with many objects of the same type. Negative caching prevents repeated filesystem access for types without custom handlers.
STATUS:
Approved

9 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 assemble final documents from database content, reconstructing AST from stored fragments.

BELONGS TO:
SF-004
RATIONALE:
Decouples parsing from rendering for flexibility

HLR-OUT-002: Float Resolution

The system shall resolve Float references, replacing raw AST with rendered content (SVG, images).

BELONGS TO:
SF-004
RATIONALE:
Integrates external rendering results into final output

HLR-OUT-003: Float Numbering

The system shall assign sequential numbers to Floats within Counter Groups across all documents.

BELONGS TO:
SF-004
RATIONALE:
Ensures consistent cross-document numbering (Figure 1, 2, 3…)

HLR-OUT-004: Multi-Format Output

The system shall generate outputs in multiple formats (DOCX, HTML5) from a single processed document.

BELONGS TO:
SF-004
RATIONALE:
Single-source publishing to multiple targets

HLR-OUT-005: DOCX Generation

The system shall generate DOCX output via Pandoc with custom reference documents and OOXML post-processing.

BELONGS TO:
SF-004
RATIONALE:
Produces Word documents with proper styling

HLR-OUT-006: HTML5 Generation

The system shall generate HTML5 output via Pandoc with web-specific templates and assets.

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.

BELONGS TO:
SF-004
RATIONALE:
Produces web-ready documentation

10 Audit & Integrity Requirements

SF-006: Audit and Integrity

Deterministic compilation, reproducible builds, and audit trail integrity.

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:
Encompasses content-addressed hashing for incremental build detection, structured NDJSON logging for audit trails, and include dependency tracking for proper cache invalidation.
RATIONALE:
Certification environments require reproducible builds and auditable processing trails for traceability evidence.

11 System Concepts

TERM-20: ANALYZE 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 Lua module generating data for chart injection.

DESCRIPTION:

Purpose: Produces structured data that can be injected into chart floats.

Implementation: Lua scripts that query database and return chart-compatible data structures.

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 VERIFY.

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 modular component that processes specific content types through pipeline phases.

DESCRIPTION:

Purpose: Encapsulates processing logic for a content type across all pipeline phases.

Structure: Implements phase methods (initialize, analyze, verify, transform, emit) for its content type.

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 definitions, handlers, and styles for a domain.

DESCRIPTION:

Purpose: Bundles related type definitions, handlers, and styling for specific documentation domains.

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, ANALYZE, TRANSFORM, VERIFY, EMIT.

TERM-15: Pipeline

The 5-phase processing system (INITIALIZE -> ANALYZE -> TRANSFORM -> VERIFY -> 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 ANALYZE, before VERIFY.

TERM-27: Type Alias

Alternative syntax identifier for a type (e.g., “csv” -> “TABLE”).

DESCRIPTION:

Purpose: Provides shorthand or alternative names for types.

Example: csv is an alias for the TABLE type in float definitions.

TERM-38: Type Loader

System that discovers and loads type handlers from model directories.

DESCRIPTION:

Purpose: Dynamically discovers and instantiates type handlers from model definitions.

Implementation: Scans model directories for handler definitions and registers them.

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: VERIFY Phase

The fourth phase in the pipeline that validates content via proof views.

DESCRIPTION:

Purpose: Validates document content using proof views 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 @PID in 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-PROOF: Proof View

A SQL query that validates data integrity constraints during the VERIFY phase.

ACRONYM:
-
DESCRIPTION:

Purpose: Defines validation rules as SQL queries that detect specification errors.

Execution: Run during the VERIFY phase; violations are reported as diagnostics.

Examples: Missing required attributes, unresolved relations, cardinality violations.

DOMAIN:
Core
TERM:
Proof View

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 rendering behavior for a category of elements.

Categories: Object types (HLR, SECTION), float types (FIGURE, TABLE), relation types (TRACES_TO), view types (TOC, LOF).

Registration: Types are loaded from model directories and stored in 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 traceability attribute links.

Naming: VC PIDs follow the pattern VC-{category}-{seq} (e.g., VC-PIPE-001).

DOMAIN:
Core
TERM:
Verification Case

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

3 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.

VC ID HLR Method
VC-001 HLR-PIPE-001 Test
VC-002 HLR-PIPE-002 Test
VC-003 HLR-PIPE-003 Test
VC-004 HLR-PIPE-004 Test
VC-005 HLR-PIPE-005 Test
VC-006 HLR-PIPE-006 Inspection
VC-007 HLR-STOR-001 Test
VC-008 HLR-STOR-002 Test
VC-009 HLR-STOR-003 Test
VC-010 HLR-STOR-004 Test
VC-011 HLR-STOR-005 Demonstration
VC-012 HLR-TYPE-001 Test
VC-013 HLR-TYPE-002 Test
VC-014 HLR-TYPE-003 Test
VC-015 HLR-TYPE-005 Test
VC-016 HLR-TYPE-004 Test
VC-017 HLR-TYPE-006 Test
VC-018 HLR-TYPE-007 Test
VC-019 HLR-EXT-001 Test
VC-020 HLR-EXT-002 Test
VC-021 HLR-EXT-003 Test
VC-022 HLR-EXT-004 Test
VC-023 HLR-EXT-005 Test
VC-024 HLR-EXT-006 Test
VC-025 HLR-EXT-007 Inspection
VC-026 HLR-EXT-008 Inspection
VC-027 HLR-OUT-003 Test
VC-028 HLR-OUT-004 Demonstration
VC-029 HLR-OUT-005 Test
VC-030 HLR-OUT-006 Demonstration
VC-031 HLR-OUT-001 Test
VC-032 HLR-OUT-002 Test
VC-033 HLR-STOR-006 Test
VC-OUT-001 HLR-OUT-001 Test
VC-OUT-004 HLR-OUT-001 Test
VC-PIPE-007 HLR-PIPE-001 Test

4 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-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-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-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-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-020 Model Directory Structure TR-020-01 PASS
VC-021 Handler Registration Interface 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-024 External Renderer Registration TR-024-02 PASS
VC-025 Data View Generator Loading TR-025-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-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-028 Multi-Format Output TR-028-03 PASS
VC-029 DOCX Generation TR-029-01 PASS
VC-029 DOCX Generation TR-029-02 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-OUT-001 Document Assembly TR-OUT-001-01 PASS
VC-OUT-004 Render Decoration TR-OUT-004-01 PASS
VC-PIPE-007 Sourcepos Normalization TR-PIPE-007-01 PASS

5 Traceability Matrix

HLR ID HLR Title VC ID VC Title Result
HLR-EXT-001 Model-Specific Type Handler Loading VC-019 Model Type Loading ✓ Pass
HLR-EXT-001 Model-Specific Type Handler Loading VC-019 Model Type Loading ✓ Pass
HLR-EXT-001 Model-Specific Type Handler Loading VC-019 Model Type Loading ✓ Pass
HLR-EXT-001 Model-Specific Type Handler Loading VC-019 Model Type Loading ✓ Pass
HLR-EXT-002 Model Directory Structure VC-020 Model Directory Structure ✓ Pass
HLR-EXT-003 Handler Registration Interface VC-021 Handler Registration Interface ✓ Pass
HLR-EXT-004 Type Definition Schema VC-022 Type Definition Schema ✓ Pass
HLR-EXT-005 Model Path Resolution VC-023 Model Path Resolution ✓ Pass
HLR-EXT-006 External Renderer Registration VC-024 External Renderer Registration ✓ Pass
HLR-EXT-006 External Renderer Registration VC-024 External Renderer Registration ✓ Pass
HLR-EXT-007 Data View Generator Loading VC-025 Data View Generator Loading ✓ Pass
HLR-EXT-007 Data View Generator Loading VC-025 Data View Generator Loading ✓ Pass
HLR-EXT-007 Data View Generator Loading VC-025 Data View Generator Loading ✓ Pass
HLR-EXT-007 Data View Generator Loading VC-025 Data View Generator Loading ✓ Pass
HLR-EXT-007 Data View Generator Loading VC-025 Data View Generator Loading ✓ Pass
HLR-EXT-007 Data View Generator Loading VC-025 Data View Generator Loading ✓ Pass
HLR-EXT-007 Data View Generator Loading VC-025 Data View Generator Loading ✓ Pass
HLR-EXT-007 Data View Generator Loading VC-025 Data View Generator Loading ✓ Pass
HLR-EXT-007 Data View Generator Loading VC-025 Data View Generator Loading ✓ Pass
HLR-EXT-008 Handler Caching VC-026 Handler Caching — Not Run
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-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-028 Multi-Format Output ✓ 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-PIPE-001 Five-Phase Lifecycle VC-001 Five-Phase Lifecycle — Not Run
HLR-PIPE-001 Five-Phase Lifecycle VC-PIPE-007 Sourcepos Normalization ✓ Pass
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 VERIFY 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-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-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-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-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

5.1 Deterministic Enforcement in VERIFY

  • 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).

6 Pipeline Verification Cases

VC-001: Five-Phase Lifecycle

Verify that the Pipeline executes all five phases in correct order.

OBJECTIVE:
Confirm INITIALIZE Phase , ANALYZE Phase , TRANSFORM Phase , VERIFY Phase , EMIT Phase execute sequentially
VERIFICATION METHOD:
Test
PASS CRITERIA:
  • All 5 phases execute for every document
  • Phase order is always INITIALIZE < ANALYZE < TRANSFORM < VERIFY < EMIT
APPROACH:
  • Register handlers for all 5 phases that record execution timestamps
  • Execute pipeline with test document
  • Verify timestamps show strict ordering
TRACEABILITY:
HLR-PIPE-001

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:
HLR-PIPE-002 , LLR-PIPE-002-01 , LLR-PIPE-002-02 , 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:
HLR-PIPE-003

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 VERIFY
  • TRANSFORM phase has already completed before VERIFY
  • EMIT phase handlers never called
APPROACH:
  • Create document with validation errors (missing required attribute)
  • Execute pipeline
  • Verify EMIT handlers are not invoked after VERIFY errors are reported
TRACEABILITY:
HLR-PIPE-004

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, ANALYZE, TRANSFORM, VERIFY, 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}_batch hooks are required
APPROACH:
  • Create 3 test documents
  • Register handler with on_initialize, on_analyze, on_transform, on_verify, and on_emit hooks that record call counts and context sizes
  • Execute pipeline
  • Verify each phase hook receives array with 3 contexts
TRACEABILITY:
HLR-PIPE-005

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:
HLR-PIPE-006 , LLR-PIPE-006-01 , LLR-PIPE-006-02 , 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:
HLR-PIPE-001

7 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:
HLR-STOR-001 , LLR-DB-007-01 , 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 proof-view diagnostics
APPROACH:
  • Run markdown-driven attribute probe through test_cov template
  • 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:
HLR-STOR-002 , 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:
HLR-STOR-003

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:
HLR-STOR-004

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:
HLR-STOR-005

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:
HLR-STOR-006

8 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:
HLR-TYPE-001

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:
HLR-TYPE-002

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:
HLR-TYPE-003

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 ANALYZE Phase phase
APPROACH:
  • Process document with text and text links
  • Process links with normalized/object-header syntax ([@PID](@), [#PID](@))
  • Query spec_relations table
  • Verify source_ref, target_text, type_ref fields
TRACEABILITY:
HLR-TYPE-005

VC-016: Spec Views Container

Verify spec_views table stores generated content.

OBJECTIVE:
Confirm view code blocks create spec_view records
VERIFICATION METHOD:
Test
PASS CRITERIA:
  • Each view code block creates one record
  • view_type_ref matches view type
  • resolved_ast populated during TRANSFORM Phase phase
  • resolved_data contains structured view data
APPROACH:
  • Process document with toc and lof code blocks
  • Query spec_views table
  • Verify view_type_ref, resolved_ast fields
TRACEABILITY:
HLR-TYPE-004

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:
HLR-TYPE-006

VC-018: Type Validation

Verify proof views detect data integrity violations.

OBJECTIVE:
Confirm validation catches invalid data
VERIFICATION METHOD:
Test
PASS CRITERIA:
  • SD-102 violation reported for invalid enum
  • SD-201 violation reported for missing required
  • SD-301 violation reported for dangling reference
  • SD-601/SD-602/SD-603 violations are reported deterministically for broken HLR-VC-TR chains (sw_docs model)
  • SD-605 violation is reported when VC TP artifact path violates TP naming convention
  • SD-606 violation is reported when an FD has no traceability link to a CSC
  • SD-607 violation 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 (SD-102)
  • Create document with missing required attribute (SD-201)
  • Create document with dangling relation (SD-301)
  • Run VERIFY phase, check diagnostics
TRACEABILITY:
HLR-TYPE-007

9 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:
HLR-EXT-001

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:
HLR-EXT-002 , LLR-EXT-020-01

VC-021: Handler Registration Interface

Verify type modules can export handlers.

OBJECTIVE:
Confirm M.handler is registered with pipeline
VERIFICATION METHOD:
Test
PASS CRITERIA:
  • Handler registered if M.handler exists
  • Handler prerequisites respected
  • Handler invoked during appropriate phase
APPROACH:
  • Create type module with M.handler export
  • Load model
  • Verify handler is registered in pipeline
TRACEABILITY:
HLR-EXT-003 , LLR-EXT-021-01 , LLR-EXT-021-02

VC-022: Type Definition Schema

Verify type modules follow required schema.

OBJECTIVE:
Confirm type exports contain required fields
VERIFICATION METHOD:
Test
PASS CRITERIA:
  • Valid types are inserted into category tables
  • Missing-id schemas are skipped
  • 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 valid schemas register with defaults and invalid schemas are ignored
TRACEABILITY:
HLR-EXT-004 , 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:
HLR-EXT-005 , LLR-EXT-023-01 , 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_loader before rendering.
VERIFICATION METHOD:
Test
PASS CRITERIA:
  • Floats with needs_external_render are queued for rendering
  • External tools (PlantUML, ECharts) are invoked
  • view data is injected into chart config for standard dataset and sankey flows
  • Missing/invalid views do not abort render and leave input config intact
  • Omitted view attributes preserve chart config with no injection side effects
APPROACH:
  • Process markdown chart blocks with view=... attributes
  • Verify model fallback (model=sw_docs -> default gauss) 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:
HLR-EXT-006 , LLR-EXT-024-01 , LLR-EXT-024-02 , 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 generate() function produces data for chart consumers.
VERIFICATION METHOD:
Inspection
PASS CRITERIA:
  • View modules loaded from models/{model}/types/views/
  • Resolution tries specified model first, falls back to default
  • generate() receives params table and DataManager instance
  • Return value used as chart data source
APPROACH:
  • Examine data_loader.load_view() resolution logic (model-first, default fallback)
  • Verify generate(params, data) receives user parameters and DataManager instance
  • Confirm returned dataset is passed to chart float rendering
TRACEABILITY:
HLR-EXT-007

VC-026: Handler Caching

Verify type handler loaders cache modules to avoid repeated loading.

OBJECTIVE:
Confirm handler dispatchers maintain a cache keyed by model and type_ref, including negative caching for missing handlers.
VERIFICATION METHOD:
Inspection
PASS CRITERIA:
  • Cache keyed by model:type_ref combination
  • Second access to same type returns cached handler
  • Failed lookup stores false (negative cache)
  • No repeated require() for previously loaded types
APPROACH:
  • Examine float_handlers, view_handlers, and inline_handlers dispatch modules
  • Verify cache keyed by {model}:{type_ref}
  • Confirm cache hit returns stored handler without re-loading
  • Confirm failed lookups store false to prevent repeated require() calls
TRACEABILITY:
HLR-EXT-008

10 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:
HLR-OUT-001

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
APPROACH:
  • Process document with PlantUML float
  • Run float_resolver
  • Verify resolved_ast contains SVG image
TRACEABILITY:
HLR-OUT-002

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:
HLR-OUT-003

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:
HLR-OUT-004

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
  • OOXML postprocessing applied
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
TRACEABILITY:
HLR-OUT-005 , 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:
HLR-OUT-006

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:
HLR-OUT-001

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:
HLR-OUT-001

11 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:
101
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
64
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
75
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/internals/vc_pipe_007_01_sourcepos_compat.md
TRACEABILITY:
VC-PIPE-007

TR-007-01: 007 01 Db Persistence

DURATION MS:
132
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
117
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
105
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
492
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
1194
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
262
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
110
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
138
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
126
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
69
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
76
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
71
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
72
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/internals/vc_014_05_spec_floats.md
TRACEABILITY:
VC-014

TR-015-01: 015 01 Relation Resolver

DURATION MS:
80
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
87
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/internals/vc_015_02_relation_edges.md
TRACEABILITY:
VC-015

TR-015-03: 015 03 Links

DURATION MS:
133
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/relations/vc_015_03_links.md
TRACEABILITY:
VC-015

TR-015-04: 015 04 Xref

DURATION MS:
86
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/relations/vc_015_04_xref.md
TRACEABILITY:
VC-015

TR-015-05: 015 05 Citations

DURATION MS:
80
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/relations/vc_015_05_citations.md
TRACEABILITY:
VC-015

TR-015-06: 015 06 Scoped Resolution

DURATION MS:
80
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
89
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
93
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
95
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/relations/vc_015_09_section_xrefs.md
TRACEABILITY:
VC-015

TR-016-01: 016 01 View Materializer

DURATION MS:
75
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/internals/vc_016_01_view_materializer.md
TRACEABILITY:
VC-016

TR-016-02: 016 02 View Utils

DURATION MS:
73
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
128
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/views/vc_016_03_inline_views.md
TRACEABILITY:
VC-016

TR-017-01: 017 01 Attribute Caster

DURATION MS:
72
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
75
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
241
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/sdn_types/vc_017_03_attr_dedup.md
TRACEABILITY:
VC-017

TR-017-04: 017 04 Syntax Attributes

DURATION MS:
133
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
85
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
251
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
205
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
209
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
178
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
149
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
149
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/verify/vc_018_09_verify_inherited_enum.md
TRACEABILITY:
VC-018

TR-019-01: 019 01 Preset Load Chain

DURATION MS:
106
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
209
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/sdn_types/vc_019_02_sf_type.md
TRACEABILITY:
VC-019

TR-019-03: 019 03 Nfr Type

DURATION MS:
214
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/sdn_types/vc_019_03_nfr_type.md
TRACEABILITY:
VC-019

TR-019-04: 019 04 Realizes Relation

DURATION MS:
202
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/sdn_types/vc_019_04_realizes_relation.md
TRACEABILITY:
VC-019

TR-020-01: 020 01 Model Directory Structure

DURATION MS:
101
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
65
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
67
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
68
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
89
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/floats/vc_024_01_plantuml.md
TRACEABILITY:
VC-024

TR-024-02: 024 02 Charts

DURATION MS:
112
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/floats/vc_024_02_charts.md
TRACEABILITY:
VC-024

TR-025-01: 025 01 Data Views

DURATION MS:
146
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/floats/vc_025_01_data_views.md
TRACEABILITY:
VC-025

TR-025-02: 025 02 View Registration

DURATION MS:
92
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
244
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
189
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
155
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
162
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
165
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
159
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
168
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/sw_docs-tests/vc_025_09_test_execution_matrix.md
TRACEABILITY:
VC-025

TR-027-01: 027 01 Float Numbering

DURATION MS:
81
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
135
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/output/vc_028_01_output_formats.md
TRACEABILITY:
VC-028

TR-028-02: 028 02 Bibliography

DURATION MS:
81
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/output/vc_028_02_bibliography.md
TRACEABILITY:
VC-028

TR-028-03: 028 03 Reqif Export

DURATION MS:
447
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/reqif/vc_028_03_reqif_export.md
TRACEABILITY:
VC-028

TR-029-01: 029 01 Ooxml Schema Validation

DURATION MS:
341
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
241
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/ooxml/vc_029_02_ooxml_validator_selftest.md
TRACEABILITY:
VC-029

TR-030-01: 030 01 Html Options

DURATION MS:
68
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
114
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
82
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/webapp/vc_030_03_web_search.md
TRACEABILITY:
VC-030

TR-031-01: 031 01 Assembler

DURATION MS:
72
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/internals/vc_031_01_assembler.md
TRACEABILITY:
VC-031

TR-032-01: 032 01 Caption Structure

DURATION MS:
105
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
120
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
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:
73
EXECUTED BY:
E2E Test Runner
EXECUTION DATE:
2026-02-23
RESULT:
Pass
TEST FILE:
tests/e2e/internals/vc_out_004_01_render_utils.md
TRACEABILITY:
VC-OUT-004