update semantics and terminology from 'brand rules' to 'rules profiles'

This commit is contained in:
Joe Danziger
2025-05-26 19:07:10 -04:00
parent ba55615d55
commit 9db5f78da3
29 changed files with 918 additions and 513 deletions

View File

@@ -3,8 +3,9 @@ import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import {
convertRuleToBrandRule,
convertAllRulesToBrandRules
convertAllRulesToProfileRules,
convertRuleToProfileRule,
getRulesProfile
} from '../../src/utils/rule-transformer.js';
import * as rooProfile from '../../scripts/profiles/roo.js';
@@ -44,7 +45,7 @@ Also has references to .mdc files.`;
// Convert it
const testRooRule = path.join(testDir, 'basic-terms.md');
convertRuleToBrandRule(testCursorRule, testRooRule, rooProfile);
convertRuleToProfileRule(testCursorRule, testRooRule, rooProfile);
// Read the converted file
const convertedContent = fs.readFileSync(testRooRule, 'utf8');
@@ -75,7 +76,7 @@ alwaysApply: true
// Convert it
const testRooRule = path.join(testDir, 'tool-refs.md');
convertRuleToBrandRule(testCursorRule, testRooRule, rooProfile);
convertRuleToProfileRule(testCursorRule, testRooRule, rooProfile);
// Read the converted file
const convertedContent = fs.readFileSync(testRooRule, 'utf8');
@@ -103,7 +104,7 @@ This references [dev_workflow.mdc](mdc:.cursor/rules/dev_workflow.mdc) and
// Convert it
const testRooRule = path.join(testDir, 'file-refs.md');
convertRuleToBrandRule(testCursorRule, testRooRule, rooProfile);
convertRuleToProfileRule(testCursorRule, testRooRule, rooProfile);
// Read the converted file
const convertedContent = fs.readFileSync(testRooRule, 'utf8');
@@ -121,7 +122,7 @@ This references [dev_workflow.mdc](mdc:.cursor/rules/dev_workflow.mdc) and
const assetRule = path.join(assetsRulesDir, 'dev_workflow.mdc');
fs.writeFileSync(assetRule, 'dummy');
// Should create .roo/rules and call post-processing
convertAllRulesToBrandRules(testDir, rooProfile);
convertAllRulesToProfileRules(testDir, rooProfile);
// Check for post-processing artifacts, e.g., rules-* folders or extra files
const rooDir = path.join(testDir, '.roo');
const found = fs.readdirSync(rooDir).some((f) => f.startsWith('rules-'));