docs: PR template applies to every PR, regardless of task framing#21008
Conversation
Codify two lessons from agent failures on PR #21007: 1. The PR template is mandatory for every PR — including ones the user only asked the agent to 'verify', 'check', 'test', or 'add a small assertion to'. Task framing and diff size do not change the template requirement. 2. webpack/webpack auto-opens a PR via webhook on every new-branch push, with the commit message as the body — which never matches the template. Spell this out and require that the agent's very next action after `git push` is `list_pull_requests` + `update_pull_request` to install the template, before any reviewer (human or bot) sees the empty-template PR. Also note that PR titles are plain text — raw `<` / `>` / `&` belong in the title, never HTML-entity-encoded as `<` / `>` / `&`.
|
|
This PR is packaged and the instant preview is available (9e8717e). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@9e8717e
yarn add -D webpack@https://pkg.pr.new/webpack@9e8717e
pnpm add -D webpack@https://pkg.pr.new/webpack@9e8717e |
There was a problem hiding this comment.
Pull request overview
Updates AGENTS.md to make PR-template compliance unambiguous for agents, including in “quick verify/test” task framings, and to document the repo’s auto-PR-on-push behavior so agents reliably install the correct template immediately after pushing.
Changes:
- Clarifies that the org-wide PR template is mandatory for every PR, regardless of task framing or diff size.
- Documents that new-branch pushes can auto-open a PR with a non-template body, and prescribes the immediate follow-up steps to apply the template.
- Adds guidance that PR titles are plain text and should not use HTML entity encoding.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21008 +/- ##
==========================================
+ Coverage 91.62% 91.63% +0.01%
==========================================
Files 573 573
Lines 59232 59232
Branches 15995 15995
==========================================
+ Hits 54272 54278 +6
+ Misses 4960 4954 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 32.57%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Summary
Codify two lessons from agent failures observed on PR #21007:
git pushmust belist_pull_requests+update_pull_requestto install the template, before any reviewer (human or bot) sees the empty-template PR.Also adds a short note that PR titles are plain text —
<,>, and&belong in the title raw, never as<,>,&. Another concrete agent-failure-mode from PR #21007, where the title displayed<link>instead of<link>.What kind of change does this PR introduce?
docs — AGENTS.md only; no code changes.
Did you add tests for your changes?
n/a — docs-only.
Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
n/a — this PR is the documentation update.
Use of AI
Claude Code was used under human review. The maintainer flagged repeated agent failures around the PR template (treating "just verify"/"just add a test" tasks as exempt; missing the webhook auto-created PR body; HTML-entity-encoding
<in the title). Claude Code drafted the AGENTS.md additions to capture those failure modes as explicit, prescriptive rules. The change was reviewed before being committed.Generated by Claude Code