-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(profiles): fix vscode profile generation #1027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(profiles): fix vscode profile generation #1027
Conversation
🦋 Changeset detectedLatest commit: 5685a1a The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
""" WalkthroughThe changes update the VSCode profile generation process to use the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant VSCodeProfile
participant RuleTransformer
User->>VSCodeProfile: Generate profile for rules
VSCodeProfile->>RuleTransformer: Transform rule file (.mdc)
RuleTransformer->>RuleTransformer: Remove 'alwaysApply' property
RuleTransformer->>RuleTransformer: Update file references to .instructions.md
RuleTransformer-->>VSCodeProfile: Return transformed rule (.instructions.md)
VSCodeProfile-->>User: Output profile with .instructions.md rules
Estimated code review effort2 (~15 minutes) 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings
package.json (17)Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR 🔇 Additional comments (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (5)
.changeset/swift-otters-argue.md
(1 hunks)src/profiles/base-profile.js
(1 hunks)src/profiles/vscode.js
(2 hunks)tests/integration/profiles/vscode-init-functionality.test.js
(1 hunks)tests/unit/profiles/rule-transformer-vscode.test.js
(3 hunks)
🧰 Additional context used
📓 Path-based instructions (10)
.changeset/*.md
📄 CodeRabbit Inference Engine (.cursor/rules/changeset.mdc)
.changeset/*.md
: When runningnpm run changeset
ornpx changeset add
, provide a concise summary of the changes for theCHANGELOG.md
in imperative mood, typically a single line, and not a detailed Git commit message.
The changeset summary should be user-facing, describing what changed in the released version that is relevant to users or consumers of the package.
Do not use your detailed Git commit message body as the changeset summary.
Files:
.changeset/swift-otters-argue.md
.changeset/*
📄 CodeRabbit Inference Engine (.cursor/rules/new_features.mdc)
Create appropriate changesets for new features, use semantic versioning, include tagged system information in release notes, and document breaking changes if any.
Files:
.changeset/swift-otters-argue.md
tests/{unit,integration,e2e,fixtures}/**/*.js
📄 CodeRabbit Inference Engine (.cursor/rules/architecture.mdc)
Test files must be organized as follows: unit tests in tests/unit/, integration tests in tests/integration/, end-to-end tests in tests/e2e/, and test fixtures in tests/fixtures/.
Files:
tests/integration/profiles/vscode-init-functionality.test.js
tests/unit/profiles/rule-transformer-vscode.test.js
**/*.{test,spec}.{js,ts,jsx,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/git_workflow.mdc)
**/*.{test,spec}.{js,ts,jsx,tsx}
: Create a test file and ensure all tests pass when all subtasks are complete; commit tests if added or modified
When all subtasks are complete, run final testing using the appropriate test runner (e.g., npm test, jest, or manual testing)
Files:
tests/integration/profiles/vscode-init-functionality.test.js
tests/unit/profiles/rule-transformer-vscode.test.js
**/*.test.js
📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
**/*.test.js
: Never use asynchronous operations in tests. Make all mocks return synchronous values when possible.
Always mock tests properly based on the way the tested functions are defined and used.
Follow the test file organization: mocks must be set up before importing modules under test, and spies on mocked modules should be set up after imports.
Use fixtures from tests/fixtures/ for consistent sample data across tests.
Always declare mocks before importing the modules being tested in Jest test files.
Use jest.spyOn() after imports to create spies on mock functions and reference these spies in test assertions.
When testing functions with callbacks, get the callback from your mock's call arguments, execute it directly with test inputs, and verify the results.
For ES modules, use jest.mock() before static imports and jest.unstable_mockModule() before dynamic imports to mock dependencies.
Reset mock functions (mockFn.mockReset()) before dynamic imports if they might have been called previously.
When verifying console assertions, assert against the actual arguments passed (single formatted string), not multiple arguments.
Use mock-fs to mock file system operations in tests, and restore the file system after each test.
Mock API calls (e.g., Anthropic/Claude) by mocking the entire module and providing predictable responses.
Set mock environment variables in test setup and restore them after each test.
Maintain test fixtures separate from test logic.
Follow the mock-first-then-import pattern for all Jest mocks.
Do not define mock variables before jest.mock() calls (they won't be accessible due to hoisting).
Use test-specific file paths (e.g., 'test-tasks.json') for all file operations in tests.
Mock readJSON and writeJSON to avoid real file system interactions in tests.
Verify file operations use the correct paths in expect statements.
Use different file paths for each test to avoid test interdependence.
Verify modifications on the in-memory task objects passed to w...
Files:
tests/integration/profiles/vscode-init-functionality.test.js
tests/unit/profiles/rule-transformer-vscode.test.js
tests/integration/**/*.test.js
📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
Integration tests must be located in tests/integration/, test interactions between modules, and focus on component interfaces rather than implementation details.
Files:
tests/integration/profiles/vscode-init-functionality.test.js
tests/{unit,integration,e2e}/**/*.test.js
📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
tests/{unit,integration,e2e}/**/*.test.js
: When testing CLI commands built with Commander.js, test the command action handlers directly rather than trying to mock the entire Commander.js chain.
When mocking the Commander.js chain, mock ALL chainable methods (option, argument, action, on, etc.) and return this (or the mock object) from all chainable method mocks.
Explicitly handle all options, including defaults and shorthand flags (e.g., -p for --prompt), and include null/undefined checks in test implementations for parameters that might be optional.
Do not try to use the real action implementation without proper mocking, and do not mock Commander partially—either mock it completely or test the action directly.
Mock the action handlers for CLI commands and verify they're called with correct arguments.
Use sample task fixtures for consistent test data, mock file system operations, and test both success and error paths for task operations.
Mock console output and verify correct formatting in UI function tests. Use flexible assertions like toContain() or toMatch() for formatted output.
Mock chalk functions to return the input text to make testing easier while still verifying correct function calls.
Files:
tests/integration/profiles/vscode-init-functionality.test.js
tests/unit/profiles/rule-transformer-vscode.test.js
tests/{integration,e2e}/**/*.test.js
📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
Properly mock session objects when required by functions, and reset environment variables between tests if modified.
Files:
tests/integration/profiles/vscode-init-functionality.test.js
**/*.js
📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
**/*.js
: Declare and initialize global variables at the top of modules to avoid hoisting issues.
Use proper function declarations to avoid hoisting issues and initialize variables before they are referenced.
Do not reference variables before their declaration in module scope.
Use dynamic imports (import()) to avoid initialization order issues in modules.
Files:
tests/integration/profiles/vscode-init-functionality.test.js
src/profiles/vscode.js
src/profiles/base-profile.js
tests/unit/profiles/rule-transformer-vscode.test.js
tests/unit/**/*.test.js
📄 CodeRabbit Inference Engine (.cursor/rules/tests.mdc)
tests/unit/**/*.test.js
: Unit tests must be located in tests/unit/, test individual functions and utilities in isolation, mock all external dependencies, and keep tests small, focused, and fast.
Do not include actual command execution in unit tests.
Files:
tests/unit/profiles/rule-transformer-vscode.test.js
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Every pull request containing new features, bug fixes, breaking changes, performance improvements, significant refactoring, user-facing documentation updates, dependency updates, or impactful build/tooling changes should include a changeset file.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.773Z
Learning: Pull Request descriptions must use the provided template, including Task Overview, Subtasks Completed, Implementation Details, Testing, Breaking Changes, and Related Tasks
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Applies to assets/**/.windsurfrules : Update Windsurf rules when new patterns emerge, add examples from the actual codebase, remove outdated patterns, and cross-reference related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:28.207Z
Learning: Applies to .cursor/rules/*.mdc : Maintain Cursor rule files by updating them when new patterns emerge, adding examples from the actual codebase, removing outdated patterns, and cross-referencing related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:23.831Z
Learning: Applies to .cursor/rules/*.mdc : Maintain Cursor rule files by updating them when new patterns emerge, adding examples from the actual codebase, removing outdated patterns, and cross-referencing related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Mark outdated patterns as deprecated, remove rules that no longer apply, update references to deprecated rules, and document migration paths for old patterns.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Keep examples synchronized with code, update references to external docs, maintain links between related rules, and document breaking changes.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/self_improve.mdc:0-0
Timestamp: 2025-07-18T17:13:11.216Z
Learning: Modify existing rules when implementation details have changed
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Modify existing rules when better examples exist, additional edge cases are discovered, related rules have been updated, or implementation details have changed.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.852Z
Learning: Applies to .*/rules/** : Each AI coding assistant rule profile (e.g., Claude Code, Cursor, Windsurf) creates its own directory (e.g., `.cursor/rules`, `.roo/rules`) with appropriate configuration files. Manage rule sets using the `task-master rules` commands.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Applies to .cursor/rules/** : Do not add a changeset for changes only to files within `.cursor/rules/` that solely guide internal development practices for this specific repository.
.changeset/swift-otters-argue.md (19)
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Applies to .cursor/rules/** : Do not add a changeset for changes only to files within .cursor/rules/
that solely guide internal development practices for this specific repository.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Applies to assets/**/.windsurfrules : Update Windsurf rules when new patterns emerge, add examples from the actual codebase, remove outdated patterns, and cross-reference related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:28.215Z
Learning: Applies to .cursor/rules/*.mdc : Maintain Cursor rule files by updating them when new patterns emerge, adding examples from the actual codebase, removing outdated patterns, and cross-referencing related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:23.831Z
Learning: Applies to .cursor/rules/*.mdc : Maintain Cursor rule files by updating them when new patterns emerge, adding examples from the actual codebase, removing outdated patterns, and cross-referencing related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Applies to .changeset/*.md : When running npm run changeset
or npx changeset add
, provide a concise summary of the changes for the CHANGELOG.md
in imperative mood, typically a single line, and not a detailed Git commit message.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Applies to .changeset/*.md : The changeset summary should be user-facing, describing what changed in the released version that is relevant to users or consumers of the package.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/self_improve.mdc:0-0
Timestamp: 2025-07-18T17:13:11.216Z
Learning: Modify existing rules when implementation details have changed
Learnt from: Crunchyman-ralph
PR: #992
File: .coderabbit.yaml:1-169
Timestamp: 2025-07-16T16:06:07.169Z
Learning: CodeRabbit configuration files like .coderabbit.yaml are internal development tooling that affect the review process but don't impact end users, so changesets are not required for these configuration additions.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.858Z
Learning: Applies to .cursor/rules/.mdc : Update relevant '.cursor/rules/.mdc' files and include tagged system considerations in architecture docs when adding new features.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Generate task files with task-master generate
after updating tasks.json.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.852Z
Learning: Applies to .*/rules/** : Each AI coding assistant rule profile (e.g., Claude Code, Cursor, Windsurf) creates its own directory (e.g., .cursor/rules
, .roo/rules
) with appropriate configuration files. Manage rule sets using the task-master rules
commands.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Use task-master fix-dependencies
to find and fix all invalid dependencies in tasks.json and task files.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.373Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Use task-master add-task
to add a new task to tasks.json using AI.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Do not modify real task files (tasks.json) during tests.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Applies to assets/.taskmaster/tasks/**/* : Task files should follow the specified format with fields: id, title, status, dependencies, priority, description, details, and testStrategy.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.852Z
Learning: Applies to tasks.json : Use the tasks.json
file (generated by Taskmaster) to store the project's task list, including tags and task structures.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:02.683Z
Learning: Applies to .taskmaster/config.json : Store Taskmaster configuration settings (AI model selections, parameters, logging level, default subtasks/priority, project name, tag management) in .taskmaster/config.json
in the project root. Do not configure these via environment variables.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Maintain valid dependency structure with task-master fix-dependencies
when needed.
tests/integration/profiles/vscode-init-functionality.test.js (14)
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Verify file operations use the correct paths in expect statements.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.858Z
Learning: Applies to scripts/modules/**/*.test.js : Test core logic independently with both data formats, mock file system operations, test tag resolution behavior, and verify migration compatibility in unit tests.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:28.215Z
Learning: Applies to .cursor/rules/*.mdc : Maintain Cursor rule files by updating them when new patterns emerge, adding examples from the actual codebase, removing outdated patterns, and cross-referencing related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:23.831Z
Learning: Applies to .cursor/rules/*.mdc : Maintain Cursor rule files by updating them when new patterns emerge, adding examples from the actual codebase, removing outdated patterns, and cross-referencing related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Verify modifications on the in-memory task objects passed to writeJSON.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Use test-specific file paths (e.g., 'test-tasks.json') for all file operations in tests.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Use different file paths for each test to avoid test interdependence.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.858Z
Learning: Applies to .cursor/rules/.mdc : Update relevant '.cursor/rules/.mdc' files and include tagged system considerations in architecture docs when adding new features.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Mock console output and verify correct formatting in UI function tests. Use flexible assertions like toContain() or toMatch() for formatted output.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-07-18T17:07:39.336Z
Learning: Applies to tests/{unit,integration,e2e,fixtures}/**/*.js : Test files must be organized as follows: unit tests in tests/unit/, integration tests in tests/integration/, end-to-end tests in tests/e2e/, and test fixtures in tests/fixtures/.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.858Z
Learning: Applies to scripts/modules/**/*.test.js : Every new feature must include comprehensive tests following the guidelines in 'tests.mdc', including unit tests, integration tests, edge cases, and at least 80% coverage.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Do not test exact error messages; test for error presence and general properties instead.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.773Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Create a test file if needed and ensure all tests pass before completing a task
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Use sample task fixtures for consistent test data, mock file system operations, and test both success and error paths for task operations.
src/profiles/vscode.js (13)
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:28.207Z
Learning: Applies to .cursor/rules/*.mdc : Maintain Cursor rule files by updating them when new patterns emerge, adding examples from the actual codebase, removing outdated patterns, and cross-referencing related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:23.831Z
Learning: Applies to .cursor/rules/*.mdc : Maintain Cursor rule files by updating them when new patterns emerge, adding examples from the actual codebase, removing outdated patterns, and cross-referencing related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.852Z
Learning: Applies to .*/rules/** : Each AI coding assistant rule profile (e.g., Claude Code, Cursor, Windsurf) creates its own directory (e.g., .cursor/rules
, .roo/rules
) with appropriate configuration files. Manage rule sets using the task-master rules
commands.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-12T06:21:41.224Z
Learning: Applies to .*/rules/** : Store rule set configuration files for each AI assistant profile in their respective .*/rules/
directories.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-07-18T17:07:53.100Z
Learning: Applies to .cursor/rules/** : Do not add a changeset for changes only to files within .cursor/rules/
that solely guide internal development practices for this specific repository.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-07-18T17:11:36.718Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : Use path.join() instead of string concatenation for file paths, and follow established file naming conventions (e.g., 'task_001.txt') in direct functions.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Mark outdated patterns as deprecated, remove rules that no longer apply, update references to deprecated rules, and document migration paths for old patterns.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.346Z
Learning: Applies to assets/**/.windsurfrules : Update Windsurf rules when new patterns emerge, add examples from the actual codebase, remove outdated patterns, and cross-reference related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:23.831Z
Learning: Applies to .cursor/rules/*.mdc : When referencing files in Cursor rule files, use the filename or filename markdown link format.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:23.831Z
Learning: Applies to .cursor/rules/*.mdc : Cursor rule files must follow the required structure: a YAML frontmatter block with description, globs, and alwaysApply fields, followed by main points in bold, sub-points, and examples/explanations in markdown.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:28.215Z
Learning: Applies to .cursor/rules/*.mdc : Cursor rule files must follow the required structure: a YAML frontmatter block with description, globs, and alwaysApply fields, followed by main points in bold, sub-points, and examples/explanations in markdown.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:28.215Z
Learning: Applies to .cursor/rules/*.mdc : When including code examples in Cursor rule files, use language-specific code blocks and clearly mark DO and DON'T examples.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.852Z
Learning: For code analysis and refactoring, use tools like ripgrep to search for exported functions/constants (e.g., rg "export (async function|function|const) \w+"
).
src/profiles/base-profile.js (1)
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.852Z
Learning: Applies to .*/rules/** : Each AI coding assistant rule profile (e.g., Claude Code, Cursor, Windsurf) creates its own directory (e.g., .cursor/rules
, .roo/rules
) with appropriate configuration files. Manage rule sets using the task-master rules
commands.
tests/unit/profiles/rule-transformer-vscode.test.js (15)
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Verify file operations use the correct paths in expect statements.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Verify modifications on the in-memory task objects passed to writeJSON.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.858Z
Learning: Applies to scripts/modules/**/*.test.js : Test core logic independently with both data formats, mock file system operations, test tag resolution behavior, and verify migration compatibility in unit tests.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Mock console output and verify correct formatting in UI function tests. Use flexible assertions like toContain() or toMatch() for formatted output.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Use sample task fixtures for consistent test data, mock file system operations, and test both success and error paths for task operations.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.773Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Create a test file if needed and ensure all tests pass before completing a task
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-07-18T17:07:39.336Z
Learning: Applies to tests/{unit,integration,e2e,fixtures}/**/*.js : Test files must be organized as follows: unit tests in tests/unit/, integration tests in tests/integration/, end-to-end tests in tests/e2e/, and test fixtures in tests/fixtures/.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Do not modify real task files (tasks.json) during tests.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : When verifying console assertions, assert against the actual arguments passed (single formatted string), not multiple arguments.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.779Z
Learning: Applies to **/*.test.js : Use test-specific file paths (e.g., 'test-tasks.json') for all file operations in tests.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:28.215Z
Learning: Applies to .cursor/rules/*.mdc : Cursor rules should start with a high-level overview, include specific actionable requirements, show examples of correct implementation, reference existing code when possible, and keep rules DRY by referencing other rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:23.831Z
Learning: Applies to .cursor/rules/*.mdc : Cursor rules should start with a high-level overview, include specific actionable requirements, show examples of correct implementation, reference existing code when possible, and keep rules DRY by referencing other rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:28.215Z
Learning: Applies to .cursor/rules/*.mdc : When including code examples in Cursor rule files, use language-specific code blocks and clearly mark DO and DON'T examples.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/cursor_rules.mdc:0-0
Timestamp: 2025-07-18T17:09:23.831Z
Learning: Applies to .cursor/rules/*.mdc : When including code examples in Cursor rule files, use language-specific code blocks and clearly mark DO and DON'T examples.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.858Z
Learning: Applies to scripts/modules/**/*.test.js : Test CLI and MCP interfaces with real task data, verify end-to-end workflows across tag contexts, and test error scenarios and recovery in integration tests.
🪛 LanguageTool
.changeset/swift-otters-argue.md
[grammar] ~5-~5: Use articles correctly
Context: ...neration to use correct rule file names (using .instructions.md
extension instead of...
(QB_NEW_EN_OTHER_ERROR_IDS_11)
[grammar] ~5-~5: Use hyphens correctly
Context: ...y` property from the instructions files front-matter).
(QB_NEW_EN_OTHER_ERROR_IDS_29)
🪛 markdownlint-cli2 (0.17.2)
.changeset/swift-otters-argue.md
5-5: First line in a file should be a top-level heading
(MD041, first-line-heading, first-line-h1)
🔇 Additional comments (8)
src/profiles/base-profile.js (1)
237-237
: LGTM! Clean addition of targetExtension property.This change properly exposes the
targetExtension
property in the profile configuration, supporting the new VSCode.instructions.md
extension requirement. The implementation follows the established pattern of the base profile factory.tests/integration/profiles/vscode-init-functionality.test.js (1)
38-42
: LGTM! Test correctly updated for new file extension.The test accurately reflects the change from
.md
to.instructions.md
extension mapping. Both the test description and assertion are properly updated to match the new VSCode profile behavior.src/profiles/vscode.js (3)
169-169
: LGTM! Correct target extension for VSCode instructions.Setting
targetExtension
to.instructions.md
properly configures the VSCode profile to generate files with the correct extension for GitHub Copilot instructions.
181-182
: LGTM! Proper removal of unsupported property.The regex replacement correctly removes the unsupported
alwaysApply
property from VSCode instruction files, addressing compatibility issues as mentioned in the PR objectives.
187-187
: LGTM! Consistent markdown link transformation.The markdown link transformation is updated to use
.instructions.md
extension, maintaining consistency with the new target extension setting.tests/unit/profiles/rule-transformer-vscode.test.js (3)
79-79
: LGTM! Good test coverage for alwaysApply removal.The assertion properly verifies that the
alwaysApply
property is removed from transformed content, ensuring the new replacement rule works correctly.
136-136
: LGTM! Target filename updated consistently.The target filename is correctly updated to use the
.instructions.md
extension, maintaining consistency with the VSCode profile changes.
152-155
: LGTM! Expected file references updated correctly.The expected transformed file references are properly updated to use the
.instructions.md
extension, ensuring test assertions match the actual transformation behavior.
- Add .instructions.md extension for VSCode Copilot instructions file. - Add customReplacement to remove unsupported property `alwaysApply` from YAML front-matter in VSCode instructions files. - Add missing property `targetExtension` to the base profile object to support the change to file extension.
074c341
to
aa00cc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, nice one dude!
* fix(profiles): fix vscode profile generation - Add .instructions.md extension for VSCode Copilot instructions file. - Add customReplacement to remove unsupported property `alwaysApply` from YAML front-matter in VSCode instructions files. - Add missing property `targetExtension` to the base profile object to support the change to file extension. * chore: run format --------- Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* fix(profiles): fix vscode profile generation - Add .instructions.md extension for VSCode Copilot instructions file. - Add customReplacement to remove unsupported property `alwaysApply` from YAML front-matter in VSCode instructions files. - Add missing property `targetExtension` to the base profile object to support the change to file extension. * chore: run format --------- Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Description
Fix VSCode profile generation:
.instructions.md
extension for VSCode Copilot instructions files, instead of just.md
.customReplacement
to remove the unsupported propertyalwaysApply
from YAML front-matter in VSCode instructions files.targetExtension
to the base profile object to support the change to file extensions.Type of Change
Testing
Changeset
Additional Notes
Fixes #993
Summary by CodeRabbit
Summary by CodeRabbit
Bug Fixes
.md
to.instructions.md
.alwaysApply
property from instructions files for improved compatibility.New Features
Tests
alwaysApply
property.