/** A runtime-agnostic rule definition stored in the neutral registry. */ export type NeutralRule = { id: string; title: string; content: string; tags: string[]; appliesTo: string[]; /** * Optional id of a compiled shared-section this rule deliberately supersedes. * When set, the rule composer (`composeProfileRules`) treats this neutral rule * as an override of that section rather than an additive block, even if the * headings do not match textually. See `src/services/rule-composition.ts`. */ replacesSection?: string; }; export type RuleTarget = 'claude' | 'cursor' | 'codex' | 'vscode' | 'windsurf' | 'opencode'; export declare const REGISTRY_DIR = ".setup-agents/rules"; export declare const OPENCODE_RULE_MARKER = ""; /** * Loads all neutral rules from the registry directory. * Each rule is a JSON file in `.setup-agents/rules/` with the NeutralRule shape. */ export declare function loadRegistry(cwd: string): NeutralRule[]; /** Returns all rules that apply to a given profile ID. */ export declare function getRulesForProfile(rules: NeutralRule[], profileId: string): NeutralRule[]; /** Renders a neutral rule into the target runtime's format. */ export declare function renderForTarget(rule: NeutralRule, target: RuleTarget): string; /** * Returns the file path where a rule should be written for the given target. * Paths are normalized to forward slashes so they read identically across * platforms (Node's fs accepts `/` on Windows); without this the rule-injection * assertions and the generated manifests diverge on Windows runners. */ export declare function getTargetPath(cwd: string, rule: NeutralRule, target: RuleTarget): string; /** True only for OpenCode neutral-rule files carrying setup-agents' ownership marker. */ export declare function isManagedOpenCodeRule(content: string): boolean;