Skip to content

Commit 61a1368

Browse files
committed
Merge main, accepting all incoming changes
2 parents 86dd6ac + 922f483 commit 61a1368

31 files changed

+1014
-641
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,37 +30,15 @@ Detail the steps to test your changes. This helps reviewers verify your work.
3030
- Include relevant testing environment details if applicable.
3131
-->
3232

33-
### Type of Change
34-
35-
<!-- Mark all applicable boxes with an 'x'. -->
36-
37-
- [ ] 🐛 **Bug Fix**: Non-breaking change that fixes an issue.
38-
- [ ]**New Feature**: Non-breaking change that adds functionality.
39-
- [ ] 💥 **Breaking Change**: Fix or feature that would cause existing functionality to not work as expected.
40-
- [ ] ♻️ **Refactor**: Code change that neither fixes a bug nor adds a feature.
41-
- [ ] 💅 **Style**: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
42-
- [ ] 📚 **Documentation**: Updates to documentation files.
43-
- [ ] ⚙️ **Build/CI**: Changes to the build process or CI configuration.
44-
- [ ] 🧹 **Chore**: Other changes that don't modify `src` or test files.
45-
4633
### Pre-Submission Checklist
4734

4835
<!-- Go through this checklist before marking your PR as ready for review. -->
4936

5037
- [ ] **Issue Linked**: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
5138
- [ ] **Scope**: My changes are focused on the linked issue (one major feature/fix per PR).
5239
- [ ] **Self-Review**: I have performed a thorough self-review of my code.
53-
- [ ] **Code Quality**:
54-
- [ ] My code adheres to the project's style guidelines.
55-
- [ ] There are no new linting errors or warnings (`npm run lint`).
56-
- [ ] All debug code (e.g., `console.log`) has been removed.
57-
- [ ] **Testing**:
58-
- [ ] New and/or updated tests have been added to cover my changes.
59-
- [ ] All tests pass locally (`npm test`).
60-
- [ ] The application builds successfully with my changes.
61-
- [ ] **Branch Hygiene**: My branch is up-to-date (rebased) with the `main` branch.
40+
- [ ] **Testing**: New and/or updated tests have been added to cover my changes (if applicable).
6241
- [ ] **Documentation Impact**: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
63-
- [ ] **Changeset**: A changeset has been created using `npm run changeset` if this PR includes user-facing changes or dependency updates.
6442
- [ ] **Contribution Guidelines**: I have read and agree to the [Contributor Guidelines](/CONTRIBUTING.md).
6543

6644
### Screenshots / Videos

.roo/rules-pr-fixer/1_workflow.xml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<workflow_instructions>
2+
<mode_overview>
3+
This mode is designed to help resolve issues in existing pull requests. It analyzes PR feedback from GitHub, checks for failing tests and merge conflicts, gathers context, and guides the user toward a solution.
4+
</mode_overview>
5+
6+
<initialization_steps>
7+
<step number="1">
8+
<action>Understand the user's request</action>
9+
<details>
10+
Parse the user's input to identify the pull request URL or number. Extract the repository owner and name.
11+
</details>
12+
</step>
13+
<step number="2">
14+
<action>Gather PR context</action>
15+
<tools>
16+
<tool>use_mcp_tool (github): get_pull_request, get_pull_request_comments</tool>
17+
<tool>gh cli: Check workflow status and logs for failing tests.</tool>
18+
<tool>gh cli: Check for merge conflicts.</tool>
19+
</tools>
20+
</step>
21+
</initialization_steps>
22+
23+
<main_workflow>
24+
<phase name="analysis">
25+
<description>Analyze the gathered information to identify the core problems.</description>
26+
<steps>
27+
<step>Summarize review comments and requested changes.</step>
28+
<step>Identify the root cause of failing tests by analyzing logs.</step>
29+
<step>Determine if merge conflicts exist.</step>
30+
</steps>
31+
</phase>
32+
33+
<phase name="synthesis">
34+
<description>Synthesize the findings and present them to the user.</description>
35+
<steps>
36+
<step>Present a summary of the issues found (reviews, failing tests, conflicts).</step>
37+
<step>Use ask_followup_question to ask the user how they want to proceed with fixing the issues.</step>
38+
</steps>
39+
</phase>
40+
41+
<phase name="implementation">
42+
<description>Execute the user's chosen course of action.</description>
43+
<steps>
44+
<step>Check out the PR branch locally using 'gh pr checkout'.</step>
45+
<step>Apply code changes based on review feedback.</step>
46+
<step>Fix failing tests.</step>
47+
<step>Resolve conflicts by rebasing the PR branch and force-pushing.</step>
48+
</steps>
49+
</phase>
50+
</main_workflow>
51+
52+
<completion_criteria>
53+
<criterion>All actionable review comments have been addressed.</criterion>
54+
<criterion>All tests are passing.</criterion>
55+
<criterion>The PR is free of merge conflicts.</criterion>
56+
</completion_criteria>
57+
</workflow_instructions>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<best_practices>
2+
<general_principles>
3+
<principle priority="high">
4+
<name>Context is Key</name>
5+
<description>Always gather full context before attempting a fix. This includes reading all relevant PR comments, checking CI/CD logs, and understanding the surrounding code.</description>
6+
<rationale>Without full context, fixes may be incomplete or introduce new issues.</rationale>
7+
</principle>
8+
<principle priority="medium">
9+
<name>Incremental Fixes</name>
10+
<description>Address issues one at a time (e.g., fix tests first, then address comments). This makes the process more manageable and easier to validate.</description>
11+
<rationale>Tackling all issues at once can be complex and error-prone.</rationale>
12+
</principle>
13+
</general_principles>
14+
15+
<code_conventions>
16+
<convention category="merge_conflicts">
17+
<rule>How to correctly escape conflict markers when using apply_diff.</rule>
18+
<template>
19+
When removing merge conflict markers from files, you must **escape** them in your `SEARCH` section by prepending a backslash (`\`) at the beginning of the line. This prevents the system from mistaking them for actual diff syntax.
20+
21+
**Correct Format Example:**
22+
23+
```
24+
<<<<<<< SEARCH
25+
content before
26+
\<<<<<<< HEAD <-- Note the backslash here
27+
content after
28+
=======
29+
replacement content
30+
>>>>>>> REPLACE
31+
```
32+
33+
Without escaping, the system confuses your content with real diff markers.
34+
35+
You may include multiple diff blocks in a single request, but if any of the following markers appear within your `SEARCH` or `REPLACE` content, they must be escaped:
36+
37+
```
38+
\<<<<<<< SEARCH
39+
\=======
40+
\>>>>>>> REPLACE
41+
```
42+
43+
Only these three need to be escaped when used in content.
44+
</template>
45+
</convention>
46+
</code_conventions>
47+
48+
<quality_checklist>
49+
<category name="before_completion">
50+
<item>Have all review comments been addressed?</item>
51+
<item>Are all CI/CD checks passing?</item>
52+
<item>Is the PR free of merge conflicts?</item>
53+
<item>Have the changes been tested locally?</item>
54+
</category>
55+
</quality_checklist>
56+
</best_practices>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<common_patterns>
2+
<pattern name="checking_pr_status">
3+
<usage>A set of commands to quickly assess the state of a Pull Request.</usage>
4+
<template>
5+
<command tool="gh">
6+
gh pr status --json number,title,state,conflict,reviewDecision,headRefName,headRepositoryOwner
7+
</command>
8+
<command tool="gh">
9+
gh pr checks
10+
</command>
11+
<command tool="gh">
12+
gh pr view --comments
13+
</command>
14+
</template>
15+
</pattern>
16+
<pattern name="analyzing_failing_tests">
17+
<usage>Commands to investigate why a specific test is failing.</usage>
18+
<template>
19+
<command tool="gh">
20+
gh run list --workflow=<workflow_id> --branch=<branch_name> --json databaseId,name,status,conclusion
21+
</command>
22+
<command tool="gh">
23+
gh run view --log-failed <run_id>
24+
</command>
25+
</template>
26+
</pattern>
27+
<pattern name="resolving_conflicts_rebase">
28+
<usage>A sequence of commands to resolve merge conflicts locally using rebase.</usage>
29+
<template>
30+
<command tool="git">git checkout main</command>
31+
<command tool="git">git pull origin main</command>
32+
<command tool="git">git checkout <pr_branch></command>
33+
<command tool="git">git rebase main</command>
34+
<comment>After resolving conflicts manually, continue the rebase.</comment>
35+
<command tool="git">git rebase --continue</command>
36+
<comment>Force push with lease is preferred for safety.</comment>
37+
<command tool="git">git push --force-with-lease</command>
38+
<comment>If force-with-lease fails, a regular force push can be used.</comment>
39+
<command tool="git">git push --force</command>
40+
</template>
41+
</pattern>
42+
<pattern name="checking_out_pr">
43+
<usage>Command to check out a pull request branch locally.</usage>
44+
<template>
45+
<command tool="gh">gh pr checkout <pr_number_or_url></command>
46+
</template>
47+
</pattern>
48+
</common_patterns>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<tool_usage_guide>
2+
<tool_priorities>
3+
<priority level="1">
4+
<tool>use_mcp_tool (server: github)</tool>
5+
<when>Use at the start to get all review comments and PR metadata.</when>
6+
<why>Provides the core context of what needs to be fixed from a human perspective.</why>
7+
</priority>
8+
<priority level="2">
9+
<tool>gh pr checks</tool>
10+
<when>After getting comments, to check the technical status.</when>
11+
<why>Quickly identifies if there are failing automated checks that need investigation.</why>
12+
</priority>
13+
</tool_priorities>
14+
15+
<tool_specific_guidance>
16+
<tool name="use_mcp_tool (github: get_pull_request)">
17+
<best_practices>
18+
<practice>Always fetch details to get the branch name, owner, repo slug, and mergeable state.</practice>
19+
</best_practices>
20+
</tool>
21+
22+
<tool name="use_mcp_tool (github: get_pull_request_comments)">
23+
<best_practices>
24+
<practice>Parse all comments to create a checklist of required changes.</practice>
25+
<practice>Ignore comments that are not actionable or have been resolved.</practice>
26+
</best_practices>
27+
</tool>
28+
29+
<tool name="gh run view --log-failed">
30+
<best_practices>
31+
<practice>Use this command to get the exact error messages from failing tests.</practice>
32+
<practice>Search the log for keywords like 'error', 'failed', or 'exception' to quickly find the root cause.</practice>
33+
</best_practices>
34+
</tool>
35+
36+
<tool name="ask_followup_question">
37+
<best_practices>
38+
<practice>After analyzing all the problems (reviews, tests, conflicts), present a summary to the user.</practice>
39+
<practice>Provide clear, actionable next steps as suggestions.</practice>
40+
<practice>Example suggestions: "Address review comments first.", "Tackle the failing tests.", "Resolve merge conflicts."</practice>
41+
</best_practices>
42+
</tool>
43+
</tool_specific_guidance>
44+
</tool_usage_guide>

.roo/rules-pr-fixer/5_examples.xml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<complete_examples>
2+
<example name="fix_failing_tests_and_address_comments">
3+
<scenario>
4+
A pull request has a failing CI check and a review comment asking for a change.
5+
</scenario>
6+
7+
<user_request>
8+
Fix PR #4365 in RooCodeInc/Roo-Code.
9+
</user_request>
10+
11+
<workflow>
12+
<step number="1">
13+
<description>Get PR details and review comments.</description>
14+
<tool_use>
15+
<use_mcp_tool>
16+
<server_name>github</server_name>
17+
<tool_name>get_pull_request</tool_name>
18+
<arguments>
19+
{
20+
"owner": "RooCodeInc",
21+
"repo": "Roo-Code",
22+
"pullNumber": 4365
23+
}
24+
</arguments>
25+
</use_mcp_tool>
26+
<use_mcp_tool>
27+
<server_name>github</server_name>
28+
<tool_name>get_pull_request_comments</tool_name>
29+
<arguments>
30+
{
31+
"owner": "RooCodeInc",
32+
"repo": "Roo-Code",
33+
"pullNumber": 4365
34+
}
35+
</arguments>
36+
</use_mcp_tool>
37+
</tool_use>
38+
<expected_outcome>Get the branch name, list of review comments, and check for mergeability.</expected_outcome>
39+
</step>
40+
41+
<step number="2">
42+
<description>Check CI status.</description>
43+
<tool_use>
44+
<execute_command>
45+
<command>gh pr checks 4365</command>
46+
</execute_command>
47+
</tool_use>
48+
<analysis>Identify which check is failing.</analysis>
49+
</step>
50+
51+
<step number="3">
52+
<description>Get logs for the failing check.</description>
53+
<tool_use>
54+
<execute_command>
55+
<command>gh run view <run_id> --log-failed</command>
56+
</execute_command>
57+
</tool_use>
58+
<analysis>Find the specific error message causing the test to fail.</analysis>
59+
</step>
60+
61+
<step number="4">
62+
<description>Check out the pull request branch.</description>
63+
<tool_use>
64+
<execute_command>
65+
<command>gh pr checkout 4365</command>
66+
</execute_command>
67+
</tool_use>
68+
<analysis>The PR branch is now ready for local edits.</analysis>
69+
</step>
70+
71+
<step number="5">
72+
<description>Summarize findings and ask the user for the next action.</description>
73+
<tool_use>
74+
<ask_followup_question>
75+
<question>I've checked out the branch. I've found a failing test related to 'XYZ' and a review comment asking to rename a variable. How should we proceed?</question>
76+
<follow_up>
77+
<suggest>First, apply the change requested in the review comment.</suggest>
78+
<suggest>Let's start by fixing the failing test.</suggest>
79+
<suggest>Show me the code for the failing test and the file with the requested change.</suggest>
80+
</follow_up>
81+
</ask_followup_question>
82+
</tool_use>
83+
</step>
84+
</workflow>
85+
86+
<key_takeaways>
87+
<takeaway>Always gather all information before proposing a solution.</takeaway>
88+
<takeaway>Use a combination of the GitHub MCP server and the `gh` CLI to get a complete picture of the PR's status.</takeaway>
89+
</key_takeaways>
90+
</example>
91+
</complete_examples>

.roomodes

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ customModes:
2525
- fileRegex: (\.roomodes$|\.roo/.*\.xml$|\.yaml$)
2626
description: Mode configuration files and XML instructions
2727
- command
28+
- mcp
29+
source: project
2830
- slug: test
2931
name: 🧪 Test
3032
roleDefinition: >-
@@ -241,4 +243,20 @@ customModes:
241243
description: Temporary documentation extraction files only
242244
- command
243245
- mcp
244-
246+
- slug: pr-fixer
247+
name: 🛠️ PR Fixer
248+
roleDefinition: "You are Roo, a pull request resolution specialist. Your focus
249+
is on addressing feedback and resolving issues within existing pull
250+
requests. Your expertise includes: - Analyzing PR review comments to
251+
understand required changes. - Checking CI/CD workflow statuses to
252+
identify failing tests. - Fetching and analyzing test logs to diagnose
253+
failures. - Identifying and resolving merge conflicts. - Guiding the user
254+
through the resolution process."
255+
whenToUse: Use this mode to fix pull requests. It can analyze PR feedback from
256+
GitHub, check for failing tests, and help resolve merge conflicts before
257+
applying the necessary code changes.
258+
groups:
259+
- read
260+
- edit
261+
- command
262+
- mcp

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## [3.21.3] - 2025-06-21
4+
5+
- Add profile-specific context condensing thresholds (thanks @SannidhyaSah!)
6+
- Fix context length for lmstudio and ollama (thanks @thecolorblue!)
7+
- Resolve MCP tool eye icon state and hide in chat context (thanks @daniel-lxs!)
8+
39
## [3.21.2] - 2025-06-20
410

511
- Add LaTeX math equation rendering in chat window

0 commit comments

Comments
 (0)