import type { BlackboardEntry, Decision } from "../utils/types.js"; export interface StalenessReason { signal: "scope_path_missing" | "affected_files_missing" | "branch_gone"; score: number; detail: string; } export interface StaleItem { id: string; kind: "decision" | "blackboard"; summary: string; scope: string; score: number; reasons: StalenessReason[]; branch?: string; commit_sha?: string; recorded_at?: string; } export interface StalenessAuditOptions { threshold: number; projectRoot: string; } export interface StalenessAuditResult { threshold: number; candidates: StaleItem[]; } /** * Score one decision or blackboard entry. Pure given probe results. * Exported for unit testing without filesystem. */ export declare function scoreItem(item: { scope: string; affected_files?: string[]; provenance?: { branch?: string; }; }, probes: { scopePathExists: (scope: string) => boolean | null; fileExists: (file: string) => boolean; branchKnown: (branch: string) => boolean; }): { score: number; reasons: StalenessReason[]; }; /** * Split a free-text scope into probeable path segments. Field scopes are * compound ("specs/ + rfcs/", "rfcs/, specs/x/", ".github/workflows/ tools/") * and carry section refs ("spec.md §2.7") — statting the whole string as one * path is guaranteed-false. Exported for unit testing. */ export declare function splitScopeSegments(scope: string): string[]; /** Build the three probes for a real project root. Cheap one-shot setup. */ export declare function buildProbes(projectRoot: string): { scopePathExists: (scope: string) => boolean | null; fileExists: (file: string) => boolean; branchKnown: (branch: string) => boolean; }; export declare function auditStaleness(decisions: Decision[], blackboardEntries: BlackboardEntry[], options: StalenessAuditOptions): StalenessAuditResult; //# sourceMappingURL=staleness.d.ts.map