Default to Cursor profile for MCP init when no rules specified (#846)

This commit is contained in:
Joe Danziger
2025-06-22 15:24:09 -04:00
committed by GitHub
parent 403d7b00ca
commit 59a4ec9e1a
3 changed files with 12 additions and 6 deletions

View File

@@ -0,0 +1,5 @@
---
"task-master-ai": patch
---
Default to Cursor profile for MCP init when no rules specified

View File

@@ -72,15 +72,16 @@ export async function initializeProjectDirect(args, log, context = {}) {
yes: true // Force yes mode yes: true // Force yes mode
}; };
// Handle rules option just like CLI // Handle rules option with MCP-specific defaults
if (Array.isArray(args.rules) && args.rules.length > 0) { if (Array.isArray(args.rules) && args.rules.length > 0) {
options.rules = args.rules; options.rules = args.rules;
options.rulesExplicitlyProvided = true;
log.info(`Including rules: ${args.rules.join(', ')}`); log.info(`Including rules: ${args.rules.join(', ')}`);
} else { } else {
options.rules = RULE_PROFILES; // For MCP initialization, default to Cursor profile only
log.info( options.rules = ['cursor'];
`No rule profiles specified, defaulting to: ${RULE_PROFILES.join(', ')}` options.rulesExplicitlyProvided = true;
); log.info(`No rule profiles specified, defaulting to: Cursor`);
} }
log.info(`Initializing project with options: ${JSON.stringify(options)}`); log.info(`Initializing project with options: ${JSON.stringify(options)}`);

View File

@@ -51,7 +51,7 @@ export function registerInitializeProjectTool(server) {
.array(z.enum(RULE_PROFILES)) .array(z.enum(RULE_PROFILES))
.optional() .optional()
.describe( .describe(
`List of rule profiles to include at initialization. If omitted, defaults to all available profiles. Available options: ${RULE_PROFILES.join(', ')}` `List of rule profiles to include at initialization. If omitted, defaults to Cursor profile only. Available options: ${RULE_PROFILES.join(', ')}`
) )
}), }),
execute: withNormalizedProjectRoot(async (args, context) => { execute: withNormalizedProjectRoot(async (args, context) => {