/** * Citation-graph densification (#1505): two TS-native tools that close gaps in * a research corpus's citation graph. * * - extract-crossrefs — scan analysis docs' Cross-References / Related-Work / * Referenced-By sections for REF ids that have a sidecar but are missing from * the source's Outgoing table, and (with --write) inject them as outgoing * edges. Port of section9 `extract_crossrefs.py`. This is new capability — * no existing skill covers cross-reference → outgoing densification. * - citation-backfill — compute the inverse of the outgoing map and report / * inject missing Incoming edges + dangling cited-but-no-sidecar targets. * TS-native parity for `citation_backfill.py`; the prose `citation-backfill` * skill orchestrates this deterministic tool. * * Both default to dry-run; pass `{ write: true }` to persist. * * @source historical: corpus/extract_crossrefs.py, corpus/citation_backfill.py * @tests @test/unit/artifacts/citation-densify.test.ts */ export interface CrossrefResult { scanned: number; /** source ref → target refs to add as outgoing edges */ perSource: Record; totalAdditions: number; applied: number; } export declare function extractCrossrefs(root: string, opts?: { refs?: string[]; write?: boolean; }): CrossrefResult; export declare function renderCrossrefs(r: CrossrefResult, write: boolean): string; export interface BackfillResult { scanned: number; totalOutgoing: number; totalIncomingCurrent: number; totalIncomingExpected: number; missingEdges: number; /** target ref → source refs missing from its incoming table */ perTarget: Record; /** cited but no sidecar: target ref → citing sources */ dangling: Array<{ target: string; sources: string[]; }>; applied: number; } export declare function backfillCitations(root: string, opts?: { write?: boolean; }): BackfillResult; export declare function renderBackfill(r: BackfillResult, write: boolean): string; //# sourceMappingURL=citation-densify.d.ts.map