Skip to content

Remove Phase 2 (Tests) from PR agent workflow#33905

Merged
PureWeen merged 5 commits intodotnet:mainfrom
kubaflo:agent/remove-tests-phase
Feb 6, 2026
Merged

Remove Phase 2 (Tests) from PR agent workflow#33905
PureWeen merged 5 commits intodotnet:mainfrom
kubaflo:agent/remove-tests-phase

Conversation

@kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Feb 5, 2026

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description

Removes the redundant Tests phase from the PR agent workflow, simplifying from 5 phases to 4 phases.

Rationale

The Tests phase was redundant with the Gate phase:

  • Gate already fails if tests don't exist or don't catch the bug
  • Test creation via write-ui-tests skill can be invoked from Gate if needed
  • Reduces cognitive overhead and workflow complexity

New Workflow

Phase Name Description
1 Pre-Flight Context gathering from issues/PRs
2 Gate Verify tests exist and catch the issue
3 Fix Multi-model fix exploration
4 Report Final recommendation

Files Changed

  • .github/agents/pr.md - Main agent file, removed Tests section
  • .github/agents/pr/PLAN-TEMPLATE.md - Updated checklist
  • .github/agents/pr/post-gate.md - Renumbered phases (3-4 instead of 4-5)
  • .github/README-AI.md - Updated documentation
  • .github/copilot-instructions.md - Updated agent description
  • .github/scripts/Review-PR.ps1 - Updated comments
  • .github/skills/ai-summary-comment/* - Removed Tests phase references

Migration Notes

Existing state files in agent-pr-session/ are historical and not modified. New PR reviews will use the simplified 4-phase workflow.

The Tests phase was redundant with the Gate phase:
- Gate already fails if tests don't exist or don't catch the bug
- Test creation via write-ui-tests skill can be invoked from Gate if needed
- Reduces workflow from 5 phases to 4 phases

New workflow:
1. Pre-Flight - Context gathering
2. Gate - Verify tests exist and catch the issue
3. Fix - Multi-model fix exploration
4. Report - Final recommendation

Updated files:
- .github/agents/pr.md - Main agent, removed Tests section
- .github/agents/pr/PLAN-TEMPLATE.md - Updated checklist
- .github/agents/pr/post-gate.md - Renumbered phases
- .github/README-AI.md - Updated documentation
- .github/copilot-instructions.md - Updated description
- .github/scripts/Review-PR.ps1 - Updated comments
- .github/skills/ai-summary-comment/* - Removed Tests references
Copilot AI review requested due to automatic review settings February 5, 2026 12:27
Copy link
Contributor

Copilot AI left a 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 simplifies the PR agent workflow from 5 phases to 4 phases by removing the redundant Tests phase. The Tests phase functionality (verifying tests exist and creating them if needed) has been merged into the Gate phase, reducing cognitive overhead while maintaining all necessary verification steps.

Changes:

  • Consolidated test verification into Gate phase (was separate Tests phase before)
  • Updated all phase numbering from 1-5 to 1-4 throughout documentation and scripts
  • Removed Tests phase validation logic from AI summary comment scripts
  • Updated workflow diagrams and documentation to reflect 4-phase structure

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/agents/pr.md Removed Tests phase section, merged functionality into Gate phase (now Phase 2), updated all phase references
.github/agents/pr/PLAN-TEMPLATE.md Updated plan template to remove Tests checklist, renumbered phases 2-4
.github/agents/pr/post-gate.md Updated post-gate phases from 4-5 to 3-4, adjusted all cross-references
.github/README-AI.md Updated documentation to reflect 4-phase workflow throughout
.github/copilot-instructions.md Updated PR agent description from "5-phase" to "4-phase"
.github/scripts/Review-PR.ps1 Updated script description to list 4 phases with correct numbering
.github/skills/ai-summary-comment/SKILL.md Removed Tests phase badge, updated examples to show 4-phase workflow
.github/skills/ai-summary-comment/IMPROVEMENTS.md Removed Tests phase pattern examples, updated phase numbering examples
.github/skills/ai-summary-comment/scripts/post-ai-summary-comment.ps1 Removed Tests phase validation logic

Update the PR plan template to include explicit steps and example PowerShell commands for posting AI-generated comments. The single checklist item for posting via `ai-summary-comment` was replaced with two separate steps: an AI Summary comment (PR phases + try-fix) using `.github/skills/ai-summary-comment/scripts/post-ai-summary-comment.ps1 -PRNumber XXXXX -SkipValidation` and `.github/skills/ai-summary-comment/scripts/post-try-fix-comment.ps1 -IssueNumber XXXXX`, and a separate PR Finalization comment using `.github/skills/ai-summary-comment/scripts/post-pr-finalize-comment.ps1 -PRNumber XXXXX -SummaryFile CustomAgentLogsTmp/PRState/pr-XXXXX.md`. Checklist and state update steps remain unchanged.
@kubaflo kubaflo added area-ai-agents Copilot CLI agents, agent skills, AI-assisted development copilot labels Feb 6, 2026
- Fix PLAN-TEMPLATE.md inconsistency: align with pr.md (inform user vs auto-invoke)
- Review-PR.ps1: '5 phases' → '4 phases', 'Phase 4' → 'Phase 3' for try-fix
- post-ai-summary-comment.ps1: Remove entire Tests phase pipeline (phaseStatuses,
  pattern extraction, session creation/merge, section building)
- post-ai-summary-comment.ps1: 'Phase 5.*Report' → 'Phase 4.*Report'
- NO-EXTERNAL-REFERENCES-RULE.md: 'Phase 5' → 'Phase 4' (3 locations)
- IMPROVEMENTS.md: Update all Phase 5/🧪 Tests references throughout
@kubaflo kubaflo force-pushed the agent/remove-tests-phase branch from 8c597ad to 8f22f27 Compare February 6, 2026 22:41
@PureWeen PureWeen merged commit 8e00547 into dotnet:main Feb 6, 2026
2 of 3 checks passed
This was referenced Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ai-agents Copilot CLI agents, agent skills, AI-assisted development copilot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants