/** * Staleness detection — flag facts that may no longer reflect the code. * * Two signals: age (`lastVerified` older than a threshold) and change (the * file named in an entity's `source` was modified per git diff). Confidence * degrades ×0.8 on change until re-verified; decay is applied lazily by the * commands that call in here — no watchers or daemons (design DD6). * * Requirements: KG 7.1–7.4 * * @module */ import type { Entity } from './types.js'; import type { KnowledgeIndex } from './index/knowledge-index.js'; import type { YamlSourceStore } from './yaml-source.js'; /** Multiplier applied to confidence when a source file changed (KG Req 7.2). */ export declare const CONFIDENCE_DECAY = 0.8; /** Default staleness threshold in days (KG Req 7.1). */ export declare const DEFAULT_STALE_DAYS = 30; export interface StaleEntity { entity: Entity; reason: 'age' | 'file-changed'; detail: string; } export declare class StalenessDetector { private readonly index; private readonly source; private readonly projectRoot; constructor(index: KnowledgeIndex, source: YamlSourceStore, projectRoot: string); /** Entities not verified within `thresholdDays` (KG Req 7.1). */ byAge(thresholdDays?: number): StaleEntity[]; /** * Entities whose source file changed per git diff; degrades their * confidence ×0.8 in both index and YAML (KG Req 7.2, 7.3). */ degradeChanged(sinceRef?: string): StaleEntity[]; /** Confirm an entity is accurate: bump lastVerified, restore confidence (KG Req 7.4). */ verify(entityId: string): Entity; private recentlyModifiedFiles; } //# sourceMappingURL=staleness.d.ts.map