export type ConfidenceLevel = "high" | "medium" | "low"; export type DecisionCategory = | "implementation_approach" | "technology_choice" | "architecture" | "scope" | "verification" | "security" | "deployment" | "general"; export interface Decision { id: string; timestamp: string; decision: string; rationale: string; confidence: number; category: DecisionCategory; alternatives_considered: Alternative[]; human_override: string | null; phase?: string; task?: string; } export interface Alternative { option: string; rejected_reason: string; } export function confidenceToLevel(confidence: number): ConfidenceLevel { if (confidence > 0.85) return "high"; if (confidence >= 0.6) return "medium"; return "low"; } export function shouldEscalate( confidence: number, threshold: number ): boolean { return confidence < threshold; }