/** * Expertise decay analysis — tracks activity freshness of code owners. * * Unlike knowledge-loss-risk (which focuses on bus factor = 1), * this module detects when dominant owners become inactive. */ import type { RiskLevel } from "./risk-classifiers.js"; export type OwnerStatus = "active" | "fading" | "inactive"; export interface ExpertiseDecayOwner { email: string; commits: number; percentage: number; lastActivityDate: string | null; daysSinceLastActivity: number | null; status: OwnerStatus; } export interface ExpertiseDecayEntry { directory: string; busFactor: number; owners: ExpertiseDecayOwner[]; riskLevel: RiskLevel; } export interface ExpertiseDecayResult { entries: ExpertiseDecayEntry[]; summary: { totalDirectories: number; highRisk: number; mediumRisk: number; lowRisk: number; }; } export interface ExpertiseDecayOptions { depth?: number; since?: string; maxCommits?: number; inactivityThresholdDays?: number; fadingThresholdDays?: number; pathPattern?: string; timeoutMs?: number; } /** * Analyze expertise decay across repository directories. * * For each directory's dominant contributors, checks how recently * they have been active and classifies the decay risk. */ export declare function analyzeExpertiseDecay(repoPath: string, options?: ExpertiseDecayOptions): Promise;