-
Notifications
You must be signed in to change notification settings - Fork 76
feat: Add support for Roo Code #9
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,7 @@ ai-devkit init --phases requirements,design,planning | |
| ``` | ||
|
|
||
| This will: | ||
|
|
||
| 1. Create a `.ai-devkit.json` configuration file | ||
| 2. Set up your AI development environment (Cursor/Claude Code) | ||
| 3. Generate phase templates in `docs/ai/` | ||
|
|
@@ -62,11 +63,13 @@ Detailed user guide can be found [here](https://ai-devkit.com/docs/). | |
| Initialize AI DevKit in your project. | ||
|
|
||
| **Options:** | ||
|
|
||
| - `-e, --environment <env>`: Specify environment (cursor|claude|both) | ||
| - `-a, --all`: Initialize all phases at once | ||
| - `-p, --phases <phases>`: Comma-separated list of specific phases | ||
|
|
||
| **Examples:** | ||
|
|
||
| ```bash | ||
| # Interactive mode | ||
| ai-devkit init | ||
|
|
@@ -83,6 +86,7 @@ ai-devkit init --phases requirements,design,implementation | |
| Add or update a specific phase template. | ||
|
|
||
| **Examples:** | ||
|
|
||
| ```bash | ||
| # Interactive selection | ||
| ai-devkit phase | ||
|
|
@@ -119,18 +123,18 @@ your-project/ | |
| ``` | ||
|
|
||
| Supported Tools & Agents: | ||
| | Agent | Support | Notes | | ||
| | Agent | Support | Notes | | ||
| |-----------------------------------------------------------|---------|---------------------------------------------------| | ||
| | [Claude Code](https://www.anthropic.com/claude-code) | ✅ | | | ||
| | [GitHub Copilot](https://code.visualstudio.com/) | ✅ | VSCode only | | ||
| | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | ✅ | | | ||
| | [Cursor](https://cursor.sh/) | ✅ | | | ||
| | [opencode](https://opencode.ai/) | 🚧 | Testing | | ||
| | [Windsurf](https://windsurf.com/) | 🚧 | Testing | | ||
| | [Kilo Code](https://github.com/Kilo-Org/kilocode) | 🚧 | Testing | | ||
| | [Roo Code](https://roocode.com/) | 🚧 | Testing | | ||
| | [Codex CLI](https://github.com/openai/codex) | 🚧 | Testing | | ||
| | [Amp](https://ampcode.com/) | 🚧 | Testing | | ||
| | [Claude Code](https://www.anthropic.com/claude-code) | ✅ | | | ||
| | [GitHub Copilot](https://code.visualstudio.com/) | ✅ | VSCode only | | ||
| | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | ✅ | | | ||
| | [Cursor](https://cursor.sh/) | ✅ | | | ||
| | [opencode](https://opencode.ai/) | 🚧 | Testing | | ||
| | [Windsurf](https://windsurf.com/) | 🚧 | Testing | | ||
| | [Kilo Code](https://github.com/Kilo-Org/kilocode) | 🚧 | Testing | | ||
| | [Roo Code](https://roocode.com/) | ✅ | | | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please add proof of testing? |
||
| | [Codex CLI](https://github.com/openai/codex) | 🚧 | Testing | | ||
| | [Amp](https://ampcode.com/) | 🚧 | Testing | | ||
|
|
||
| Templates are designed to provide structure while remaining concise and AI-friendly. | ||
|
|
||
|
|
@@ -139,10 +143,12 @@ Templates are designed to provide structure while remaining concise and AI-frien | |
| ### Cursor | ||
|
|
||
| Generated files: | ||
|
|
||
| - `.cursor/rules/`: Project-specific rules as Markdown files (per [Cursor documentation](https://cursor.com/docs/context/rules)) | ||
| - `.cursor/commands/`: Custom slash commands as Markdown files (per [Cursor documentation](https://cursor.com/docs/agent/chat/commands)) | ||
|
|
||
| Available slash commands: | ||
|
|
||
| - `/new-requirement`: Complete workflow for adding a new feature from requirements to PR | ||
| - `/code-review`: Structured local code review against design docs before pushing changes | ||
| - `/execute-plan`: Walk a feature plan task-by-task with interactive prompts | ||
|
|
@@ -157,10 +163,12 @@ Each command is stored as a plain Markdown file in `.cursor/commands/` and will | |
| ### Claude Code | ||
|
|
||
| Generated files: | ||
|
|
||
| - `.claude/CLAUDE.md`: Workspace configuration and guidelines | ||
| - `.claude/commands/`: Custom commands as Markdown files | ||
|
|
||
| Available commands: | ||
|
|
||
| - `new-requirement` - Complete workflow for adding a new feature from requirements to PR | ||
| - `code-review` - Structured local code review against design docs before pushing changes | ||
| - `execute-plan` - Walk a feature plan task-by-task with interactive prompts | ||
|
|
@@ -178,32 +186,39 @@ Commands can be referenced in Claude Code chats to guide AI assistance through y | |
| ### Initial Project Setup | ||
|
|
||
| 1. **Initialize your project:** | ||
|
|
||
| ```bash | ||
| ai-devkit init | ||
| ``` | ||
|
|
||
| 2. **Start with requirements:** | ||
|
|
||
| - Fill out `docs/ai/requirements/README.md` | ||
| - Use your AI assistant to help clarify and document requirements | ||
|
|
||
| 3. **Design your system:** | ||
|
|
||
| - Complete `docs/ai/design/README.md` and feature-specific files | ||
| - Include mermaid diagrams for architecture, component interactions, and data flow | ||
| - Reference requirements when making design decisions | ||
|
|
||
| 4. **Plan your work:** | ||
|
|
||
| - Break down tasks in `docs/ai/planning/README.md` | ||
| - Estimate and prioritize | ||
|
|
||
| 5. **Implement with guidance:** | ||
|
|
||
| - Follow patterns in `docs/ai/implementation/README.md` | ||
| - Keep implementation notes updated | ||
|
|
||
| 6. **Test thoroughly:** | ||
|
|
||
| - Use `docs/ai/testing/README.md` as your testing guide | ||
| - Document test cases and results | ||
|
|
||
| 7. **Deploy confidently:** | ||
|
|
||
| - Follow deployment procedures in `docs/ai/deployment/README.md` | ||
|
|
||
| 8. **Monitor and iterate:** | ||
|
|
@@ -278,20 +293,19 @@ MIT | |
|
|
||
| ## Quick Reference | ||
|
|
||
| | Task | Command | | ||
| |------|---------| | ||
| | Initialize everything | `npx ai-devkit init --all` | | ||
| | Initialize for Cursor | `npx ai-devkit init --environment cursor` | | ||
| | Add specific phases | `npx ai-devkit init --phases requirements,design` | | ||
| | Add one phase later | `npx ai-devkit phase testing` | | ||
| | Guided feature workflow | `/new-requirement` (Cursor & Claude) | | ||
| | Execute feature plan | `/execute-plan` (Cursor & Claude) | | ||
| | Generate tests | `/writing-test` (Cursor & Claude) | | ||
| | Local code review | `/code-review` (Cursor & Claude) | | ||
| | Help | `npx ai-devkit --help` | | ||
|
|
||
| | Quick links | Description | | ||
| |-------------|-------------| | ||
| | Task | Command | | ||
| | ----------------------- | ------------------------------------------------- | | ||
| | Initialize everything | `npx ai-devkit init --all` | | ||
| | Initialize for Cursor | `npx ai-devkit init --environment cursor` | | ||
| | Add specific phases | `npx ai-devkit init --phases requirements,design` | | ||
| | Add one phase later | `npx ai-devkit phase testing` | | ||
| | Guided feature workflow | `/new-requirement` (Cursor & Claude) | | ||
| | Execute feature plan | `/execute-plan` (Cursor & Claude) | | ||
| | Generate tests | `/writing-test` (Cursor & Claude) | | ||
| | Local code review | `/code-review` (Cursor & Claude) | | ||
| | Help | `npx ai-devkit --help` | | ||
|
|
||
| | Quick links | Description | | ||
| | ---------------------------- | -------------------------------- | | ||
| | [CHANGELOG.md](CHANGELOG.md) | Recent changes and release notes | | ||
| | [templates/](templates/) | Phase and environment templates | | ||
|
|
||
| | [templates/](templates/) | Phase and environment templates | | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,13 +29,13 @@ export class TemplateManager { | |
| "docs", | ||
| "ai", | ||
| phase, | ||
| "README.md" | ||
| "README.md", | ||
| ); | ||
| return fs.pathExists(targetFile); | ||
| } | ||
|
|
||
| async setupMultipleEnvironments( | ||
| environmentIds: EnvironmentCode[] | ||
| environmentIds: EnvironmentCode[], | ||
| ): Promise<string[]> { | ||
| const copiedFiles: string[] = []; | ||
|
|
||
|
|
@@ -75,7 +75,7 @@ export class TemplateManager { | |
| } | ||
|
|
||
| private async setupSingleEnvironment( | ||
| env: EnvironmentDefinition | ||
| env: EnvironmentDefinition, | ||
| ): Promise<string[]> { | ||
| const copiedFiles: string[] = []; | ||
|
|
||
|
|
@@ -90,7 +90,8 @@ export class TemplateManager { | |
| console.warn(`Warning: Context file not found: ${contextSource}`); | ||
| } | ||
|
|
||
| if (!env.isCustomCommandPath) { | ||
| // Roo Code commands are handled in copyRooSpecificFiles | ||
| if (!env.isCustomCommandPath && env.code !== "roo") { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this? Please refer https://github.com/codeaholicguy/ai-devkit/blob/main/src/util/env.ts#L64 |
||
| await this.copyCommands(env, copiedFiles); | ||
| } | ||
|
|
||
|
|
@@ -101,6 +102,9 @@ export class TemplateManager { | |
| case "gemini": | ||
| await this.copyGeminiSpecificFiles(copiedFiles); | ||
| break; | ||
| case "roo": | ||
| await this.copyRooSpecificFiles(copiedFiles); | ||
| break; | ||
| default: | ||
| break; | ||
| } | ||
|
|
@@ -114,7 +118,7 @@ export class TemplateManager { | |
|
|
||
| private async copyCommands( | ||
| env: EnvironmentDefinition, | ||
| copiedFiles: string[] | ||
| copiedFiles: string[], | ||
| ): Promise<void> { | ||
| const commandsSourceDir = path.join(this.templatesDir, "commands"); | ||
| const commandExtension = env.customCommandExtension || ".md"; | ||
|
|
@@ -128,17 +132,17 @@ export class TemplateManager { | |
| commandFiles | ||
| .filter((file: string) => file.endsWith(".md")) | ||
| .map(async (file: string) => { | ||
| const targetFile = file.replace('.md', commandExtension); | ||
| const targetFile = file.replace(".md", commandExtension); | ||
| await fs.copy( | ||
| path.join(commandsSourceDir, file), | ||
| path.join(commandsTargetDir, targetFile) | ||
| path.join(commandsTargetDir, targetFile), | ||
| ); | ||
| copiedFiles.push(path.join(commandsTargetDir, targetFile)); | ||
| }) | ||
| }), | ||
| ); | ||
| } else { | ||
| console.warn( | ||
| `Warning: Commands directory not found: ${commandsSourceDir}` | ||
| `Warning: Commands directory not found: ${commandsSourceDir}`, | ||
| ); | ||
| } | ||
| } | ||
|
|
@@ -148,7 +152,7 @@ export class TemplateManager { | |
| this.templatesDir, | ||
| "env", | ||
| "cursor", | ||
| "rules" | ||
| "rules", | ||
| ); | ||
| const rulesTargetDir = path.join(this.targetDir, ".cursor", "rules"); | ||
|
|
||
|
|
@@ -165,7 +169,7 @@ export class TemplateManager { | |
|
|
||
| private async copyGeminiSpecificFiles(copiedFiles: string[]): Promise<void> { | ||
| const commandFiles = await fs.readdir( | ||
| path.join(this.templatesDir, "commands") | ||
| path.join(this.templatesDir, "commands"), | ||
| ); | ||
| const commandTargetDir = path.join(this.targetDir, ".gemini", "commands"); | ||
|
|
||
|
|
@@ -176,10 +180,33 @@ export class TemplateManager { | |
| .map(async (file: string) => { | ||
| await fs.copy( | ||
| path.join(this.templatesDir, "commands", file), | ||
| path.join(commandTargetDir, file) | ||
| path.join(commandTargetDir, file), | ||
| ); | ||
| copiedFiles.push(path.join(commandTargetDir, file)); | ||
| }) | ||
| }), | ||
| ); | ||
| } | ||
|
|
||
| private async copyRooSpecificFiles(copiedFiles: string[]): Promise<void> { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't we use https://github.com/codeaholicguy/ai-devkit/blob/main/src/util/env.ts#L64? |
||
| // Copy commands to .roo/commands/ | ||
| const commandsSourceDir = path.join(this.templatesDir, "commands"); | ||
| const commandsTargetDir = path.join(this.targetDir, ".roo", "commands"); | ||
|
|
||
| if (await fs.pathExists(commandsSourceDir)) { | ||
| await fs.ensureDir(commandsTargetDir); | ||
|
|
||
| const commandFiles = await fs.readdir(commandsSourceDir); | ||
| await Promise.all( | ||
| commandFiles | ||
| .filter((file: string) => file.endsWith(".md")) | ||
| .map(async (file: string) => { | ||
| await fs.copy( | ||
| path.join(commandsSourceDir, file), | ||
| path.join(commandsTargetDir, file), | ||
| ); | ||
| copiedFiles.push(path.join(commandsTargetDir, file)); | ||
| }), | ||
| ); | ||
| } | ||
| } | ||
| } | ||
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.
Please remove all redundancy that doesn't require for Roo Code integration