@@ -4,18 +4,15 @@ This folder contains instructions and configurations for AI coding assistants wo
44
55## Available Agents
66
7+ ### PR Agent
8+ The PR agent is a unified 5-phase workflow for investigating issues and reviewing/working on PRs. It handles everything from context gathering through test verification, fix exploration, and creating PRs or review reports.
9+
710### Sandbox Agent
811The sandbox agent is your general-purpose tool for working with the .NET MAUI Sandbox app. Use it for manual testing, PR validation, issue reproduction, and experimentation with MAUI features.
912
1013### UI Test Coding Agent
1114The UI test coding agent writes and runs automated UI tests following .NET MAUI conventions. Use it for creating new test coverage, running existing tests from PRs, and validating UI test correctness.
1215
13- ### Issue Resolver Agent
14- The issue resolver agent investigates, reproduces, and fixes reported issues in the .NET MAUI repository with comprehensive testing and validation.
15-
16- ### PR Reviewer Agent (Inline)
17- The PR reviewer agent conducts thorough, constructive code reviews of .NET MAUI pull requests with hands-on testing and validation. This agent uses inline instructions rather than a separate file.
18-
1916## How to Use
2017
2118### Option 1: Multi-Agent Mode (Recommended)
@@ -88,28 +85,23 @@ please write UI tests for issue #12345
8885please run the UI tests from PR #32479
8986` ` `
9087
91- ** Issue Resolver Agent:**
88+ ** PR Agent:**
9289` ` ` bash
9390# Start GitHub Copilot CLI with agent support
9491copilot
9592
96- # Invoke the issue-resolver agent
97- /agent issue-resolver
93+ # Invoke the pr agent
94+ /agent pr
9895
99- # Request issue investigation
100- please investigate and fix https://github.com/dotnet/maui/issues/XXXXX
96+ # Fix an issue or review a PR
97+ please fix issue # 12345
98+ please review https://github.com/dotnet/maui/pull/XXXXX
10199` ` `
102100
103- ** PR Reviewer Agent :**
101+ ** For issues without a PR (remote Copilot) :**
104102` ` ` bash
105- # Start GitHub Copilot CLI with agent support
106- copilot
107-
108- # Invoke the pr-reviewer agent
109- /agent pr-reviewer
110-
111- # Request a review
112- please review https://github.com/dotnet/maui/pull/XXXXX
103+ # Use /delegate to have remote Copilot create the fix
104+ /delegate fix issue https://github.com/dotnet/maui/issues/XXXXX
113105` ` `
114106
115107# ## Option 3: GitHub Copilot Agents (Web)
@@ -121,13 +113,12 @@ please review https://github.com/dotnet/maui/pull/XXXXX
1211133. ** Choose your agent** from the dropdown:
122114 - ` sandbox-agent` for manual testing and experimentation
123115 - ` uitest-coding-agent` for writing and running UI tests
124- - ` issue-resolver` for investigating and fixing issues
125- - ` pr-reviewer` for PR reviews
116+ - ` pr` for reviewing and working on existing PRs
126117
1271184. ** Enter a task** in the text box:
128119 - For sandbox testing: ` Please test PR # 32479`
129120 - For UI tests: ` Please write UI tests for issue # 12345`
130- - For issue resolution : ` Please investigate and fix: https://github.com/dotnet/maui/issues/ XXXXX`
121+ - For PR review : ` Please review PR # XXXXX`
131122 - For PR reviews: ` Please review this PR: https://github.com/dotnet/maui/pull/XXXXX`
132123
1331245. ** Click Start task** or press Return
@@ -156,32 +147,19 @@ Automated testing specialist for the .NET MAUI test suite:
1561474. **Cross-Platform** - Tests on iOS, Android, Windows, and MacCatalyst
1571485. **Automated Workflow** - Uses `BuildAndRunHostApp.ps1` to handle building, deployment, and logging to `CustomAgentLogsTmp/UITests/`
158149
159- ### Issue Resolver Agent
160-
161- Comprehensive issue investigation and resolution:
162-
163- 1. **Issue Investigation** - Analyzes the reported issue and gathers context
164- 2. **Reproduction** - Creates minimal reproduction case in Sandbox app
165- 3. **Root Cause Analysis** - Identifies the underlying problem in the codebase
166- 4. **Fix Implementation** - Implements and tests the fix
167- 5. **Validation** - Tests both with and without the fix to prove it works
168- 6. **UI Test Creation** - Adds automated UI test to prevent regression
169- 7. **Documentation** - Provides detailed explanation of the issue and fix
170-
171- ### PR Reviewer Agent
150+ ### PR Agent
172151
173- Thorough PR review with hands-on testing :
152+ Unified 5-phase workflow for issue investigation and PR work :
174153
175- 1. **Code Analysis** - Reviews code for correctness, style, and best practices
176- 2. **Build & Deploy** - Builds the Sandbox app and deploys to simulator/emulator
177- 3. **Real Testing** - Tests PR changes on actual devices with measurements
178- 4. **Before/After Comparison** - Compares behavior with and without PR changes
179- 5. **Edge Case Testing** - Tests scenarios not mentioned by the PR author
180- 6. **Documented Results** - Provides review with actual test data and evidence
154+ 1. **Pre-Flight** - Context gathering from issues/PRs
155+ 2. **Tests** - Create or verify reproduction tests exist
156+ 3. **Gate** - Verify tests catch the issue (mandatory checkpoint)
157+ 4. **Fix** - Explore fix alternatives using `try-fix` skill, compare approaches
158+ 5. **Report** - Create PR or write review report
181159
182160### When Agents Pause
183161
184- Both agents will pause and ask for help if they encounter:
162+ All agents will pause and ask for help if they encounter:
185163- Merge conflicts when applying changes
186164- Build errors that prevent testing
187165- Test results that are unexpected or confusing
@@ -224,18 +202,17 @@ Agents work with **time budgets as estimates for planning**, not hard deadlines:
224202# # File Structure
225203
226204# ## Agent Definitions
205+ - ** ` agents/pr.md` ** - PR workflow phases 1-3 (Pre-Flight, Tests, Gate)
206+ - ** ` agents/pr/post-gate.md` ** - PR workflow phases 4-5 (Fix, Report)
227207- ** ` agents/sandbox-agent.md` ** - Sandbox agent for testing and experimentation
228208- ** ` agents/uitest-coding-agent.md` ** - UI test agent for writing and running tests
229- - ** ` agents/issue-resolver.md` ** - Issue resolver agent for investigating and fixing issues
230- - ** ` agents/pr-reviewer.md` ** - PR reviewer agent (inline instructions)
231- - ** ` agents/README.md` ** - Agent selection guide and quick reference
232209
233210# ## Agent Files
234211
235- Agents are now self-contained single files :
212+ Agent files in the ` .github/agents/ ` directory :
236213
237- - ** ` agents/pr-reviewer .md` ** - PR review workflow with hands-on testing (~400 lines )
238- - ** ` agents/issue-resolver .md` ** - Issue resolution workflow with checkpoints (~620 lines )
214+ - ** ` agents/pr.md` ** - PR workflow phases 1-3 (Pre-Flight, Tests, Gate )
215+ - ** ` agents/pr/post-gate .md` ** - PR workflow phases 4-5 (Fix, Report )
239216- ** ` agents/sandbox-agent.md` ** - Sandbox app testing and experimentation
240217- ** ` agents/uitest-coding-agent.md` ** - UI test writing and execution
241218
@@ -248,6 +225,9 @@ These provide specialized guidance for specific scenarios used by all agents:
248225- ** ` instructions/templates.instructions.md` ** - Template modification rules
249226- ** ` instructions/xaml-unittests.instructions.md` ** - XAML unit testing guidelines
250227- ** ` instructions/collectionview-handler-detection.instructions.md` ** - CollectionView handler configuration
228+ - ** ` instructions/agents.instructions.md` ** - Custom agent authoring guidelines
229+ - ** ` instructions/skills.instructions.md` ** - Skill development standards
230+ - ** ` instructions/helix-device-tests.instructions.md` ** - Helix device test infrastructure
251231
252232# ## Shared Scripts
253233
@@ -264,23 +244,28 @@ All agent logs are consolidated under `CustomAgentLogsTmp/`:
264244- ** ` CustomAgentLogsTmp/Sandbox/` ** - Sandbox agent logs (appium.log, android-device.log, ios-device.log, RunWithAppiumTest.cs)
265245- ** ` CustomAgentLogsTmp/UITests/` ** - UI test agent logs (appium.log, android-device.log, ios-device.log, test-output.log)
266246
267- # ## Recent Improvements (Phase 2 - November 2025)
247+ # ## Skills
248+
249+ Reusable skills in ` .github/skills/` that agents can invoke:
250+
251+ - ** ` try-fix/` ** - Proposes and tests independent fix approaches, records results, learns from failures
252+ - ** ` verify-tests-fail-without-fix/` ** - Verifies UI tests catch bugs (auto-detects mode based on git diff)
253+ - ** ` write-tests/` ** - Creates UI tests for issues following MAUI conventions
254+ - ** ` pr-build-status/` ** - Retrieves Azure DevOps build status for PRs
255+
256+ # ## Recent Improvements (January 2026)
257+
258+ ** PR Agent Consolidation:**
259+ 1. ** Unified PR Agent** - Replaced separate ` issue-resolver` and ` pr-reviewer` agents with single 5-phase ` pr` agent
260+ 2. ** try-fix Skill** - New skill for exploring independent fix alternatives with empirical testing
261+ 3. ** Skills Integration** - Added ` verify-tests-fail-without-fix` and ` write-tests` skills for reusable test workflows
262+ 4. ** Agent/Skills Guidelines** - New instruction files for authoring agents and skills
268263
269- ** Infrastructure Consolidation:**
264+ ** Prior Infrastructure Consolidation (November 2025) :**
2702651. ** Unified Log Structure** - All logs now under ` CustomAgentLogsTmp/` with subdirectories for Sandbox and UITests
2712662. ** Shared Script Library** - Created reusable PowerShell scripts for device startup, build, and deployment
2722673. ** Agent Simplification** - Consolidated ` uitest-pr-validator` into ` uitest-coding-agent` for clarity
273- 4. ** Agent Rename** - ` sandbox-pr-tester` → ` sandbox-agent` to reflect broader purpose (testing, validation, experimentation)
274- 5. ** Automated Testing Scripts** - All agents now use PowerShell scripts instead of manual commands
275- 6. ** noReset Capability Added** - Android Appium tests now include ` noReset: true` to prevent app reinstalls
276- 7. ** Complete Link Validation** - All 53 markdown files validated and updated with correct paths
277-
278- ** Phase 1 Improvements (November 2025):**
279- 1. ** Mandatory pre-work moved to top** - Critical requirements now at line 6 instead of line 43
280- 2. ** Reading order & stopping points** - Explicit " STOP after Essential Reading" to prevent reading loop
281- 3. ** Most critical mistake elevated** - " Don't Skip Testing" moved from Mistake # 6 to Mistake #1
282- 4. ** Time messaging reconciled** - Clarified that time budgets are guides for planning, not hard deadlines
283- 5. ** Appium version updated** - All references updated to Appium.WebDriver 8.0.1 (latest stable)
268+ 4. ** Automated Testing Scripts** - All agents now use PowerShell scripts instead of manual commands
284269
285270# ## General Guidelines
286271- ** ` copilot-instructions.md` ** - General coding standards, build requirements, file conventions for the entire repository
@@ -380,8 +365,8 @@ For issues or questions about the AI agent instructions:
380365# # Metrics
381366
382367** Agent Files** :
383- - 4 agent definition files (sandbox-agent, uitest-coding-agent, issue-resolver, pr-reviewer )
384- - 53 total markdown files in ` .github/ ` directory
368+ - 4 agent files (pr.md, pr/post-gate.md, sandbox-agent.md , uitest-coding-agent.md )
369+ - 4 skills (try-fix, verify-tests-fail-without-fix, write-tests, pr-build-status)
385370- All validated and consistent with consolidated structure
386371
387372** Automation** :
@@ -397,6 +382,6 @@ For issues or questions about the AI agent instructions:
397382
398383---
399384
400- ** Last Updated** : 2025-11-25
385+ ** Last Updated** : 2026-01-07
401386
402- ** Note** : These instructions are actively being refined based on real-world usage. Phase 2 infrastructure consolidation completed November 2025. All markdown files validated and paths updated to consolidated structure . Feedback and improvements are welcome!
387+ ** Note** : These instructions are actively being refined based on real-world usage. PR agent consolidation completed January 2026 (unified 5-phase workflow with try-fix skill) . Feedback and improvements are welcome!
0 commit comments