/** * Pattern Verification Service * * Verifies pattern checklist items by checking if patterns are being followed. * Supports multiple verification types: response checks, code checks, file checks, command checks. * * Phase 2.2: Pattern verification with caching */ import { PatternChecklistItem } from './checklist-registry.js'; import { PatternVerificationStep } from './pattern-checklist-generator.js'; /** * Verification result for a step */ export interface VerificationStepResult { passed: boolean; message: string; verifiedAt: string; } /** * Verification result for a pattern item */ export interface VerificationResult { itemId: string; patternId: string; passed: boolean; steps: VerificationStepResult[]; overallPassed: boolean; verifiedAt: string; } /** * Pattern Verification Service * * Verifies pattern compliance with caching support. */ export declare class PatternVerificationService { private cache; private cacheTTL; /** * Verify a pattern checklist item */ verifyPatternItem(item: PatternChecklistItem): Promise; /** * Verify a single verification step */ verifyStep(step: PatternVerificationStep, patternId: string): Promise; /** * Verify response check (read/understand verification) * Note: Response checks are indirect - they check if AI response mentions the pattern * This is a simplified implementation - actual verification would require response history */ private verifyResponseCheck; /** * Verify code check (implementation verification) * Checks if code complies with pattern requirements */ private verifyCodeCheck; /** * Verify file check (file exists verification) * Checks if required files exist */ private verifyFileCheck; /** * Verify command check (command execution verification) * Checks if command was run successfully */ private verifyCommandCheck; /** * Generate verification steps for a pattern item * Helper method to create steps (would normally come from PatternChecklistGenerator) */ private generateVerificationSteps; /** * Clear verification cache */ clearCache(): void; /** * Invalidate cache for a specific pattern */ invalidateCache(patternId: string): void; /** * Invalidate all expired cache entries */ cleanupExpiredCache(): void; }