Repository navigation
Tell AI agents to use the PR templates and the contribution terms box - #972
Merged
Merged
Conversation
AGENTS.md (and CLAUDE.md, which imports it) tells agents to start every PR description from the matching template, which gh pr create --body and the API skip, to keep the "Contribution terms" checkbox line as written, and to add the section when no template fits. The box is the human's agreement: agents tick it only when the person they work for has accepted the terms, and otherwise leave it unticked and say so. copilot-instructions.md lists the default and used-by-listing templates and points to AGENTS.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PRs opened by AI agents often skip the PR template, because
gh pr create --bodyand the API don't apply it. That drops the contribution terms checkbox, so the requiredContribution termscheck fails and auto-merge (E23) refuses the PR.AGENTS.md(new, read by Codex, Copilot, Cursor and others): start every PR description from the matching template (data, web editor/code, "Used by", or the default) and keep the "Contribution terms" checkbox line exactly as written. When no template fits, add the section anyway. The box is the human's agreement, so the agent asks the person it works for whether they accept the terms (with a one-line summary and the link), then ticks or leaves the box in the PR body based on the answer. It skips the question only when the person already answered in the session or in their own instructions. Fixing the box means editing the description, which re-runs the check without a new commit.CLAUDE.md(new):@AGENTS.md, because Claude Code readsCLAUDE.md..github/copilot-instructions.md: the PR template list now includes the default andused-by-listing.mdtemplates, plus a pointer toAGENTS.md.Contribution terms