import type { DeferredRow, Trajectory, TrajectoryRow } from "./parser.js";
export type MitigationKind = "telemetry-alert" | "scheduled-review" | "downstream-plan" | "canary-or-staging" | "feedback-signal" | "unclassified";
export interface MitigationClassification {
    row: DeferredRow;
    kind: MitigationKind;
    /** Hints extracted from the text: plan names, file paths, metric names. */
    hints: string[];
    /** Non-null when the mitigation is too vague — needs a more concrete commitment. */
    warning: string | null;
}
/**
 * Retrospective audit: classify every Deferred Verification row, flag any
 * whose mitigation text is too vague or unclassifiable. Returns findings
 * suitable for inclusion in a retrospective's "What We Learned" section
 * or a Graphiti audit episode.
 */
export declare function auditDeferredMitigations(trajectory: Trajectory): MitigationClassification[];
export interface BlockedRowFinding {
    row: TrajectoryRow;
    message: string;
}
/**
 * Retrospective audit: surface trajectory rows that ended the plan in
 * `blocked` state. Blocked means "was writable/written but regressed or
 * changed" — if the plan closes with blocked rows, they should be
 * explicitly resolved (fix, move passesAt, or move to Deferred Verification).
 */
export declare function findBlockedRows(trajectory: Trajectory): BlockedRowFinding[];
export interface TestIdResolution {
    id: string;
    asserts: string;
    /** Best-effort test file name glob (e.g. "**\/*reconciler*.test.ts") or null. */
    fileGlob: string | null;
    /** Vitest command with a filter, if one can be derived from the asserts text. */
    suggestedCommand: string;
}
/**
 * Derive a concrete test file glob + runnable command from a trajectory
 * row's asserts text. Heuristic: extract identifiers (camelCase, kebab-case,
 * backtick-quoted code) and use the longest as a filename hint. Returns a
 * fallback `pnpm test` with a `-t` name filter if no filename hint found.
 *
 * The verify skill uses this to resolve phase-Verification items that say
 * "T3 passes (...)" into a real invocation. Best-effort — human can override.
 */
export declare function resolveTestIdCommand(trajectory: Trajectory, id: string): TestIdResolution | null;
/** Convenience — parse + audit + resolve in one call for the retrospective skill. */
export declare function auditPlanAtClose(body: string): {
    deferred: MitigationClassification[];
    blocked: BlockedRowFinding[];
};
