/**
 * Template Discovery Module
 *
 * Provides auto-discovery and loading of CLI templates from
 * ~/.claude/workflows/cli-templates/
 *
 * Features:
 * - Scan prompts/ directory (flat structure with category-function.txt naming)
 * - Match template names (e.g., "analysis-review-architecture" or just "review-architecture")
 * - Load protocol files based on mode (analysis/write)
 * - Cache template content for performance
 */
export interface TemplateMeta {
    name: string;
    path: string;
    category: string;
    shortName: string;
}
export interface TemplateIndex {
    templates: Map<string, TemplateMeta>;
    byShortName: Map<string, TemplateMeta>;
    categories: Map<string, string[]>;
    lastScan: number;
}
/**
 * Get the base templates directory path
 */
export declare function getTemplatesDir(): string;
/**
 * Get the prompts directory path
 */
export declare function getPromptsDir(): string;
/**
 * Get the protocols directory path
 */
export declare function getProtocolsDir(): string;
/**
 * Scan templates directory and build index
 * Flat structure: prompts/category-function.txt
 * Results are cached for performance
 */
export declare function scanTemplates(forceRescan?: boolean): TemplateIndex;
/**
 * Find a template by name
 *
 * @param nameOrShort - Full template name (e.g., "analysis-review-architecture")
 *                      or short name (e.g., "review-architecture")
 * @returns Full path to template file, or null if not found
 */
export declare function findTemplate(nameOrShort: string): string | null;
/**
 * Load protocol content based on mode
 *
 * @param mode - Execution mode: "analysis" or "write"
 * @returns Protocol file content, or empty string if not found
 */
export declare function loadProtocol(mode: string): string;
/**
 * Load template content by name or path
 *
 * @param nameOrPath - Template name or relative path
 * @returns Template file content
 * @throws Error if template not found
 */
export declare function loadTemplate(nameOrPath: string): string;
/**
 * Build rules content from protocol and template
 *
 * @param mode - Execution mode for protocol selection
 * @param templateName - Template name or path (optional)
 * @param includeProtocol - Whether to include protocol (default: true)
 * @returns Combined rules content
 */
export declare function buildRulesContent(mode: string, templateName?: string, includeProtocol?: boolean): string;
/**
 * List all available templates
 *
 * @returns Object with categories and their templates
 */
export declare function listTemplates(): Record<string, TemplateMeta[]>;
/**
 * Clear template cache (useful for testing or after template updates)
 */
export declare function clearCache(): void;
//# sourceMappingURL=template-discovery.d.ts.map