An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.
JavaScript aicursorcursor-aicursorailovablelovable-devroocodetask-managertaskstasks-listwindsurfwindsurf-ai
fix(profiles): fix vscode profile generation (#1027)
Andre Silva6ae66b2afbfe
diff --git a/.changeset/swift-otters-argue.md b/.changeset/swift-otters-argue.mdnew file mode 100644index 00000000..6a6b60a5--- /dev/null+++ b/.changeset/swift-otters-argue.md@@ -0,0 +1,5 @@+---+"task-master-ai": patch+---++Fix VSCode profile generation to use correct rule file names (using `.instructions.md` extension instead of `.md`) and front-matter properties (removing the unsupported `alwaysApply` property from instructions files' front-matter).diff --git a/package.json b/package.jsonindex 61db3007..645a04e7 100644--- a/package.json+++ b/package.json@@ -9,10 +9,7 @@"task-master-mcp": "mcp-server/server.js","task-master-ai": "mcp-server/server.js"},- "workspaces": [- "apps/*",- "."- ],+ "workspaces": ["apps/*", "."],"scripts": {"test": "node --experimental-vm-modules node_modules/.bin/jest","test:fails": "node --experimental-vm-modules node_modules/.bin/jest --onlyFailures",diff --git a/src/profiles/base-profile.js b/src/profiles/base-profile.jsindex 6f9c5e56..5c329b5a 100644--- a/src/profiles/base-profile.js+++ b/src/profiles/base-profile.js@@ -234,6 +234,7 @@ export function createProfile(editorConfig) {globalReplacements: baseGlobalReplacements,conversionConfig,getTargetRuleFilename,+ targetExtension,// Optional lifecycle hooks...(onAdd && { onAddRulesProfile: onAdd }),...(onRemove && { onRemoveRulesProfile: onRemove }),diff --git a/src/profiles/vscode.js b/src/profiles/vscode.jsindex 06e28797..df4837b3 100644--- a/src/profiles/vscode.js+++ b/src/profiles/vscode.js@@ -166,6 +166,7 @@ export const vscodeProfile = createProfile({rulesDir: '.github/instructions', // VS Code instructions locationprofileDir: '.vscode', // VS Code configuration directorymcpConfigName: 'mcp.json', // VS Code uses mcp.json in .vscode directory+ targetExtension: '.instructions.md',customReplacements: [// Core VS Code directory structure changes{ from: /\.cursor\/rules/g, to: '.github/instructions' },@@ -177,10 +178,13 @@ export const vscodeProfile = createProfile({// VS Code custom instructions format - use applyTo with quoted patterns instead of globs{ from: /^globs:\s*(.+)$/gm, to: 'applyTo: "$1"' },+ // Remove unsupported property - alwaysApply+ { from: /^alwaysApply:\s*(true|false)\s*\n?/gm, to: '' },+// Essential markdown link transformations for VS Code structure{from: /\[(.+?)\]\(mdc:\.cursor\/rules\/(.+?)\.mdc\)/g,- to: '[$1](.github/instructions/$2.md)'+ to: '[$1](.github/instructions/$2.instructions.md)'},// VS Code specific terminologydiff --git a/tests/integration/profiles/vscode-init-functionality.test.js b/tests/integration/profiles/vscode-init-functionality.test.jsindex 794b673a..f5d69ae9 100644--- a/tests/integration/profiles/vscode-init-functionality.test.js+++ b/tests/integration/profiles/vscode-init-functionality.test.js@@ -35,10 +35,10 @@ describe('VSCode Profile Initialization Functionality', () => {expect(Array.isArray(vscodeProfile.globalReplacements)).toBe(true);});- test('vscode.js configures .mdc to .md extension mapping', () => {+ test('vscode.js configures .mdc to .instructions.md extension mapping', () => {// Check that the profile object has the correct file mapping behavior (vscode converts to .md)expect(vscodeProfile.fileMap['rules/cursor_rules.mdc']).toBe(- 'vscode_rules.md'+ 'vscode_rules.instructions.md');});diff --git a/tests/unit/profiles/rule-transformer-vscode.test.js b/tests/unit/profiles/rule-transformer-vscode.test.jsindex bcce79ad..ee48c61e 100644--- a/tests/unit/profiles/rule-transformer-vscode.test.js+++ b/tests/unit/profiles/rule-transformer-vscode.test.js@@ -76,6 +76,7 @@ Also has references to .mdc files and cursor rules.`;expect(transformedContent).not.toContain('cursor.so');expect(transformedContent).not.toContain('Cursor rule');expect(transformedContent).not.toContain('globs:');+ expect(transformedContent).not.toContain('alwaysApply:');});it('should correctly convert tool references', () => {@@ -132,7 +133,7 @@ Files are in the .cursor/rules directory and we should reference the rules direc// Call the actual functionconst result = convertRuleToProfileRule('source.mdc',- 'target.md',+ 'target.instructions.md',vscodeProfile);@@ -148,10 +149,10 @@ Files are in the .cursor/rules directory and we should reference the rules direc'applyTo: ".github/instructions/*.md"'); // globs -> applyTo with path transformationexpect(transformedContent).toContain(- '(.github/instructions/dev_workflow.md)'+ '(.github/instructions/dev_workflow.instructions.md)'); // File path transformation - no taskmaster subdirectory for VS Codeexpect(transformedContent).toContain(- '(.github/instructions/taskmaster.md)'+ '(.github/instructions/taskmaster.instructions.md)'); // File path transformation - no taskmaster subdirectory for VS Codeexpect(transformedContent).toContain('instructions directory'); // "rules directory" -> "instructions directory"expect(transformedContent).not.toContain('(mdc:.cursor/rules/');