The exporter package shall produce the CSV, HTML, NDJSON, and graph output formats. CSV streams attribute columns through a bufio.Writer; HTML is described below; NDJSON is defined in SW-EXP-003; the graph export writes a persistent LadybugDB database for external Cypher query tools and is compiled only behind the ladybug build tag.
The HTML export shall render a server-rendered Document view per document (compact app bar with brand, document breadcrumb, outline and theme toggles; server-rendered sidebar outline with scroll-spy highlighting; one sticky search-and-filter toolbar whose attribute menus are built from every attribute present on a requirement, including undeclared ones; neutral requirement cards with status/coverage/verdict chips, goldmark-rendered body, and a collapsible detail block for the attribute grid, rationale, evidence, and trace links; a doc-level trace chain section; and nested sub-requirement cards). The Document view shall be visible by default — no x-cloak or other client-only hiding — so the reading view survives a failed script or an offline file:// open.
The HTML export shall serve Table, Trace, and Coverage views from one embedded pageModel (requirement nodes with attributes, coverage state, verdict eligibility, and resolved upstream/downstream links). Analytical views shall render on demand in the client; the exporter shall not emit hidden Table, Trace, or Coverage markup. The page model shall not duplicate body or rationale text that already appears in the Document view.
The HTML export shall adapt coverage, verification, and link health from the graph's CoverageStates, VerificationStates, and TraceRefs APIs, including no verdict in the verification denominator over eligible measures, and shall carry version-pin direction per link so stale links are never inferred from link presence.
The HTML export shall embed its stylesheet and client controller and load no external scripts (no CDN), and shall render a project home page (index.html) with a document catalog, project-wide health, actionable exception queues, and cross-document requirement search.
The HTML export SHALL render requirement body and rationale through goldmark to support inline Markdown syntax (code spans, emphasis, emoji, math, fenced code blocks) rather than plain text escaping.