import type { ValidationIssue, ValidationRuleResult } from '../types/validation.js';
export interface IssueTree {
    rule_id: string;
    rule_name: string;
    total_count: number;
    date_range: {
        earliest: string;
        latest: string;
    } | null;
    categories: IssueCategoryBucket[];
}
export interface IssueCategoryBucket {
    kind: 'file_issue' | 'missing_file';
    label: string;
    count: number;
    time_buckets: TimeBucket<ValidationIssue>[];
    undated_issues: ValidationIssue[];
}
export interface TimeBucket<T = ValidationIssue> {
    key: string;
    label: string;
    count: number;
    issues: T[];
}
export declare const MONTH_NAMES: string[];
export declare function bucket_dates_by_quarter<T extends {
    date?: string;
}>(items: T[]): TimeBucket<T>[];
export declare function bucket_issues(issues: ValidationIssue[]): {
    categories: IssueCategoryBucket[];
    date_range: IssueTree['date_range'];
};
export declare function build_issue_tree(result: ValidationRuleResult): IssueTree;
/** Format an ISO YYYY-MM-DD date as "Mon YYYY" (e.g. "Jul 2024"). Returns the input unchanged when malformed. */
export declare function format_month(iso: string): string;
//# sourceMappingURL=issue_bucketing.d.ts.map