Skip to content

Allow review-fix agent to edit files a requested change mechanically requires#28

Merged
plebioda merged 1 commit into
masterfrom
fix-review-handling-not-reviewed-files
Jun 23, 2026
Merged

Allow review-fix agent to edit files a requested change mechanically requires#28
plebioda merged 1 commit into
masterfrom
fix-review-handling-not-reviewed-files

Conversation

@plebioda

Copy link
Copy Markdown
Collaborator

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.

@plebioda plebioda force-pushed the fix-review-handling-not-reviewed-files branch from 812fb3e to 3b42302 Compare June 23, 2026 19:56
@plebioda plebioda requested a review from Copilot June 23, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 modified field definition to include both explicitly-named and mechanically-required files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mergai/prompts/system_prompt_review.md
…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.
@plebioda plebioda force-pushed the fix-review-handling-not-reviewed-files branch from 764dc6e to 8447591 Compare June 23, 2026 20:54
@plebioda plebioda merged commit a1212fc into master Jun 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants