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
| Component | Kind | Matrix | Reqs | Tests | Result | Status |
|---|---|---|---|---|---|---|
| TFL Engine tfl-engine | Engine | tfl-engine.md | 62 | 74 | 74 passing | evidenced |
| Text Library text | Text Library | text.md | 85 | 155 | 5 pending review | evidenced |
| Report Template Library templates | Report Templates | templates.md | 25 | 30 | 30 passing | evidenced |
| Traceability traceability | Framework | traceability.md | 16 | 23 | 23 passing | evidenced |
| Quality Framework quality | Framework | quality.md | 63 | 155 | 155 passing | evidenced |
| Subject Disposition t-disposition | Display | displays.md | 14 | 4 | 4 passing | evidenced |
| Demographic and Baseline Characteristics t-demographics | Display | displays.md | 14 | 4 | 4 passing | evidenced |
| Extent of Exposure to Study Drug t-exposure | Display | displays.md | 14 | 4 | 4 passing | evidenced |
| Overview of Treatment-Emergent Adverse Events t-ae-overview | Display | displays.md | 14 | 7 | 7 passing | evidenced |
| Treatment-Emergent Adverse Events by System Organ Class and Preferred Term t-ae-common | Display | displays.md | 14 | 7 | 7 passing | evidenced |
| Listing of Serious Adverse Events l-ae-serious | Display | displays.md | 14 | 3 | 3 passing | evidenced |
How the loop works
- 1MatrixA reviewed Markdown table in
quality/requirements/, one row per requirement. - 2Test titleTests name the IDs they evidence:
"DSP-AE-001: overview counts match ADAE (#1)". Guard tests in both suites enforce the convention. - 3Evidence
scripts/evidence.mjsnormalizes testthat and vitest into oneevidence.jsonper module, with the data → ARD → display traceability object attached. - 4PageThis site joins the matrix extract to the evidence set and publishes it.
- 5Guards
requirements:checkandevidence:checkfail 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.
- TFL- TFL Builder engine
- DSP- per-display requirements
- TXT- Text Library blocks
- RPT- Report template assembly
- TRC- traceability and provenance
- QC- the quality framework itself
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/