fix: add scope-guard, acceptance criteria, and version-bump constraints to prevent PR scope drift#33127
Closed
Copilot wants to merge 2 commits into
Closed
fix: add scope-guard, acceptance criteria, and version-bump constraints to prevent PR scope drift#33127Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…ts to prevent PR scope drift - Add Checkpoint 2b (Scope-Guard) to AGENTS.md Critical Requirements: agents must verify branch name, changed files, and PR title all match issue scope before calling report_progress; call report_incomplete if any diverge - Add Acceptance Criteria and Scope Anchoring mandatory section to AGENTS.md: agents extract files/tests/reviewer question from issue before writing code - Update Quick Reference section in AGENTS.md to include Checkpoint 2b - Add Version-Bump Scope Constraint best practice to upgrade-agentic-workflows.md: only update the target version constant and recompile; do not regenerate unrelated artifacts Closes #[this issue] Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix scope drift in closed Copilot PRs
fix: add scope-guard, acceptance criteria, and version-bump constraints to prevent PR scope drift
May 18, 2026
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.
185 closed-without-merge Copilot PRs show a recurring pattern: the agent reinterprets the issue mid-session and pivots to a related but distinct change, causing maintainers to close the PR as a scope mismatch. This adds three targeted guardrails to stop that.
Changes
AGENTS.md— Checkpoint 2b: Scope-GuardNew mandatory step inserted directly after the existing Checkpoint 2 (pre-
report_progressvalidation). Agents must confirm all three align before opening a PR:If any diverge → call
report_incompleteinstead of opening the PR.AGENTS.md— Acceptance Criteria and Scope AnchoringNew mandatory section in Critical Requirements. Before writing code, agents must extract from the issue:
Explicit prohibitions: no fixing unrelated bugs, no regenerating artifacts not in scope, no out-of-scope refactoring.
AGENTS.md— Quick Reference updatedCheckpoint 2b summary added to the condensed reference block at the bottom so it's visible on a quick scan.
.github/aw/upgrade-agentic-workflows.md— Version-Bump Scope ConstraintNew best-practice item (#6): version-bump upgrades are constrained to the version identifier + recompile only. Agents must not regenerate agent files, prompt templates, or other artifacts unless the changelog explicitly requires it. Unexpected diffs beyond lock files must be documented before inclusion in the PR.