/** * ComplexityAnalyzer Domain Service * * Analyzes task complexity and recommends decomposition * * @see REQ-SDD-001 - Task Complexity Evaluation * @see DES-SDD-001 - ComplexityAnalyzer */ import type { Task } from '../entities/Task.js'; import { type ComplexityScore } from '../value-objects/ComplexityScore.js'; import { type ComplexityFactor, type ComplexityFactorName } from '../value-objects/ComplexityFactor.js'; /** * Complexity analyzer interface */ export interface IComplexityAnalyzer { /** * Analyze task complexity * @param task - Task to analyze * @returns Complexity score */ analyze(task: Task): ComplexityScore; /** * Check if task should be decomposed * @param score - Complexity score * @returns true if decomposition recommended */ shouldDecompose(score: ComplexityScore): boolean; /** * Get decomposition recommendation * @param task - Task to analyze * @returns Recommendation with reasoning */ getRecommendation(task: Task): DecompositionRecommendation; } /** * Decomposition recommendation */ export interface DecompositionRecommendation { /** Should decompose */ readonly shouldDecompose: boolean; /** Complexity score */ readonly score: ComplexityScore; /** Reasoning */ readonly reasoning: string; /** Suggested subtask count */ readonly suggestedSubtaskCount: number; /** Primary factors contributing to complexity */ readonly primaryFactors: readonly ComplexityFactor[]; } /** * Analyzer configuration */ export interface ComplexityAnalyzerConfig { /** Decomposition threshold (default: 7) */ threshold?: number; /** Factor weight overrides */ factorWeights?: Partial>; } /** * Create a complexity analyzer * * @param config - Optional configuration * @returns IComplexityAnalyzer implementation */ export declare function createComplexityAnalyzer(config?: ComplexityAnalyzerConfig): IComplexityAnalyzer; export { shouldDecompose } from '../value-objects/ComplexityScore.js'; //# sourceMappingURL=ComplexityAnalyzer.d.ts.map