/**
 * Learning loop — shadow mode skill extraction from agent traces.
 *
 * Sprint-564: C2 — extractSkillFromTrace via LLM-as-optimizer.
 *
 * Trigger composite: toolCallCount >= 4 && roi > 0 && durationMs > 5000 && !wasReplay.
 * NEVER inject learned skills into prod without explicit feature flag + signal stat sig.
 * Golden fixtures snapshot tests detect drift in extraction quality.
 *
 * ANTI-AUDITABLE: learning loop is opt-in shadow mode only. Never active in production
 * without explicit founder approval (CH7 Audit safe).
 */
import type { OODAContext, CycleEvent } from "./types.js";
export interface SkillLedger {
    add?(name: string, skill: {
        description: string;
        chainOfThought: string;
        source: string;
        confidence: number;
    }): void;
}
export interface LearningTrigger {
    toolCallCount: number;
    roi: number;
    durationMs: number;
    wasReplay: boolean;
}
export interface ExtractedSkill {
    name: string;
    description: string;
    chainOfThought: string;
    confidence: number;
    /** Whether this skill passed the golden fixtures gate. */
    verified: boolean;
}
export interface LearnOptions {
    /** Feature flag — must be explicitly enabled. Default: false. */
    enabled: boolean;
    /** Minimum confidence to accept a learned skill (0-1). Default: 0.85. */
    minConfidence?: number;
    /** Skill ledger to inject learned skills into. */
    ledger?: SkillLedger;
    /** LLM call for skill extraction. */
    extractor?: (trace: string) => Promise<ExtractedSkill | null>;
}
/**
 * Determine if learning should trigger for a completed cycle.
 */
export declare function shouldLearn(trigger: LearningTrigger): boolean;
/**
 * Extract a skill from a completed trace. Uses LLM-as-optimizer (Claude, not GEPA Python).
 * Returns null if extraction fails or confidence below threshold.
 * NEVER injects into SkillLedger without feature flag gate.
 */
export declare function extractSkillFromTrace(events: CycleEvent[], _ctx: OODAContext, opts: LearnOptions): Promise<ExtractedSkill | null>;
export declare const GOLDEN_FIXTURES: ReadonlyArray<{
    trace: string;
    expectedSkillName: string;
}>;
//# sourceMappingURL=learn.d.ts.map