/**
 * Enterprise Documentation Analyzer
 *
 * Provides comprehensive documentation analysis covering:
 * - All docs/internal folders (specs, architecture, ADRs, governance)
 * - Spec-code mismatch detection
 * - Documentation health scoring
 * - Enterprise-grade reporting
 */
import { Logger } from '../utils/logger.js';
export interface DocumentCategory {
    name: string;
    path: string;
    fileCount: number;
    files: DocumentInfo[];
    lastUpdated: Date | null;
}
export interface DocumentInfo {
    path: string;
    name: string;
    category: string;
    lastModified: Date;
    size: number;
    hasAcceptanceCriteria: boolean;
    acceptanceCriteria: AcceptanceCriterion[];
}
export interface AcceptanceCriterion {
    id: string;
    description: string;
    isComplete: boolean;
    sourceFile: string;
}
export interface SpecCodeMismatch {
    specFile: string;
    criterionId: string;
    description: string;
    claimedComplete: boolean;
    codeEvidence: CodeEvidence | null;
    confidence: number;
    mismatchType: 'ghost_completion' | 'undocumented_code' | 'partial_implementation' | 'spec_drift';
}
export interface CodeEvidence {
    files: string[];
    functions: string[];
    lineCount: number;
}
export interface HealthScore {
    overall: number;
    grade: 'A' | 'B' | 'C' | 'D' | 'F';
    freshness: number;
    coverage: number;
    accuracy: number;
    trend: 'improving' | 'stable' | 'declining';
}
export interface NamingViolation {
    file: string;
    category: string;
    violationType: 'all_caps' | 'mixed_case' | 'date_suffix' | 'inconsistent_prefix' | 'no_extension';
    expectedPattern: string;
    actual: string;
    severity: 'error' | 'warning' | 'info';
}
export interface DuplicateDocument {
    files: string[];
    similarity: number;
    duplicateType: 'exact' | 'near_duplicate' | 'same_title';
}
export interface DocumentDiscrepancy {
    file: string;
    discrepancyType: 'orphaned_reference' | 'broken_link' | 'outdated_version' | 'conflicting_info';
    description: string;
    relatedFiles?: string[];
}
export interface EnterpriseDocReport {
    generatedAt: Date;
    projectPath: string;
    categories: DocumentCategory[];
    totalDocuments: number;
    healthScore: HealthScore;
    mismatches: SpecCodeMismatch[];
    namingViolations: NamingViolation[];
    duplicates: DuplicateDocument[];
    discrepancies: DocumentDiscrepancy[];
    recommendations: string[];
}
export interface EnterpriseAnalyzerOptions {
    projectPath: string;
    logger?: Logger;
    includeArchived?: boolean;
}
/**
 * Enterprise Documentation Analyzer
 */
export declare class EnterpriseDocAnalyzer {
    private projectPath;
    private logger;
    private includeArchived;
    constructor(options: EnterpriseAnalyzerOptions);
    /**
     * Run full enterprise documentation analysis
     */
    analyze(): Promise<EnterpriseDocReport>;
    /**
     * Scan all documentation categories
     */
    private scanAllCategories;
    /**
     * Scan a single documentation category
     */
    private scanCategory;
    /**
     * Scan increment spec files
     */
    private scanIncrementSpecs;
    /**
     * Parse acceptance criteria from markdown content
     */
    private parseAcceptanceCriteria;
    /**
     * Extract all acceptance criteria from categories
     */
    private extractAllAcceptanceCriteria;
    /**
     * Detect mismatches between specs and code
     */
    private detectMismatches;
    /** Common English stop words to filter from keyword extraction */
    private static readonly STOP_WORDS;
    /**
     * Extract keywords from AC description for code search
     */
    private extractKeywords;
    /**
     * Search for code evidence matching keywords
     */
    private searchCodeEvidence;
    /**
     * Detect naming convention violations in documentation files
     */
    private detectNamingViolations;
    /**
     * Detect duplicate documents based on title similarity and content
     */
    private detectDuplicates;
    /**
     * Detect discrepancies in documentation (broken links, orphaned refs)
     */
    private detectDiscrepancies;
    /**
     * Calculate documentation health score
     */
    private calculateHealthScore;
    /**
     * Generate recommendations based on analysis
     */
    private generateRecommendations;
}
/**
 * Generate markdown report from enterprise analysis
 */
export declare function generateEnterpriseReport(report: EnterpriseDocReport): string;
//# sourceMappingURL=enterprise-analyzer.d.ts.map