import type { BenchmarkPhaseDuration } from "./workflow-run.js"; export type SizingLabel = "xs" | "s" | "m" | "l" | "xl"; export declare const SIZING_LABELS: SizingLabel[]; export type EstimateConfidence = "low" | "medium" | "high"; export interface EstimateRecord { id: string; taskId: string; sizingLabel: SizingLabel; soloEstimateDays: number; aiUnguidedEstimateDays: number; aiGuidedEstimateDays: number; comparisonRationale?: string; confidence: EstimateConfidence; declaredBy: string; declaredAt: string; } export interface EstimateInput { taskId: string; sizingLabel: SizingLabel; soloEstimateDays: number; aiUnguidedEstimateDays: number; aiGuidedEstimateDays: number; comparisonRationale?: string; confidence: EstimateConfidence; declaredBy: string; } export interface EstimateCalibration { baselineEstimateDays: number; historicalMedian: number | null; variance: number | null; calibrationNote: string; sampleSize: number; ignored: boolean; } export interface BenchmarkQualitySignals { reviewCount: number; blockingReviews: number; evidenceCount: number; gateBlockCount: number; lessonCount: number; totalInputTokens: number; totalOutputTokens: number; estimatedCostUsd: number; } export interface EffortBreakdown { aiAutonomousMinutes: number; aiSupervisedMinutes: number; aiCalibrationBaselineMinutes: number; humanReviewMinutes: number; humanManualMinutes: number; classification: "ai_autonomous" | "ai_supervised" | "human_manual" | "pending"; notes: string[]; } export interface BenchmarkResult { taskId: string; sizingLabel: SizingLabel; soloEstimateDays: number; aiUnguidedEstimateDays: number; aiGuidedEstimateDays: number; actualSource: "phase-timeline" | "task-lifecycle" | "task-timestamps" | "evidence-review-window" | "task-status" | "none"; actualDays: number | null; actualHours: number | null; vsSoloPct: number | null; vsAiUnguidedPct: number | null; vsAiGuidedPct: number | null; qaIterations: number; phaseDurations: BenchmarkPhaseDuration[]; effortBreakdown: EffortBreakdown; quality: BenchmarkQualitySignals; status: "pending" | "complete"; } export interface BenchmarkSummary { stories: BenchmarkResult[]; totalWithActuals: number; avgVsSoloPct: number | null; avgVsAiUnguidedPct: number | null; avgVsAiGuidedPct: number | null; } export interface VelocityWeek { week: string; storiesCompleted: number; pointsCompleted: number; } export interface VelocityReport { totalStoriesCompleted: number; totalPointsCompleted: number; totalStoriesWithActuals: number; totalPointsWithActuals: number; avgActualDaysPerStory: number | null; avgVsSoloPct: number | null; avgVsAiUnguidedPct: number | null; avgVsAiGuidedPct: number | null; weeks: VelocityWeek[]; trend: "improving" | "stable" | "declining" | "insufficient_data"; } export interface SprintRecord { id: string; taskIds: string[]; status: "active" | "closed"; startedAt: string; closedAt: string | null; } export interface SprintVelocity { sprintId: string; taskIds: string[]; storiesCompleted: number; pointsCompleted: number; storiesWithActuals: number; pointsWithActuals: number; } export interface SprintVelocityReport { sprints: SprintVelocity[]; trend: "improving" | "stable" | "declining" | "insufficient_data"; } export interface CalibrationRoleReport { role: string; stories: number; avgDeclaredDays: number; avgActualDays: number; avgErrorPct: number; bias: "over" | "under" | "balanced" | "insufficient_data"; lessonRecorded: boolean; } export interface CalibrationReport { roles: CalibrationRoleReport[]; } export interface BurndownPoint { day: number; remaining: number; completedTaskIds?: string[]; } export interface TaskEstimateBreakdown { taskId: string; architectPoints: number | null; developerPoints: number | null; resolvedPoints: number; completedAt: string | null; } export interface BurndownSeries { sprintTaskIds: string[]; totalPoints: number; idealLine: BurndownPoint[]; actualLine: BurndownPoint[]; taskBreakdown: TaskEstimateBreakdown[]; warnings: string[]; }