aicm
Version:
A TypeScript CLI tool for managing AI IDE rules across different projects and teams
25 lines (24 loc) • 936 B
TypeScript
export type RuleMetadata = Record<string, string | boolean | string[]>;
/**
* Parse YAML frontmatter blocks from a rule file and return a flat metadata object
*/
export declare function parseRuleFrontmatter(content: string): RuleMetadata;
/**
* Remove the rules block from the content
*/
export declare function removeRulesBlock(content: string): string;
/**
* Write rules to the .windsurfrules file
* This will update the content between the RULES_BEGIN and RULES_END markers
* If the file doesn't exist, it will create it
* If the markers don't exist, it will append them to the existing content
*/
export declare function writeRulesFile(rulesContent: string, rulesFilePath?: string): void;
/**
* Generate the rules file content based on rule files
*/
export declare function generateRulesFileContent(ruleFiles: {
name: string;
path: string;
metadata: Record<string, string | boolean | string[]>;
}[]): string;