update semantics and terminology from 'brand rules' to 'rules profiles'
This commit is contained in:
32
src/constants/profiles.js
Normal file
32
src/constants/profiles.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @typedef {'cline' | 'cursor' | 'roo' | 'windsurf'} RulesProfile
|
||||
*/
|
||||
|
||||
/**
|
||||
* Available rules profiles for project initialization and rules command
|
||||
*
|
||||
* ⚠️ SINGLE SOURCE OF TRUTH: This is the authoritative list of all supported rules profiles.
|
||||
* This constant is used directly throughout the codebase (previously aliased as PROFILE_NAMES).
|
||||
*
|
||||
* @type {RulesProfile[]}
|
||||
* @description Defines possible rules profile sets:
|
||||
* - cline: Cline IDE rules
|
||||
* - cursor: Cursor IDE rules (default)
|
||||
* - roo: Roo Code IDE rules
|
||||
* - windsurf: Windsurf IDE rules
|
||||
*
|
||||
* To add a new rules profile:
|
||||
* 1. Add the profile name to this array
|
||||
* 2. Create a profile file in scripts/profiles/{profile}.js
|
||||
* 3. Export it as {profile}Profile in scripts/profiles/index.js
|
||||
*/
|
||||
export const RULES_PROFILES = ['cline', 'cursor', 'roo', 'windsurf'];
|
||||
|
||||
/**
|
||||
* Check if a given rules profile is valid
|
||||
* @param {string} rulesProfile - The rules profile to check
|
||||
* @returns {boolean} True if the rules profile is valid, false otherwise
|
||||
*/
|
||||
export function isValidRulesProfile(rulesProfile) {
|
||||
return RULES_PROFILES.includes(rulesProfile);
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/**
|
||||
* @typedef {'cursor' | 'roo' | 'windsurf' | 'cline'} BrandRule
|
||||
*/
|
||||
|
||||
/**
|
||||
* Available brand rules for project initialization
|
||||
*
|
||||
* @type {BrandRule[]}
|
||||
* @description Defines possible brand rule sets:
|
||||
* - cursor: Cursor IDE rules (default)
|
||||
* - roo: Roo Code IDE rules
|
||||
* - windsurf: Windsurf IDE rules
|
||||
* - cline: Cline IDE rules
|
||||
*
|
||||
* To add a new brand:
|
||||
* 1. Add the brand name to this array
|
||||
* 2. Create a profile file in scripts/profiles/{brand}.js
|
||||
* 3. Export it in scripts/profiles/index.js
|
||||
* 4. Add it to BRAND_PROFILES in src/utils/rule-transformer.js
|
||||
*/
|
||||
export const BRAND_RULE_OPTIONS = [
|
||||
'cursor',
|
||||
'roo',
|
||||
'windsurf',
|
||||
'cline'
|
||||
];
|
||||
|
||||
/**
|
||||
* Check if a given brand rule is valid
|
||||
* @param {string} brandRule - The brand rule to check
|
||||
* @returns {boolean} True if the brand rule is valid, false otherwise
|
||||
*/
|
||||
export function isValidBrandRule(brandRule) {
|
||||
return BRAND_RULE_OPTIONS.includes(brandRule);
|
||||
}
|
||||
Reference in New Issue
Block a user