/**
 * FailureClusterView — groups failed runs by (failureClass, triggerTool,
 * argHash-prefix) so weekly reviews can prioritize the top-N clusters.
 *
 * Each cluster includes: N runs, scenarios affected, representative
 * error message, a proposed mitigation hint (rule → action table).
 */
import { type FailureRule } from '../failure-taxonomy';
import type { FailureClass } from '../trace/schema';
import type { TraceStore } from '../trace/store';
export interface FailureCluster {
    failureClass: FailureClass;
    /** Tool name when the trigger was a tool span, else undefined. */
    toolName?: string;
    /** First 16 chars of argHash — clusters similar args. */
    argPrefix?: string;
    /**
     * Source dimension when the trigger was a judge span (e.g. `'format'`,
     * `'safety'`, `'correctness'`). Lets cross-template aggregators
     * group failures by the dimension that fired without overloading
     * `argPrefix`. Optional — clusters without this field deserialize cleanly.
     */
    dimension?: string;
    runCount: number;
    scenarioIds: string[];
    exampleError?: string;
    exampleRunId: string;
}
export interface FailureClusterReport {
    clusters: FailureCluster[];
    totalFailures: number;
    totalRuns: number;
}
export declare function failureClusterView(store: TraceStore, options?: {
    rules?: FailureRule[];
    minClusterSize?: number;
}): Promise<FailureClusterReport>;
//# sourceMappingURL=failure-cluster.d.ts.map