/** * Template Processing System * Reads template files with {{variable}} placeholders and substitutes values */ import type { ScanResult } from '../scanner/types.js'; /** * Template variables available for substitution */ export interface TemplateVariables { projectName: string; projectRoot: string; framework: string; frameworkVersion: string; frameworkVariant: string; packageManager: string; packageManagerVersion: string; unitTest: string; unitTestVersion: string; e2eTest: string; e2eTestVersion: string; styling: string; stylingVersion: string; stylingVariant: string; devCommand: string; buildCommand: string; testCommand: string; lintCommand: string; typecheckCommand: string; formatCommand: string; appDir: string; isTui: string; hasSupabase: string; hasPosthog: string; aiEntryPoints: string; aiKeyDirectories: string; aiNamingConventions: string; aiImplementationGuidelines: string; aiMcpEssential: string; aiMcpRecommended: string; aiMissedTechnologies: string; hasAiAnalysis: string; [key: string]: string; } /** * Extract template variables from scan result */ export declare function extractVariables(scanResult: ScanResult, customVars?: Record): TemplateVariables; /** * Process a template string with variable substitution */ export declare function processTemplate(template: string, variables: TemplateVariables): string; /** * Read and process a template file */ export declare function processTemplateFile(templatePath: string, variables: TemplateVariables): Promise; /** * Get the templates directory path */ export declare function getTemplatesDir(): string; /** * Template file info */ export interface TemplateFile { /** Source template path */ sourcePath: string; /** Relative path from templates directory */ relativePath: string; /** Output path (without .tmpl extension) */ outputPath: string; /** Category (prompts, guides, specs, config) */ category: string; } /** * Discover all template files */ export declare function discoverTemplates(templatesDir: string): Promise; /** * Process all templates and return their contents */ export declare function processAllTemplates(templatesDir: string, variables: TemplateVariables): Promise>;