import type { Database } from "bun:sqlite";
export type RetrospectiveScope = "project" | "plan";
export type RetrospectiveExportFormat = "json" | "markdown";
export interface RetrospectiveRecord {
    id: string;
    title: string;
    scope: RetrospectiveScope;
    project_id: string | null;
    plan_id: string | null;
    agent_id: string | null;
    report: RetrospectiveReport;
    created_at: string;
    updated_at: string;
}
export interface CreateRetrospectiveInput {
    title?: string;
    project_id?: string;
    plan_id?: string;
    agent_id?: string;
    create_followups?: boolean;
}
export interface ListRetrospectivesOptions {
    project_id?: string;
    plan_id?: string;
    agent_id?: string;
    limit?: number;
}
export interface RetrospectiveReport {
    schema_version: 1;
    local_only: true;
    no_network: true;
    generated_at: string;
    scope: RetrospectiveScope;
    scope_id: string;
    title: string;
    summary: {
        total_tasks: number;
        completed_tasks: number;
        failed_tasks: number;
        completed_plans: number;
        missed_estimates: number;
        recurring_blockers: number;
        failed_verifications: number;
        follow_up_tasks: number;
    };
    completed_plans: Array<{
        id: string;
        name: string;
        completed_tasks: number;
        total_tasks: number;
    }>;
    missed_estimates: Array<{
        id: string;
        short_id: string | null;
        title: string;
        estimated_minutes: number;
        actual_minutes: number;
        over_by_minutes: number;
    }>;
    recurring_blockers: Array<{
        blocker_task_id: string;
        short_id: string | null;
        title: string;
        status: string;
        blocks_count: number;
        blocked_task_ids: string[];
    }>;
    failed_verifications: Array<{
        id: string;
        task_id: string;
        task_title: string;
        command: string;
        run_at: string;
    }>;
    lessons: string[];
    follow_up_tasks: Array<{
        title: string;
        description: string;
        priority: "low" | "medium" | "high" | "critical";
        reason: string;
        created_task_id: string | null;
    }>;
}
export interface RetrospectiveExport {
    schema_version: 1;
    local_only: true;
    no_network: true;
    generated_at: string;
    filters: Omit<ListRetrospectivesOptions, "limit">;
    count: number;
    retrospectives: RetrospectiveRecord[];
}
export declare function createRetrospective(input: CreateRetrospectiveInput, db?: Database): RetrospectiveRecord;
export declare function getRetrospective(id: string, db?: Database): RetrospectiveRecord | null;
export declare function listRetrospectives(options?: ListRetrospectivesOptions, db?: Database): RetrospectiveRecord[];
export declare function createRetrospectiveExport(options?: ListRetrospectivesOptions, db?: Database): RetrospectiveExport;
export declare function renderRetrospectiveMarkdown(record: RetrospectiveRecord | RetrospectiveExport): string;
//# sourceMappingURL=retrospectives.d.ts.map