Repository navigation
Add a PR template and an AI Policy #2209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f03c2b3
66bee72
89da447
dd0c188
50ded32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also note that agentic tools don't tend to load this file deterministically. Moreover, they open PRs via API, supplying a free-form body in the request never seeing this text. Most tools would, however, load an
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know it's not deterministic, that's fine - this is as much for the reviewers' benefit as for the new contributor or agentic tool. If it's clear that they didn't read it, it's an easy automatic close. Which we do now as reviewers already sometimes, it's just harder to justify so takes more work.
That's not an option, since it conflicts with valid
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tools allow local files generally; usually a harmless specific file overrides AGENTS.md and some harnesses even have a However, I don't think this repo needs one, you can just make sure there's a link to what you want it to read in the README. If there's no AGENTS.md, all models are very likely to at least read the README as they gather info about where they are.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Also, we can come up with a valid AGENTS.md that helps experienced contributors while still making sure it follows a process if making PRs - not in this PR though)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree w/ Henry here. I've been exploring agentic context files and they can generally be useful and wouldn't conflict w/ whatever people have locally. I've been looking at them as a way to improve the interactions as a contrib thing and found that it ended up being a place where I'd record things I repeat the PR authors should stop doing in reviews. Having agents not repeat mistakes automatically (to an extent) is a good thing. But I was also focusing on configuring the thing making the operator more aware of the project and on their own understanding of what they are doing and why... Like a reverse rubber ducky.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't seem true that it wouldn't conflict: some harnesses allow overriding, some allow a second file that gets combined, some have no options for this at all. It's a bit like the pre- Summary of current state generated with Sol 6.1.Checked against the official documentation on 27 November 2026. This comparison is restricted to uncommitted, repository-specific files inside the checkout or in its immediate parent directory. It excludes user-wide settings, global instruction files, and session-only prompts or switches. Behavior is documented loading behavior, not a guarantee that the model follows every instruction.
Here, a parent-directory arrangement means a dedicated container for this one That arrangement works for Claude Code's documented ancestor lookup. It is not Files inside a checkout are private only if they are kept out of commits. A Under this narrower definition, Codex has a direct local replacement file;
Yes, I think so. If someone can come up with a working solution and more or less universally applicable content for this file, then sure why not. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| ### PR summary and motivation | ||
| <!-- Please take some time to make it easier for us to review | ||
| your pull request (PR). Describe the PR using the questions below as guidance. | ||
|
|
||
| - What problem does this PR solve? Link any relevant issues and PRs. | ||
| - Why are you interested in working on this PR? | ||
| - How does the proposed change help you? | ||
|
rgommers marked this conversation as resolved.
Resolved
|
||
| - Will this change be relevant in 5 years (for new pages or sections)? | ||
|
|
||
| Make sure to review the contribution guidelines: https://packaging.python.org/en/latest/contribute/ | ||
|
|
||
| --> | ||
|
|
||
|
|
||
| #### AI usage disclosure | ||
|
rgommers marked this conversation as resolved.
Resolved
|
||
| <!-- If AI was used in the preparation of this PR, please disclose | ||
| the tool(s) used, how they were used, and specify what code or text is AI generated. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is too much detail, expect nobody to fill it in to this level. specifying what was AI generated is inappropriate and nobody is going to track that other than "all of it". nobody will ever go line by line, word by word, and call out the bits and pieces when they edited something. it isn't practical. I'd keep this simpler to the thing you'll actually see complied with: "please disclose the tool(s) and model version used" what outcomes are you looking for? there isn't anything meaningful reviewers will be able to do with "how they were used" or a specific byte by byte indicator of whether a PEBKAC keyboard user was involved or not. so don't ask for it. you won't generally get it and have no way to know because that level of detail is generally not relevant.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it appropriate to simply copy the text from the devguide into here?
(ref: https://devguide.python.org/getting-started/ai-tools/#ai-tools ) It could be dropped in verbatim, followed by "Use this section to tell us about your tool versions and usage."
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the "be prepared to" phrasing, as there are times when that could be of interest but I doubt most cases are.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I will keep this as is. These comments feel like bike shedding, and this works quite well for NumPy and SciPy where it's been in use for the past year or so. There is high signal-to-noise on this question, and this addresses an actual problem we have on this repo (many drive-by PRs). There are no complaints on this from the dozens maintainers on those repos, and it takes like 5 seconds to fill out where you didn't use an AI tool, used one for code generation, only for self-review, etc. To be clear, the main problems we have are:
An "it's optional to disclose" does not address (1), and based on what I hear from CPython devs, that devguide guidance isn't working all that well and there's an issue there deciding on what to do with the flood of AI-driven issues and PRs as well.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. editing a doc or template will not solve drive by PR volume. you have to actually restrict PR creation. https://docs.github.com/en/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository In cpython we currently limit the ability for drive-by PR creations for those not already involved with the project.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We did add a limit to PRs from new contributors a few days ago. IMO the best way to reduce PR volume is to close open issues (I wish there was a private issue option that was not related to security). I agree I've not really seen a difference in volume when adding similar docs to build (for example). Also about 2/3 of the low quality PRs ignore the template completely.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comparing the disclosure request to a proactive control on junk PRs is slightly amiss. Whether or not the section is filled out, and what it says, helps with triage, which is a distinct activity. I'm in favor of any minor changes which help keep this PR unblocked.1 To me, this is good enough:
Footnotes
|
||
| If no AI tools were used, please write "No AI tools used" in this section. | ||
|
rgommers marked this conversation as resolved.
Resolved
|
||
|
|
||
| All interactions with reviewers must be performed by humans, including the submission of PRs. | ||
|
|
||
| Read the Python Packaging User Guide's policy on AI-assisted contributions at | ||
| https://github.com/pypa/packaging.python.org/blob/main/AI_POLICY.md | ||
|
|
||
| --> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # AI Policy | ||
|
|
||
| AI-assisted contributions are accepted only if: | ||
|
|
||
| - The PR follows the same rules as a non-AI PR. | ||
| - It clearly states that it is AI-assisted and names the tool used. | ||
| - If you are a new contributor, your PR links to an accepted issue. | ||
| - AI-generated descriptions/comments are clearly marked and only used when | ||
| required. | ||
| - A human drove the tool, reviewed every line, and can explain the change. | ||
| - It was not opened by a fully autonomous agent. | ||
| - You respond to review comments yourself. | ||
|
|
||
| This applies to issues and comments as well as pull requests. Using AI for | ||
| translation or grammar help is fine. AI output may infringe copyright; it is | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This copyright claim is baseless FUD. It is already the maintainers responsibility to do this. Human authored things are just as likely to do this as well. Do you tell people not to do this explicitly in a human policy doc? If not, this statement is fluff and doesn't add anything by being here. Your contribute.rst text already covers this concept with "you are responsible".
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I personally don't care much about the exact wording here and would be fine to delete it, given that the risk is quite a bit lower than it would be in say domain-specific algorithmic code. I'll just point out that (a) this is not uncommon wording, (b) contribute.rst doesn't say "copyright" in so many words, and (c) "baseless FUD" isn't particularly constructive wording (especially on a repo you don't actually contribute to). I'll defer to @henryiii here, since he maintains the chosen template. Henry, would you prefer to keep or delete this? |
||
| your responsibility to make sure it does not. | ||
|
|
||
| Unsolicited, undisclosed, or low-effort AI PRs will be closed. | ||
|
rgommers marked this conversation as resolved.
Resolved
|
||
|
|
||
| Only humans can be named as co-authors, and AI can *never* sign off on a | ||
| commit. I.e., don't add `Co-authored-by` or `Signed-Off-By` for an AI tool. | ||
Uh oh!
There was an error while loading. Please reload this page.