/**
 * pipeline/repo-threshold-evaluator.ts
 *
 * Evaluates per-task scores against thresholds configured in repo task
 * definitions (`.ailf/tasks/*.yaml` → `execution.threshold`).
 *
 * This is distinct from the readiness-gate threshold system in
 * `config/thresholds`. Repo thresholds are per-task, defined by
 * the product team, and drive PR check pass/fail status. Framework
 * thresholds are per-area, defined by the AILF team, and drive
 * readiness reports.
 *
 * @see docs/archive/exec-plans/tasks-as-content/phase-6-pr-quality-gates.md
 * @see packages/eval/src/adapters/task-sources/repo-schemas.ts
 */
import type { ScoreSummary } from "./types.js";
/** Threshold configuration from a repo task's execution block */
export interface TaskThresholdConfig {
    /** Task ID */
    taskId: string;
    /** Whether failing this threshold should block the PR */
    blocking: boolean;
    /** Minimum overall score (0–100) */
    score?: number;
    /** Per-dimension minimums */
    dimensions?: {
        taskCompletion?: number;
        codeCorrectness?: number;
        docCoverage?: number;
    };
}
/** Result of evaluating a single task against its threshold */
export interface TaskThresholdResult {
    /** Task ID */
    taskId: string;
    /** Feature area */
    area: string;
    /** Actual overall score */
    actualScore: number;
    /** Configured threshold (or framework default) */
    threshold: number;
    /** Whether the score meets or exceeds the threshold */
    passed: boolean;
    /** Whether this result blocks the PR */
    blocking: boolean;
    /** Per-dimension results (when dimension thresholds are configured) */
    dimensionResults?: DimensionThresholdResult[];
    /** Status classification */
    status: "passed" | "warning" | "failed";
}
/** Result of evaluating a single dimension against its threshold */
export interface DimensionThresholdResult {
    dimension: string;
    actual: number;
    threshold: number;
    passed: boolean;
}
/** Aggregate result of evaluating all tasks */
export interface RepoThresholdEvaluation {
    /** Whether the overall check passes (no blocking failures) */
    checkPassed: boolean;
    /** Individual task results */
    results: TaskThresholdResult[];
    /** Summary counts */
    summary: {
        total: number;
        passed: number;
        warnings: number;
        failed: number;
    };
    /** Overall score (average across all evaluated tasks) */
    overallScore: number;
    /** Default threshold used when tasks don't specify one */
    defaultThreshold: number;
}
/**
 * Evaluate task scores against repo-configured thresholds.
 *
 * For each task with a threshold configured in its `execution` block,
 * compare the actual score against the threshold and determine pass/fail.
 *
 * Tasks without explicit thresholds use the `configDefaultThreshold`
 * (from `.ailf/config.yaml`) or the framework default (0 = no gate).
 *
 * @param scoreSummary - The evaluation score summary
 * @param thresholds - Per-task threshold configs (from repo task definitions)
 * @param configDefaultThreshold - Default threshold from .ailf/config.yaml
 */
export declare function evaluateRepoThresholds(scoreSummary: ScoreSummary, thresholds: TaskThresholdConfig[], configDefaultThreshold?: number): RepoThresholdEvaluation;
