From b87ce1d9c0e9567c6ab42cb611f7085640c75a1f Mon Sep 17 00:00:00 2001 From: mariatta Date: Tue, 27 Oct 2026 14:22:07 -0700 Subject: [PATCH 1/4] Update Docs about AI policy enforcement Update AI policy guidelines doc to explain how we are enforcing this policy. Update triaging docs to add checklist and guidance on how to triage ai-assisted contributions. Closes #1935 --- getting-started/ai-tools.rst | 15 +++++++++++++++ triage/labels.rst | 2 +- triage/triage-team.rst | 23 +++++++++++++++++++++++ triage/triaging.rst | 2 ++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/getting-started/ai-tools.rst b/getting-started/ai-tools.rst index cd69987ca2..56ba247336 100644 --- a/getting-started/ai-tools.rst +++ b/getting-started/ai-tools.rst @@ -62,3 +62,18 @@ disrespectful of the maintainers time. It is not acceptable to alter or bypass existing tests, or remove desired functionality, in order to make a failing test pass. Such changes are not a real fix. + +How these guidelines are applied +================================ + +Using AI tools is not a reason on its own for an issue or PR to be labeled +or closed. When a maintainer thinks an issue or PR does not follow these +guidelines, they may apply one of the following labels. A bot then posts a +comment that links to this page. + +- :gh-label:`AI-needs-explanation`: the issue or PR stays open. Reply in your + own words: explain what the change does or what the issue is about, and + describe how you checked that it is correct. +- :gh-label:`AI-guidelines-not-met`: the issue or PR is closed. If you think + we misunderstood your contribution, reply on the issue or PR. You are + welcome to explain your approach or ask questions about these guidelines. diff --git a/triage/labels.rst b/triage/labels.rst index e015b965b5..c277437c6e 100644 --- a/triage/labels.rst +++ b/triage/labels.rst @@ -120,7 +120,7 @@ Other labels AI-assisted submission where you think the author is unlikely to engage with feedback. The bot links to the :ref:`guidelines for using AI tools ` and closes the issue or PR. See the :ref:`triage team's guidance - on closing PRs `. + on applying the AI policy labels `. * Use :gh-label:`AI-needs-explanation` when you have concerns about AI-assisted work and think the author is likely to engage with feedback. The bot posts a reminder and leaves the issue or PR open. diff --git a/triage/triage-team.rst b/triage/triage-team.rst index 7acebc130c..f3c8896aad 100644 --- a/triage/triage-team.rst +++ b/triage/triage-team.rst @@ -56,6 +56,29 @@ the Python Software Foundation, always follow the `PSF Code of Conduct`_. .. _PSF Code of Conduct: https://policies.python.org/python.org/code-of-conduct/ +.. _triage-ai-labels: + +Applying the AI policy labels +============================= + +Use the AI policy labels for issues and PRs that don't follow the +:ref:`guidelines for using AI tools `. Don't apply them only because +AI tools were used, or because the author disclosed using them. + +* Start with :gh-label:`AI-needs-explanation`. The bot asks the author to + explain the work in their own words and leaves the issue or PR open. +* Use :gh-label:`AI-guidelines-not-met` only for clear cases, such as a + low-effort submission where the author is unlikely to engage with feedback. + The bot posts a comment and closes the issue or PR. If you have any doubt, + use :gh-label:`AI-needs-explanation` instead, or consult a core developer. +* If the author responds and the concern is resolved, remove the label. + For a closed issue or PR, reopen it as well. + +Prefer these labels over closing manually, so the author gets the same +explanation each time and the issues and PRs can be found later by filtering +on the label. + + Becoming a member of the Python triage team =========================================== diff --git a/triage/triaging.rst b/triage/triaging.rst index 22c1c5b745..a61c45aa35 100644 --- a/triage/triaging.rst +++ b/triage/triaging.rst @@ -28,6 +28,8 @@ Checklist for triaging * If the issue is clearly invalid (unrelated to CPython, spam, and so on), you can use GitHub's :guilabel:`Close as not planned` option and apply the :gh-label:`invalid` label. +* If the issue or PR doesn't follow the :ref:`guidelines for using AI tools + `, apply one of the :ref:`AI policy labels `. .. _triage-fields: From 8b641c565da1daffc22d473c35f1b2684119e7af Mon Sep 17 00:00:00 2001 From: mariatta Date: Tue, 27 Oct 2026 14:26:39 -0700 Subject: [PATCH 2/4] Add escalation step and link both AI label entries to the guidance --- triage/labels.rst | 4 +++- triage/triage-team.rst | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/triage/labels.rst b/triage/labels.rst index c277437c6e..36e98e7c01 100644 --- a/triage/labels.rst +++ b/triage/labels.rst @@ -123,7 +123,9 @@ Other labels on applying the AI policy labels `. * Use :gh-label:`AI-needs-explanation` when you have concerns about AI-assisted work and think the author is likely to engage with feedback. - The bot posts a reminder and leaves the issue or PR open. + The bot posts a reminder and leaves the issue or PR open. See the + :ref:`triage team's guidance on applying the AI policy labels + `. * :gh-label:`build`/:gh-label:`performance`: for issues related to the build process or performance, respectively. * :gh-label:`easy`: for issues that are considered easy. diff --git a/triage/triage-team.rst b/triage/triage-team.rst index f3c8896aad..993ed70d98 100644 --- a/triage/triage-team.rst +++ b/triage/triage-team.rst @@ -71,6 +71,11 @@ AI tools were used, or because the author disclosed using them. low-effort submission where the author is unlikely to engage with feedback. The bot posts a comment and closes the issue or PR. If you have any doubt, use :gh-label:`AI-needs-explanation` instead, or consult a core developer. +* If the author doesn't respond to :gh-label:`AI-needs-explanation`, or the + response doesn't address the concern (for example, it is more generated + text), add :gh-label:`AI-guidelines-not-met`. The bot posts the closing + comment and closes the issue or PR. If you have any doubt, consult a core + developer first. * If the author responds and the concern is resolved, remove the label. For a closed issue or PR, reopen it as well. From 3e30b9e366de780cb8c46847cc76168bbc0e391b Mon Sep 17 00:00:00 2001 From: mariatta Date: Tue, 27 Oct 2026 14:30:49 -0700 Subject: [PATCH 3/4] Recommend applying only one AI policy label at a time --- triage/triage-team.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/triage/triage-team.rst b/triage/triage-team.rst index 993ed70d98..6c429e8789 100644 --- a/triage/triage-team.rst +++ b/triage/triage-team.rst @@ -65,6 +65,9 @@ Use the AI policy labels for issues and PRs that don't follow the :ref:`guidelines for using AI tools `. Don't apply them only because AI tools were used, or because the author disclosed using them. +Apply only one of these labels to an issue or PR. If you add one when the +other is already there, remove the other label. + * Start with :gh-label:`AI-needs-explanation`. The bot asks the author to explain the work in their own words and leaves the issue or PR open. * Use :gh-label:`AI-guidelines-not-met` only for clear cases, such as a @@ -73,7 +76,8 @@ AI tools were used, or because the author disclosed using them. use :gh-label:`AI-needs-explanation` instead, or consult a core developer. * If the author doesn't respond to :gh-label:`AI-needs-explanation`, or the response doesn't address the concern (for example, it is more generated - text), add :gh-label:`AI-guidelines-not-met`. The bot posts the closing + text), remove :gh-label:`AI-needs-explanation` and add + :gh-label:`AI-guidelines-not-met`. The bot posts the closing comment and closes the issue or PR. If you have any doubt, consult a core developer first. * If the author responds and the concern is resolved, remove the label. From a85b1130ce4049feb9ee77fba9903dd9d138fb5d Mon Sep 17 00:00:00 2001 From: Mariatta Date: Tue, 27 Oct 2026 15:13:28 -0700 Subject: [PATCH 4/4] Update triage/triage-team.rst Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- triage/triage-team.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/triage/triage-team.rst b/triage/triage-team.rst index 6c429e8789..afc72e75c7 100644 --- a/triage/triage-team.rst +++ b/triage/triage-team.rst @@ -79,7 +79,7 @@ other is already there, remove the other label. text), remove :gh-label:`AI-needs-explanation` and add :gh-label:`AI-guidelines-not-met`. The bot posts the closing comment and closes the issue or PR. If you have any doubt, consult a core - developer first. + team member first. * If the author responds and the concern is resolved, remove the label. For a closed issue or PR, reopen it as well.