/**
 * DORA Metrics Persistent Tracking
 *
 * Stores DORA metrics in append-only JSONL format for historical tracking and trending
 *
 * Features:
 * - Append-only JSONL storage (.specweave/metrics/dora-history.jsonl)
 * - Trend calculation (7-day, 30-day, 90-day rolling averages)
 * - Degradation detection (alert if metrics worsen >20%)
 * - Living docs integration (auto-update dashboard)
 */
export interface DORAMetric {
    value: number;
    unit: string;
    tier: 'elite' | 'high' | 'medium' | 'low' | 'n/a';
}
export interface DORASnapshot {
    timestamp: string;
    deploymentFrequency: DORAMetric;
    leadTime: DORAMetric;
    changeFailureRate: DORAMetric;
    mttr: DORAMetric;
}
export interface TrendData {
    current: number;
    sevenDay: number;
    thirtyDay: number;
    ninetyDay: number;
    sevenDayChange: number;
    thirtyDayChange: number;
    ninetyDayChange: number;
}
export interface DegradationAlert {
    metric: string;
    currentValue: number;
    previousValue: number;
    percentageChange: number;
    severity: 'warning' | 'critical';
    message: string;
}
/**
 * Append DORA snapshot to history file (JSONL format)
 *
 * @param snapshot - DORA metrics snapshot
 */
export declare function appendSnapshot(snapshot: DORASnapshot): void;
/**
 * Read all DORA snapshots from history file
 *
 * @returns Array of DORA snapshots (oldest first)
 */
export declare function readHistory(): DORASnapshot[];
/**
 * Calculate trend data for a specific metric
 *
 * @param metricName - Name of metric ('deploymentFrequency', 'leadTime', etc.)
 * @returns Trend data with current, 7-day, 30-day, 90-day averages and changes
 */
export declare function calculateTrend(metricName: keyof DORASnapshot): TrendData | null;
/**
 * Detect metric degradation (>20% worsening)
 *
 * @returns Array of degradation alerts (empty if no degradation detected)
 */
export declare function detectDegradation(): DegradationAlert[];
/**
 * Get latest DORA snapshot
 *
 * @returns Latest snapshot, or null if no history
 */
export declare function getLatestSnapshot(): DORASnapshot | null;
/**
 * Get snapshot count
 *
 * @returns Number of snapshots in history
 */
export declare function getSnapshotCount(): number;
/**
 * Clear history (use with caution!)
 */
export declare function clearHistory(): void;
//# sourceMappingURL=dora-tracker.d.ts.map