/**
 * PATTERN ROUTER - Enforces Terminal-Bench discovered patterns
 *
 * This module reads pattern definitions from .factory/patterns/index.json
 * and enforces them during task classification and execution.
 */
export interface PatternDefinition {
    id: string | number;
    file: string;
    title: string;
    abbreviation: string;
    category: string;
    keywords: string[];
}
export declare class PatternRouter {
    private patterns;
    private loadedFromPath?;
    /** Cache for matchPatterns results — avoids re-scanning all patterns on repeated queries */
    private matchCache;
    constructor();
    /**
     * Load pattern definitions from index.json
     */
    loadPatterns(projectDir: string): boolean;
    /**
     * Get all loaded patterns
     */
    getPatterns(): PatternDefinition[];
    /**
     * Get the path patterns were loaded from
     */
    getLoadedPath(): string | undefined;
    /**
     * Match patterns based on keywords or task description.
     * Results are cached with adaptive TTL to avoid re-scanning on repeated queries.
     */
    matchPatterns(description: string): PatternDefinition[];
    /**
     * Get enforcement checklist for a task description.
     * Always includes critical patterns (Output Existence, Decoder-First) regardless of keywords.
     * Sorts by historical success rate from AdaptivePatternEngine when data is available.
     */
    getEnforcementChecklist(description: string, taskCategory?: string): PatternDefinition[];
    /**
     * Print loaded patterns for debugging
     */
    printPatterns(): void;
}
export declare function getPatternRouter(): PatternRouter;
/**
 * Reset the singleton (for testing)
 */
export declare function resetPatternRouter(): void;
//# sourceMappingURL=pattern-router.d.ts.map