/** * Hybrid evaluation mode (FR-25). * * Orchestrates executable evaluators (FR-23) and LLM evaluation into a * unified gate verdict. Implements fast-fail: if executable evaluators * fail, LLM evaluation is skipped to save tokens and time. * * AC-25.1: Evaluators run before LLM; any fail → skip LLM, gate fails. * AC-25.2: Evaluator pass → trigger LLM with quantitative context. * AC-25.3: Any layer fail → overall fail. * AC-25.4: Each verdict item tagged with source (evaluator / llm). * AC-25.5: No evaluators → pure LLM (backward compatible). * AC-25.6: Result included in Ledger evidence chain. * AC-25.7: LLM prompt includes evaluator quantitative summary. */ import type { GateVerdict } from '../types/index.js'; import type { EvaluatorResultSet, EvaluatorRegistry, LlmEvaluationResult, HybridGateVerdict } from './evaluator-types.js'; /** * Generate a human-readable summary of evaluator results for LLM context injection. * * AC-25.7: LLM receives quantitative summary so it doesn't re-check * dimensions already covered by executable evaluators. */ export declare function generateEvaluatorSummary(resultSet: EvaluatorResultSet): string; export interface HybridGateOptions { /** Project root directory. */ projectRoot: string; /** Pipeline stage name. */ stage: string; /** Paths to stage output artifacts. */ artifactPaths: string[]; /** Project metadata passed to evaluators. */ projectMeta: Record; /** * LLM evaluation function. Called only when evaluators pass. * Receives the evaluator summary string for context injection (AC-25.7). */ runLlmEvaluation: (evaluatorSummary: string) => Promise; /** Override evaluator registry (for testing). */ evaluatorRegistry?: EvaluatorRegistry; /** * FR-26: Optional work-package ID for ratchet threshold check. * When provided, evaluator scores are checked against historical high scores. * Regression from high score → gate fails with ratchet violation. */ ratchetWorkPackageId?: string; } /** * Execute hybrid gate evaluation. * * 1. Run executable evaluators (if any registered for this stage). * 2. If evaluators fail → fast-fail, skip LLM (AC-25.1). * 3. If evaluators pass → run LLM with evaluator summary (AC-25.2). * 4. Combine results into HybridGateVerdict (AC-25.3, AC-25.4). * 5. No evaluators → pure LLM evaluation (AC-25.5). */ export declare function evaluateHybridGate(options: HybridGateOptions): Promise; /** * Convert an existing GateVerdict into an LlmEvaluationResult. * * Utility for integrating hybrid evaluation with existing gate infrastructure. */ export declare function gateVerdictToLlmResult(verdict: GateVerdict): LlmEvaluationResult; //# sourceMappingURL=hybrid-gate.d.ts.map