import type { Config } from '../config/schema.js';
import { type DiagnoseReport } from './diagnose.js';
type Agent = 'claude' | 'codex';
export declare function selectOptimizeAgent(config: Config, report: DiagnoseReport): {
    agent: Agent;
    reason: string;
};
type ChangeTarget = 'config_field' | 'workflow_instructions';
interface ProposedChange {
    target: ChangeTarget;
    field?: string;
    label: string;
    oldValue: string;
    newValue: string;
    reason: string;
    outcome: string;
}
export declare function deriveConfigChanges(report: DiagnoseReport, config: Config): ProposedChange[];
export declare function countInstructionDiffLines(diff: string): {
    additions: number;
    deletions: number;
};
export declare function buildCodexOptimizeArgs(outputFile: string): string[];
export declare function runOptimize(opts: {
    apply?: boolean;
    dryRun?: boolean;
    since?: string;
    agent?: string;
    config?: string;
}): Promise<void>;
export {};
//# sourceMappingURL=optimize.d.ts.map