/**
 * Shared rubric template resolution for all evaluation modes.
 *
 * Resolves templated LLM-rubric assertions (those with `template` + `criteria`
 * fields) into fully assembled Promptfoo assertions with rubric text and
 * dimension metadata.
 *
 * Used by both literacy and agent-harness compilers. Extracted from
 * literacy/assertions.ts to fix the compilation bug where agent-harness
 * tasks with templated rubrics produced empty rubric text (DOC-2029).
 *
 * @see docs/design-docs/mode-agnostic-scoring.md
 * @see docs/design-docs/two-stage-grader-symbol-preflight.md — W0198 Phase 6
 * @see config/rubrics.ts — template definitions
 */
import type { CriterionRef, PreflightRubricContext } from "../../_vendor/ailf-core/index.d.ts";
import type { PromptfooAssertion } from "./assertion-mapper.js";
export type { PreflightRubricContext } from "../../_vendor/ailf-core/index.d.ts";
/** Minimal rubric config needed for template resolution */
export interface RubricResolutionInput {
    templates: Record<string, {
        criteria_label?: string;
        dimension?: string;
        header: string;
        scale: string[];
        /**
         * Plan 03-02 — per-dimension legal failure-mode list emitted into the
         * rubric prompt body before `${rubricConfig.footer}`. Sourced from
         * `failureModesForDimension(dimension)` in
         * `packages/eval/src/grader/index.ts` so the grader is told which modes
         * are legal for this dimension family.
         */
        failureModes?: readonly string[];
    }>;
    /**
     * Plan 03-01 — formerly hard-coded literal at L98-102; now sourced
     * from RubricConfig.footer. The footer documents the target wire
     * format the grader emits (structured GraderJudgment shape sketch in
     * Phase 3+; legacy `{score, reason}` JSON pre-Phase-3).
     */
    footer: string;
}
/**
 * Resolve a templated LLM-rubric assertion into a fully assembled
 * Promptfoo assertion with rubric text and dimension metadata.
 *
 * A "templated" assertion has `template` (referencing a key in rubrics.ts)
 * and `criteria` (task-specific bullet points). The template provides the
 * scoring header, scale, and dimension metadata. The criteria are appended
 * to create the final rubric prompt.
 *
 * When `canonicalReference` is supplied, it is emitted on the assertion's
 * `rubricPrompt` field — Promptfoo's per-assertion grader-prompt override —
 * wrapped in a ground-truth framing so the grader treats the supplied
 * content as authoritative. The rubric `value` itself is unchanged. Without
 * it, the grader falls back on training priors and may hallucinate against
 * neighboring API surfaces.
 *
 * Returns null (with a warning) if the template can't be resolved.
 */
export declare function resolveTemplatedAssertion(assertion: {
    criteria: (string | CriterionRef)[];
    template: string;
    type: string;
}, rubricConfig: RubricResolutionInput | undefined, graderProvider: string | undefined, warnings: string[], canonicalReference?: string, preflightContext?: PreflightRubricContext): PromptfooAssertion | null;
/**
 * Build the W0198 Phase 6 preflight preface for a `code-correctness`
 * rubric. Returned with a trailing newline so it composes cleanly with
 * the existing rubric body.
 */
export declare function buildPreflightSection(context: PreflightRubricContext): string;
