Quality

Requirements, tests, evidence

A reviewed requirement matrix per component; test titles that carry the requirement IDs; one normalized evidence stream across testthat and vitest; drift guards that fail CI when any committed artifact stops matching a fresh run.

265reviewed requirements11 matrices
441distinct test recordsjs-unit · r-unit · text-review
99%requirement coverage263 evidenced
99%tests passing0 failing · 5 pending review
Every requirement ID referenced by a test resolves to a reviewed matrix row.

2 reviewed requirements not yet referenced by any test: QC-CI-001, QC-CI-002

Components

ComponentKindMatrixReqsTestsResultStatus
TFL Engine
tfl-engine
Enginetfl-engine.md627474 passingevidenced
Text Library
text
Text Librarytext.md851555 pending reviewevidenced
Report Template Library
templates
Report Templatestemplates.md253030 passingevidenced
Traceability
traceability
Frameworktraceability.md162323 passingevidenced
Quality Framework
quality
Frameworkquality.md63155155 passingevidenced
Subject Disposition
t-disposition
Displaydisplays.md1444 passingevidenced
Demographic and Baseline Characteristics
t-demographics
Displaydisplays.md1444 passingevidenced
Extent of Exposure to Study Drug
t-exposure
Displaydisplays.md1444 passingevidenced
Overview of Treatment-Emergent Adverse Events
t-ae-overview
Displaydisplays.md1477 passingevidenced
Treatment-Emergent Adverse Events by System Organ Class and Preferred Term
t-ae-common
Displaydisplays.md1477 passingevidenced
Listing of Serious Adverse Events
l-ae-serious
Displaydisplays.md1433 passingevidenced

How the loop works

  1. 1MatrixA reviewed Markdown table in quality/requirements/, one row per requirement.
  2. 2Test titleTests name the IDs they evidence: "DSP-AE-001: overview counts match ADAE (#1)". Guard tests in both suites enforce the convention.
  3. 3Evidencescripts/evidence.mjs normalizes testthat and vitest into one evidence.json per module, with the data → ARD → display traceability object attached.
  4. 4PageThis site joins the matrix extract to the evidence set and publishes it.
  5. 5Guardsrequirements:check and evidence:check fail CI when a committed artifact drifts from a fresh run.

Requirement ID scheme

All IDs match ^[A-Z]{2,4}-[A-Z]+-\d+[A-D]?$ — unchanged from safety.viz, because every downstream tool depends on it.

Test naming, both suites: "<REQ-ID>[, <REQ-ID>]: <description> (#1)".

Reproduce

npm ci
npx vitest run                         # the JS suite
Rscript qc/run-tests.R                 # testthat → qc/testthat-results.json
node scripts/requirements.mjs          # matrices → docs/requirements/*.json
node scripts/evidence.mjs              # both suites → docs/evidence/*/evidence.json
node scripts/requirements.mjs --check  # drift guard
node scripts/evidence.mjs --check      # drift guard
node scripts/site.mjs                  # this site → site/_build/