Allow review-fix agent to edit files a requested change mechanically requires#28
Merged
Merged
Conversation
812fb3e to
3b42302
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the review-fix system prompt to allow the agent to make mechanically required cross-file edits (e.g., updating call sites or matching interface/base-class declarations) when needed to keep a requested change correct and compiling, while still prohibiting opportunistic refactors.
Changes:
- Expands the “stay within scope” rule to include mechanically required cross-file edits and instructs the agent to record them under
modified. - Updates the “Hard rules” section to reflect the relaxed-but-still-strict file-edit scope.
- Clarifies the
modifiedfield definition to include both explicitly-named and mechanically-required files.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…requires The review-fix system prompt forbade editing any file not anchored to or explicitly named by a comment. When a comment asked to change a method's signature, the agent could not also update the matching interface/base-class declaration, so it reverted its correct edits and recorded the thread as unaddressed - producing no commit. Relax the scope rules to permit cross-file edits that are mechanically required for a requested change to be correct and compile (matching interface/base-class declarations, call sites of a renamed symbol), record them under `modified`, and keep deferring to a human when the required change is broad or involves design judgement. The ban on opportunistic refactors and unrelated fixes is unchanged.
764dc6e to
8447591
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The review-fix system prompt forbade editing any file not anchored to or explicitly named by a comment. When a comment asked to change a method's signature, the agent could not also update the matching interface/base-class declaration, so it reverted its correct edits and recorded the thread as unaddressed - producing no commit.
Relax the scope rules to permit cross-file edits that are mechanically required for a requested change to be correct and compile (matching interface/base-class declarations, call sites of a renamed symbol), record them under
modified, and keep deferring to a human when the required change is broad or involves design judgement. The ban on opportunistic refactors and unrelated fixes is unchanged.