/** * Compute the staleness score for a set of changed files. * * Scoring model (deliberately simple, documented in docs/preflight.md): * * per-file weight = * 1 base * + 2 if any node in the file is a hub (is_hub = 1) * + min(3, ceil(maxFanIn/5)) for the heaviest fan-in in the file * * staleness_score = sum(per-file weight) over files that map to nodes in * the graph; files not in the graph are reported but do * not contribute to the score (we cannot reason about * them without re-analyzing). * * This is intentionally a heuristic — a hub change matters more than a leaf * change, but we never claim it's a true blast-radius computation. It is the * cheapest signal that distinguishes "noisy editor save" from "ripped out a * central module." */ export interface FileScore { filePath: string; /** Whether the file appears in the graph at all. */ inGraph: boolean; /** Did the file contain at least one hub? */ hub: boolean; /** Max fan-in across nodes in the file. */ maxFanIn: number; /** Number of nodes in the file. */ nodeCount: number; /** Weight contribution. */ weight: number; } export interface ScoreResult { perFile: FileScore[]; totalScore: number; hubCount: number; leafCount: number; /** Files not represented in the graph at all (e.g. new files). */ unknownFiles: string[]; } export declare function scoreChangedFiles(repoRoot: string, changedFiles: string[]): ScoreResult; //# sourceMappingURL=score.d.ts.map