Skip to content

Commit 0ee1a98

Browse files
Mariattagpsheadcorona10devdanzinJacobCoffee
authored
Update guidelines on using GenAI (#1778)
* Update guidelines on using GenAI * Update the title to clarify the purpose of this doc is to provide guidelines. * Add the Guidelines to the contributing table. * Fix the markup in rendering the table * Soften the wording about AI tool disclosure. * Moved the considerations to be earlier in the page. * Apply suggestions from code review * Add more explicit in the beginning that the person submitting issue or pr is responsible for its content. * adjust wording about being disrespectful and about reviewing the output always. * Rename the file to ai-tools.rst * Reformat to 80 chars max Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Donghee Na <donghee.na@python.org> Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com> Co-authored-by: Jacob Coffee <jacob@z7x.org> Co-authored-by: Savannah Ostrowski <savannah@python.org> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
1 parent 42d2e0f commit 0ee1a98

5 files changed

Lines changed: 67 additions & 42 deletions

File tree

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
"contrib/project/github.rst": "index.rst",
206206
"contrib/project/governance.rst": "index.rst",
207207
"contrib/project/roles.rst": "index.rst",
208-
"contrib/project/generative-ai.rst": "getting-started/generative-ai.rst",
208+
"contrib/project/ai-tools.rst": "getting-started/ai-tools.rst",
209209
"contrib/project/outreach.rst": "index.rst",
210210
"contrib/project/directory-structure.rst": "getting-started/setup-building.rst",
211211
"contrib/project/index.rst": "index.rst",

getting-started/ai-tools.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.. _ai-tools:
2+
3+
=============================
4+
Guidelines for using AI tools
5+
=============================
6+
7+
The person submitting an issue or PR is responsible for its content,
8+
regardless of whether AI tools were used in its creation. Generative AI
9+
tools can produce output quickly, but discretion, good judgment, and
10+
critical thinking are the foundation of all good contributions. We value
11+
good code, concise accurate documentation, and well scoped PRs without
12+
unneeded code churn.
13+
14+
Considerations for success
15+
==========================
16+
17+
Authors must review the work done by AI tooling in detail to ensure it
18+
actually makes sense before proposing it as a PR or filing it as an issue.
19+
20+
We expect PR authors and those filing issues to be able to explain their
21+
proposed changes in their own words.
22+
23+
Disclosure of the use of AI tools in the PR description is appreciated,
24+
while not required. Be prepared to explain how the tool was used and what
25+
changes it made.
26+
27+
Whether you are using AI tools or not, keep the following principles in
28+
mind for the quality of your contribution:
29+
30+
- Consider whether the change is necessary
31+
- Make minimal, focused changes
32+
- Follow existing coding style and patterns
33+
- Write tests that exercise the change
34+
- Keep backwards compatibility with prior releases in mind. Existing
35+
tests may be ensuring specific API behaviors are maintained.
36+
37+
Pay close attention to AI generated recommendations for testing changes.
38+
Provide input about Python's testing principles when guiding an AI model.
39+
Always review the output before opening a pull request or issue,
40+
including proposed PR or issue titles and descriptions.
41+
42+
Acceptable uses
43+
===============
44+
45+
Some of the acceptable uses of generative AI include:
46+
47+
- Assistance with writing comments, especially in a non-native language
48+
- Gaining understanding of existing code
49+
- Supplementing contributor knowledge for code, tests, and documentation
50+
51+
Unacceptable uses
52+
=================
53+
54+
Maintainers may close issues and PRs that are not useful or productive,
55+
regardless of whether AI tools were used or not.
56+
57+
If a contributor repeatedly opens unproductive issues or PRs, they may be
58+
blocked from contributing to the project because it is disruptive and
59+
disrespectful of the maintainers time.
60+
61+
It is not acceptable to alter or bypass existing tests, or remove desired
62+
functionality, in order to make a failing test pass. Such changes are not
63+
a real fix.

getting-started/generative-ai.rst

Lines changed: 0 additions & 40 deletions
This file was deleted.

getting-started/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Getting started
1212
git-boot-camp
1313
pull-request-lifecycle
1414
getting-help
15-
generative-ai
15+
ai-tools

index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Guide for contributing to Python:
4040
* :ref:`rst-primer`
4141
* :ref:`translating`
4242
* :ref:`devguide`
43+
* :ref:`ai-tools`
4344
-
4445
* :ref:`setup`
4546
* :ref:`help`
@@ -49,6 +50,7 @@ Guide for contributing to Python:
4950
* :ref:`communication`
5051
* :ref:`gitbootcamp`
5152
* :ref:`devcycle`
53+
* :ref:`ai-tools`
5254
-
5355
* :ref:`tracker`
5456
* :ref:`triaging`

0 commit comments

Comments
 (0)