Software elements

Software module responsibilities and containment within the product system elements.

Software element: Extension lifecycle and directives STV_SWE_DIRECTIVE
status: accepted
tags: release_initial
basis: inferred
evidence: docs/architecture/decisions/STV_ADR_001_static_extension.rst
priority: unassigned
verification_state: not_assessed

Registers the extension, parses directives, records source locations, resolves optional seed lists, validates initial capacity and handles package compatibility. See STV_ADR_001: Static build integration and browser runtime, STV_ADR_002: Portable graph and rendered-detail bundle, STV_ADR_003: Transactional exploration and semantic rank layout and STV_ADR_004: Concrete dependency and delivery stack.

Component directory: src/sphinx_traceability_view/directive. The folder name is the lowercase suffix of STV_SWE_DIRECTIVE.

Implementation: lifecycle.py; directives.py; __init__.py.

The public setup/version shims in src/sphinx_traceability_view/__init__.py and src/sphinx_traceability_view/_version.py belong to this component.

Unit tests: tests/test_lifecycle.py.

Boundary: README.rst.

Registers the two font-scale settings and page-level metadata assets on HTML pages with actionable host Need metadata, including pages without an STV directive. See STV_ADR_011: Separate exploration, page metadata and SVG capture.

Software element: Host model normalization STV_SWE_MODEL
status: accepted
tags: release_initial
basis: inferred
evidence: docs/architecture/decisions/STV_ADR_001_static_extension.rst
priority: unassigned
verification_state: not_assessed

Validates supplemental mappings against host definitions; resolves colors, labels, acceptance values and stakeholder entry roles. See STV_ADR_001: Static build integration and browser runtime, STV_ADR_002: Portable graph and rendered-detail bundle, STV_ADR_003: Transactional exploration and semantic rank layout and STV_ADR_004: Concrete dependency and delivery stack.

Component directory: src/sphinx_traceability_view/model. The folder name is the lowercase suffix of STV_SWE_MODEL.

Implementation: __init__.py.

Unit tests: tests/test_model.py.

Boundary: README.rst.

Validates independent finite positive tooltip/detail font scales. See STV_ADR_011: Separate exploration, page metadata and SVG capture.

Software element: Graph adapter and indexes STV_SWE_GRAPH
status: accepted
tags: release_initial
basis: inferred
evidence: docs/architecture/decisions/STV_ADR_001_static_extension.rst
priority: unassigned
verification_state: not_assessed

Reads the completed Needs collection and constructs canonical objects, links, incoming/outgoing indexes, missing-target records and project-name/stakeholder entry metadata. See STV_ADR_001: Static build integration and browser runtime, STV_ADR_002: Portable graph and rendered-detail bundle, STV_ADR_003: Transactional exploration and semantic rank layout and STV_ADR_004: Concrete dependency and delivery stack.

Component directory: src/sphinx_traceability_view/graph. The folder name is the lowercase suffix of STV_SWE_GRAPH.

Implementation: __init__.py; placement.py.

Resolves configurable per-object evidence rows before publishing the graph.

Unit tests: tests/test_graph.py.

Boundary: README.rst.

Software element: Rendered detail extraction STV_SWE_DETAIL_BUILD
status: accepted
tags: release_initial
basis: inferred
evidence: docs/architecture/decisions/STV_ADR_001_static_extension.rst
priority: unassigned
verification_state: not_assessed

Uses Beautiful Soup 4.13.5 with html.parser to capture full host-rendered Need HTML, adjusts portable links/assets and isolates fragments for overlay use. See STV_ADR_001: Static build integration and browser runtime, STV_ADR_002: Portable graph and rendered-detail bundle, STV_ADR_003: Transactional exploration and semantic rank layout and STV_ADR_004: Concrete dependency and delivery stack.

Component directory: src/sphinx_traceability_view/detail_build. The folder name is the lowercase suffix of STV_SWE_DETAIL_BUILD.

Implementation: __init__.py; export_resources.py.

Unit tests: tests/test_details.py.

Boundary: README.rst.

Collects output-contained media/font bytes and safe export resource dependencies after final HTML extraction. See STV_ADR_011: Separate exploration, page metadata and SVG capture.

Software element: Static bundle emission STV_SWE_BUNDLE
status: accepted
tags: release_initial
basis: inferred
evidence: docs/architecture/decisions/STV_ADR_001_static_extension.rst
priority: unassigned
verification_state: not_assessed
allocated requirements: STV_SWR_017, STV_SWR_018, STV_SWR_072
part of: STV_SE_BUILD

Packages esbuild-built local runtime assets and writes deterministic graph manifests, lazy per-object detail scripts and packaged runtime assets with relative output paths and rebuild dependencies. See STV_ADR_001: Static build integration and browser runtime, STV_ADR_002: Portable graph and rendered-detail bundle, STV_ADR_003: Transactional exploration and semantic rank layout and STV_ADR_004: Concrete dependency and delivery stack.

Component directory: src/sphinx_traceability_view/bundle. The folder name is the lowercase suffix of STV_SWE_BUNDLE.

Implementation: __init__.py.

Unit tests: tests/test_bundle.py.

Boundary: README.rst.

Maintainer delivery helpers frontend/build.js and frontend/legal/ own audited npm/compiled-library notices and generated package assets for this delivery boundary; they introduce no additional runtime element.

Publishes additive presentation fields and content-addressed export resource records with the graph/detail identities. See STV_ADR_011: Separate exploration, page metadata and SVG capture.

Software element: Exploration state engine STV_SWE_STATE
status: accepted
tags: release_initial
basis: inferred
evidence: docs/architecture/decisions/STV_ADR_001_static_extension.rst
priority: unassigned
verification_state: not_assessed

Pure transition and visibility logic; immutable input graph, independent view state, capacity checks, persistent seed sets, independent project-page exploration and later occurrence projection. See STV_ADR_001: Static build integration and browser runtime, STV_ADR_002: Portable graph and rendered-detail bundle, STV_ADR_003: Transactional exploration and semantic rank layout and STV_ADR_004: Concrete dependency and delivery stack.

Component directory: frontend/src/state. The folder name is the lowercase suffix of STV_SWE_STATE.

Implementation: state.js.

Unit tests: tests/state.test.js.

Boundary: README.rst.

Handles atomic collapse-all with current roots and clears stored page expansions. See STV_ADR_011: Separate exploration, page metadata and SVG capture.

Owns versioned snapshot encoding, current-graph validation and guarded browser storage in persistence.js; unit tests: tests/persistence.test.js. See STV_ADR_012: Browser-local opt-in view snapshots.

Software element: Semantic rank layout STV_SWE_LAYOUT
status: accepted
tags: release_initial
basis: inferred
evidence: docs/architecture/decisions/STV_ADR_001_static_extension.rst
priority: unassigned
verification_state: not_assessed

Uses ELK.js 0.10.0 for ordering suggestions then STV projection to rank by model levels with a separate synthetic project-root band, places classified evidence in resolved rows and legacy-role tests to the right and routes edges including cycles without changing semantic graph data. See STV_ADR_001: Static build integration and browser runtime, STV_ADR_002: Portable graph and rendered-detail bundle, STV_ADR_003: Transactional exploration and semantic rank layout and STV_ADR_004: Concrete dependency and delivery stack.

Component directory: frontend/src/layout. The folder name is the lowercase suffix of STV_SWE_LAYOUT.

Implementation: layout.js; stability.js; level.js.

Owns fresh placement and committed-slot stabilization; see STV_ADR_008: Stable navigation after fresh placement.

Unit tests: tests/layout.test.js; tests/stability.test.js; tests/classified-rows.test.js.

Boundary: README.rst.

Reuses snapshot positions only with matching dimensions/ranks/topology before current routing and geometry validation. See STV_ADR_012: Browser-local opt-in view snapshots.

Software element: Accessible view and viewport STV_SWE_RENDER
status: accepted
tags: release_initial
basis: inferred
evidence: docs/architecture/decisions/STV_ADR_001_static_extension.rst
priority: unassigned
verification_state: not_assessed

Renders SVG connections and HTML controls/nodes, owns project-root presentation/paging, relationship-control ordering, focus, keyboard operation, status styling and D3 zoom 3.0.0/selection 3.0.0 for view-local pan/zoom. See STV_ADR_001: Static build integration and browser runtime, STV_ADR_002: Portable graph and rendered-detail bundle, STV_ADR_003: Transactional exploration and semantic rank layout and STV_ADR_004: Concrete dependency and delivery stack.

Component directory: frontend/src/render. The folder name is the lowercase suffix of STV_SWE_RENDER.

Implementation: index.js; view.js; groups.js; seeds.js; edge-viewport.js; stv.css.

Unit tests: tests/groups.test.js; tests/seeds.test.js; tests/edge-viewport.test.js; tests/page-metadata.test.js.

Boundary: README.rst.

Owns Collapse all nodes / Save as SVG wiring and page-metadata.js for scoped page-wide metadata actions; supplies committed workspace geometry to EXPORT. See STV_ADR_011: Separate exploration, page metadata and SVG capture.

Owns opt-in checkbox, persistence status, startup save gate and committed-state/zoom-end wiring. See STV_ADR_012: Browser-local opt-in view snapshots.

Software element: Hover, persistent details and original links STV_SWE_INSPECT
status: accepted
tags: release_initial
basis: inferred
evidence: docs/architecture/decisions/STV_ADR_001_static_extension.rst
priority: unassigned
verification_state: not_assessed

Uses Floating UI DOM 1.7.4 for transient hover and a separate bounded per-view persistent collection (STV_ADR_010: Separate persistent details from hover inspection). Restores final rendered fragments in scrollable panels and retains original-object new-tab links for real Needs, excluding artificial project roots. See STV_ADR_001: Static build integration and browser runtime, STV_ADR_002: Portable graph and rendered-detail bundle, STV_ADR_003: Transactional exploration and semantic rank layout and STV_ADR_004: Concrete dependency and delivery stack.

Component directory: frontend/src/inspect. The folder name is the lowercase suffix of STV_SWE_INSPECT.

Implementation: inspect.js (hover), content.js (shared safe content), collection.js (bounded identities), persistent.js (persistent DOM/focus), typography.js (baseline-preserving font scaling).

Unit tests: tests/inspect.test.js; tests/collection.test.js; tests/typography.test.js.

Boundary: README.rst.

Applies independent presentation scales and supplies read-only currently visible detail snapshots to EXPORT. See STV_ADR_011: Separate exploration, page metadata and SVG capture.

Provides ordered card IDs and focus-free reopening for snapshot restoration. See STV_ADR_012: Browser-local opt-in view snapshots.

Software element: Visible-area SVG snapshot and download STV_SWE_EXPORT
status: accepted
tags: change_increment
basis: documented
evidence: docs/architecture/decisions/STV_ADR_011_view-and-page-controls.rst
priority: unassigned
verification_state: not_assessed
allocated requirements: STV_SWR_070, STV_SWR_071, STV_SWR_072

Owns immutable visible-area capture, clipping/style/resource composition, inert XML serialization and browser-managed SVG download. Reads committed RENDER geometry and INSPECT display state without owning exploration or cards. Uses native DOM, SVG foreignObject, XMLSerializer, Blob and object URLs.

Component directory: frontend/src/export.

Source: snapshot.js; resources.js; download.js; README.rst.

Unit tests: tests/snapshot.test.js; tests/resources.test.js; tests/download.test.js. Real browser checks remain system-level.