SourceTexttypeno test imports ittype SourceText = { readonly path: string; readonly text: string };A file of the repository and its text.
The files of a requirement's trace chain (commons 0001-quality-evidence FR-030, 0020-ifccm FR-014): its specification, the code that cites it with a // Spec: line, the tests that prove it with proves, and the ontology files that define a term for it. A change to any of them after the revision of a run makes the proof stale; this file only says which they are. It reads text it is given and uses the readers of kernel/trace.ts, so that no stage needs an annotation of its own.
Also here: the tests a repository holds, by name (testsOf), which a CAPA names (FR-033), and the line of a requirement in its specification (requirementLine), so that a change to the requirement's own text is told from a change to its neighbours' (FR-030's "its text").
SourceTexttypeno test imports ittype SourceText = { readonly path: string; readonly text: string };A file of the repository and its text.
requirementsOffunctionfunction requirementsOf(specs: readonly { readonly slug: string; readonly text: string; }[]): ReadonlyMap<string, readonly string[]>The requirements, NNNN-slug FR-nnn, of each specification's text, by slug.
chainFilesfunctionno test imports itfunction chainFiles(requirements: readonly string[], sources: readonly SourceText[], specPaths: ReadonlyMap<string, string>): ReadonlyMap<string, readonly string[]>For each requirement, the files of its chain (FR-030): the specification at specPaths, every file whose // Spec: line or proves call names it (alone or in a range), and every file that holds its identifier as text where it is an ontology file (mz:definedBy).
requirementLinefunctionno test imports itfunction requirementLine(specText: string, fr: string): string | undefinedThe line of a requirement in its specification's text (- **FR-nnn**: ...), trimmed; undefined where there is none.
testsOffunctionno test imports itfunction testsOf(text: string): readonly KnownTest[]The tests a text holds that name the requirements they prove: proves(["0001-quality-evidence FR-013"], "the name", ...).