/** * Heuristic Patterns for Git Extraction * * Regex patterns for extracting structured facts from PR descriptions, * review comments, and issue bodies without requiring LLM calls. * * Part of LISA-9: Phase 3 Git-Powered Memory Extraction. */ import type { HeuristicFactType } from '../../../domain/interfaces/IGitExtractor'; /** * Pattern definition with associated fact type and confidence. */ export interface IPatternDefinition { /** The regex pattern to match. */ readonly pattern: RegExp; /** The fact type this pattern extracts. */ readonly factType: HeuristicFactType; /** Name of the pattern for tagging. */ readonly name: string; /** Base confidence level for matches. */ readonly baseConfidence: 'high' | 'medium' | 'low'; /** Minimum match length to be considered valid. */ readonly minLength: number; } /** * Decision patterns - extract motivations, trade-offs, and rationale. */ export declare const DECISION_PATTERNS: readonly IPatternDefinition[]; /** * Gotcha patterns - extract warnings, workarounds, and caveats. */ export declare const GOTCHA_PATTERNS: readonly IPatternDefinition[]; /** * Convention patterns - extract coding standards and guidelines. */ export declare const CONVENTION_PATTERNS: readonly IPatternDefinition[]; /** * All patterns combined for bulk matching. */ export declare const ALL_PATTERNS: readonly IPatternDefinition[]; /** * Match result from pattern extraction. */ export interface IPatternMatch { /** The extracted text content. */ readonly text: string; /** The fact type. */ readonly factType: HeuristicFactType; /** The pattern name that matched. */ readonly patternName: string; /** Confidence level. */ readonly confidence: 'high' | 'medium' | 'low'; /** Start position in source text. */ readonly startIndex: number; } /** * Extract all pattern matches from text. * * @param text - Source text to search * @param patterns - Patterns to match against (defaults to ALL_PATTERNS) * @returns Array of matches found */ export declare function extractPatternMatches(text: string, patterns?: readonly IPatternDefinition[]): IPatternMatch[]; /** * Extract matches for a specific fact type. * * @param text - Source text to search * @param factType - Type of facts to extract * @returns Array of matches for the specified type */ export declare function extractByFactType(text: string, factType: HeuristicFactType): IPatternMatch[]; //# sourceMappingURL=HeuristicPatterns.d.ts.map