export type TrendMetric = "hotspots" | "churn" | "contributors" | "commit_count"; export type PeriodLength = "week" | "month" | "quarter"; export interface PeriodData { label: string; since: string; until: string; value: number; } export interface TrendResult { metric: TrendMetric; periodLength: PeriodLength; periods: PeriodData[]; delta: number; deltaPercentage: number | null; direction: "improving" | "stable" | "worsening"; } export interface TrendAnalysisOptions { metric: TrendMetric; periodLength?: PeriodLength; numPeriods?: number; pathPattern?: string; timeoutMs?: number; } /** * Analyze trend over time by running the same analysis across multiple time periods. * Compares period-over-period changes to detect improvement or deterioration. */ export declare function analyzeTrend(repoPath: string, options: TrendAnalysisOptions): Promise; interface PeriodBoundary { label: string; since: string; until: string; } export declare function computePeriodBoundaries(periodLength: PeriodLength, numPeriods: number): PeriodBoundary[]; export declare function formatPeriodLabel(date: Date, periodLength: PeriodLength): string; /** * Classify trend direction based on metric semantics. * For hotspots and churn: increase = worsening (more files changing, more churn) * For contributors: increase = improving (more people contributing) * For commit_count: neutral (just activity, context-dependent) */ export declare function classifyDirection(metric: TrendMetric, delta: number, baseValue: number): "improving" | "stable" | "worsening"; export {};