Browse Source

Feat: Improve Issue Fixer Rules for Targeted Fixes (#4652)

Daniel 8 months ago
parent
commit
48d0b19324

+ 11 - 9
.roo/rules-issue-fixer/1_Workflow.xml

@@ -98,9 +98,9 @@
       For Bug Fixes:
       For Bug Fixes:
       1. Reproduce the bug locally (if possible)
       1. Reproduce the bug locally (if possible)
       2. Identify root cause
       2. Identify root cause
-      3. Plan the fix approach
-      4. Identify files to modify
-      5. Plan test cases to prevent regression
+      3. Plan the fix approach. The plan should be focused on resolving the issue with a high-quality, targeted fix, while avoiding unrelated changes.
+      4. Identify files to modify.
+      5. Plan test cases to prevent regression.
       
       
       For Feature Implementation:
       For Feature Implementation:
       1. Break down the feature into components
       1. Break down the feature into components
@@ -114,10 +114,12 @@
       <ask_followup_question>
       <ask_followup_question>
       <question>I've analyzed issue #[number]: "[title]"
       <question>I've analyzed issue #[number]: "[title]"
 
 
-      Here's my implementation plan:
+      Here's my implementation plan to resolve the issue:
 
 
       [Detailed plan with steps and affected files]
       [Detailed plan with steps and affected files]
 
 
+      This plan focuses on providing a quality fix for the reported problem without introducing unrelated changes.
+
       Would you like me to proceed with this implementation?</question>
       Would you like me to proceed with this implementation?</question>
       <follow_up>
       <follow_up>
       <suggest>Yes, proceed with the implementation</suggest>
       <suggest>Yes, proceed with the implementation</suggest>
@@ -199,11 +201,11 @@
       5. Ensure backward compatibility (if applicable)
       5. Ensure backward compatibility (if applicable)
       
       
       For Bug Fixes:
       For Bug Fixes:
-      1. Apply the minimal fix needed
-      2. Don't refactor unrelated code
-      3. Add regression tests
-      4. Verify the fix resolves the issue
-      5. Check for side effects
+      1. Implement the planned fix, focusing on quality and precision.
+      2. The scope of the fix should be as narrow as possible to address the issue. Avoid making changes to code that is not directly related to the fix. This is not an encouragement for one-line hacks, but a guideline to prevent unintended side-effects.
+      3. Add regression tests.
+      4. Verify the fix resolves the issue.
+      5. Check for side effects.
       
       
       For Features:
       For Features:
       1. Implement incrementally
       1. Implement incrementally

+ 2 - 1
.roo/rules-issue-fixer/2_best_practices.xml

@@ -1,7 +1,8 @@
 <best_practices>
 <best_practices>
   - Always read the entire issue and all comments before starting
   - Always read the entire issue and all comments before starting
   - Follow the project's coding standards and patterns
   - Follow the project's coding standards and patterns
-  - Make minimal changes for bug fixes (don't refactor unnecessarily)
+  - Focus exclusively on addressing the issue's requirements.
+  - Make minimal, high-quality changes for bug fixes. The goal is a narrow, targeted fix, not a one-line hack.
   - Test thoroughly - both automated and manual testing
   - Test thoroughly - both automated and manual testing
   - Document complex logic with comments
   - Document complex logic with comments
   - Keep commits focused and well-described
   - Keep commits focused and well-described