/** * `dim impact` — knowledge-impact report for a pull request. * * Given a base and head ref, reports which verified memories are affected by the * changed files. This is read-only: it does not flip statuses or mutate the store. * The post-merge `dim verify` hook is what actually re-checks evidence and marks * memories stale. * * With `--verify`, it also runs evidence checks against the head ref and reports * which memories would go STALE if the PR merges. */ import type { MemoryStore } from "../db/store.js"; import type { MemoryEntry, MemoryKind, EvidenceResult } from "../types.js"; export interface ImpactMemory { memory: MemoryEntry; reason: "scope" | "violation"; } export interface StalePrediction { memory: MemoryEntry; evidenceType: string; result: EvidenceResult | "SKIPPED"; detail: string; } export interface ImpactReport { base: string; head: string; changedFiles: string[]; violations: import("./check.js").CheckViolation[]; affected: Record; stalePredictions: StalePrediction[]; newDecisions: ImpactMemory[]; summary: { total: number; byKind: Record; staleRisk: number; wouldGoStale: number; newDecisions: number; }; } export declare function gitChangedFiles(repoRoot: string, base: string, head: string): string[]; export declare function gitWorkingTreeFiles(repoRoot: string, staged?: boolean): string[]; export declare function buildImpactReport(store: MemoryStore, repoRoot: string, base: string, head: string, opts?: { verify?: boolean; }): ImpactReport; export declare function renderImpactReport(r: ImpactReport): string;