/**
 * Haiku-backed diff proposer for `sw:skill-refine`.
 *
 * Given the current SKILL.md contents and an aggregate of refinement signals,
 * asks Claude Haiku for a unified-diff proposal and a short rationale. The
 * model is invoked at `temperature: 0` so repeat runs with the same inputs
 * yield byte-identical output (AC-US2-02 determinism check).
 *
 * The Anthropic client is injected via the `client` option so tests can stub
 * the call — production callers pass the real SDK instance.
 *
 * @module core/skill-refine/haiku-diff
 */
import type { AggregateResult } from './aggregator';
export declare const HAIKU_MODEL = "claude-haiku-4-5-20251001";
export interface HaikuDiffResult {
    diff: string;
    rationale: string;
}
export interface HaikuClientLike {
    messages: {
        create: (args: {
            model: string;
            max_tokens: number;
            temperature: number;
            system?: string;
            messages: Array<{
                role: 'user' | 'assistant';
                content: string;
            }>;
        }) => Promise<{
            content: Array<{
                type: string;
                text?: string;
            }>;
        }>;
    };
}
export interface ProposeDiffOptions {
    client: HaikuClientLike;
    skillMd: string;
    aggregate: AggregateResult;
    model?: string;
    maxTokens?: number;
}
/**
 * Render the user-facing prompt. Exposed for test introspection — stable
 * string shape is part of the determinism contract (same inputs → same
 * prompt → same completion at temp 0).
 */
export declare function buildUserPrompt(skillMd: string, aggregate: AggregateResult): string;
/**
 * Call Haiku with temperature 0 and extract the proposed {diff, rationale}.
 *
 * Throws when the model returns malformed JSON — callers should surface the
 * error so the user can retry or abort (we never silently fall back to a
 * blank diff, because that would suggest "no change needed" when the truth
 * is "the model broke").
 */
export declare function proposeDiff(opts: ProposeDiffOptions): Promise<HaikuDiffResult>;
/**
 * Extract the JSON object from a Haiku completion. Tolerates ```json fences
 * in case the model slips past the system instruction.
 */
export declare function parseHaikuJson(raw: string): HaikuDiffResult;
//# sourceMappingURL=haiku-diff.d.ts.map