import { BugRiskScore, TechDebtForecast, AnomalyEvent, MonteCarloResult, CodeMetrics, CodeAgeResult, ComplexityReport } from '../types.js'; /** * Predictive Engine — knows where bugs will appear before they do. * * Bug Risk Model: Weighted linear regression with exponential decay * Features: churn rate, cyclomatic complexity, time since last test, * number of authors, recent error frequency, code age * * Tech Debt Forecast: Time-series + seasonal decomposition * Linear trend + seasonal component, 90-day projection * * Anomaly Detection: Z-score monitoring (rolling 7-day window, |z| > 2.5) * * Monte Carlo: 1000 simulations for debt payoff date estimation */ export declare class PredictiveEngine { private metricHistory; private readonly ANOMALY_WINDOW_DAYS; private readonly ANOMALY_Z_THRESHOLD; /** * Score bug risk for each file based on multiple factors. * Uses weighted linear regression with exponential time decay. */ scoreBugRisk(files: CodeAgeResult[], metrics: CodeMetrics): BugRiskScore[]; /** * Forecast tech debt trajectory using time-series analysis. * Fits linear trend + seasonal component, projects 90 days forward. */ forecastDebt(history: ComplexityReport[]): TechDebtForecast; /** * Detect anomalies using Z-score on rolling window. * Alert when |z| > 2.5 (99.4% confidence interval). */ detectAnomalies(metrics: number[], windowDays?: number): AnomalyEvent[]; /** * Monte Carlo simulation for debt payoff estimation. * Runs N scenarios with randomized velocity to estimate completion dates. */ monteCarlo(currentDebt: number, avgVelocity: number, simulations?: number): MonteCarloResult; /** Simple linear regression */ private linearRegression; /** Box-Muller Gaussian random */ private gaussianRandom; } //# sourceMappingURL=predictive-engine.d.ts.map