-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: Add support for .roorules configuration files #2309
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
Conversation
- Add .roorules to the list of supported rule files - Improve mode-specific rule file handling to prioritize .roorules over .clinerules - Update file loading logic to track which rule file was successfully loaded - Add test cases for .roorules functionality This change maintains backward compatibility with existing .clinerules while introducing support for the new .roorules format as the preferred configuration method.
|
|
Thank you so much for starting the process on this! I've been thinking about this a bit too.
|
|
@mrubens Thank you for your comments!
|
- Removed .cursorrules and .windsurfrules from the list of rule files in loadRuleFiles function.
- Modified loadRuleFiles function to return content from the first available rule file instead of combining multiple rule files. - Updated tests to reflect the new behavior of loading only the .roorules file content when available, ensuring clarity in rule file handling.
- Updated prompts in the English locale to reflect the deprecation of .clinerules in favor of .roorules. - Added notes in the prompts indicating that .clinerules will stop working soon, ensuring users are aware of the upcoming changes.
|
Pushed a few updates! |
|
Thank you for your quick code review and code fixes!
LGTM :) |
|
I’ve been wanting to do this for so long! Thanks for making it happen. |
|
quick question. how are roorules different to the complete system-prompt replacement in combination with roomodes? |

Context
We are adding support for
.roorulesconfiguration files while maintaining backward compatibility with existing.clinerules. This change is part of our transition to use Roo-specific configuration files, making it clearer which settings belong to the Roo Code ecosystem.Cline has recently added support for .clinerules/ directory, which prevents the creation of .clinerules files when the directory exists.
Implementation
The implementation involves several key changes:
.roorulesto the list of supported rule files inloadRuleFiles.roorules-{mode}.clinerules-{mode}if.roorulesis not found.roorulesfunctionalityKey technical decisions:
.clinerulessupport.roorulesover.clinerulesfor future extensibilityusedRuleFile) to ensure correct rule source attributionScreenshots
Not applicable for this change as it's a backend configuration enhancement.
How to Test
npm test.roorulescontent is loaded before.clinerules.roorules-test-modeare prioritized over.clinerules-test-mode.clinerulescontinues to work as beforeGet in Touch
I'm available in the Roo Code Discord as
serizawa_. Feel free to reach out with any questions or concerns about this implementation.Important
Add support for
.roorulesconfiguration files, prioritizing them over.clinerules, with updated tests for new behavior..roorulesinloadRuleFiles()incustom-instructions.ts, prioritizing over.clinerules..roorules-{mode}first, then.clinerules-{mode}.usedRuleFileto track which file was loaded.custom-instructions.test.tsto cover.roorulesand mode-specific rule loading..clinerules.This description was created by
for 72498ef. It will automatically update as commits are pushed.