Add AI policy page (#14473)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
Jared Dillard
2026-06-09 05:25:35 +00:00
committed by GitHub
co-authored by Bénédikt Tran
parent 31330f8b1a
commit bc5837b0a8
3 changed files with 102 additions and 0 deletions
+14
View File
@@ -31,3 +31,17 @@ previous discussions or decisions.
- <...>
- <...>
- <...>
## AI Disclosure
<!--
If AI was used in the preparation of this pull request, please disclose the
tool(s) used, how they were used, and specify what code or text is AI generated.
If no AI tools were used, please write "No AI tools used" in this section.
Please read our policy on AI generated code:
https://www.sphinx-doc.org/en/master/internals/ai-policy.html
In particular, all interaction is to be done by humans, including submission
of pull requests.
-->
+87
View File
@@ -0,0 +1,87 @@
=========
AI Policy
=========
"AI" herein refers to generative AI tools like large language models (LLMs)
that can generate, edit, and review software code, create and manipulate
images, or generate human-like communication.
Responsibility
--------------
You are responsible for any code you submit to Sphinx's repositories,
regardless of whether it was manually written or generated by AI. You must
understand and be able to explain the code you submit as well as the existing
related code. It is not acceptable to submit a patch that you cannot understand
and explain yourself. In explaining your contribution, do not use AI to
automatically generate comments, pull request descriptions, or issue
descriptions. See below for our policy on AI translation systems.
Disclosure
----------
You must disclose whether AI has been used to assist in the development of your
pull request. If so, you must document which tool(s) have been used, how they
were used, and specify what code or text is AI generated. We will reject any
pull request that does not include the disclosure.
Code Quality
------------
Contributors are expected to submit code that meets Sphinx's standards. We will
reject pull requests that we deem to be "`AI slop`_". Do not waste developers'
time by submitting code that is fully or mostly generated by AI, and doesn't
meet our standards.
.. _AI slop: https://en.wikipedia.org/wiki/AI_slop
Copyright
---------
All code in Sphinx is released under the two clause BSD copyright license.
Contributors to Sphinx license their code under the same license when it is
included in Sphinx's version control repository. That means contributors must
own the copyright of any code submitted to Sphinx or must include the BSD
two clause compatible open source license(s) associated with the submitted code
in the patch. Code generated by AI may infringe on copyright and it is the
submitter's responsibility to not infringe. We reserve the right to reject any
pull requests, AI-generated or not, where the copyright is in question.
Communication
-------------
When interacting with developers (forums, discussions, issues, pull requests,
etc.) do not use AI to speak for you, except for translation or grammar
editing. If the developers want to chat with a chatbot, they can do so
themselves. Human-to-human communication is essential for an open source
community to thrive.
AI Agents
---------
The use of an AI agent that writes code and then submits a pull request
autonomously is not permitted. A human must check any generated code and submit
a pull request according to the 'Responsibility' section above.
Other Resources
---------------
While these do not formally form part of Sphinx's AI policy, the following
resources may be helpful in understanding some pitfalls associated with using
AI to contribute to Sphinx:
- `LLVM AI tool policy`_
- `Open source AI contribution policies`_
- `Scientific Python community considerations around AI`_
- `Python developer's guide to AI tools`_
.. _LLVM AI tool policy: https://llvm.org/docs/AIToolPolicy.html
.. _Open source AI contribution policies: https://github.com/melissawm/open-source-ai-contribution-policies
.. _Scientific Python community considerations around AI: https://blog.scientific-python.org/scientific-python/community-considerations-around-ai/
.. _Python developer's guide to AI tools: https://devguide.python.org/getting-started/ai-tools/index.html
Acknowledgements
----------------
We thank the SciPy and NumPy developers, whose AI policy pages this document
was adapted from.
+1
View File
@@ -10,6 +10,7 @@ how to contribute to the project.
:maxdepth: 2
contributing
ai-policy
release-process
organization
code-of-conduct