/**
 * pipeline/grader-consistency.ts
 *
 * Pure computation module for measuring grader consistency.
 *
 * Takes replicated grading results (the same judgment run N times) and
 * computes standard deviation, per-dimension consistency, and an
 * empirically-derived noise threshold recommendation.
 *
 * This module has NO side effects — no file I/O, no API calls.
 * It operates on pre-collected data only.
 *
 * @see docs/archive/exec-plans/grader-reliability.md — Phase 1
 */
/** Per-dimension consistency aggregates */
export interface DimensionConsistency {
    /** Average range (max - min) across all judgments */
    avgRange: number;
    /** Average standard deviation across all judgments in this dimension */
    avgStdDev: number;
    /** Number of judgments contributing to this aggregate */
    judgmentCount: number;
    /** Maximum standard deviation observed in this dimension */
    maxStdDev: number;
}
/** Top-level grader consistency result */
export interface GraderConsistency {
    /** Average range (max - min) across all judgments */
    avgRange: number;
    /** Average standard deviation across ALL grading judgments */
    avgStdDev: number;
    /** When this analysis was generated */
    generatedAt: string;
    /** Per-judgment details (sorted by stdDev descending — noisiest first) */
    judgments: JudgmentConsistency[];
    /** Maximum standard deviation observed (worst-case noise) */
    maxStdDev: number;
    /** Per-dimension consistency (keyed by kebab-case dimension name) */
    perDimension: Record<string, DimensionConsistency>;
    /** Recommended noise threshold for comparisons (2× max dimension avgStdDev) */
    recommendedThreshold: number;
    /** Number of replications per judgment */
    replications: number;
    /** Total number of judgments analyzed */
    totalJudgments: number;
}
/** Consistency stats for a single judgment */
export interface JudgmentConsistency {
    /** Feature area */
    area: string;
    /** Scoring dimension (kebab-case, e.g. 'task-completion') */
    dimension: string;
    /** Max score observed */
    max: number;
    /** Mean score across replications */
    mean: number;
    /** Min score observed */
    min: number;
    /** Provider (model under test) */
    providerId?: string;
    /** Score range (max - min) */
    range: number;
    /** Number of replications */
    replications: number;
    /** Standard deviation across replications */
    stdDev: number;
    /** Task ID */
    taskId: string;
}
/** A single replicated grading judgment: one (response, rubric) pair graded N times */
export interface ReplicatedGrading {
    /** Feature area (derived from task description) */
    area: string;
    /** Which scoring dimension this rubric measures (kebab-case, e.g. 'task-completion') */
    dimension: string;
    /** Provider (model under test) that produced the original response */
    providerId?: string;
    /** The scores from each replication (length = N replications) */
    scores: number[];
    /** Which task this judgment belongs to */
    taskId: string;
}
/**
 * Analyze a set of replicated gradings and produce a full consistency report.
 *
 * This is the main entry point — a pure function with no side effects.
 *
 * @param gradings Array of replicated grading judgments (each graded N times)
 * @returns GraderConsistency report with per-dimension and overall statistics
 */
export declare function analyzeConsistency(gradings: ReplicatedGrading[]): GraderConsistency;
/**
 * Compute consistency statistics for a single replicated judgment.
 */
export declare function analyzeJudgment(grading: ReplicatedGrading): JudgmentConsistency;
/** Compute mean of an array of numbers */
export declare function mean(values: number[]): number;
/** Compute population standard deviation of an array of numbers */
export declare function stdDev(values: number[]): number;
