-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(roocode): add RooCode integration (configurator, slash commands, templates) #288
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a6ed09d
feat(roocode): 添加RooCode工具支持及相关配置
jax-max 3419cd2
Resolve merge conflict: keep both RooCode and Gemini CLI scenarios in…
jax-max 0efa6fc
Merge branch 'main' into feat/RooCode-support
jax-max c5cd2b6
Remove RooCode related configurations from the project. This includes…
jax-max File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import path from 'path'; | ||
| import { ToolConfigurator } from './base.js'; | ||
| import { FileSystemUtils } from '../../utils/file-system.js'; | ||
| import { TemplateManager } from '../templates/index.js'; | ||
| import { OPENSPEC_MARKERS } from '../config.js'; | ||
|
|
||
| export class RooCodeConfigurator implements ToolConfigurator { | ||
| name = 'RooCode'; | ||
| configFileName = 'ROOCODE.md'; | ||
| isAvailable = true; | ||
|
|
||
| async configure(projectPath: string, _openspecDir: string): Promise<void> { | ||
| const filePath = path.join(projectPath, this.configFileName); | ||
| const content = TemplateManager.getRooCodeTemplate(); | ||
|
|
||
| await FileSystemUtils.updateFileWithMarkers( | ||
| filePath, | ||
| content, | ||
| OPENSPEC_MARKERS.start, | ||
| OPENSPEC_MARKERS.end | ||
| ); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { SlashCommandConfigurator } from './base.js'; | ||
| import { SlashCommandId } from '../../templates/index.js'; | ||
|
|
||
| const NEW_FILE_PATHS: Record<SlashCommandId, string> = { | ||
| proposal: '.roo/commands/openspec-proposal.md', | ||
| apply: '.roo/commands/openspec-apply.md', | ||
| archive: '.roo/commands/openspec-archive.md' | ||
| }; | ||
|
|
||
| export class RooCodeSlashCommandConfigurator extends SlashCommandConfigurator { | ||
| readonly toolId = 'roocode'; | ||
| readonly isAvailable = true; | ||
|
|
||
| protected getRelativePath(id: SlashCommandId): string { | ||
| return NEW_FILE_PATHS[id]; | ||
| } | ||
|
|
||
| protected getFrontmatter(id: SlashCommandId): string | undefined { | ||
| const descriptions: Record<SlashCommandId, string> = { | ||
| proposal: 'Scaffold a new OpenSpec change and validate strictly.', | ||
| apply: 'Implement an approved OpenSpec change and keep tasks in sync.', | ||
| archive: 'Archive a deployed OpenSpec change and update specs.' | ||
| }; | ||
| const description = descriptions[id]; | ||
| return `# OpenSpec: ${id.charAt(0).toUpperCase() + id.slice(1)}\n\n${description}`; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { agentsRootStubTemplate as roocodeTemplate } from './agents-root-stub.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@jax-max I believe roocode supports the
AGENTS.mdcan we get away with not having to create another rules file for roo if not needed?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.
@TabishB AFAIK claude also supports AGENTS.md, maybe we can get rid of CLAUDE.md as well?
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.
Thanks for the heads-up. Roocode doesn’t have a native mechanism to "default scan ROOCODE.md and auto-apply its rules". I’ve removed the ROOCODE.md-related mechanism and only retained the slash command functionality – please help review, much appreciated!
@TabishB
Uh oh!
There was an error while loading. Please reload this page.
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.
@ravshansbox There's currently only 2 coding agent that don't support
AGENTS.md. Claude and Cline. Cline will support it soon, but I don't think Claude will haha. it's been requested for a while: anthropics/claude-code#6235