diff --git a/.changeset/lemon-deer-hide.md b/.changeset/lemon-deer-hide.md index 003adf34..9dc2df95 100644 --- a/.changeset/lemon-deer-hide.md +++ b/.changeset/lemon-deer-hide.md @@ -2,14 +2,14 @@ 'task-master-ai': patch --- -Added flexible brand rules management: +Added flexible rules management: -- New `init` flag: You can now specify which brands to include rules for at project initialization using `--rules ` or `-r ` (e.g., `task-master init -r cursor,roo`). Only the selected brands' rules and configuration are included. -- New commands: `task-master rules add ` and `task-master rules remove ` let you add or remove brand-specific rules and MCP config after initialization, supporting multiple brands at once. -- New command: `task-master rules setup` launches an interactive prompt to select which brand rules to apply to your project. This does **not** re-initialize your project or affect shell aliases; it only manages rules. The list of brands is always up-to-date with available profiles, so you never have to update the CLI when adding a new brand. -- The interactive rules setup flow is also used during `init` if you don't specify brands with `--rules`. +- New `init` flag: You can now specify which rules to include at project initialization using `--rules ` or `-r ` (e.g., `task-master init -r cursor,roo`). Only the selected rules and configuration are included. +- New commands: `task-master rules add ` and `task-master rules remove ` let you add or remove specific rules and MCP config after initialization, supporting multiple rules at once. +- New command: `task-master rules setup` launches an interactive prompt to select which rules to apply to your project. This does **not** re-initialize your project or affect shell aliases; it only manages rules. The list of rules is always up-to-date with available profiles, so you never have to update the CLI when adding a new rule set. +- The interactive rules setup flow is also used during `init` if you don't specify rules with `--rules`. - Documentation and tests were updated to reflect these changes. -This enables more flexible, brand-specific project setups and makes rules management much easier. You can update or switch brands at any time after initialization using the interactive setup. +This enables more flexible, rule-specific project setups and makes rules management much easier. You can update or switch rules at any time after initialization using the interactive setup. - Resolves #338 \ No newline at end of file diff --git a/.cursor/rules/taskmaster.mdc b/.cursor/rules/taskmaster.mdc index e53f9983..52a52e70 100644 --- a/.cursor/rules/taskmaster.mdc +++ b/.cursor/rules/taskmaster.mdc @@ -17,12 +17,12 @@ This document provides a detailed reference for interacting with Taskmaster, cov ### 1. Initialize Project (`init`) -* **Brand Rules Option:** - * `--rules ` or `-r `: Comma-separated list of brand rule sets to apply at initialization (e.g., `cursor,windsurf,roo`). +* **Rules Option:** + * `--rules ` or `-r `: Comma-separated list of rule sets to apply at initialization (e.g., `cursor,windsurf,roo`). * Example: `task-master init --rules cursor,windsurf` * Example: `task-master init -r roo` * **What happens:** - * For each brand, creates the appropriate rules directory (e.g., `.roo/rules`) and MCP config (e.g., `.roo/mcp.json`). + * For each, creates the appropriate rules directory (e.g., `.roo/rules`) and MCP config (e.g., `.roo/mcp.json`). * If not specified, only Cursor rules are initialized by default. @@ -93,15 +93,15 @@ This document provides a detailed reference for interacting with Taskmaster, cov --- -### Add or Remove Brand Rules After Initialization +### Add or Remove Rules After Initialization * **CLI Command:** - * `task-master rules add `: Add one or more brand rule sets to your project (e.g., `task-master rules add windsurf,roo`). - * `task-master rules remove `: Remove one or more brand rule sets (e.g., `task-master rules remove windsurf`). + * `task-master rules add `: Add one or more rule sets to your project (e.g., `task-master rules add windsurf,roo`). + * `task-master rules remove `: Remove one or more rule sets (e.g., `task-master rules remove windsurf`). * **What happens:** - * Adding rules creates the brand rules directory (e.g., `.roo/rules`) and MCP config. - * Removing rules deletes the brand rules directory and associated MCP config. - * You can use multiple comma-separated brands in a single command. + * Adding rules creates the rules directory (e.g., `.roo/rules`) and MCP config (if appropriate). + * Removing rules deletes the rules directory and associated MCP config. + * You can use multiple comma-separated rules in a single command. --- diff --git a/README.md b/README.md index d79acc26..e2d4283f 100644 --- a/README.md +++ b/README.md @@ -93,14 +93,12 @@ task-master init # If installed locally npx task-master init + +# Initialize project with specific rules +task-master init --rules cursor,windsurf ``` This will prompt you for project details and set up a new project with the necessary files and structure. -You can also specify brand rules to apply during initialization: - -```bash -task-master init --rules cursor,windsurf -``` #### Common Commands @@ -108,81 +106,22 @@ task-master init --rules cursor,windsurf # Initialize a new project task-master init -# Initialize a new project applying specific brand rules -task-master init --rules cursor,windsurf - # Parse a PRD and generate tasks task-master parse-prd your-prd.txt -# Add, remove, or set up brand rules after initialization - -You can add or remove brand rules at any time after project initialization: - -``` - -task-master rules add windsurf,roo - -# Adds the specified brand rule sets (e.g., .windsurf/rules, .roo/rules) to your project. - -# Also sets up the corresponding MCP configuration in the brand directory. - -task-master rules remove windsurf - -# Removes the specified brand rule sets and their MCP config from your project. - -task-master rules setup - -# Launches an interactive prompt to select which brand rules to apply to your project. - -# This does NOT re-initialize the project or ask about shell aliases. - -# Useful for updating/enforcing rules or switching brands at any time. - -# The list of brands is always up-to-date with available profiles. - -```` - -- Adding rules creates the brand rules directory (e.g., `.roo/rules`) and copies/initializes the brand's rules. -- Removing rules deletes the brand rules directory and associated MCP config. -- You can use multiple comma-separated brands in a single command. -- Use the `--force` flag to bypass the confirmation prompt when removing rules (dangerous, irreversible): - -```bash -task-master rules remove windsurf --force -```` - -:warning: **Warning:** The `--force` flag will immediately and permanently delete brand rules and configuration without asking for confirmation. - -task-master rules add windsurf,roo -task-master rules remove windsurf --force - # List all tasks - task-master list # Show the next task to work on - task-master next # Generate task files - task-master generate -```` - -### Interactive Rules Setup - -You can launch the interactive rules setup at any time with: - -```bash -task-master rules setup +# Add rules after initialization +task-master rules add windsurf,roo ``` -This command opens a prompt where you can select which brand rules (e.g., Cursor, Roo, Windsurf) you want to apply to your project. The list of brands is always current with the available profiles—no manual updates needed. This does **not** re-initialize your project or ask about shell aliases; it only manages rules. - -- Use this command to update, enforce, or switch brand rules interactively after project creation. -- The same interactive prompt is also used during `init` if you don't specify brands with `--rules`. - ## Documentation For more detailed information, check out the documentation in the `docs` directory: diff --git a/assets/rules/taskmaster.mdc b/assets/rules/taskmaster.mdc index e53f9983..52a52e70 100644 --- a/assets/rules/taskmaster.mdc +++ b/assets/rules/taskmaster.mdc @@ -17,12 +17,12 @@ This document provides a detailed reference for interacting with Taskmaster, cov ### 1. Initialize Project (`init`) -* **Brand Rules Option:** - * `--rules ` or `-r `: Comma-separated list of brand rule sets to apply at initialization (e.g., `cursor,windsurf,roo`). +* **Rules Option:** + * `--rules ` or `-r `: Comma-separated list of rule sets to apply at initialization (e.g., `cursor,windsurf,roo`). * Example: `task-master init --rules cursor,windsurf` * Example: `task-master init -r roo` * **What happens:** - * For each brand, creates the appropriate rules directory (e.g., `.roo/rules`) and MCP config (e.g., `.roo/mcp.json`). + * For each, creates the appropriate rules directory (e.g., `.roo/rules`) and MCP config (e.g., `.roo/mcp.json`). * If not specified, only Cursor rules are initialized by default. @@ -93,15 +93,15 @@ This document provides a detailed reference for interacting with Taskmaster, cov --- -### Add or Remove Brand Rules After Initialization +### Add or Remove Rules After Initialization * **CLI Command:** - * `task-master rules add `: Add one or more brand rule sets to your project (e.g., `task-master rules add windsurf,roo`). - * `task-master rules remove `: Remove one or more brand rule sets (e.g., `task-master rules remove windsurf`). + * `task-master rules add `: Add one or more rule sets to your project (e.g., `task-master rules add windsurf,roo`). + * `task-master rules remove `: Remove one or more rule sets (e.g., `task-master rules remove windsurf`). * **What happens:** - * Adding rules creates the brand rules directory (e.g., `.roo/rules`) and MCP config. - * Removing rules deletes the brand rules directory and associated MCP config. - * You can use multiple comma-separated brands in a single command. + * Adding rules creates the rules directory (e.g., `.roo/rules`) and MCP config (if appropriate). + * Removing rules deletes the rules directory and associated MCP config. + * You can use multiple comma-separated rules in a single command. --- diff --git a/docs/command-reference.md b/docs/command-reference.md index d47bfa89..9542d6c0 100644 --- a/docs/command-reference.md +++ b/docs/command-reference.md @@ -209,13 +209,13 @@ task-master add-task --prompt="Description" --priority=high # Initialize a new project with Task Master structure task-master init -# Initialize a new project applying specific brand rules +# Initialize a new project applying specific rules task-master init --rules cursor,windsurf ``` -- The `--rules` flag allows you to specify one or more brand rule sets (e.g., `cursor`, `roo`, `windsurf`) to apply during initialization. +- The `--rules` flag allows you to specify one or more rule sets (e.g., `cursor`, `roo`, `windsurf`) to apply during initialization. - If omitted, the default is `cursor`. -- You can use multiple comma-separated brands in a single command. +- You can use multiple comma-separated rules in a single command. **Example:** @@ -223,25 +223,25 @@ task-master init --rules cursor,windsurf task-master init --rules cursor,roo ``` -## Manage Brand Rules +## Manage Rules ```bash -# Add brand rule sets to your project +# Add rule sets to your project # (e.g., .roo/rules, .windsurf/rules) -task-master rules add +task-master rules add -# Remove brand rule sets from your project -task-master rules remove +# Remove rule sets from your project +task-master rules remove -# Launch interactive rules setup to select brands +# Launch interactive rules setup to select rules # (does not re-initialize project or ask about shell aliases) task-master rules setup ``` -- Adding rules creates the brand rules directory (e.g., `.roo/rules`) and copies/initializes the brand's rules. -- Removing rules deletes the brand rules directory and associated MCP config. -- You can use multiple comma-separated brands in a single command. -- The `setup` action launches an interactive prompt to select which brand rules to apply. The list of brands is always current with the available profiles, and no manual updates are needed. This command does **not** re-initialize your project or affect shell aliases; it only manages rules interactively. +- Adding rules creates the rules directory (e.g., `.roo/rules`) and copies/initializes the rules. +- Removing rules deletes the rules directory and associated MCP config. +- You can use multiple comma-separated rules in a single command. +- The `setup` action launches an interactive prompt to select which rules to apply. The list of rules is always current with the available profiles, and no manual updates are needed. This command does **not** re-initialize your project or affect shell aliases; it only manages rules interactively. **Examples:** @@ -259,10 +259,10 @@ You can launch the interactive rules setup at any time with: task-master rules setup ``` -This command opens a prompt where you can select which brand rules (e.g., Cursor, Roo, Windsurf) you want to apply to your project. The list of brands is always current with the available profiles—no manual updates needed. This does **not** re-initialize your project or ask about shell aliases; it only manages rules. +This command opens a prompt where you can select which rules (e.g., Cursor, Roo, Windsurf) you want to apply to your project. The list of rules is always current with the available profiles—no manual updates needed. This does **not** re-initialize your project or ask about shell aliases; it only manages rules. -- Use this command to update, enforce, or switch brand rules interactively after project creation. -- The same interactive prompt is also used during `init` if you don't specify brands with `--rules`. +- Use this command to add rules interactively after project creation. +- The same interactive prompt is also used during `init` if you don't specify rules with `--rules`. ## Configure AI Models diff --git a/mcp-server/src/core/direct-functions/initialize-project.js b/mcp-server/src/core/direct-functions/initialize-project.js index 01184112..28ba9be1 100644 --- a/mcp-server/src/core/direct-functions/initialize-project.js +++ b/mcp-server/src/core/direct-functions/initialize-project.js @@ -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`); diff --git a/mcp-server/src/core/direct-functions/rules.js b/mcp-server/src/core/direct-functions/rules.js index 77e8a7e2..222c195d 100644 --- a/mcp-server/src/core/direct-functions/rules.js +++ b/mcp-server/src/core/direct-functions/rules.js @@ -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 diff --git a/mcp-server/src/tools/initialize-project.js b/mcp-server/src/tools/initialize-project.js index f4a286d4..4fcfefc6 100644 --- a/mcp-server/src/tools/initialize-project.js +++ b/mcp-server/src/tools/initialize-project.js @@ -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) => { diff --git a/mcp-server/src/tools/rules.js b/mcp-server/src/tools/rules.js index 1b9421b8..e45cf2fc 100644 --- a/mcp-server/src/tools/rules.js +++ b/mcp-server/src/tools/rules.js @@ -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()