/** * Unified Query Analyzer Service * Single Responsibility: ONE Claude call for query analysis, intent detection, and complexity assessment * * This replaces the separate NaturalLanguageProcessor + TaskDecompositionService + ClaudeIntentAnalyzer * with a single, efficient Claude call that provides all needed information. * * Benefits: * - 50% faster startup (one Claude call instead of two) * - Simpler code path * - Better consistency (same Claude instance analyzes everything) * - Natural clarification handling (Claude asks if truly needed) */ export interface UnifiedAnalysis { intent: 'create' | 'modify' | 'fix' | 'delete' | 'understand' | 'analyze' | 'search' | 'general'; confidence: number; isComplex: boolean; subTasks: SubTask[]; targetEntities: string[]; searchTerms: string[]; clarificationNeeded: boolean; clarificationQuestion?: string; reasoning: string; } export interface SubTask { id: number; type: 'analyze' | 'create' | 'modify' | 'refactor' | 'test' | 'fix' | 'document' | 'configure' | 'general'; description: string; searchTerms: string[]; priority: number; dependencies: number[]; } export interface UnifiedAnalysisResult { success: boolean; analysis: UnifiedAnalysis; fallbackUsed?: boolean; error?: string; } export declare class UnifiedQueryAnalyzer { private logger; private static instance; static getInstance(): UnifiedQueryAnalyzer; /** * Analyze query in ONE Claude call - intent + complexity + clarification */ analyzeQuery(query: string, projectContext?: string): Promise; /** * Build unified prompt that does everything in one call */ private buildUnifiedPrompt; /** * Parse Claude's response */ private parseResponse; /** * Normalize intent to valid value */ private normalizeIntent; /** * Normalize task type */ private normalizeTaskType; /** * Fallback when Claude is unavailable */ private fallbackAnalysis; /** * Quick check if input is natural language vs command * Natural language queries have multiple words and don't look like commands. * Single-word inputs matching known commands are treated as commands. * Multi-word inputs starting with a command word are natural language (e.g., "Analyze this codebase") */ isNaturalLanguageQuery(input: string): boolean; } //# sourceMappingURL=unified-query-analyzer.d.ts.map