-
Notifications
You must be signed in to change notification settings - Fork 955
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
Conversation
新增RooCode工具集成,包括: - 添加RooCode配置器类 - 注册RooCode到工具注册表 - 实现RooCode模板文件 - 添加RooCode斜杠命令支持 - 更新README文档说明 - 添加相关测试用例
WalkthroughThis PR integrates RooCode as a native slash-command AI tool for OpenSpec workflows. Changes include adding RooCode to the AI tools registry, implementing a new slash-command configurator to manage OpenSpec-related commands, updating documentation, and adding test coverage for initialization and update flows. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧬 Code graph analysis (1)test/core/update.test.ts (1)
🪛 LanguageToolopenspec/specs/cli-init/spec.md[duplication] ~243-~243: Possible typo: you repeated a word. (ENGLISH_WORD_REPEAT_RULE) 🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 0
🧹 Nitpick comments (1)
src/core/configurators/slash/roocode.ts (1)
4-8: Rename constant to match established naming convention.The constant
NEW_FILE_PATHSshould be renamed toFILE_PATHSto maintain consistency with other slash command configurators likeClineSlashCommandConfigurator.Apply this diff:
-const NEW_FILE_PATHS: Record<SlashCommandId, string> = { +const FILE_PATHS: Record<SlashCommandId, string> = { proposal: '.roo/commands/openspec-proposal.md', apply: '.roo/commands/openspec-apply.md', archive: '.roo/commands/openspec-archive.md' };And update the reference on line 15:
protected getRelativePath(id: SlashCommandId): string { - return NEW_FILE_PATHS[id]; + return FILE_PATHS[id]; }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
README.md(2 hunks)openspec/specs/cli-init/spec.md(2 hunks)src/core/config.ts(1 hunks)src/core/configurators/registry.ts(3 hunks)src/core/configurators/roocode.ts(1 hunks)src/core/configurators/slash/registry.ts(3 hunks)src/core/configurators/slash/roocode.ts(1 hunks)src/core/templates/index.ts(2 hunks)src/core/templates/roocode-template.ts(1 hunks)test/core/init.test.ts(2 hunks)test/core/update.test.ts(3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
openspec/{specs/**/spec.md,changes/*/specs/**/spec.md}
📄 CodeRabbit inference engine (openspec/AGENTS.md)
openspec/{specs/**/spec.md,changes/*/specs/**/spec.md}: Write requirements using SHALL/MUST for normative wording
Every requirement must include at least one scenario, formatted exactly with a '#### Scenario: ' header (no bullets or bold)
Under ADDED, introduce new capabilities as standalone requirements rather than altering existing ones
Files:
openspec/specs/cli-init/spec.md
openspec/specs/**/spec.md
📄 CodeRabbit inference engine (openspec/AGENTS.md)
Keep current, deployed specs in openspec/specs//spec.md (one focused capability per directory)
Files:
openspec/specs/cli-init/spec.md
🧠 Learnings (17)
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/changes/*/{proposal.md,tasks.md,design.md,specs/**/spec.md} : Scaffold each change with proposal.md, tasks.md, optional design.md, and delta spec files under openspec/changes/<change-id>/specs/<capability>/spec.md
Applied to files:
openspec/specs/cli-init/spec.mdREADME.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/{specs/**/spec.md,changes/*/specs/**/spec.md} : Under ADDED, introduce new capabilities as standalone requirements rather than altering existing ones
Applied to files:
openspec/specs/cli-init/spec.md
📚 Learning: 2025-10-21T03:05:07.856Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.856Z
Learning: Use @/openspec/AGENTS.md to learn how to create and apply change proposals
Applied to files:
openspec/specs/cli-init/spec.mdREADME.md
📚 Learning: 2025-10-21T03:05:07.856Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.856Z
Learning: Use @/openspec/AGENTS.md to learn spec format and conventions
Applied to files:
openspec/specs/cli-init/spec.mdREADME.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/changes/*/specs/**/spec.md : Use ADDED, MODIFIED, REMOVED, or RENAMED sections when authoring deltas; place changed requirements under the correct operation header
Applied to files:
openspec/specs/cli-init/spec.md
📚 Learning: 2025-10-21T03:05:07.856Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.856Z
Learning: Always open @/openspec/AGENTS.md when the request introduces new capabilities, breaking changes, architecture shifts, or major performance/security work
Applied to files:
openspec/specs/cli-init/spec.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/specs/**/spec.md : Keep current, deployed specs in openspec/specs/<capability>/spec.md (one focused capability per directory)
Applied to files:
openspec/specs/cli-init/spec.mdREADME.md
📚 Learning: 2025-10-21T03:05:07.856Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.856Z
Learning: Use @/openspec/AGENTS.md to learn the project structure and guidelines
Applied to files:
openspec/specs/cli-init/spec.mdREADME.md
📚 Learning: 2025-10-21T03:05:07.856Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.856Z
Learning: Always open @/openspec/AGENTS.md when the request is ambiguous and the authoritative spec is needed before coding
Applied to files:
openspec/specs/cli-init/spec.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/{specs/**/spec.md,changes/*/specs/**/spec.md} : Every requirement must include at least one scenario, formatted exactly with a '#### Scenario: <name>' header (no bullets or bold)
Applied to files:
openspec/specs/cli-init/spec.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/{specs/**/spec.md,changes/*/specs/**/spec.md} : Write requirements using SHALL/MUST for normative wording
Applied to files:
openspec/specs/cli-init/spec.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/project.md : Document project conventions in openspec/project.md and review it before starting work
Applied to files:
README.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/specs/*/ : Name capabilities with clear, single-purpose verb-noun directories (e.g., user-auth, payment-capture) and split if the description needs 'AND'
Applied to files:
README.md
📚 Learning: 2025-10-21T03:05:07.856Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.856Z
Learning: Always open @/openspec/AGENTS.md when the request mentions planning or proposals (e.g., proposal, spec, change, plan)
Applied to files:
README.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/changes/*/** : Choose a unique kebab-case, verb-led change-id (add-, update-, remove-, refactor-) for openspec/changes/<change-id>/
Applied to files:
README.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Search existing work before starting (use openspec spec list, openspec list, and ripgrep only for full-text)
Applied to files:
README.md
📚 Learning: 2025-10-22T06:05:06.615Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-10-22T06:05:06.615Z
Learning: Applies to openspec/changes/archive/** : Archive completed changes under openspec/changes/archive/YYYY-MM-DD-<name>/ and run 'openspec validate --strict' post-archive; update specs/ if capabilities changed
Applied to files:
README.md
🧬 Code graph analysis (8)
src/core/configurators/registry.ts (3)
src/core/configurators/roocode.ts (1)
RooCodeConfigurator(7-23)src/core/configurators/base.ts (1)
ToolConfigurator(1-6)src/core/init.ts (1)
configureAITools(763-786)
test/core/init.test.ts (1)
src/utils/file-system.ts (1)
fileExists(76-86)
src/core/templates/roocode-template.ts (1)
src/core/init.ts (1)
configureRootAgentsStub(788-803)
src/core/configurators/slash/roocode.ts (2)
src/core/templates/index.ts (1)
SlashCommandId(55-55)src/core/configurators/slash/cline.ts (1)
ClineSlashCommandConfigurator(10-27)
src/core/configurators/slash/registry.ts (1)
src/core/configurators/slash/roocode.ts (1)
RooCodeSlashCommandConfigurator(10-27)
src/core/configurators/roocode.ts (4)
src/core/configurators/base.ts (1)
ToolConfigurator(1-6)src/core/templates/index.ts (1)
TemplateManager(15-52)src/utils/file-system.ts (1)
FileSystemUtils(44-187)src/core/config.ts (1)
OPENSPEC_MARKERS(3-6)
openspec/specs/cli-init/spec.md (1)
test/cli-e2e/basic.test.ts (1)
projectDir(102-115)
test/core/update.test.ts (1)
src/utils/file-system.ts (2)
FileSystemUtils(44-187)fileExists(76-86)
🔇 Additional comments (19)
src/core/config.ts (1)
23-23: LGTM! RooCode entry follows the established pattern.The new AI tool entry is consistent with existing tools and includes all required fields.
src/core/templates/index.ts (2)
5-5: LGTM! Import follows the established pattern.The roocodeTemplate import is consistent with other template imports in this file.
37-39: LGTM! Template getter follows the established pattern.The getRooCodeTemplate method is consistent with other template getters (getClaudeTemplate, getClineTemplate, etc.) and properly exposes the RooCode template through the TemplateManager API.
src/core/configurators/registry.ts (2)
9-9: LGTM! Import follows the established pattern.
22-22: LGTM! RooCode configurator registration is correct.The configurator is properly instantiated and registered with the tool ID 'roocode', which matches the value in the AI_TOOLS configuration (src/core/config.ts line 23).
Also applies to: 31-31
README.md (2)
99-99: LGTM! RooCode documentation entry is consistent.The table entry properly documents RooCode's slash commands and their location (
.roo/commands/), following the same format as other native tools.
236-236: LGTM! Updated note correctly includes RooCode.The note now properly lists RooCode among tools with native slash command support.
src/core/configurators/slash/registry.ts (2)
18-18: LGTM! Import follows the established pattern.
40-40: LGTM! RooCode slash configurator registration is correct.The slash command configurator is properly instantiated and registered using its toolId property, consistent with other configurators in the registry.
Also applies to: 58-58
src/core/templates/roocode-template.ts (1)
1-1: LGTM! Template aliasing is appropriate for RooCode.RooCode reuses the
agentsRootStubTemplateby aliasing it asroocodeTemplate. This is intentional and consistent with RooCode being an AGENTS.md-compatible tool that uses the same stub format. The RooCodeConfigurator will use this template to populate ROOCODE.md with a reference to the main@/openspec/AGENTS.mdfile.openspec/specs/cli-init/spec.md (2)
94-99: LGTM! RooCode configuration scenario is well-documented.The scenario follows the established pattern for tool configuration, properly documenting that ROOCODE.md is created at the project root with a stub pointing to
@/openspec/AGENTS.md.
240-247: LGTM! RooCode slash command scenario is comprehensive.The scenario properly documents:
- Command file locations (
.roo/commands/)- Simple Markdown heading format without YAML frontmatter
- OpenSpec managed markers for updates
- All three workflow stages (proposal, apply, archive)
test/core/init.test.ts (4)
1130-1163: LGTM! Comprehensive test coverage for RooCode slash commands.The test properly verifies:
- All three command files are created at the correct paths (
.roo/commands/)- Content includes expected headings (
# OpenSpec: Proposal, etc.)- Workflow-specific instructions are present (Guardrails, task sequencing, archive commands)
1165-1175: LGTM! Extend mode detection test is correct.The test verifies that RooCode is properly marked as already configured during extend mode, consistent with how other tools are handled.
1262-1275: LGTM! ROOCODE.md creation test is comprehensive.The test verifies that ROOCODE.md is created with the expected content:
- OpenSpec markers (START/END)
- Reference to
@/openspec/AGENTS.md- Update instructions mentioning
openspec update
1277-1293: LGTM! ROOCODE.md update test validates marker preservation.The test correctly verifies that updating an existing ROOCODE.md file:
- Preserves custom content outside the managed markers
- Updates content within the OpenSpec markers
- Maintains the reference to
@/openspec/AGENTS.mdThis ensures users' custom instructions are not overwritten during updates.
src/core/configurators/slash/roocode.ts (1)
14-26: LGTM!The implementation of
getRelativePathandgetFrontmattercorrectly follows the established pattern from other slash command configurators. The per-command descriptions are appropriate and consistent with the OpenSpec workflow.src/core/configurators/roocode.ts (1)
1-23: LGTM!The
RooCodeConfiguratorimplementation correctly follows the established pattern for tool configurators. It properly implements theToolConfiguratorinterface and uses the standard approach for marker-based content updates viaFileSystemUtils.updateFileWithMarkers.test/core/update.test.ts (1)
1026-1064: LGTM!The RooCode test coverage is comprehensive and follows the established testing patterns used for other tool integrations (Claude, Cline, etc.). The tests properly verify:
- Slash command file updates with marker content replacement
- Preservation of existing content outside markers
- No creation of missing files during updates
- ROOCODE.md file updates and marker handling
- Graceful error handling with appropriate logging
Also applies to: 1066-1097, 1209-1245, 1247-1257, 1569-1605
TabishB
left a comment
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.
Hey @jax-max! This is an amazing PR, thanks for this. Only one small comment on whether we truly need a ROOCODE.md if roo code already supports AGENTS.md?
My opinion here is probably not, but open to any strong opinions.
openspec/specs/cli-init/spec.md
Outdated
| #### Scenario: Configuring RooCode | ||
|
|
||
| - **WHEN** RooCode is selected | ||
| - **THEN** create or update `ROOCODE.md` in the project root directory (not inside `openspec/`) |
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.md can 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
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
… deleting the RooCode configurator, its template, and associated tests.
TabishB
left a comment
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 again @jax-max, this was a great PR, great work! Very much appreciated 🚀
… templates) (Fission-AI#288) * feat(roocode): Added RooCode tool support and related configurations Added RooCode tool integration, including: - Added RooCode configurator class - Registered RooCode to the tool registry - Implemented RooCode template files - Added RooCode slash command support - Updated README documentation - Added related test cases * Removed RooCode related configurations from the project. This includes deleting the RooCode configurator, its template, and associated tests.
… templates) (Fission-AI#288) * feat(roocode): Added RooCode tool support and related configurations Added RooCode tool integration, including: - Added RooCode configurator class - Registered RooCode to the tool registry - Implemented RooCode template files - Added RooCode slash command support - Updated README documentation - Added related test cases * Removed RooCode related configurations from the project. This includes deleting the RooCode configurator, its template, and associated tests.
#feat(roocode): add RooCode integration (configurator, slash commands, templates)
Description
This PR adds full integration of the RooCode tool into the OpenSpec ecosystem, enabling seamless usage of RooCode's capabilities through the existing toolchain.
Changes Included
Checklist
Notes
Feel free to let me know if any adjustments are needed for the integration logic or documentation!
Summary by CodeRabbit
New Features
.roo/commands/.openspec update.Documentation