/** * Velocity anomaly detection — pure statistical functions. * * Given time-bucketed commit counts, detects periods where the count * deviates significantly from the mean (spikes / drops). */ export interface VelocityBucket { period: string; count: number; } export interface VelocityAnomaly { period: string; count: number; mean: number; stddev: number; direction: "spike" | "drop"; /** Deviation magnitude in units of standard deviation (σ). */ magnitude: number; } export interface VelocityAnomalyResult { mean: number; stddev: number; thresholdSigma: number; totalBuckets: number; anomalies: VelocityAnomaly[]; } /** * Detect anomalous periods in a time series of commit counts. * * A period is anomalous when `|count - mean| > thresholdSigma * stddev`. * When stddev is 0 (all values identical), no anomalies are returned. */ export declare function detectVelocityAnomalies(buckets: VelocityBucket[], thresholdSigma?: number): VelocityAnomalyResult;