import type { ResolvedProfileContext, SemanticGraph } from './compiler.js'; import type { EvidenceReport, EvidenceResult } from './evidence.js'; export interface RtmSource { readonly path: string; readonly line: number; } export interface RtmEvidenceVerdict { readonly target: 'subject' | 'claim'; readonly result: EvidenceResult; readonly provider: string; readonly evidenceDocument: string; readonly uri: string; readonly message?: string; } export interface RtmLineageEntry { readonly relationship: string; readonly role: 'realizes' | 'influences' | 'influenced-by'; readonly subject: string; readonly kind?: string; readonly name?: string; readonly source: RtmSource; } export interface RtmRealizer { readonly subject: string; readonly kind?: string; readonly name?: string; readonly status?: string; readonly relationship: string; readonly source: RtmSource; readonly evidence: readonly RtmEvidenceVerdict[]; } export interface RtmAttestation { readonly topic: string; readonly by: string; readonly recordedBy?: string; readonly on: string; readonly source: RtmSource; } export interface RtmRow { readonly subject: string; readonly kind: string; readonly coreKind: 'requirement' | 'constraint'; readonly name: string; readonly description?: string; readonly status?: string; readonly gap: boolean; readonly source: RtmSource; readonly lineage: readonly RtmLineageEntry[]; readonly realizers: readonly RtmRealizer[]; readonly attestations: readonly RtmAttestation[]; } export interface RtmContextEntry { readonly subject: string; readonly kind: string; readonly name: string; readonly source: RtmSource; } export interface RtmDescopedEntry { readonly subject: string; readonly name: string; /** * Why the row left the coverage arithmetic. A retired requirement is a * declared non-goal (ADR 0073); a retired constraint is deliberately * outside that set, because retiring one lifts a rule rather than * declining scope. Both are descoped, and a compliance reader needs to * know which happened. */ readonly reason: 'non-goal' | 'lifted-constraint'; readonly rationale?: string; readonly source: RtmSource; } export interface RequirementsTraceabilityMatrix { readonly format: 'yarramate/rtm/v1'; readonly workspace: string; readonly summary: { readonly rows: number; readonly requirements: number; readonly constraints: number; readonly covered: number; readonly gaps: number; readonly descoped: number; readonly realizers: number; readonly realizersWithEvidence: number; readonly attestedRows: number; }; readonly rows: readonly RtmRow[]; readonly descoped: readonly RtmDescopedEntry[]; readonly motivationContext: readonly RtmContextEntry[]; } export declare function buildRtm(workspace: string, graph: SemanticGraph, profileContext: ResolvedProfileContext, evidenceReports: readonly EvidenceReport[]): RequirementsTraceabilityMatrix; export declare function renderRtmMarkdown(rtm: RequirementsTraceabilityMatrix): string;