/** * Invariant Rules Engine — checks files and call graph against user-defined rules. * * Rule kinds: * import-ban — no file may import a banned module (except exempt files) * call-constraint — restrict which files may call a given function * module-boundary — files in `from` may not import from `to` * naming — exported symbols must match a regex * ast-pattern — AST node pattern matching via @ast-grep/napi * style-mechanism — enforce allowed style mechanisms per file * no-raw-values — enforce design-token references for specified CSS properties */ import type { CodeIndexDB } from '../codeIndexDB.js'; import type { InvariantRule, RuleCheckResult } from './types.js'; export type { InvariantRule, RuleViolation, RuleCheckResult } from './types.js'; export { hasRules } from './ruleValidator.js'; export interface RuleEngineOptions { /** The invariant rules to enforce */ rules: InvariantRule[]; /** Files to check (repo-relative paths) */ files: string[]; /** CodeIndexDB instance for call-graph lookups */ db?: CodeIndexDB; /** Base project directory for resolving absolute paths */ projectDir: string; } /** * Check all rules against all specified files. * import-ban, module-boundary, and naming are per-file. * call-constraint queries the full index for callers. */ export declare function checkRules(options: RuleEngineOptions): RuleCheckResult; /** Clear the matcher cache (useful for tests) */ export declare function clearMatcherCache(): void; //# sourceMappingURL=ruleEngine.d.ts.map