Skip to content

Feat/add-kilocode-rules#1040

Merged
Crunchyman-ralph merged 9 commits intoeyaltoledano:nextfrom
DomVidja:feat/add-kilocode-rules
Aug 12, 2025
Merged

Feat/add-kilocode-rules#1040
Crunchyman-ralph merged 9 commits intoeyaltoledano:nextfrom
DomVidja:feat/add-kilocode-rules

Conversation

@DomVidja
Copy link
Contributor

@DomVidja DomVidja commented Jul 24, 2025

Description

Add Kilo Code profile integration with custom modes and MCP configuration. This PR introduces support for Kilo Code AI assistant, including profile management, custom mode configurations, and proper asset handling for .kilocodemodes and mode-specific rules.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

  • I have tested this locally
  • All existing tests pass (1007/1007)
  • I have added tests for new functionality

Changeset

  • I have created a changeset (or this change doesn't need one)

Additional Notes

This integration adds:

Kilo Code profile with proper lifecycle management (add/remove/post-convert)
Support for custom modes through .kilocodemodes configuration
Asset copying for mode-specific rules in .kilo/rules-{mode}/ directories
Integration with the existing profile system using ROO_STYLE tool mappings
Proper cleanup when removing the profile
The implementation follows the established patterns in the codebase and maintains compatibility with existing functionality. All tests pass and code formatting has been applied.

Summary by CodeRabbit

  • New Features
    • Added integration for the Kilo Code profile, enabling support for custom modes and configuration settings.
    • Introduced a new Kilo Code conversion profile for transforming and managing rule files and directories.
  • Enhancements
    • Minor improvements and extensions related to task-master-ai and general functionality.
  • Bug Fixes
    • Improved error handling and logging during file operations for the new profile.
  • Configuration
    • Updated configuration to support the Kilo profile and adjusted task-master-ai server settings.
  • Tests
    • Added comprehensive unit tests for Kilo profile integration and rule transformation logic.

@changeset-bot
Copy link

changeset-bot bot commented Jul 24, 2025

🦋 Changeset detected

Latest commit: ea4eb0f

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 24, 2025

Walkthrough

This change introduces support for a new "Kilo" rules profile, including its integration, transformation logic, and lifecycle management. Configuration files are updated to recognize the Kilo profile and its MCP integration. New unit tests are added to verify the conversion logic and integration, while some minor configuration and formatting adjustments are made for consistency.

Changes

File(s) Change Summary
src/profiles/kilo.js Added new Kilo profile with transformation logic, lifecycle hooks, and export of related functions.
src/constants/profiles.js Added 'kilo' to the list of rule profiles and updated typedefs/documentation.
src/profiles/index.js Exported the new kiloProfile.
.mcp.json Modified "task-master-ai" server config: added "disabled": true and "alwaysAllow": [].
package.json Reformatted "workspaces" field to single-line array.
.changeset/curly-poets-move.md Added changeset documenting Kilo profile integration and related minor enhancements.
tests/unit/profiles/kilo-integration.test.js Added Jest test suite for Kilo profile integration and structure creation.
tests/unit/profiles/rule-transformer-kilo.test.js Added Jest tests for Kilo rule transformation logic and error handling.
tests/unit/profiles/rule-transformer.test.js Updated test to include Kilo profile in expected MCP configuration.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ProfileManager
    participant FileSystem

    User->>ProfileManager: Add Kilo Profile
    ProfileManager->>FileSystem: Copy roocode assets
    ProfileManager->>FileSystem: Transform and rename files/directories (Roo → Kilo)
    ProfileManager->>FileSystem: Write .kilocodemodes file
    ProfileManager->>FileSystem: Create .kilo/rules-<mode> directories and files
    ProfileManager-->>User: Profile added and transformed
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@DomVidja DomVidja marked this pull request as ready for review July 24, 2025 03:08
@Crunchyman-ralph Crunchyman-ralph changed the base branch from main to next July 24, 2025 10:55
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small changes, but would love to get this out, seems exciting. wondering if we can consolidate our rules between all the different IDEs

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we try to use our existing rules, or does kilo code need its own wording ? See how we do it with roo or cline

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidating rules would be great! There is a new IDE every other week these days... but because they all have slightly different quirks, that might not be completely trivial.

So I reviewed the roo implementation and essentially tried to replicate that exact implementation (same rules, same modes, same functions) but with the kilo / kilo code branding. I think it should be good to go now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DomVidja I don't see any new commits, feel free to commit and then remove the assets files related to kilo code when you've done that.

What I suggest is to re-use roo code rules, and just do a regex replace inside the profile file of kilo, as mentioned, look at how other profiles do it. @joedanz can input his expertise here

Comment on lines 69 to 76
export const KILO_MODES = [
'architect',
'ask',
'orchestrator',
'code',
'debug',
'test'
];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We technically could reuse the const ROO_MODES. I just wanted to be consistent and create the const KILO_MODES. It should be fine to remove this and use ROO_MODES variable

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we just do KILO_MODES = ROO_MODES ? if you wanna keep the KILO_MODES name ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually ended up removing the KILO_MODES constant and instead importing ROO_MODES directly

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure we're leveraging our existing functions, look at roo.js or cline.js

- Add comprehensive rule sets for all modes (architect, ask, code, debug, orchestrator, test)
- Update .kilocodemodes configuration with mode-specific settings
- Configure MCP integration for Kilo Code profile
- Establish consistent rule structure across all modes
@Crunchyman-ralph Crunchyman-ralph added this to the 0.23 milestone Jul 25, 2025
@joedanz
Copy link
Contributor

joedanz commented Jul 25, 2025

Thanks for the contribution @DomVidja ! We've actually got a profile system setup where you should essentially be able to do this just by adding a new kilocode.js under /src/profiles and making sure its references under /src/profiles.

Is this essentially identical to Roo profile with with "Kilo" instead?

Remove duplicate Kilo-specific rule files and assets in favor of reusing roo rules with dynamic replacements, eliminating 900+ lines of duplicated code while maintaining full Kilo functionality.

The profile now:
- Reuses ROO_MODES constant instead of maintaining separate KILO_MODES
- Applies text replacements to convert roo references to kilo
- Maps roo rule files to kilo equivalents via fileMap
- Removes all duplicate rule files from assets/kilocode directory
@DomVidja
Copy link
Contributor Author

Thanks for the contribution @DomVidja ! We've actually got a profile system setup where you should essentially be able to do this just by adding a new kilocode.js under /src/profiles and making sure its references under /src/profiles.

Is this essentially identical to Roo profile with with "Kilo" instead?

Hi @joedanz - it's my pleasure. I love TaskMaster and I'm happy to contribute.

You are absolutely correct. This should be essentially identical to Roo profile but with Kilo branding instead, given that Kilo is originally a fork of Roo. I've made some changes to the code following @Crunchyman-ralph advice and tried to leverage the existing Roo functions for less duplication. I committed now, so it should be ready for a review.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/profiles/kilo.js (1)

33-49: Consider reusing existing file copying utilities.

The copyRecursiveSync function might duplicate existing functionality from other profiles.

#!/bin/bash
# Description: Check if similar file copying utilities exist in other profile files

# Search for recursive copy functions in profile files
echo "=== Searching for existing copy functions in profiles ==="
rg -A 5 "function.*copy.*recursive|copyRecursive|recursiveCopy" src/profiles/

# Check specific profiles mentioned in the review comment
echo -e "\n=== Checking roo.js for utility functions ==="
rg -A 10 "function|const.*=" src/profiles/roo.js

echo -e "\n=== Checking cline.js for utility functions ==="
rg -A 10 "function|const.*=" src/profiles/cline.js

# Look for shared utilities
echo -e "\n=== Checking for shared utilities ==="
fd -e js . src/utils/ --exec rg -l "copy.*recursive|copyRecursive"
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 31b8407 and f9adb06.

📒 Files selected for processing (9)
  • .changeset/curly-poets-move.md (1 hunks)
  • .mcp.json (1 hunks)
  • package.json (1 hunks)
  • src/constants/profiles.js (3 hunks)
  • src/profiles/index.js (1 hunks)
  • src/profiles/kilo.js (1 hunks)
  • tests/unit/profiles/kilo-integration.test.js (1 hunks)
  • tests/unit/profiles/rule-transformer-kilo.test.js (1 hunks)
  • tests/unit/profiles/rule-transformer.test.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
.changeset/*.md

📄 CodeRabbit Inference Engine (.cursor/rules/changeset.mdc)

.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.
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/curly-poets-move.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/curly-poets-move.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/unit/profiles/rule-transformer.test.js
  • tests/unit/profiles/rule-transformer-kilo.test.js
  • tests/unit/profiles/kilo-integration.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/unit/profiles/rule-transformer.test.js
  • tests/unit/profiles/rule-transformer-kilo.test.js
  • tests/unit/profiles/kilo-integration.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/unit/profiles/rule-transformer.test.js
  • tests/unit/profiles/rule-transformer-kilo.test.js
  • tests/unit/profiles/kilo-integration.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.test.js
  • tests/unit/profiles/rule-transformer-kilo.test.js
  • tests/unit/profiles/kilo-integration.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/unit/profiles/rule-transformer.test.js
  • tests/unit/profiles/rule-transformer-kilo.test.js
  • tests/unit/profiles/kilo-integration.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/unit/profiles/rule-transformer.test.js
  • src/profiles/index.js
  • src/constants/profiles.js
  • tests/unit/profiles/rule-transformer-kilo.test.js
  • tests/unit/profiles/kilo-integration.test.js
  • src/profiles/kilo.js
🪛 LanguageTool
.changeset/curly-poets-move.md

[grammar] ~6-~6: There might be a mistake here.
Context: ...e integration with custom modes and MCP configuration"

(QB_NEW_EN_OTHER)

🪛 markdownlint-cli2 (0.17.2)
.changeset/curly-poets-move.md

6-6: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🔇 Additional comments (17)
package.json (1)

12-12: LGTM! Formatting improvement for consistency.

The conversion to single-line format for the workspaces array improves readability while maintaining the same functionality.

.mcp.json (1)

6-8: LGTM! MCP server configuration updated for Kilo profile integration.

The changes appropriately disable the task-master-ai server by default and introduce the alwaysAllow permissions array, which aligns with the new Kilo profile integration.

src/profiles/index.js (1)

8-8: Approve export; Kilo profile has unique implementation

The export { kiloProfile } from './kilo.js' line in src/profiles/index.js is correctly added and alphabetically placed. A direct comparison of src/profiles/kilo.js and src/profiles/roo.js confirms that the Kilo profile includes distinct transformation logic (the applyKiloTransformations utility), a fileMap, and customReplacements not present in the Roo profile, so it isn’t simply a renamed duplicate.

tests/unit/profiles/rule-transformer.test.js (1)

231-235: Tests for the new “kilo” profile are correct.

The added snippet in tests/unit/profiles/rule-transformer.test.js (lines 231–235) matches the existing pattern used for the “roo” profile and correctly asserts that mcpConfigName: 'mcp.json' lives under '.kilo/mcp.json'.

• Kilo configuration in tests:

kilo: {
  mcpConfig: true,
  mcpConfigName: 'mcp.json',
  expectedPath: '.kilo/mcp.json'
},

• Roo configuration in tests:

roo: {
  mcpConfig: true,
  mcpConfigName: 'mcp.json',
  expectedPath: '.roo/mcp.json'
},

Given that this mirrors the Roo profile and aligns with the constants in src/constants/profiles.js, there are no test failures or inconsistencies to address here.

src/constants/profiles.js (1)

2-2: LGTM! Profile integration follows established patterns.

The addition of 'kilo' to the RulesProfile typedef, documentation, and RULE_PROFILES array correctly follows the documented process for adding new rule profiles.

Also applies to: 21-21, 42-42

tests/unit/profiles/rule-transformer-kilo.test.js (6)

1-37: Test setup follows best practices.

The mock-first-then-import pattern is correctly implemented, and the test setup with spies and mock cleanup is appropriate.


39-76: Basic terms conversion test is comprehensive.

The test properly validates both the presence of expected Kilo terms and the absence of Cursor-related terms after transformation.


78-112: Tool references test validates expected mappings.

The test correctly verifies the transformation of generic tool names to Kilo-specific equivalents.


114-145: File path transformation test is well-documented.

The test correctly validates the transformation of file paths, and the comments clearly explain the expected behavior regarding the taskmaster subdirectory.


147-195: Error handling tests are thorough.

Both read and write error scenarios are properly tested, verifying graceful failure and appropriate error logging.


197-216: Directory creation test validates recursive behavior.

The test properly verifies that missing directories are created with the recursive option.

tests/unit/profiles/kilo-integration.test.js (4)

53-90: Helper function properly simulates Kilo structure creation.

The mockCreateKiloStructure function comprehensively creates all expected directories and files for the Kilo profile.


92-161: Directory and file creation tests are comprehensive.

The tests thoroughly verify the creation of all required directories and mode-specific rule files.


163-191: Configuration and additional directory tests are correct.

The tests properly validate the creation of the .kilocodemodes file and additional required directories.


44-51: Avoid using mocked console.error in cleanup.

The console.error call in the cleanup section uses the mocked console, which might not work as expected during teardown.

 afterEach(() => {
   // Clean up the temporary directory
   try {
     fs.rmSync(tempDir, { recursive: true, force: true });
   } catch (err) {
-    console.error(`Error cleaning up: ${err.message}`);
+    // Silently ignore cleanup errors or use a different logging approach
   }
 });

Likely an incorrect or invalid review comment.

src/profiles/kilo.js (2)

52-110: Lifecycle implementation handles transformations correctly.

The onAddRulesProfile function properly transforms Roo assets to Kilo, including file content transformations and directory renaming. The error handling is appropriate.


112-145: Cleanup logic is thorough and handles edge cases.

The onRemoveRulesProfile function properly removes all Kilo-specific files and directories, with appropriate error handling.

Comment on lines +1 to +6
---
"extension": minor
"task-master-ai": minor
---

"Add Kilo Code profile integration with custom modes and MCP configuration"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Changeset follows proper format with minor formatting considerations.

The changeset correctly documents the integration using proper YAML frontmatter and an appropriate summary in imperative mood. The static analysis hints about markdown formatting are typical for changeset files and don't affect functionality.

If you want to address the markdown formatting suggestions, you could add a top-level heading:

---
"extension": minor
"task-master-ai": minor
---

+# Add Kilo Code profile integration
+
-"Add Kilo Code profile integration with custom modes and MCP configuration"
+Add Kilo Code profile integration with custom modes and MCP configuration

However, this is purely cosmetic and not required for changeset functionality.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
---
"extension": minor
"task-master-ai": minor
---
"Add Kilo Code profile integration with custom modes and MCP configuration"
---
"extension": minor
"task-master-ai": minor
---
# Add Kilo Code profile integration
Add Kilo Code profile integration with custom modes and MCP configuration
🧰 Tools
🪛 LanguageTool

[grammar] ~6-~6: There might be a mistake here.
Context: ...e integration with custom modes and MCP configuration"

(QB_NEW_EN_OTHER)

🪛 markdownlint-cli2 (0.17.2)

6-6: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🤖 Prompt for AI Agents
In the .changeset/curly-poets-move.md file from lines 1 to 6, the changeset is
correctly formatted and functional, but there are minor markdown formatting
suggestions such as adding a top-level heading for improved readability. This is
optional and purely cosmetic, so no changes are required unless you want to
enhance markdown presentation.

Comment on lines 152 to 185
export const kiloProfile = createProfile({
name: 'kilo',
displayName: 'Kilo Code',
url: 'kilocode.com',
docsUrl: 'docs.kilocode.com',
profileDir: '.kilo',
rulesDir: '.kilo/rules',
toolMappings: COMMON_TOOL_MAPPINGS.ROO_STYLE,
customReplacements: [
// Replace roo-specific terms with kilo equivalents
{ from: /\broo\b/gi, to: (match) => match.charAt(0) === 'R' ? 'Kilo' : 'kilo' },
{ from: /Roo/g, to: 'Kilo' },
{ from: /ROO/g, to: 'KILO' },
{ from: /roocode\.com/gi, to: 'kilocode.com' },
{ from: /docs\.roocode\.com/gi, to: 'docs.kilocode.com' },
{ from: /https?:\/\/roocode\.com/gi, to: 'https://kilocode.com' },
{ from: /https?:\/\/docs\.roocode\.com/gi, to: 'https://docs.kilocode.com' },
{ from: /\.roo\//g, to: '.kilo/' },
{ from: /\.roomodes/g, to: '.kilocodemodes' },
// Handle file extensions and directory references
{ from: /roo-rules/g, to: 'kilo-rules' },
{ from: /rules-roo/g, to: 'rules-kilo' }
],
fileMap: {
// Map roo rule files to kilo equivalents
'rules/cursor_rules.mdc': 'kilo_rules.md',
'rules/dev_workflow.mdc': 'dev_workflow.md',
'rules/self_improve.mdc': 'self_improve.md',
'rules/taskmaster.mdc': 'taskmaster.md'
},
onAdd: onAddRulesProfile,
onRemove: onRemoveRulesProfile,
onPostConvert: onPostConvertRulesProfile
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Remove duplicated customReplacements array.

The customReplacements array is duplicated - it's already defined in the applyKiloTransformations function.

+// Define replacements once at module level
+const KILO_REPLACEMENTS = [
+  // Replace roo-specific terms with kilo equivalents
+  { from: /\broo\b/gi, to: (match) => match.charAt(0) === 'R' ? 'Kilo' : 'kilo' },
+  { from: /Roo/g, to: 'Kilo' },
+  { from: /ROO/g, to: 'KILO' },
+  { from: /roocode\.com/gi, to: 'kilocode.com' },
+  { from: /docs\.roocode\.com/gi, to: 'docs.kilocode.com' },
+  { from: /https?:\/\/roocode\.com/gi, to: 'https://kilocode.com' },
+  { from: /https?:\/\/docs\.roocode\.com/gi, to: 'https://docs.kilocode.com' },
+  { from: /\.roo\//g, to: '.kilo/' },
+  { from: /\.roomodes/g, to: '.kilocodemodes' },
+  // Handle file extensions and directory references
+  { from: /roo-rules/g, to: 'kilo-rules' },
+  { from: /rules-roo/g, to: 'rules-kilo' }
+];

 // Utility function to apply kilo transformations to content
 function applyKiloTransformations(content) {
-  const customReplacements = [
-    // Replace roo-specific terms with kilo equivalents
-    { from: /\broo\b/gi, to: (match) => match.charAt(0) === 'R' ? 'Kilo' : 'kilo' },
-    { from: /Roo/g, to: 'Kilo' },
-    { from: /ROO/g, to: 'KILO' },
-    { from: /roocode\.com/gi, to: 'kilocode.com' },
-    { from: /docs\.roocode\.com/gi, to: 'docs.kilocode.com' },
-    { from: /https?:\/\/roocode\.com/gi, to: 'https://kilocode.com' },
-    { from: /https?:\/\/docs\.roocode\.com/gi, to: 'https://docs.kilocode.com' },
-    { from: /\.roo\//g, to: '.kilo/' },
-    { from: /\.roomodes/g, to: '.kilocodemodes' },
-    // Handle file extensions and directory references
-    { from: /roo-rules/g, to: 'kilo-rules' },
-    { from: /rules-roo/g, to: 'rules-kilo' }
-  ];
-
   let transformedContent = content;
-  for (const replacement of customReplacements) {
+  for (const replacement of KILO_REPLACEMENTS) {
     transformedContent = transformedContent.replace(replacement.from, replacement.to);
   }
   return transformedContent;
 }

 // ... rest of the file ...

 export const kiloProfile = createProfile({
   name: 'kilo',
   displayName: 'Kilo Code',
   url: 'kilocode.com',
   docsUrl: 'docs.kilocode.com',
   profileDir: '.kilo',
   rulesDir: '.kilo/rules',
   toolMappings: COMMON_TOOL_MAPPINGS.ROO_STYLE,
-  customReplacements: [
-    // Replace roo-specific terms with kilo equivalents
-    { from: /\broo\b/gi, to: (match) => match.charAt(0) === 'R' ? 'Kilo' : 'kilo' },
-    { from: /Roo/g, to: 'Kilo' },
-    { from: /ROO/g, to: 'KILO' },
-    { from: /roocode\.com/gi, to: 'kilocode.com' },
-    { from: /docs\.roocode\.com/gi, to: 'docs.kilocode.com' },
-    { from: /https?:\/\/roocode\.com/gi, to: 'https://kilocode.com' },
-    { from: /https?:\/\/docs\.roocode\.com/gi, to: 'https://docs.kilocode.com' },
-    { from: /\.roo\//g, to: '.kilo/' },
-    { from: /\.roomodes/g, to: '.kilocodemodes' },
-    // Handle file extensions and directory references
-    { from: /roo-rules/g, to: 'kilo-rules' },
-    { from: /rules-roo/g, to: 'rules-kilo' }
-  ],
+  customReplacements: KILO_REPLACEMENTS,
   fileMap: {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const kiloProfile = createProfile({
name: 'kilo',
displayName: 'Kilo Code',
url: 'kilocode.com',
docsUrl: 'docs.kilocode.com',
profileDir: '.kilo',
rulesDir: '.kilo/rules',
toolMappings: COMMON_TOOL_MAPPINGS.ROO_STYLE,
customReplacements: [
// Replace roo-specific terms with kilo equivalents
{ from: /\broo\b/gi, to: (match) => match.charAt(0) === 'R' ? 'Kilo' : 'kilo' },
{ from: /Roo/g, to: 'Kilo' },
{ from: /ROO/g, to: 'KILO' },
{ from: /roocode\.com/gi, to: 'kilocode.com' },
{ from: /docs\.roocode\.com/gi, to: 'docs.kilocode.com' },
{ from: /https?:\/\/roocode\.com/gi, to: 'https://kilocode.com' },
{ from: /https?:\/\/docs\.roocode\.com/gi, to: 'https://docs.kilocode.com' },
{ from: /\.roo\//g, to: '.kilo/' },
{ from: /\.roomodes/g, to: '.kilocodemodes' },
// Handle file extensions and directory references
{ from: /roo-rules/g, to: 'kilo-rules' },
{ from: /rules-roo/g, to: 'rules-kilo' }
],
fileMap: {
// Map roo rule files to kilo equivalents
'rules/cursor_rules.mdc': 'kilo_rules.md',
'rules/dev_workflow.mdc': 'dev_workflow.md',
'rules/self_improve.mdc': 'self_improve.md',
'rules/taskmaster.mdc': 'taskmaster.md'
},
onAdd: onAddRulesProfile,
onRemove: onRemoveRulesProfile,
onPostConvert: onPostConvertRulesProfile
});
// Define replacements once at module level
const KILO_REPLACEMENTS = [
// Replace roo-specific terms with kilo equivalents
{ from: /\broo\b/gi, to: (match) => match.charAt(0) === 'R' ? 'Kilo' : 'kilo' },
{ from: /Roo/g, to: 'Kilo' },
{ from: /ROO/g, to: 'KILO' },
{ from: /roocode\.com/gi, to: 'kilocode.com' },
{ from: /docs\.roocode\.com/gi, to: 'docs.kilocode.com' },
{ from: /https?:\/\/roocode\.com/gi, to: 'https://kilocode.com' },
{ from: /https?:\/\/docs\.roocode\.com/gi, to: 'https://docs.kilocode.com' },
{ from: /\.roo\//g, to: '.kilo/' },
{ from: /\.roomodes/g, to: '.kilocodemodes' },
// Handle file extensions and directory references
{ from: /roo-rules/g, to: 'kilo-rules' },
{ from: /rules-roo/g, to: 'rules-kilo' }
];
// Utility function to apply kilo transformations to content
function applyKiloTransformations(content) {
let transformedContent = content;
for (const replacement of KILO_REPLACEMENTS) {
transformedContent = transformedContent.replace(replacement.from, replacement.to);
}
return transformedContent;
}
export const kiloProfile = createProfile({
name: 'kilo',
displayName: 'Kilo Code',
url: 'kilocode.com',
docsUrl: 'docs.kilocode.com',
profileDir: '.kilo',
rulesDir: '.kilo/rules',
toolMappings: COMMON_TOOL_MAPPINGS.ROO_STYLE,
customReplacements: KILO_REPLACEMENTS,
fileMap: {
'rules/cursor_rules.mdc': 'kilo_rules.md',
'rules/dev_workflow.mdc': 'dev_workflow.md',
'rules/self_improve.mdc': 'self_improve.md',
'rules/taskmaster.mdc': 'taskmaster.md'
},
onAdd: onAddRulesProfile,
onRemove: onRemoveRulesProfile,
onPostConvert: onPostConvertRulesProfile
});
🤖 Prompt for AI Agents
In src/profiles/kilo.js between lines 152 and 185, the customReplacements array
is duplicated because it is also defined in the applyKiloTransformations
function. To fix this, remove the customReplacements array from the kiloProfile
object and rely on the existing definition in applyKiloTransformations to avoid
redundancy.

…e duplicate customReplacements array based on CodeRabbit's suggestion
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

♻️ Duplicate comments (1)
src/profiles/kilo.js (1)

8-40: Consider extracting replacements as a module-level constant.

The function logic is correct and handles all the necessary Roo-to-Kilo transformations. Consider moving the customReplacements array to module level as a constant for better maintainability and potential reuse:

+// Define replacements at module level
+const KILO_REPLACEMENTS = [
+  // Replace roo-specific terms with kilo equivalents
+  {
+    from: /\broo\b/gi,
+    to: (match) => (match.charAt(0) === 'R' ? 'Kilo' : 'kilo')
+  },
+  { from: /Roo/g, to: 'Kilo' },
+  { from: /ROO/g, to: 'KILO' },
+  // ... rest of replacements
+];

 function applyKiloTransformations(content) {
-  const customReplacements = [
-    // Replace roo-specific terms with kilo equivalents
-    // ... array contents
-  ];
-
   let transformedContent = content;
-  for (const replacement of customReplacements) {
+  for (const replacement of KILO_REPLACEMENTS) {
     transformedContent = transformedContent.replace(
       replacement.from,
       replacement.to
     );
   }
   return transformedContent;
 }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f9adb06 and f9865c2.

📒 Files selected for processing (1)
  • src/profiles/kilo.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.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:

  • src/profiles/kilo.js
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Monitor code review comments, track common development questions, update rules after major refactors, add links to relevant documentation, and cross-reference related rules.
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/self_improve.mdc:0-0
Timestamp: 2025-07-18T17:13:11.229Z
Learning: Monitor code review comments for continuous improvement
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/self_improve.mdc:0-0
Timestamp: 2025-07-18T17:13:11.229Z
Learning: Add new rules when code reviews repeatedly mention the same feedback
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/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
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/self_improve.mdc:0-0
Timestamp: 2025-07-18T17:13:11.229Z
Learning: Modify existing rules when implementation details have changed
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/self_improve.mdc:0-0
Timestamp: 2025-07-18T17:13:11.229Z
Learning: Update rules after major refactors
src/profiles/kilo.js (16)

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
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.365Z
Learning: Add new rules when a new technology or pattern is used in 3+ files, common bugs could be prevented, code reviews repeatedly mention the same feedback, or new security/performance patterns emerge.

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
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: assets/.windsurfrules:0-0
Timestamp: 2025-07-18T17:19:27.365Z
Learning: Monitor code review comments, track common development questions, update rules after major refactors, add links to relevant documentation, and cross-reference related rules.

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Ensure new features work with existing projects seamlessly, supporting both legacy and tagged task data formats, and support silent migration during feature usage.

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/self_improve.mdc:0-0
Timestamp: 2025-07-18T17:13:11.229Z
Learning: Update rules after major refactors

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : When implementing core logic for new features, do so in 'scripts/modules/' before CLI or MCP interfaces, and design functions to work with both legacy and tagged data formats using tag resolution functions.

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Export all core functions, helper functions, and utility methods needed by your new function or command from their respective modules. Explicitly review the module's export block to ensure every required dependency is included.

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-07-18T17:11:36.732Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : Check that all helper functions your direct function needs are properly exported from their source modules and import these dependencies explicitly at the top of your file in direct functions.

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-07-18T17:16:32.622Z
Learning: Applies to scripts/modules/ui.js : Import data processing functions from other modules rather than implementing them within UI functions

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
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+").

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-07-18T17:11:36.732Z
Learning: Applies to mcp-server/src/{tools,core/direct-functions}/*.js : Use kebab-case for all file names in mcp-server/src/tools/ and mcp-server/src/core/direct-functions/.

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/self_improve.mdc:0-0
Timestamp: 2025-07-18T17:13:11.229Z
Learning: Modify existing rules when better examples exist in the codebase

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to {scripts/modules/utils.js,mcp-server/src/core/utils/path-utils.js,mcp-server/src/tools/utils.js} : Keep utilities relevant to their location, export all utility functions in a single statement per file, group related exports together, export configuration constants, do not use default exports, and do not create circular dependencies.

Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-07-18T17:11:36.732Z
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: .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.

🔇 Additional comments (5)
src/profiles/kilo.js (5)

1-6: LGTM: Clean import structure.

The imports are properly organized at the top of the module and follow established patterns from the codebase.


60-122: LGTM: Well-structured lifecycle function with proper error handling.

The function correctly implements the add profile logic with:

  • Proper error handling using try-catch blocks
  • Comprehensive logging for debugging
  • Appropriate cleanup of original files after transformation
  • Cross-platform path handling using path.join

The sequential approach (copy → transform → cleanup) is logical and follows established patterns.


124-157: LGTM: Comprehensive cleanup logic with defensive programming.

The removal function properly handles:

  • Safe removal of profile-specific files and directories
  • Selective removal of only rules-* directories to preserve other content
  • Empty directory cleanup with proper checks
  • Robust error handling for each operation

The defensive approach ensures partial failures don't leave the system in an inconsistent state.


159-161: LGTM: Appropriate post-conversion delegation.

The function correctly delegates to onAddRulesProfile to re-apply transformations after rule conversion, which aligns with the expected lifecycle behavior.


163-186: LGTM: Clean profile configuration following established patterns.

The profile creation correctly:

  • Reuses ROO_STYLE tool mappings, appropriate for a Roo fork
  • Defines proper Kilo-specific branding and directory structure
  • Maps rule files appropriately for the transformation system
  • Assigns lifecycle functions for complete profile management

The export structure provides both the complete profile and individual functions for flexibility.

Comment on lines +42 to +58
// Utility function to copy files recursively
function copyRecursiveSync(src, dest) {
const exists = fs.existsSync(src);
const stats = exists && fs.statSync(src);
const isDirectory = exists && stats.isDirectory();
if (isDirectory) {
if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
fs.readdirSync(src).forEach((childItemName) => {
copyRecursiveSync(
path.join(src, childItemName),
path.join(dest, childItemName)
);
});
} else {
fs.copyFileSync(src, dest);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consider using fs.cpSync or adding error handling.

The recursive copy logic is correct, but consider these improvements:

  1. Use modern Node.js API: fs.cpSync(src, dest, { recursive: true }) provides better performance and built-in error handling.

  2. Add error handling if keeping the current implementation:

 function copyRecursiveSync(src, dest) {
+  try {
     const exists = fs.existsSync(src);
     const stats = exists && fs.statSync(src);
     const isDirectory = exists && stats.isDirectory();
     if (isDirectory) {
       if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
       fs.readdirSync(src).forEach((childItemName) => {
         copyRecursiveSync(
           path.join(src, childItemName),
           path.join(dest, childItemName)
         );
       });
     } else {
       fs.copyFileSync(src, dest);
     }
+  } catch (err) {
+    log('error', `[Kilo] Failed to copy ${src} to ${dest}: ${err.message}`);
+    throw err;
+  }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Utility function to copy files recursively
function copyRecursiveSync(src, dest) {
const exists = fs.existsSync(src);
const stats = exists && fs.statSync(src);
const isDirectory = exists && stats.isDirectory();
if (isDirectory) {
if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
fs.readdirSync(src).forEach((childItemName) => {
copyRecursiveSync(
path.join(src, childItemName),
path.join(dest, childItemName)
);
});
} else {
fs.copyFileSync(src, dest);
}
}
// Utility function to copy files recursively
function copyRecursiveSync(src, dest) {
try {
const exists = fs.existsSync(src);
const stats = exists && fs.statSync(src);
const isDirectory = exists && stats.isDirectory();
if (isDirectory) {
if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
fs.readdirSync(src).forEach((childItemName) => {
copyRecursiveSync(
path.join(src, childItemName),
path.join(dest, childItemName)
);
});
} else {
fs.copyFileSync(src, dest);
}
} catch (err) {
log('error', `[Kilo] Failed to copy ${src} to ${dest}: ${err.message}`);
throw err;
}
}
🤖 Prompt for AI Agents
In src/profiles/kilo.js around lines 42 to 58, the current recursive copy
function can be improved by replacing the manual recursion with the modern
Node.js API fs.cpSync using the option { recursive: true } for better
performance and built-in error handling. Alternatively, if you keep the existing
implementation, wrap the file system operations in try-catch blocks to handle
and log errors gracefully.

Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just removing the .mcp.json stuff

@Crunchyman-ralph Crunchyman-ralph merged commit fc47714 into eyaltoledano:next Aug 12, 2025
4 checks passed
stephanschielke pushed a commit to stephanschielke/cursor-task-master that referenced this pull request Aug 22, 2025
* feat: Add Kilo Code integration to TaskMaster

* feat: Add Kilo profile configuration to rule transformer tests

* refactor: Improve code formatting and consistency in Kilo profile and tests

* fix: Correct formatting of workspaces in package.json

* chore: add changeset for Kilo Code integration

* feat: add Kilo Code rules and mode configurations

- Add comprehensive rule sets for all modes (architect, ask, code, debug, orchestrator, test)
- Update .kilocodemodes configuration with mode-specific settings
- Configure MCP integration for Kilo Code profile
- Establish consistent rule structure across all modes

* refactor(kilo): simplify profile to reuse roo rules with replacements

Remove duplicate Kilo-specific rule files and assets in favor of reusing roo rules with dynamic replacements, eliminating 900+ lines of duplicated code while maintaining full Kilo functionality.

The profile now:
- Reuses ROO_MODES constant instead of maintaining separate KILO_MODES
- Applies text replacements to convert roo references to kilo
- Maps roo rule files to kilo equivalents via fileMap
- Removes all duplicate rule files from assets/kilocode directory

* refactor(kilo): restructure object literals for consistency and remove duplicate customReplacements array based on CodeRabbit's suggestion

* chore: remove disabled .mcp.json by mistake

---------

Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
stephanschielke pushed a commit to stephanschielke/cursor-task-master that referenced this pull request Aug 22, 2025
* feat: Add Kilo Code integration to TaskMaster

* feat: Add Kilo profile configuration to rule transformer tests

* refactor: Improve code formatting and consistency in Kilo profile and tests

* fix: Correct formatting of workspaces in package.json

* chore: add changeset for Kilo Code integration

* feat: add Kilo Code rules and mode configurations

- Add comprehensive rule sets for all modes (architect, ask, code, debug, orchestrator, test)
- Update .kilocodemodes configuration with mode-specific settings
- Configure MCP integration for Kilo Code profile
- Establish consistent rule structure across all modes

* refactor(kilo): simplify profile to reuse roo rules with replacements

Remove duplicate Kilo-specific rule files and assets in favor of reusing roo rules with dynamic replacements, eliminating 900+ lines of duplicated code while maintaining full Kilo functionality.

The profile now:
- Reuses ROO_MODES constant instead of maintaining separate KILO_MODES
- Applies text replacements to convert roo references to kilo
- Maps roo rule files to kilo equivalents via fileMap
- Removes all duplicate rule files from assets/kilocode directory

* refactor(kilo): restructure object literals for consistency and remove duplicate customReplacements array based on CodeRabbit's suggestion

* chore: remove disabled .mcp.json by mistake

---------

Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
davidgilady pushed a commit to davidgilady/claude-task-master that referenced this pull request Sep 23, 2025
* feat: Add Kilo Code integration to TaskMaster

* feat: Add Kilo profile configuration to rule transformer tests

* refactor: Improve code formatting and consistency in Kilo profile and tests

* fix: Correct formatting of workspaces in package.json

* chore: add changeset for Kilo Code integration

* feat: add Kilo Code rules and mode configurations

- Add comprehensive rule sets for all modes (architect, ask, code, debug, orchestrator, test)
- Update .kilocodemodes configuration with mode-specific settings
- Configure MCP integration for Kilo Code profile
- Establish consistent rule structure across all modes

* refactor(kilo): simplify profile to reuse roo rules with replacements

Remove duplicate Kilo-specific rule files and assets in favor of reusing roo rules with dynamic replacements, eliminating 900+ lines of duplicated code while maintaining full Kilo functionality.

The profile now:
- Reuses ROO_MODES constant instead of maintaining separate KILO_MODES
- Applies text replacements to convert roo references to kilo
- Maps roo rule files to kilo equivalents via fileMap
- Removes all duplicate rule files from assets/kilocode directory

* refactor(kilo): restructure object literals for consistency and remove duplicate customReplacements array based on CodeRabbit's suggestion

* chore: remove disabled .mcp.json by mistake

---------

Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
sfc-gh-dflippo pushed a commit to sfc-gh-dflippo/task-master-ai that referenced this pull request Dec 4, 2025
* feat: Add Kilo Code integration to TaskMaster

* feat: Add Kilo profile configuration to rule transformer tests

* refactor: Improve code formatting and consistency in Kilo profile and tests

* fix: Correct formatting of workspaces in package.json

* chore: add changeset for Kilo Code integration

* feat: add Kilo Code rules and mode configurations

- Add comprehensive rule sets for all modes (architect, ask, code, debug, orchestrator, test)
- Update .kilocodemodes configuration with mode-specific settings
- Configure MCP integration for Kilo Code profile
- Establish consistent rule structure across all modes

* refactor(kilo): simplify profile to reuse roo rules with replacements

Remove duplicate Kilo-specific rule files and assets in favor of reusing roo rules with dynamic replacements, eliminating 900+ lines of duplicated code while maintaining full Kilo functionality.

The profile now:
- Reuses ROO_MODES constant instead of maintaining separate KILO_MODES
- Applies text replacements to convert roo references to kilo
- Maps roo rule files to kilo equivalents via fileMap
- Removes all duplicate rule files from assets/kilocode directory

* refactor(kilo): restructure object literals for consistency and remove duplicate customReplacements array based on CodeRabbit's suggestion

* chore: remove disabled .mcp.json by mistake

---------

Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants