/** * Canonical Category Map — normalizes the fragmented claim categories * (37 variants) down to ~12 canonical categories. * * Used in two places: * 1. Rule creation (harvester + pattern extractor) — new rules get canonical categories * 2. Rule loading (catalog) — existing rules get mapped at load time */ /** * The canonical set of claim categories for all learned rules. */ export declare const CANONICAL_CATEGORIES: readonly ["security", "error-handling", "data-validation", "async", "resource-management", "api-contract", "state-management", "i18n", "performance", "type-safety", "ui-logic", "code-quality"]; export type CanonicalCategory = (typeof CANONICAL_CATEGORIES)[number]; /** * Maps every known raw category string to its canonical form. * * When adding new mappings, keep the keys lowercase and hyphenated. */ export declare const CATEGORY_MAP: Readonly>; /** * Normalize a raw category string to its canonical form. * * Lookup order: * 1. Exact match in CATEGORY_MAP * 2. Lowercase + trim exact match * 3. Fallback to 'code-quality' (the broadest bucket) */ export declare function normalizeCategory(raw: string): CanonicalCategory;