/** * Task Decomposer — LLM-driven recursive task decomposition. * * Classifies issues as atomic (one agent can handle it) or composite * (needs to be broken into subtasks). Composite tasks are recursively * decomposed until all leaves are atomic. * * Integration: sits upstream of SessionManager.spawn(). When enabled, * complex issues are decomposed into child issues before agents are spawned. */ export type TaskKind = "atomic" | "composite"; export type TaskStatus = "pending" | "decomposing" | "ready" | "running" | "done" | "failed"; export interface TaskNode { id: string; depth: number; description: string; kind?: TaskKind; status: TaskStatus; lineage: string[]; children: TaskNode[]; result?: string; issueId?: string; sessionId?: string; } export interface DecompositionPlan { id: string; rootTask: string; tree: TaskNode; maxDepth: number; phase: "decomposing" | "review" | "approved" | "executing" | "done" | "failed"; createdAt: string; approvedAt?: string; parentIssueId?: string; } export interface DecomposerConfig { /** Enable auto-decomposition for backlog issues (default: false) */ enabled: boolean; /** Max recursion depth (default: 3) */ maxDepth: number; /** Model to use for decomposition (default: claude-sonnet-4-20250514) */ model: string; /** Require human approval before executing decomposed plans (default: true) */ requireApproval: boolean; } export declare const DEFAULT_DECOMPOSER_CONFIG: DecomposerConfig; /** Format the task lineage as an indented hierarchy for LLM context. */ export declare function formatLineage(lineage: string[], current: string): string; /** Format sibling tasks for awareness context. */ export declare function formatSiblings(siblings: string[], current: string): string; /** Create a decomposition plan for a task. */ export declare function decompose(taskDescription: string, config?: DecomposerConfig): Promise; /** Collect all leaf (atomic) tasks from a tree. */ export declare function getLeaves(task: TaskNode): TaskNode[]; /** Get sibling task descriptions for a given task. */ export declare function getSiblings(root: TaskNode, taskId: string): string[]; /** Format the plan tree as a human-readable string. */ export declare function formatPlanTree(task: TaskNode, indent?: number): string; /** Propagate done/failed status up the tree. */ export declare function propagateStatus(task: TaskNode): void; //# sourceMappingURL=decomposer.d.ts.map