/** Maximum iterations for estimated calculations */ export declare const MAX_ESTIMATED_ITERATIONS = 25; export interface PlanTask { name: string; completed: boolean; index: number; subtasks?: { name: string; completed: boolean; }[]; } export interface TaskCount { total: number; completed: number; pending: number; tasks: PlanTask[]; } /** * Parse tasks from IMPLEMENTATION_PLAN.md * Supports hierarchical format with ### Task N: headers and subtasks * Falls back to flat checkbox format if no headers found */ export declare function parsePlanTasks(cwd: string): TaskCount; /** * Get the current task (first uncompleted task) */ export declare function getCurrentTask(cwd: string): PlanTask | null; /** * Get task by index (0-based) */ export declare function getTaskByIndex(cwd: string, index: number): PlanTask | null; /** * Estimate task complexity from spec/task content when no plan file exists. * Counts structural elements (headings, bullet points, numbered items) * and maps them to an estimated task count. */ export declare function estimateTasksFromContent(content: string): { estimated: number; reason: string; }; /** * Calculate optimal number of loop iterations based on task count * * Formula: * - If plan exists: pendingTasks + buffer (for retries/validation fixes) * - Buffer = max(2, pendingTasks * 0.3) - at least 2, or 30% extra for retries * - If no plan but spec content: estimate from spec structure * - Minimum: 3 (even for small tasks) * - Maximum: 25 (prevent runaway loops) */ export declare function calculateOptimalIterations(cwd: string, taskContent?: string): { iterations: number; taskCount: TaskCount; reason: string; }; export declare const countPlanTasks: typeof parsePlanTasks; //# sourceMappingURL=task-counter.d.ts.map