vibe-rules
Version:
A utility for managing Cursor rules, Windsurf rules, and other AI prompts
37 lines (36 loc) • 1.63 kB
TypeScript
import { RuleConfig, RuleProvider, RuleGeneratorOptions } from "../types.js";
export declare class ClinerulesRuleProvider implements RuleProvider {
private readonly ruleType;
/**
* Generates formatted content for Clinerules/Roo including metadata.
*/
generateRuleContent(config: RuleConfig, options?: RuleGeneratorOptions): string;
/**
* Saves a rule definition to internal storage for later use.
* @param config - The rule configuration.
* @returns Path where the rule definition was saved internally.
*/
saveRule(config: RuleConfig): Promise<string>;
/**
* Loads a rule definition from internal storage.
* @param name - The name of the rule to load.
* @returns The RuleConfig if found, otherwise null.
*/
loadRule(name: string): Promise<RuleConfig | null>;
/**
* Lists rule definitions available in internal storage.
* @returns An array of rule names.
*/
listRules(): Promise<string[]>;
/**
* Applies a rule by setting up the .clinerules/vibe-rules.md structure.
* Always targets the project-local .clinerules directory.
*/
appendRule(name: string, targetPath?: string, // If provided, should be the .clinerules directory path
isGlobal?: boolean, options?: RuleGeneratorOptions): Promise<boolean>;
/**
* Formats and applies a rule directly from a RuleConfig object.
*/
appendFormattedRule(config: RuleConfig, targetPath: string, // Should now receive the correct .../.clinerules/slugified-name.md path
isGlobal?: boolean, options?: RuleGeneratorOptions): Promise<boolean>;
}