Skip to content

docs: require GitHub Copilot coding agent to always create a pull request#20933

Merged
pelikhan merged 2 commits intomainfrom
copilot/update-agents-md-instructions
Mar 14, 2026
Merged

docs: require GitHub Copilot coding agent to always create a pull request#20933
pelikhan merged 2 commits intomainfrom
copilot/update-agents-md-instructions

Conversation

Copy link
Contributor

Copilot AI commented Mar 14, 2026

Agents were not consistently creating pull requests after making changes. This adds an authoritative, hard-to-miss requirement to AGENTS.md.

Changes

  • New "Critical Requirements" section### ⚠️ MANDATORY: Always Create a Pull Request ⚠️ added before the pre-commit validation section; instructs agents to use report_progress and never leave file changes uncommitted
  • Quick Reference update — Added matching ### 🚨 CRITICAL - Always Create a Pull Request entry at the top of the quick-reference checklist for reinforcement
Original prompt

Update agents.md with authoritative instructions to "always create a pull request if you have file changes and you are the github copilot coding agent."


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…Copilot coding agent

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update agents.md with pull request instructions docs: require GitHub Copilot coding agent to always create a pull request Mar 14, 2026
Copilot AI requested a review from pelikhan March 14, 2026 13:52
@pelikhan pelikhan marked this pull request as ready for review March 14, 2026 13:55
Copilot AI review requested due to automatic review settings March 14, 2026 13:55
@pelikhan pelikhan merged commit a61fd53 into main Mar 14, 2026
@pelikhan pelikhan deleted the copilot/update-agents-md-instructions branch March 14, 2026 13:55
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

Updates AGENTS.md to make it explicit and hard to miss that the GitHub Copilot coding agent must always open/update a pull request when it has file changes, reinforcing this both in the main “Critical Requirements” and in the quick-reference checklist.

Changes:

  • Added a new “⚠️ MANDATORY: Always Create a Pull Request ⚠️” section under “Critical Requirements”.
  • Added a matching “🚨 CRITICAL - Always Create a Pull Request” entry at the top of the “Quick Reference for AI Agents”.
Comments suppressed due to low confidence (1)

AGENTS.md:1149

  • In the Quick Reference, this instruction appears immediately before the pre-commit checklist, but it still reads like report_progress is the primary step. Consider explicitly saying to run the pre-commit checklist first, then use report_progress to commit/push and update/create the PR, to avoid agents skipping validation under time pressure.
### 🚨 CRITICAL - Always Create a Pull Request
**If you are the GitHub Copilot coding agent and you have file changes, you MUST always create a pull request.**

Use **report_progress** to commit, push, and update the PR. Never leave changes uncommitted.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +37 to +39
Use the **report_progress** tool to commit and push your changes. This will automatically create or update the pull request.

**Never leave file changes uncommitted.** Even for small or "obvious" changes, always use **report_progress** to push your work to a PR so it can be reviewed.

### ⚠️ MANDATORY: Always Create a Pull Request ⚠️

**🚨 IF YOU ARE THE GITHUB COPILOT CODING AGENT AND YOU HAVE FILE CHANGES, YOU MUST ALWAYS CREATE A PULL REQUEST - NO EXCEPTIONS.**
Claude AI added a commit that referenced this pull request Mar 14, 2026
- Auto-detect GHES host from git remote when hostname is not provided
- audit command: Auto-detects hostname parameter if empty
- add-wizard command: Sets GH_HOST environment variable if not set
- Uses existing getHostFromOriginRemote() function from pr_command.go
- Resolves issue #20933: gh aw audit should auto-detect GHES and set GH_HOST
- Applies to add-wizard command as requested in issue comments

Fixes #20933
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.

3 participants