/**
 * Cross-Linker for Intelligent Living Docs Sync
 *
 * Generates cross-references between related documents for traceability.
 *
 * @module living-docs/cross-linker
 */
import { DistributionResult } from './content-distributor.js';
/**
 * Cross-link between documents
 */
export interface CrossLink {
    source: string;
    target: string;
    type: LinkType;
    description?: string;
}
/**
 * Link types
 */
export declare enum LinkType {
    Implements = "implements",// Spec implements architecture
    DependsOn = "depends-on",// Operation depends on architecture
    References = "references",// General reference
    RelatedTo = "related-to",// Related content
    DefinedIn = "defined-in",// Term/concept defined in another doc
    TestsFor = "tests-for"
}
/**
 * Linker options
 */
export interface LinkerOptions {
    basePath?: string;
    generateBacklinks?: boolean;
    updateExisting?: boolean;
    dryRun?: boolean;
}
/**
 * Cross-Linker class
 */
export declare class CrossLinker {
    private options;
    private links;
    constructor(options?: LinkerOptions);
    /**
     * Generate cross-links for distributed files
     */
    generateLinks(result: DistributionResult): Promise<CrossLink[]>;
    /**
     * Group files by category
     */
    private groupByCategory;
    /**
     * Generate links between two categories
     */
    private generateCategoryLinks;
    /**
     * Generate links from specs to architecture
     */
    private generateArchitectureLinks;
    /**
     * Generate links from operations to architecture
     */
    private generateOperationsLinks;
    /**
     * Generate links from delivery to specs
     */
    private generateDeliveryLinks;
    /**
     * Generate links from strategy to specs
     */
    private generateStrategyLinks;
    /**
     * Check if two documents are related (heuristic)
     */
    private documentsRelated;
    /**
     * Generate backlinks (bidirectional)
     */
    private generateBacklinks;
    /**
     * Get reverse link type
     */
    private getReverseType;
    /**
     * Get reverse description
     */
    private getReverseDescription;
    /**
     * Update documents with generated links
     */
    private updateDocuments;
    /**
     * Update a single document with links
     */
    private updateDocument;
    /**
     * Generate markdown for links section
     */
    private generateLinksMarkdown;
    /**
     * Get link type display title
     */
    private getLinkTypeTitle;
    /**
     * Get relative path from source to target
     */
    private getRelativePath;
    /**
     * Get all links
     */
    getLinks(): CrossLink[];
    /**
     * Get links for a specific file
     */
    getLinksFor(filePath: string): CrossLink[];
    /**
     * Get statistics
     */
    getStatistics(): {
        total: number;
        byType: Record<LinkType, number>;
        bidirectional: number;
    };
}
/**
 * Factory function to create linker
 */
export declare function createCrossLinker(options?: LinkerOptions): CrossLinker;
//# sourceMappingURL=cross-linker.d.ts.map