/** * Research Traceability — Bidirectional links between findings and specs. * * Maintains a reverse index: finding ID -> spec names[]. * Updated on every spec save. Queryable for coverage and orphan detection. */ import type { AnySpec } from "../specs/types.js"; import type { ResearchFinding } from "./engine.js"; export interface TraceabilityIndex { findingToSpecs: Record; specToFindings: Record; updatedAt: string; } export declare class ResearchTraceability { private index; private indexPath; constructor(memoireDir: string); load(): Promise; save(): Promise; onSpecSaved(spec: AnySpec): Promise; onSpecRemoved(specName: string): Promise; getSpecsForFinding(findingId: string): string[]; getFindingsForSpec(specName: string): string[]; getOrphanedFindings(allFindings: ResearchFinding[]): ResearchFinding[]; getCoverage(specNames: string[]): { covered: number; total: number; ratio: number; }; getIndex(): TraceabilityIndex; }