/**
 * Module Analyzer - Deep Dive Phase for Living Docs Builder
 *
 * Analyzes individual modules to generate detailed documentation:
 * 1. Select representative files based on sampling config
 * 2. Extract exports, types, and dependencies
 * 3. Generate module summary and documentation
 *
 * This is a SKELETON implementation - full LLM integration deferred.
 */
import type { ModuleInfo, SamplingConfig } from './discovery.js';
import type { WorkItemMatch } from './workitem-matcher.js';
/**
 * Analyzed file information
 */
export interface AnalyzedFile {
    /** File path relative to module */
    path: string;
    /** File size in bytes */
    size: number;
    /** Detected file type */
    type: 'source' | 'test' | 'config' | 'doc';
    /** Extracted exports */
    exports: ExportInfo[];
    /** Import dependencies */
    imports: ImportInfo[];
    /** Line count */
    lineCount: number;
}
/**
 * Export information
 */
export interface ExportInfo {
    /** Export name */
    name: string;
    /** Export type */
    type: 'function' | 'class' | 'const' | 'interface' | 'type' | 'default' | 'unknown';
    /** Is default export */
    isDefault: boolean;
    /** Line number */
    line?: number;
}
/**
 * Import information
 */
export interface ImportInfo {
    /** Module/package being imported */
    from: string;
    /** Is external package (not relative) */
    isExternal: boolean;
    /** Named imports */
    names: string[];
}
/**
 * Module analysis result
 */
export interface ModuleAnalysis {
    /** Module name */
    moduleName: string;
    /** Module path */
    modulePath: string;
    /** Analysis timestamp */
    analyzedAt: string;
    /** Files analyzed */
    filesAnalyzed: AnalyzedFile[];
    /** Files skipped (due to sampling) */
    filesSkipped: number;
    /** Total exports found */
    totalExports: number;
    /** External dependencies */
    externalDeps: string[];
    /** Internal dependencies (other modules) */
    internalDeps: string[];
    /** Related work items */
    relatedWorkItems: Array<{
        id: string;
        title: string;
        score: number;
    }>;
    /** Generated summary (placeholder) */
    summary: string;
    /** Documentation status */
    docStatus: 'generated' | 'partial' | 'skipped';
    /** AI-generated insights (added after initial analysis) */
    aiInsights?: AIModuleInsights;
}
/**
 * Progress callback
 */
export type AnalyzerProgressCallback = (moduleName: string, fileIndex: number, totalFiles: number) => void;
/**
 * Analyze a single module
 */
export declare function analyzeModule(projectPath: string, module: ModuleInfo, samplingConfig: SamplingConfig, workItemMatches: WorkItemMatch[], onProgress?: AnalyzerProgressCallback): Promise<ModuleAnalysis>;
/**
 * AI insights for module analysis (optional, from LLM)
 */
export interface AIModuleInsights {
    purpose?: string;
    integrationPoints?: string[];
    patterns?: Array<{
        name: string;
        evidence: string;
    }>;
}
/**
 * Module dependency information
 */
export interface ModuleDependencyInfo {
    imports: string[];
    importedBy: string[];
}
/**
 * Generate rich module summary with Purpose, Dependencies, Dependents, Integration Points, and Patterns
 */
export declare function generateRichModuleSummary(module: ModuleInfo, analyzedFiles: AnalyzedFile[], totalExports: number, aiInsights?: AIModuleInsights, dependencyGraph?: ModuleDependencyInfo): string;
/**
 * Save module analysis to disk
 * Regenerates summary if AI insights are available
 */
export declare function saveModuleAnalysis(projectPath: string, analysis: ModuleAnalysis): Promise<string>;
//# sourceMappingURL=module-analyzer.d.ts.map