/**
 * Documentation Pre-Render Validator
 *
 * Validates markdown/MDX files BEFORE Docusaurus server starts.
 * Catches issues proactively so users don't see cryptic webpack errors.
 *
 * Validates:
 * 1. YAML frontmatter syntax
 * 2. MDX/JSX compatibility (unquoted attrs, self-closing tags)
 * 3. Broken internal links
 * 4. Duplicate files/routes
 * 5. Invalid file names
 *
 * @module utils/docs-validator
 */
import { Logger } from './logger.js';
/**
 * Issue severity levels
 */
export type IssueSeverity = 'error' | 'warning' | 'info';
/**
 * Single validation issue
 */
export interface ValidationIssue {
    file: string;
    line?: number;
    severity: IssueSeverity;
    type: string;
    message: string;
    autoFixable: boolean;
    fix?: () => void;
}
/**
 * Validation result summary
 */
export interface ValidationResult {
    valid: boolean;
    totalFiles: number;
    errors: number;
    warnings: number;
    infos: number;
    issues: ValidationIssue[];
    fixedCount: number;
}
/**
 * Validator options
 */
export interface DocsValidatorOptions {
    docsPath: string;
    autoFix?: boolean;
    logger?: Logger;
    /** File extensions to validate */
    extensions?: string[];
    /** Paths to ignore (relative to docsPath) */
    ignorePaths?: string[];
}
/**
 * Documentation Pre-Render Validator
 *
 * Use before starting Docusaurus to catch issues early.
 *
 * @example
 * ```typescript
 * const validator = new DocsValidator({
 *   docsPath: '.specweave/docs/internal',
 *   autoFix: true
 * });
 * const result = await validator.validate();
 * if (!result.valid) {
 *   console.log('Fix issues before starting docs server');
 * }
 * ```
 */
export declare class DocsValidator {
    private docsPath;
    private autoFix;
    private logger;
    private extensions;
    private ignorePaths;
    private issues;
    private fixedCount;
    constructor(options: DocsValidatorOptions);
    /**
     * Run all validations
     */
    validate(): Promise<ValidationResult>;
    /**
     * Collect all markdown files recursively
     */
    private collectFiles;
    /**
     * Validate a single file
     */
    private validateFile;
    /**
     * Validate YAML frontmatter syntax
     */
    private validateFrontmatter;
    /**
     * Validate MDX/JSX compatibility
     */
    private validateMdxContent;
    /**
     * Check for duplicate routes (same normalized path)
     *
     * Docusaurus route resolution:
     * - Both README.md and index.md map to the folder's route (e.g., /folder/)
     * - Case-insensitive matching
     * - Extensions stripped
     *
     * This catches conflicts like:
     * - folder/README.md vs folder/index.md (both → /folder/)
     * - Feature.md vs feature.md (both → /feature/)
     */
    private checkDuplicateRoutes;
    /**
     * Validate file naming conventions
     */
    private validateFileName;
    /**
     * Validate internal links between documents
     */
    private validateInternalLinks;
    /**
     * Build the validation result
     */
    private buildResult;
    /**
     * Format validation result for display
     */
    static formatResult(result: ValidationResult): string;
}
/**
 * Quick validation function for scripts
 */
export declare function validateDocs(docsPath: string, options?: {
    autoFix?: boolean;
    logger?: Logger;
}): Promise<ValidationResult>;
//# sourceMappingURL=docs-validator.d.ts.map