/**
 * Issue Command - Unified JSONL storage with CLI & API compatibility
 * Storage: issues.jsonl + solutions/{issue-id}.jsonl + queue.json
 * Commands: init, list, status, task, bind, queue, next, done, retry
 */
interface IssueFeedback {
    type: 'failure' | 'clarification' | 'rejection';
    stage: string;
    content: string;
    created_at: string;
}
interface Issue {
    id: string;
    title: string;
    status: 'registered' | 'planning' | 'planned' | 'queued' | 'executing' | 'completed' | 'failed' | 'paused';
    priority: number;
    context: string;
    source?: 'github' | 'text' | 'discovery';
    source_url?: string;
    tags?: string[];
    expected_behavior?: string;
    actual_behavior?: string;
    affected_components?: string[];
    feedback?: IssueFeedback[];
    bound_solution_id: string | null;
    created_at: string;
    updated_at: string;
    planned_at?: string;
    queued_at?: string;
    completed_at?: string;
}
interface TaskTest {
    unit?: string[];
    integration?: string[];
    commands?: string[];
    coverage_target?: number;
}
interface TaskAcceptance {
    criteria: string[];
    verification: string[];
    manual_checks?: string[];
}
interface TaskCommit {
    type: 'feat' | 'fix' | 'refactor' | 'test' | 'docs' | 'chore';
    scope: string;
    message_template: string;
    breaking?: boolean;
}
interface SolutionTask {
    id: string;
    title: string;
    scope: string;
    action: string;
    description?: string;
    modification_points?: {
        file: string;
        target: string;
        change: string;
    }[];
    implementation: string[];
    test: TaskTest;
    regression: string[];
    acceptance: TaskAcceptance;
    commit: TaskCommit;
    depends_on: string[];
    estimated_minutes?: number;
    status?: string;
    priority?: number;
}
interface Solution {
    id: string;
    description?: string;
    approach?: string;
    tasks: SolutionTask[];
    exploration_context?: Record<string, any>;
    analysis?: {
        risk?: string;
        impact?: string;
        complexity?: string;
    };
    score?: number;
    is_bound: boolean;
    created_at: string;
    bound_at?: string;
}
interface FailureDetail {
    task_id?: string;
    error_type: string;
    message: string;
    stack_trace?: string;
    timestamp: string;
}
interface QueueItem {
    item_id: string;
    issue_id: string;
    solution_id: string;
    task_id?: string;
    status: 'pending' | 'ready' | 'executing' | 'completed' | 'failed' | 'blocked';
    execution_order: number;
    execution_group: string;
    depends_on: string[];
    semantic_priority: number;
    task_count?: number;
    files_touched?: string[];
    queued_at?: string;
    started_at?: string;
    completed_at?: string;
    result?: Record<string, any>;
    failure_reason?: string;
    failure_details?: FailureDetail;
    failure_history?: FailureDetail[];
}
interface QueueConflict {
    type: 'file_conflict' | 'dependency_conflict' | 'resource_conflict';
    tasks?: string[];
    solutions?: string[];
    file?: string;
    resolution: 'sequential' | 'merge' | 'manual';
    resolution_order?: string[];
    rationale?: string;
    resolved: boolean;
}
interface ExecutionGroup {
    id: string;
    type: 'parallel' | 'sequential';
    task_count?: number;
    solution_count?: number;
    tasks?: string[];
    solutions?: string[];
}
interface Queue {
    id: string;
    name?: string;
    status: 'active' | 'completed' | 'archived' | 'failed';
    issue_ids: string[];
    tasks: QueueItem[];
    solutions?: QueueItem[];
    conflicts: QueueConflict[];
    execution_groups?: ExecutionGroup[];
    _metadata: {
        version: string;
        total_tasks: number;
        pending_count: number;
        executing_count: number;
        completed_count: number;
        failed_count: number;
        updated_at: string;
    };
}
interface IssueOptions {
    status?: string;
    title?: string;
    description?: string;
    executor?: string;
    priority?: string;
    solution?: string;
    solutionId?: string;
    result?: string;
    reason?: string;
    json?: boolean;
    force?: boolean;
    fail?: boolean;
    brief?: boolean;
    data?: string;
    fromQueue?: boolean | string;
    queue?: string;
}
export declare function readIssues(): Issue[];
export declare function writeIssues(issues: Issue[]): void;
export declare function readSolutions(issueId: string): Solution[];
export declare function writeSolutions(issueId: string, solutions: Solution[]): void;
export declare function readQueue(queueId?: string): Queue | null;
export declare function writeQueue(queue: Queue): void;
export declare function issueCommand(subcommand: string, args: string | string[], options: IssueOptions): Promise<void>;
export {};
//# sourceMappingURL=issue.d.ts.map