import type { ExecutionMode, SpecType } from './primitives.js';
export interface CalibrationMetrics {
    specId: string;
    estimatedHours: number;
    actualHours: number;
    estimatedComplexity: number;
    actualComplexity: number;
    specCompleteness: number;
    driftCount: number;
    completedAt: string;
}
export interface CalibrationState {
    totalSpecs: number;
    avgAccuracy: number;
    coefficients: Record<string, number>;
    history: CalibrationMetrics[];
    lastCalibrated: string;
}
export interface LearnedRegistryEntry {
    id: string;
    registry: string;
    data: Record<string, unknown>;
    source: 'builtin' | 'learned' | 'pending_verification';
    discoveredAt: string;
    discoveredInProject: string;
    verified: boolean;
}
export interface FeedbackLoopEvent {
    type: 'validate' | 'estimate' | 'checklist' | 'challenge' | 'drift';
    specId: string;
    input: Record<string, unknown>;
    outcome: Record<string, unknown>;
    delta: Record<string, unknown>;
    timestamp: string;
}
export type LearnedRegistryType = 'architecture-patterns' | 'saas-registry' | 'deploy-platforms' | 'agent-platforms' | 'mcp-catalog';
export interface TokenUsage {
    operationId: string;
    tool: string;
    mode: ExecutionMode;
    tokensUsed: number;
    costUsd: number;
    timestamp: string;
}
export type Trend = 'improving' | 'stable' | 'degrading';
export interface TrendMetric {
    current: number;
    previous: number;
    trend: Trend;
    history: number[];
    windowSize: number;
}
export interface ImprovementMetrics {
    estimationAccuracy: TrendMetric;
    specCompleteness: TrendMetric;
    driftPrevention: TrendMetric;
    totalSpecsAnalyzed: number;
    lastAnalyzedAt: string;
}
export interface ImprovementOverride {
    id: string;
    target: 'template' | 'recommendation' | 'quality-check' | 'dor-dod';
    action: 'add_section' | 'mark_optional' | 'adjust_priority' | 'adjust_ranking';
    data: Record<string, unknown>;
    reason: string;
    appliedAt: string;
    reversible: true;
}
export interface DeveloperPreference {
    tool: string;
    action: 'accepted' | 'rejected' | 'ignored';
    count: number;
    lastSeen: string;
}
export type ModelRecommendation = 'haiku' | 'sonnet' | 'opus';
export interface LessonLearned {
    id: string;
    specId: string;
    type: 'bug-pattern' | 'arch-mismatch' | 'estimation-error' | 'tool-limitation' | 'test-complexity';
    description: string;
    tags: string[];
    recordedAt: string;
}
export interface FailurePattern {
    criterion: string;
    occurrences: number;
    specType: SpecType | 'all';
}
export interface ValidationFailure {
    criterionId: string;
    specType: SpecType;
}
export interface SpecDescriptor {
    specId: string;
    title: string;
    criteria: string[];
    keywords: string[];
}
export interface DuplicateResult {
    isDuplicate: boolean;
    existingSpecId: string | null;
    existingCriterion: string | null;
    similarity: number;
}
export interface BudgetStatus {
    monthlyLimitUsd: number;
    currentUsageUsd: number;
    percentUsed: number;
    resetDate: string;
    isWarning: boolean;
    isExceeded: boolean;
}
//# sourceMappingURL=learning.d.ts.map