/**
 * FailureLoopDriver — the closed self-improvement loop (spec §4.6.1).
 *
 *   discover (FailureAnalyzer) → IMPLEMENT (this: open a tracked item) →
 *   deploy (normal spec→build→rollout, human-driven) → VERIFY (this).
 *
 * The headline safety property — "the loop can never change the process on its
 * own" — is enforced BY CONSTRUCTION (spec §4.6.1 step 3, round-2 BL-2):
 *
 *   The driver's injected capabilities are ONLY `addAction` (an Evolution
 *   Action) and `createInitiative` (a draft Initiative in `needs-user`). It is
 *   given NO ability to create an EvolutionProposal — and a proposal is the
 *   ONLY thing the autonomous auto-implement evaluator acts on. So an
 *   auto-implemented process change is unreachable for anything this loop
 *   produces, regardless of `evolutionApprovalMode`. There is no field to forge
 *   and no layer to misplace: the capability simply isn't wired in.
 *
 * Verify (step 5): on an `acted-on` insight past its verification window, the
 * driver computes the post-change rate of the targeted failure category and
 * sets the outcome — labeled CORRELATIONAL, never causal. It requires a minimum
 * post-window exposure before concluding (else `insufficient-exposure` → extend
 * once → `inconclusive`), and caps reopens so a non-droppable class can never
 * churn forever (spec §4.6.1 M3).
 *
 * NOTE (v1 simplification, tracked): "exposure normalization" here is the raw
 * post-window category count vs. baseline. The full features-of-category-shipped
 * denominator is a later refinement — it can only make the outcome MORE
 * conservative, never auto-implement anything (the authority guard is unaffected).
 */
import type { FailureLedger, InsightRecord } from './FailureLedger.js';
/** The ONLY mutation capabilities the loop is given. Deliberately excludes any
 *  proposal-creation path (that's the by-construction authority guard). */
export interface LoopDeps {
    /** Open an Evolution Action (tracked self-improvement to-do). */
    addAction: (opts: {
        title: string;
        description: string;
        priority?: 'critical' | 'high' | 'medium' | 'low';
        source?: string;
        tags?: string[];
    }) => {
        id: string;
    };
    /** Open a draft Initiative in needs-user (a human approves turning it real). */
    createInitiative: (input: {
        id: string;
        title: string;
        description: string;
        phases: {
            name: string;
            status: string;
        }[];
        needsUser: boolean;
        needsUserReason?: string;
    }) => Promise<{
        id: string;
    }>;
    now?: () => number;
    /** Days to watch the targeted failure class after the fix ships (default 42 = 6 weeks). */
    verifyWindowDays?: number;
    /** Max reopens before terminal `inconclusive` (default 2). */
    maxReopens?: number;
    /** Minimum post-window category activity required to conclude (default 1). */
    minPostExposure?: number;
}
export interface ActResult {
    actedOn: InsightRecord[];
}
export interface VerifyResult {
    evaluated: InsightRecord[];
}
export declare class FailureLoopDriver {
    private readonly ledger;
    private readonly deps;
    constructor(ledger: FailureLedger, deps: LoopDeps);
    private now;
    /**
     * IMPLEMENT step: for each newly-`discovered` insight, open a tracked Action +
     * a draft Initiative (needs-user) and move it to `acted-on` with a verification
     * window. Never mints a proposal (see class docs). Idempotent: an insight
     * already past `discovered` is skipped.
     */
    actOnNewInsights(): Promise<ActResult>;
    /**
     * VERIFY step: for each `acted-on` insight whose window has elapsed, decide
     * the (correlational) outcome. Drop below baseline → verified-effective;
     * no drop → verified-ineffective + reopen (capped → inconclusive); too little
     * post-window activity → insufficient-exposure (extend once → inconclusive).
     */
    runVerification(): VerifyResult;
}
//# sourceMappingURL=FailureLoopDriver.d.ts.map