diff --git a/.roo/rules-issue-fixer/1_Workflow.xml b/.roo/rules-issue-fixer/1_Workflow.xml index ed1e64be16..db1e968c67 100644 --- a/.roo/rules-issue-fixer/1_Workflow.xml +++ b/.roo/rules-issue-fixer/1_Workflow.xml @@ -1,62 +1,41 @@ - Determine Workflow Type and Retrieve Context + Retrieve Issue Context - First, determine what type of work is needed. The user will provide either: - - An issue number/URL (e.g., "#123" or GitHub issue URL) - for new implementation - - A PR number/URL (e.g., "#456" or GitHub PR URL) - for addressing review feedback - - A description of changes needed for an existing PR - - For Issue-based workflow: - Extract the issue number and retrieve it: - - - github - get_issue - - { - "owner": "RooCodeInc", - "repo": "Roo-Code", - "issue_number": [extracted number] - } - - - - For PR Review workflow: - Extract the PR number and retrieve it: - - - github - get_pull_request - - { - "owner": "RooCodeInc", - "repo": "Roo-Code", - "pull_number": [extracted number] - } - - - - Then get PR review comments: - - - github - get_pull_request_reviews - - { - "owner": "RooCodeInc", - "repo": "Roo-Code", - "pull_number": [extracted number] - } - - - - Analyze the context to determine: - 1. Type of work (new issue implementation vs PR feedback) - 2. All requirements and acceptance criteria - 3. Specific changes requested (for PR reviews) - 4. Technical details mentioned - 5. Any linked issues or discussions + The user should provide a full GitHub issue URL (e.g., "https://github.com/owner/repo/issues/123") for implementation. + + Parse the URL to extract: + - Owner (organization or username) + - Repository name + - Issue number + + For example, from https://github.com/RooCodeInc/Roo-Code/issues/123: + - Owner: RooCodeInc + - Repo: Roo-Code + - Issue: 123 + + Then retrieve the issue: + + + gh issue view [issue-number] --repo [owner]/[repo] --json number,title,body,state,labels,assignees,milestone,createdAt,updatedAt,closedAt,author + + + If the command fails with an authentication error (e.g., "gh: Not authenticated" or "HTTP 401"), ask the user to authenticate: + + GitHub CLI is not authenticated. Please run 'gh auth login' in your terminal to authenticate, then let me know when you're ready to continue. + + I've authenticated, please continue + I need help with authentication + Let's use a different approach + + + + Analyze the issue to determine: + 1. All requirements and acceptance criteria + 2. Technical details mentioned + 3. Any linked issues or discussions + + Note: For PR review feedback, users should use the dedicated pr-fixer mode instead. @@ -69,23 +48,20 @@ - Community suggestions - Any decisions or changes to requirements - - github - get_issue_comments - - { - "owner": "RooCodeInc", - "repo": "Roo-Code", - "issue_number": [issue number] - } - - + + gh issue view [issue number] --repo [owner]/[repo] --comments + Also check for: 1. Related issues mentioned in the body or comments 2. Linked pull requests 3. Referenced discussions + If related PRs are mentioned, view them: + + gh pr view [pr-number] --repo [owner]/[repo] + + Document all requirements and constraints found. @@ -109,16 +85,9 @@ - Identify patterns to follow - Find related components and utilities - For PR Reviews: - - Search for files mentioned in review comments - - Find related files that use similar patterns - - Locate test files for modified functionality - - Identify files that import/depend on changed code - Example searches based on issue type: - Bug: Search for error messages, function names, component names - Feature: Search for similar functionality, API endpoints, UI components - - PR Review: Search for patterns mentioned in feedback CRITICAL: Always read multiple related files together to understand: - Current code patterns and conventions @@ -133,10 +102,15 @@ - read_file to examine specific implementations (read multiple files at once) - search_files for specific patterns or error messages - Also use GitHub tools: - - list_commits to see recent changes to affected files - - get_commit to understand specific changes - - list_pull_requests to find related PRs + Also use GitHub CLI to check recent changes: + + gh api repos/[owner]/[repo]/commits?path=[file-path]&per_page=10 --jq '.[].sha + " " + .[].commit.message' + + + Search for related PRs: + + gh pr list --repo [owner]/[repo] --search "[relevant search terms]" --limit 10 + Document: - All files that need modification @@ -464,13 +438,13 @@ **Branch:** [branch-name] **Title:** [PR title] - **Target:** RooCodeInc/Roo-Code (main branch) + **Target:** [owner]/[repo] (main branch) Here's the PR description: [Show prepared PR description] - Would you like me to create this pull request to RooCodeInc/Roo-Code? + Would you like me to create this pull request to [owner]/[repo]? Yes, create the pull request Let me review the PR description first @@ -484,46 +458,28 @@ Create Pull Request - Once user approves, create the pull request using GitHub MCP: - - - github - create_pull_request - - { - "owner": "RooCodeInc", - "repo": "Roo-Code", - "title": "[Type]: [Brief description] (#[issue-number])", - "head": "[user-fork-owner]:[branch-name]", - "base": "main", - "body": "[Complete PR description from step 9]", - "draft": false, - "maintainer_can_modify": true - } - - - - Note: The "head" parameter format depends on where the branch exists: - - If user has push access: "branch-name" - - If working from a fork: "username:branch-name" + Once user approves, create the pull request using GitHub CLI: + + If the user doesn't have push access to [owner]/[repo], fork the repository: + + gh repo fork [owner]/[repo] --clone + + + Create the pull request: + + gh pr create --repo [owner]/[repo] --base main --title "[Type]: [Brief description] (#[issue-number])" --body "[Complete PR description from step 10]" --maintainer-can-modify + + + The gh CLI will automatically handle the fork workflow if needed. After PR creation: - 1. Capture the PR number and URL from the response + 1. Capture the PR number and URL from the command output 2. Link the PR to the issue by commenting on the issue 3. Inform the user of the successful creation - - github - add_issue_comment - - { - "owner": "RooCodeInc", - "repo": "Roo-Code", - "issue_number": [original issue number], - "body": "PR #[new PR number] has been created to address this issue: [PR URL]" - } - - + + gh issue comment [original issue number] --repo [owner]/[repo] --body "PR #[new PR number] has been created to address this issue: [PR URL]" + Final message to user: ``` @@ -550,7 +506,7 @@ After the PR is created, monitor the CI/CD checks to ensure they pass: - gh pr checks --watch + gh pr checks [PR number] --repo [owner]/[repo] --watch This command will: diff --git a/.roo/rules-issue-fixer/4_github_cli_usage.xml b/.roo/rules-issue-fixer/4_github_cli_usage.xml new file mode 100644 index 0000000000..e12fb06a5b --- /dev/null +++ b/.roo/rules-issue-fixer/4_github_cli_usage.xml @@ -0,0 +1,221 @@ + + + This mode uses the GitHub CLI (gh) for all GitHub operations. + The mode assumes the user has gh installed and authenticated. If authentication errors occur, + the mode will prompt the user to authenticate. + + Users must provide full GitHub issue URLs (e.g., https://github.com/owner/repo/issues/123) + so the mode can extract the repository information dynamically. + + + + https://github.com/[owner]/[repo]/issues/[number] + + - Owner: The organization or username + - Repo: The repository name + - Number: The issue number + + + + + Assume authenticated, handle errors gracefully + Only check authentication if a gh command fails with auth error + + - "gh: Not authenticated" + - "HTTP 401" + - "HTTP 403: Resource not accessible" + + + + + + Retrieve the issue details at the start + Always use first to get the full issue content + gh issue view [issue-number] --repo [owner]/[repo] --json number,title,body,state,labels,assignees,milestone,createdAt,updatedAt,closedAt,author + + + gh issue view 123 --repo octocat/hello-world --json number,title,body,state,labels,assignees,milestone,createdAt,updatedAt,closedAt,author + + + + + + Get additional context and requirements from issue comments + Always use after viewing issue to see full discussion + gh issue view [issue-number] --repo [owner]/[repo] --comments + + + gh issue view 123 --repo octocat/hello-world --comments + + + + + + + Find recent changes to affected files + Use during codebase exploration + gh api repos/[owner]/[repo]/commits?path=[file-path]&per_page=10 + + + gh api repos/octocat/hello-world/commits?path=src/api/index.ts&per_page=10 --jq '.[].sha + " " + .[].commit.message' + + + + + + Search for code patterns on GitHub + Use to supplement local codebase_search + gh search code "[search-query]" --repo [owner]/[repo] + + + gh search code "function handleError" --repo octocat/hello-world --limit 10 + + + + + + + + Add progress updates or ask questions on issues + Use if clarification needed or to show progress + gh issue comment [issue-number] --repo [owner]/[repo] --body "[comment]" + + + gh issue comment 123 --repo octocat/hello-world --body "Working on this issue. Found the root cause in the theme detection logic." + + + + + + Find related or similar PRs + Use to understand similar changes + gh pr list --repo [owner]/[repo] --search "[search-terms]" + + + gh pr list --repo octocat/hello-world --search "dark theme" --limit 10 + + + + + + View the diff of a pull request + Use to understand changes in a PR + gh pr diff [pr-number] --repo [owner]/[repo] + + + gh pr diff 456 --repo octocat/hello-world + + + + + + + + Create a pull request + Use in step 11 after user approval + + - Target the repository from the provided URL + - Use "main" as the base branch unless specified otherwise + - Include issue number in PR title + - Use --maintainer-can-modify flag + + gh pr create --repo [owner]/[repo] --base main --title "[title]" --body "[body]" --maintainer-can-modify + + + gh pr create --repo octocat/hello-world --base main --title "fix: Resolve dark theme button visibility (#123)" --body "## Description + +Fixes #123 + +[Full PR description]" --maintainer-can-modify + + + + If working from a fork, ensure the fork is set as the remote and push the branch there first. + The gh CLI will automatically handle the fork workflow. + + + + + Fork the repository if user doesn't have push access + Use if user needs to work from a fork + gh repo fork [owner]/[repo] --clone + + + gh repo fork octocat/hello-world --clone + + + + + + Monitor CI/CD checks on a pull request + Use after creating PR to ensure checks pass + gh pr checks [pr-number] --repo [owner]/[repo] --watch + + + gh pr checks 789 --repo octocat/hello-world --watch + + + + + + + + Access GitHub API directly for advanced operations + Use when specific gh commands don't provide needed functionality + + + + gh api repos/[owner]/[repo] --jq '.default_branch' + + + + + gh api repos/[owner]/[repo]/contents/README.md --jq '.content' | base64 -d + + + + + gh api repos/[owner]/[repo]/actions/runs --jq '.workflow_runs[0:5] | .[] | .id, .status, .conclusion' + + + + + + Check GitHub Actions workflow status + Use to monitor CI/CD pipeline + gh run list --repo [owner]/[repo] --limit 5 + + + gh run list --repo octocat/hello-world --limit 5 + + + + + + + + gh: Not authenticated. Run 'gh auth login' to authenticate. + + Ask user to authenticate: + + GitHub CLI is not authenticated. Please run 'gh auth login' in your terminal to authenticate, then let me know when you're ready to continue. + + I've authenticated, please continue + I need help with authentication + Let's use a different approach + + + + + + + HTTP 403: Resource not accessible by integration + + Check if working from a fork is needed: + + gh repo fork [owner]/[repo] --clone + + + + + \ No newline at end of file diff --git a/.roo/rules-issue-fixer/4_github_mcp_tool_usage.xml b/.roo/rules-issue-fixer/4_github_mcp_tool_usage.xml deleted file mode 100644 index 49b12f96ca..0000000000 --- a/.roo/rules-issue-fixer/4_github_mcp_tool_usage.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - Retrieve the issue details at the start - Always use first to get the full issue content - - - - Get additional context and requirements - Always use after get_issue to see full discussion - - - - Find recent changes to affected files - Use during codebase exploration - - - - Find code patterns on GitHub - Use to supplement local codebase_search - - - - - - Add progress updates or ask questions - Use if clarification needed or to show progress - - - - Find related or similar PRs - Use to understand similar changes - - - - Get details of related PRs - Use when issue references specific PRs - - - - - - Create a pull request to RooCodeInc/Roo-Code - Use in step 10 after user approval - - - Always target RooCodeInc/Roo-Code repository - - Use "main" as the base branch unless specified otherwise - - Include issue number in PR title - - Set maintainer_can_modify to true - - - - github - create_pull_request - - { - "owner": "RooCodeInc", - "repo": "Roo-Code", - "title": "fix: Resolve dark theme button visibility (#123)", - "head": "username:fix/issue-123-dark-theme-button", - "base": "main", - "body": "## Description\n\nFixes #123\n\n[Full PR description]", - "draft": false, - "maintainer_can_modify": true - } - - - - - - - Fork the repository if user doesn't have push access - Use if user needs to work from a fork - - - github - fork_repository - - { - "owner": "RooCodeInc", - "repo": "Roo-Code" - } - - - - - - \ No newline at end of file diff --git a/.roo/rules-issue-fixer/5_pull_request_workflow.xml b/.roo/rules-issue-fixer/5_pull_request_workflow.xml index 79102fcf37..60a8385e3e 100644 --- a/.roo/rules-issue-fixer/5_pull_request_workflow.xml +++ b/.roo/rules-issue-fixer/5_pull_request_workflow.xml @@ -4,6 +4,7 @@ 2. Push to appropriate branch (fork or direct) 3. Prepare comprehensive PR description 4. Get user approval before creating PR + 5. Extract owner and repo from the provided GitHub URL @@ -22,9 +23,30 @@ - Screenshots/demos if applicable + + Use GitHub CLI to create the pull request: + + gh pr create --repo [owner]/[repo] --base main --title "[title]" --body "[description]" --maintainer-can-modify + + + If working from a fork, ensure you've forked first: + + gh repo fork [owner]/[repo] --clone + + + The gh CLI automatically handles fork workflows. + + - 1. Comment on original issue with PR link + 1. Comment on original issue with PR link: + + gh issue comment [issue-number] --repo [owner]/[repo] --body "PR #[pr-number] has been created to address this issue: [PR URL]" + 2. Inform user of successful creation 3. Provide next steps and tracking info + 4. Monitor PR checks: + + gh pr checks [pr-number] --repo [owner]/[repo] --watch + \ No newline at end of file diff --git a/.roo/rules-issue-fixer/8_github_communication_guidelines.xml b/.roo/rules-issue-fixer/8_github_communication_guidelines.xml index 91ef0de89e..627908f1f7 100644 --- a/.roo/rules-issue-fixer/8_github_communication_guidelines.xml +++ b/.roo/rules-issue-fixer/8_github_communication_guidelines.xml @@ -1,14 +1,4 @@ - - - Keep comments concise and focused on technical substance - - Avoid overly verbose explanations unless specifically requested - - Sound human and conversational, not robotic - - Address specific feedback points directly - - Use bullet points for multiple changes - - Reference line numbers or specific code when relevant - - Example: "Updated the error handling in `validateInput()` to catch edge cases as requested. Also added the missing null check on line 45." - - - Provide brief status updates when working on complex issues - Ask specific questions if requirements are unclear diff --git a/.roo/rules-issue-fixer/9_pr_review_workflow.xml b/.roo/rules-issue-fixer/9_pr_review_workflow.xml deleted file mode 100644 index 849ee7f1df..0000000000 --- a/.roo/rules-issue-fixer/9_pr_review_workflow.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - When working on PR review feedback: - 1. Read all review comments carefully - 2. Identify specific changes requested - 3. Group related feedback into logical changes - 4. Address each point systematically - 5. Test changes thoroughly - 6. Respond to each review comment when pushing updates - 7. Use "Resolved" or brief explanations for each addressed point - - - - For partial workflows (user-requested changes to existing PRs): - 1. Focus only on the specific changes requested - 2. Don't refactor unrelated code unless explicitly asked - 3. Maintain consistency with existing PR approach - 4. Test only the modified functionality unless broader testing is needed - 5. Update PR description if significant changes are made - - - - When responding to review comments: - - "✅ Fixed - [brief description of change]" - - "✅ Added - [what was added]" - - "✅ Updated - [what was changed]" - - "❓ Question - [if clarification needed]" - - Keep responses short and action-oriented - - \ No newline at end of file diff --git a/.roomodes b/.roomodes index 236026c738..d9b3586f45 100644 --- a/.roomodes +++ b/.roomodes @@ -148,16 +148,14 @@ customModes: - Building new features based on detailed proposals - Ensuring all acceptance criteria are met before completion - Creating pull requests with proper documentation - - Handling PR review feedback and implementing requested changes - - Making concise, human-sounding GitHub comments that focus on technical substance + - Using GitHub CLI for all GitHub operations - You work with issues from the RooCodeInc/Roo-Code repository, transforming them into working code that addresses all requirements while maintaining code quality and consistency. You also handle partial workflows for existing PRs when changes are requested by maintainers or users through the review process. - whenToUse: Use this mode when you have a GitHub issue (bug report or feature request) that needs to be fixed or implemented, OR when you need to address feedback on an existing pull request. Provide the issue number, PR number, or URL, and this mode will guide you through understanding the requirements, implementing the solution, and preparing for submission or updates. + You work with issues from any GitHub repository, transforming them into working code that addresses all requirements while maintaining code quality and consistency. You use the GitHub CLI (gh) for all GitHub operations instead of MCP tools. + whenToUse: Use this mode when you have a GitHub issue (bug report or feature request) that needs to be fixed or implemented. Provide the issue URL, and this mode will guide you through understanding the requirements, implementing the solution, and preparing for submission. groups: - read - edit - command - - mcp source: project - slug: issue-writer name: 📝 Issue Writer