From f03c2b342a156a2aa8d9b23e2bbddefd8e7c08dc Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Tue, 24 Nov 2026 11:11:24 +0100 Subject: [PATCH 1/5] Add an AI Policy that allows usage with disclosure, requires human This is the "moderate" policy from https://learn.scientific-python.org/development/guides/ai/#ai-policy-md, as suggested on gh-2183 --- AI_POLICY.rst | 28 ++++++++++++++++++++++++++++ source/contribute.rst | 5 +++++ 2 files changed, 33 insertions(+) create mode 100644 AI_POLICY.rst diff --git a/AI_POLICY.rst b/AI_POLICY.rst new file mode 100644 index 000000000..8aba0e6e7 --- /dev/null +++ b/AI_POLICY.rst @@ -0,0 +1,28 @@ +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. +- It links to an issue or discussion where a maintainer agreed to the + proposed change beforehand. +- 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 +your responsibility to make sure it does not. + +Unsolicited, undisclosed, or low-effort AI PRs will be closed. + +Only humans can be named as co-authors, and AI can *never* sign off on a +commit. The Linux kernel trailer should be used to credit AI assistance, like +this: + +.. code-block:: text + + Assisted-by: : diff --git a/source/contribute.rst b/source/contribute.rst index 112643d98..f29b0eae7 100644 --- a/source/contribute.rst +++ b/source/contribute.rst @@ -28,6 +28,11 @@ By contributing to the |PyPUG|, you're expected to follow the PSF's .. __: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md +.. _ai-policy: + +.. include:: ../AI_POLICY.rst + + Documentation types =================== From 66bee72b89933a530044d1d0ec2ac361af9439a9 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Tue, 24 Nov 2026 11:19:58 +0100 Subject: [PATCH 2/5] Add a pull request template As proposed in gh-2183. --- .github/PULL_REQUEST_TEMPLATE.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..448ddce61 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ +### PR summary and motivation + + + +#### AI usage disclosure + From 89da447596ef81cdfef97723eb74fafd4604b274 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Tue, 24 Nov 2026 21:29:13 +0100 Subject: [PATCH 3/5] Back to Markdown for the AI_POLICY` file, link it from Contributing guide --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- AI_POLICY.rst => AI_POLICY.md | 9 ++++----- source/contribute.rst | 7 ++++--- 3 files changed, 9 insertions(+), 9 deletions(-) rename AI_POLICY.rst => AI_POLICY.md (92%) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 448ddce61..b6f9877b1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,6 +20,6 @@ If no AI tools were used, please write "No AI tools used" in this section. 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://packaging.python.org/en/latest/contribute/#ai-policy +https://github.com/pypa/packaging.python.org/blob/main/AI_POLICY.md --> diff --git a/AI_POLICY.rst b/AI_POLICY.md similarity index 92% rename from AI_POLICY.rst rename to AI_POLICY.md index 8aba0e6e7..b78750e62 100644 --- a/AI_POLICY.rst +++ b/AI_POLICY.md @@ -1,5 +1,4 @@ -AI Policy -========= +# AI Policy AI-assisted contributions are accepted only if: @@ -23,6 +22,6 @@ Only humans can be named as co-authors, and AI can *never* sign off on a commit. The Linux kernel trailer should be used to credit AI assistance, like this: -.. code-block:: text - - Assisted-by: : +```text +Assisted-by: : +``` diff --git a/source/contribute.rst b/source/contribute.rst index f29b0eae7..06af7615a 100644 --- a/source/contribute.rst +++ b/source/contribute.rst @@ -28,9 +28,10 @@ By contributing to the |PyPUG|, you're expected to follow the PSF's .. __: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md -.. _ai-policy: - -.. include:: ../AI_POLICY.rst +You are responsible for all code and documentation you submit, including +AI-generated content. Review it yourself and respond to review comments in your +own words. If you use AI coding tools, please read our +`AI policy `_. Documentation types From dd0c188c407e10967981bf5760143256b4fb49bf Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 27 Nov 2026 09:30:23 -0500 Subject: [PATCH 4/5] Update AI_POLICY.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) --- AI_POLICY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI_POLICY.md b/AI_POLICY.md index b78750e62..7c90d717c 100644 --- a/AI_POLICY.md +++ b/AI_POLICY.md @@ -19,7 +19,7 @@ your responsibility to make sure it does not. Unsolicited, undisclosed, or low-effort AI PRs will be closed. Only humans can be named as co-authors, and AI can *never* sign off on a -commit. The Linux kernel trailer should be used to credit AI assistance, like +commit. The old form of the Linux kernel trailer should be used to credit AI assistance, like this: ```text From 50ded3282dcf5c5faba19bdb6e694f26a7dae63b Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sun, 29 Nov 2026 11:56:38 +0100 Subject: [PATCH 5/5] Tweaks to AI Policy to address review discussion. --- AI_POLICY.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/AI_POLICY.md b/AI_POLICY.md index 7c90d717c..5290e4a8f 100644 --- a/AI_POLICY.md +++ b/AI_POLICY.md @@ -4,8 +4,7 @@ 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. -- It links to an issue or discussion where a maintainer agreed to the - proposed change beforehand. +- 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. @@ -19,9 +18,4 @@ your responsibility to make sure it does not. Unsolicited, undisclosed, or low-effort AI PRs will be closed. Only humans can be named as co-authors, and AI can *never* sign off on a -commit. The old form of the Linux kernel trailer should be used to credit AI assistance, like -this: - -```text -Assisted-by: : -``` +commit. I.e., don't add `Co-authored-by` or `Signed-Off-By` for an AI tool.