/** Relative path (from a legacy tools checkout) to the shipped standards packs. */ export declare const VENDOR_STANDARDS_DIR = "memo/src/artifacts/standards"; export interface StandardClauseInfo { /** SysML usage name, e.g. "iec62304Clause5_2_2" */ name: string; /** * The `id` attribute, e.g. "STD-IEC-62304-5-2-2". * * Both this and `name` are carried because a ConformsTo edge addresses a * clause by whichever the project authored, and the clause instances are * library content that a consuming project's element index does not hold. */ id?: string; /** The number a document cites, e.g. "5.2.2", "820.30(c)", "V.A" */ clauseNumber: string; /** MEMO-authored scope phrase. Absent when MEMO has no verified reading. */ title?: string; normativeStrength?: string; /** Designation of the standard this clause belongs to. */ designation: string; } export interface RegulatoryStandardInfo { /** SysML usage name, e.g. "iec62304" */ name: string; designation: string; edition?: string; issuer?: string; amendments: string[]; /** * Submission regimes this standard has standing in, as bare * `RegulatoryRegimeKind` member names ("CE", "FDA_510k"). * * Empty is authored, not missing: a method or reference standard that no * regime mandates. See `appliesToRegime` in the ontology package header — * the report prints these standards separately rather than dropping them. */ regimes: string[]; sourceFile: string; /** Clause number → clause, for every clause that composes into this standard. */ clauses: Map; } /** A regime citation in a pack that names no `RegulatoryRegimeKind` member. */ export interface UnknownRegimeCitation { /** Designation of the standard that cited it. */ designation: string; /** The citation verbatim, e.g. "RegulatoryRegimeKind::EU_MDR" or "CE". */ raw: string; reason: 'unqualified' | 'unknown-member'; } export interface StandardsLibrary { /** Designation → standard. Designations are matched exactly, amendments included. */ standards: Map; /** Clause instances that compose into no standard — a defect in a pack. */ orphanClauses: StandardClauseInfo[]; /** * `RegulatoryRegimeKind` members, read from the ontology's own enum * declaration. Never a list in this file: the regimes MEMO recognises are * ontology content, and a TypeScript copy would be a second place to * maintain them. */ regimeVocabulary: string[]; /** Regime citations that resolve to no member — a defect in a pack. */ unknownRegimes: UnknownRegimeCitation[]; /** Directory the packs were read from, or null when none was found. */ sourceDir: string | null; } /** Locate the ontology's standards directory. Cached after first hit. */ export declare function findVendorStandardsDir(startDir?: string): string | null; /** Test hook: reset the cached standards directory. */ export declare function resetStandardsDirCache(): void; /** * Read the members of an ontology `enum def` out of the ontology source. * * The packs are at `/src/artifacts/standards`, so the ontology's * `src/` root is two levels up; the enum is found by walking it rather than by * naming the file that happens to hold it today. What is hardcoded here is a * locator, never a value: the members themselves come from the ontology, which * is the whole reason a regime is an enum and not a string convention. */ export declare function readEnumMembers(standardsDir: string, enumName: string): string[]; /** * Read every standards pack under the ontology's `src/artifacts/standards/`. * * Clause-to-standard membership comes from the `Composes` links the packs * declare, walked transitively, rather than from "one file, one standard" — * containment is a modelled fact and reading it back is what keeps the pack * and the library agreeing. */ export declare function loadStandardsLibrary(startDir?: string): StandardsLibrary; export interface ClauseReference { /** Standard designation the citation resolves against. */ designation: string; clauseNumber: string; /** The frontmatter entry this came from, verbatim. */ raw: string; /** True when the entry carried its own designation rather than inheriting one. */ qualified: boolean; } /** * Parse one `clauses:` frontmatter entry. * * "5.4" → relative: the document's own `standard:` * "ISO 14971:2019 §7" → qualified: designation before §, clause after * * An entry containing "§" is qualified and nothing else is. That is the whole * grammar, and it is written into the ontology's package header too — the two * shapes were both already in use before Phase 2, one of them undocumented. */ export declare function parseClauseReference(entry: string, documentStandard?: string): ClauseReference; /** Render a clause reference the way document metadata cites it. */ export declare function formatClauseReference(ref: ClauseReference): string; export type ClauseResolution = { ok: true; ref: ClauseReference; clause: StandardClauseInfo; } | { ok: false; ref: ClauseReference; reason: 'unknown-standard' | 'unknown-clause'; }; /** Resolve one citation against the library. */ export declare function resolveClause(library: StandardsLibrary, entry: string, documentStandard?: string): ClauseResolution; //# sourceMappingURL=standards-library.d.ts.map