/** * Pattern mapping types and catalog. * * This module contains the pattern mapping data structure and the catalog * of mappings from dimensions to pattern templates. */ import type { DimensionalRule, PatternTemplate, PatternVariable } from '../dsl-types'; import type { ChangeTarget, ChangeAction, NodeKind } from '../../ast/types'; /** * Internal structure for mapping dimensions to patterns. */ interface PatternMapping { /** The pattern template */ template: PatternTemplate; /** Required dimensions for this pattern */ requiredDimensions: { action?: ChangeAction[]; aspect?: string[]; impact?: string[]; target?: ChangeTarget[]; }; /** Optional dimensions that enhance specificity */ optionalDimensions?: { nodeKind?: NodeKind[]; nested?: boolean; tags?: string[]; }; /** Priority for choosing between multiple matches (higher = better) */ priority: number; /** Readable description of what this pattern captures */ description: string; } /** * Extract variables from dimensional rule for a given template */ export declare function extractVariables(dimensional: DimensionalRule, template: PatternTemplate): PatternVariable[]; /** * Find all matching patterns for a dimensional rule */ export declare function findMatchingPatterns(dimensional: DimensionalRule): Array<{ mapping: PatternMapping; confidence: number; }>; export {}; //# sourceMappingURL=mappings.d.ts.map