/** * Task analysis and prioritization core module. * @task T4538 * @epic T4454 */ import type { Task, TaskAnalysisResult } from '@cleocode/contracts'; import type { DataAccessor } from '../store/data-accessor.js'; export interface AnalysisResult extends TaskAnalysisResult { autoStarted?: boolean; } /** One ranked task as the analyze tiers report it. */ export interface AnalysisRankedTask { id: string; title: string; /** Open tasks this task unblocks (the scorer's leverage input). */ leverage: number; priority: Task['priority']; score: number; } /** * Rank tasks for `cleo analyze` exactly as `cleo next` and the briefing do — * {@link rankReadyTasks} with {@link resolveRankingPhase} and BRAIN patterns — * so all three recommend the same task in the same order (T12661). * * @param accessor - Task data accessor. * @param allTasks - The active task population. * @param opts - Project root (for BRAIN patterns), an optional id scope, and * `nowMs` (defaults to now) for the age tiebreak. * @returns Ranked ready tasks with their open-dependent leverage. * @task T12661 */ export declare function rankForAnalysis(accessor: DataAccessor, allTasks: readonly Task[], opts?: { projectRoot?: string; scopeTaskIds?: ReadonlySet; nowMs?: number; }): Promise<{ ranked: AnalysisRankedTask[]; }>; /** Analyze task priority with leverage scoring. */ export declare function analyzeTaskPriority(opts: { autoStart?: boolean; cwd?: string; }, accessor?: DataAccessor): Promise; //# sourceMappingURL=analyze.d.ts.map