update "brand rules" to "rules"

This commit is contained in:
Joe Danziger
2025-05-22 14:26:08 -04:00
parent 0c64e9a739
commit c5c46e0cf8
9 changed files with 54 additions and 115 deletions

View File

@@ -72,7 +72,7 @@ export async function initializeProjectDirect(args, log, context = {}) {
// Handle rules option just like CLI
if (Array.isArray(args.rules) && args.rules.length > 0) {
options.rules = args.rules;
log.info(`Including brand rules: ${args.rules.join(', ')}`);
log.info(`Including rules: ${args.rules.join(', ')}`);
} else {
options.rules = ['cursor'];
log.info(`No rules specified, defaulting to: cursor`);

View File

@@ -1,6 +1,6 @@
/**
* rules.js
* Direct function implementation for adding or removing brand rules
* Direct function implementation for adding or removing rules
*/
import {
@@ -18,10 +18,10 @@ import path from 'path';
import fs from 'fs';
/**
* Direct function wrapper for adding or removing brand rules.
* Direct function wrapper for adding or removing rules.
* @param {Object} args - Command arguments
* @param {"add"|"remove"} args.action - Action to perform: add or remove rules
* @param {string[]} args.rules - List of brand rules to add or remove
* @param {string[]} args.rules - List of rules to add or remove
* @param {string} args.projectRoot - Absolute path to the project root
* @param {boolean} [args.yes=true] - Run non-interactively
* @param {Object} log - Logger object

View File

@@ -40,7 +40,7 @@ export function registerInitializeProjectTool(server) {
.array(z.string())
.optional()
.describe(
'List of brand rules to include at initialization (e.g., ["cursor", "roo"]). If omitted, defaults to ["cursor"].'
'List of rules to include at initialization (e.g., ["cursor", "roo"]). If omitted, defaults to ["cursor"].'
)
}),
execute: withNormalizedProjectRoot(async (args, context) => {

View File

@@ -1,6 +1,6 @@
/**
* tools/rules.js
* Tool to add or remove brand rules from a project (MCP server)
* Tool to add or remove rules from a project (MCP server)
*/
import { z } from 'zod';
@@ -19,16 +19,16 @@ export function registerRulesTool(server) {
server.addTool({
name: 'rules',
description:
'Add or remove brand rules and MCP config from the project (mirrors CLI rules add/remove).',
'Add or remove rules and MCP config from the project (mirrors CLI rules add/remove).',
parameters: z.object({
action: z
.enum(['add', 'remove'])
.describe('Whether to add or remove brand rules.'),
.describe('Whether to add or remove rules.'),
rules: z
.array(z.string())
.min(1)
.describe(
'List of brand rules to add or remove (e.g., ["roo", "windsurf"]).'
'List of rules to add or remove (e.g., ["roo", "windsurf"]).'
),
projectRoot: z
.string()