Skip to content

Optimize PR Code Quality Reviewer prompt and diff prefetch - #51170

Merged
pelikhan merged 3 commits into
mainfrom
copilot/agentic-token-optimizer-optimize-pr-code-quality
Aug 7, 2026
Merged

Optimize PR Code Quality Reviewer prompt and diff prefetch#51170
pelikhan merged 3 commits into
mainfrom
copilot/agentic-token-optimizer-optimize-pr-code-quality

Conversation

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The PR Code Quality Reviewer carried duplicated prompt guidance and over-prefetched large PR diffs, increasing AIC on every run and especially on large diffs. This update trims always-loaded instructions and lowers the shared reviewer diff cap.

  • Prompt consolidation

    • Keeps progressive-disclosure formatting guidance at the point where review comments are written.
    • Removes the redundant Review Formatting subsection.
    • Folds “no empty compliments / no generic looks good” into the existing Do not flag list.
  • Diff cap reduction

    • Lowers shared PR diff prefetching from 3000 to 2000 lines in shared/pr-diff-data-fetch.md.
    • Recompiles all workflows that consume the shared import.
  • Engine alignment

    • Switches PR Code Quality Reviewer to the requested pi agentic engine.
engine:
  id: pi

Copilot AI and others added 2 commits August 7, 2026 19:39
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize PR Code Quality Reviewer by consolidating guidance Optimize PR Code Quality Reviewer prompt and diff prefetch Aug 7, 2026
Copilot AI requested a review from pelikhan August 7, 2026 19:50
@pelikhan
pelikhan marked this pull request as ready for review August 7, 2026 19:50
Copilot AI balanced review requested due to automatic review settings August 7, 2026 19:50
@pelikhan
pelikhan merged commit a03acf3 into main Aug 7, 2026
@pelikhan
pelikhan deleted the copilot/agentic-token-optimizer-optimize-pr-code-quality branch August 7, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Optimizes PR review token usage and aligns the code-quality reviewer with the Pi engine.

Changes:

  • Consolidates review-formatting guidance.
  • Reduces the intended diff cap from 3,000 to 2,000 lines.
  • Migrates the reviewer from Copilot to Pi.
Show a summary per file
File Description
.github/workflows/shared/pr-diff-data-fetch.md Lowers the shared diff cap.
.github/workflows/pr-code-quality-reviewer.md Streamlines prompts and selects Pi.
.github/workflows/pr-code-quality-reviewer.lock.yml Recompiles the reviewer for Pi.
.github/workflows/mattpocock-skills-reviewer.lock.yml Recompiles with the lower cap.
.github/workflows/impeccable-skills-reviewer.lock.yml Recompiles with the lower cap.

Review details

Tip

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

  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Balanced

PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
EXPR_GITHUB_REPOSITORY: ${{ github.repository }}
PR_DIFF_MAX_LINES: "3000"
PR_DIFF_MAX_LINES: "2000"
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.86.1

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.

[agentic-token-optimizer] Optimize PR Code Quality Reviewer: consolidate duplicated prompt guidance and tighten diff cap

3 participants