import type { RuleRegistryEntry } from '../schemas/rules.js'; export declare function registryPath(projectRoot: string): string; export declare function rulesViewDir(projectRoot: string): string; export declare function fingerprint(content: string): string; export declare function loadRegistry(projectRoot: string): RuleRegistryEntry[]; export declare function activeRules(entries: RuleRegistryEntry[]): RuleRegistryEntry[]; export declare function dedupeExactRules(entries: RuleRegistryEntry[]): { entries: RuleRegistryEntry[]; removed: RuleRegistryEntry[]; }; export declare function groupActiveRulesByCategory(entries: RuleRegistryEntry[]): Record; export declare function renderRuleMarkdownFiles(entries: RuleRegistryEntry[]): Map; export declare function saveRegistry(projectRoot: string, entries: RuleRegistryEntry[]): void; export declare function mergeRuleRegistryAtPath(projectRoot: string, filePath: string): { status: 'merged' | 'no-conflict' | 'missing' | 'error'; added?: number; total?: number; }; export declare function mergeRuleRegistry(projectRoot: string): { status: "merged" | "no-conflict" | "missing" | "error"; added?: number; total?: number; }; export declare function importRulesFromViews(projectRoot: string): { entries: RuleRegistryEntry[]; imported: number; }; export declare function bootstrapRuleRegistry(projectRoot: string): RuleRegistryEntry[]; export declare function nextRuleId(entries: RuleRegistryEntry[]): string; /** * Add a rule to the registry. Returns the entry if added, or the existing entry if duplicate. */ export declare function addRule(projectRoot: string, opts: { content: string; category: string; branch: string; deviation: string | null; author: string; status?: RuleRegistryEntry['status']; }): { entry: RuleRegistryEntry; isDuplicate: boolean; }; /** * Legacy compatibility: rebuild .aida/rules/*.md from rules.json. * Returns the number of files written. */ export declare function buildRuleViews(projectRoot: string): number; /** * Merge two registries (union by fingerprint). Used after git merge conflicts. * Returns merged entries and count of new entries added. */ export declare function mergeRegistries(base: RuleRegistryEntry[], incoming: RuleRegistryEntry[]): { merged: RuleRegistryEntry[]; added: number; }; /** * Find potential duplicates by checking keyword overlap. * Returns pairs of entries that might be duplicates or conflicts. */ export declare function findSimilarRules(entries: RuleRegistryEntry[]): { a: RuleRegistryEntry; b: RuleRegistryEntry; similarity: number; }[]; //# sourceMappingURL=rules.d.ts.map