-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[AI] Moved PR Reviewer Agent to File-Based Instruction System #32659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hey there @@kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
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 addresses GitHub token limit issues by migrating the PR Reviewer Agent instructions from a large inline YAML file to a file-based instruction architecture. The change splits ~1200 lines of inline instructions into 7 organized markdown files under .github/instructions/pr-reviewer-agent/.
Key changes:
- Created modular instruction files for testing, sandbox setup, error handling, output format, edge cases, SafeArea testing, and core guidelines
- Updated main agent file to reference external instruction files
- No functional behavior changes intended
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/agents/pr-reviewer.md |
Reduced from ~1200 lines to 39 lines; now references external instruction files |
.github/instructions/pr-reviewer-agent/core-guidelines.md |
Core review philosophy, workflow, and code analysis patterns |
.github/instructions/pr-reviewer-agent/testing-guidelines.md |
App selection (Sandbox vs HostApp), PR fetching, build/deploy procedures |
.github/instructions/pr-reviewer-agent/sandbox-setup.md |
Sandbox modification patterns and instrumentation examples |
.github/instructions/pr-reviewer-agent/safearea-guidelines.md |
SafeArea-specific testing guidance |
.github/instructions/pr-reviewer-agent/output-format.md |
Review structure and redundancy elimination guidelines |
.github/instructions/pr-reviewer-agent/error-handling.md |
Build error and unexpected result handling procedures |
.github/instructions/pr-reviewer-agent/edge-cases.md |
Edge case discovery requirements |
| dotnet clean Microsoft.Maui.slnx | ||
| rm -rf bin/ obj/ | ||
| dotnet restore Microsoft.Maui.slnx --force |
Copilot
AI
Nov 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect file extension. The repository uses .sln files, not .slnx. These commands should reference Microsoft.Maui.sln instead of Microsoft.Maui.slnx.
| dotnet clean Microsoft.Maui.slnx | |
| rm -rf bin/ obj/ | |
| dotnet restore Microsoft.Maui.slnx --force | |
| dotnet clean Microsoft.Maui.sln | |
| rm -rf bin/ obj/ | |
| dotnet restore Microsoft.Maui.sln --force |
|
/rebase |
Condensed and reorganized .github/agents/pr-reviewer.md to reference new modular instruction files for PR review workflow. Added core guidelines and supporting documents under .github/instructions/pr-reviewer-agent/ for time management, edge cases, error handling, output format, safe area testing, sandbox setup, and testing procedures. This improves maintainability and clarity for PR reviewer agent processes.
5060502 to
0583be0
Compare
Description
This PR migrates the .NET MAUI PR Reviewer Agent from a large inline file prompt to a file-based instruction architecture. The previous inline prompt exceeded GitHub’s token limits, preventing the agent from loading. Because the instruction set is large and cannot be shortened, externalizing it into Markdown files is the correct and scalable solution.
Changes
Why This Change Is Needed
Impact
Validation
.mdfiles resolve correctly.