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

@@ -72,15 +72,16 @@ export async function initializeProjectDirect(args, log, context = {}) {
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) {
options.rules = args.rules;
options.rulesExplicitlyProvided = true;
log.info(`Including rules: ${args.rules.join(', ')}`);
} else {
options.rules = RULE_PROFILES;
log.info(
`No rule profiles specified, defaulting to: ${RULE_PROFILES.join(', ')}`
);
// For MCP initialization, default to Cursor profile only
options.rules = ['cursor'];
options.rulesExplicitlyProvided = true;
log.info(`No rule profiles specified, defaulting to: Cursor`);
}
log.info(`Initializing project with options: ${JSON.stringify(options)}`);