Documentation

36A.21 Traceability, provenance, and automated rebuilds

Traceability, provenance, and automated rebuilds
Structural Chapter 36A diagram

nlmx report publishes one Markdown source into retained Markdown, Word and PDF by default, with optional HTML. The command solves document generation; it does not validate the scientific analysis or approve its interpretation. Treat the source Markdown and .report file as the controlled recipe, and treat every released format as a separate review target.

The report recipe

Retain source Markdown, .report, custom CSS, local images, exact report command, log and output checksum. Retain every upstream command/settings file, input hash, output checksum, seed and version cited in the report. A report package without its upstream evidence is a presentation, not a reproducible analysis.

Use a stable project layout: immutable data, models, one output folder per analysis command, report source/settings, and generated deliverables. Paths in the source should resolve in that layout. A run_all script can rebuild analyses and report into clean folders; fail fast on nonzero exits and assert native verdicts/warnings before publishing.

The provenance appendix should record software/version, dates, data/control-stream hashes, populations, commands in order, settings, seeds, output folders/checksum manifests, deviations, and approval. Fill it from logs/files, not memory. Under every table/figure provide a shorter source line.

report itself does not automatically write a default log or provenance. Supply --log-file, and write provenance into the content. The full executed evidence includes a requested log and generated output checksum. Top-level chapter checksums cover reference and QA evidence too.

Automated rebuild gate

A robust pipeline first verifies upstream checksum manifests and native verdicts, then builds Markdown/tables from controlled data, runs report, parses its log for warnings, checks expected formats, verifies report checksums, and queues visual review. Do not make --overwrite the default for initial execution; write a new attempt or archive the prior evidence. Record the exact executable path/version and environment needed for rendering. The final approval is a distinct record, not an inferred consequence of a zero exit code or matching hash.

Practical review questions

  • Does the released content answer the stated question without exceeding the evidence?
  • Can every number, table, figure and decision be traced to a retained native file and run?
  • Were all generated targets—not merely the source—inspected after the latest change?
  • Are warnings, failed runs, limitations and unverified steps visible rather than silently omitted?
  • Could another qualified analyst rebuild the same document from the retained recipe?

See the previous page, next page, and complete report reference.