summaryrefslogtreecommitdiff
path: root/docs/internals
diff options
context:
space:
mode:
authorNatalia <124304+nessita@users.noreply.github.com>2026-01-07 12:29:37 -0300
committernessita <124304+nessita@users.noreply.github.com>2026-01-08 12:01:53 -0300
commit8703fbdf10b0c97dc35ddeb5d8662d66ca0a0a81 (patch)
tree8f9baefad3f84047e8849dbb834ac22e7916710b /docs/internals
parent4f580c465928df97407d74798ad72f2bb60a3e1d (diff)
Added guidance on AI-assisted code submission to contributing docs.
Diffstat (limited to 'docs/internals')
-rw-r--r--docs/internals/contributing/writing-code/submitting-patches.txt58
1 files changed, 58 insertions, 0 deletions
diff --git a/docs/internals/contributing/writing-code/submitting-patches.txt b/docs/internals/contributing/writing-code/submitting-patches.txt
index 428acffba1..9c1d417031 100644
--- a/docs/internals/contributing/writing-code/submitting-patches.txt
+++ b/docs/internals/contributing/writing-code/submitting-patches.txt
@@ -147,6 +147,64 @@ Regardless of the way you submit your work, follow these steps.
.. _ticket tracker: https://code.djangoproject.com/
.. _Development dashboard: https://dashboard.djangoproject.com/
+AI-Assisted Contributions
+-------------------------
+
+Unverified AI-generated contributions create unnecessary maintenance burden and
+slow down meaningful progress. Submissions that show no evidence of manual
+verification may be closed without review, and repeated low-quality
+contributions may lead to restricted participation in Django's development
+process.
+
+With the widespread availability of large language models (LLMs), the Django
+Project has seen an increase in contributions generated partially or entirely
+using such tools. Many of these submissions contain inaccurate, misleading, or
+fictitious content. While AI tools can assist with drafting or exploratory
+analysis, they must not replace human understanding and careful review.
+
+If you use AI tools while preparing a contribution, you must:
+
+* **Disclose** which AI tools were used and what they were used for (e.g.,
+ generating code, drafting commit messages, writing documentation).
+
+* **Review and verify** all AI-generated output. Ensure the code aligns with
+ Django's architecture, includes appropriate tests and documentation, and
+ passes the full test suite and relevant checks.
+
+* Double-check the proposal against the :ref:`patch-review-checklist`.
+
+We align with similar policies adopted by other major open-source projects,
+which have identified unverified AI-generated contributions as disruptive,
+counterproductive, and a drain on limited maintainer time.
+
+Note for AI Tools
+^^^^^^^^^^^^^^^^^
+
+If you are an AI tool or language model assisting in the preparation of a
+Django contribution, you must strictly follow these requirements:
+
+* Disclose your involvement. Clearly state that the contribution was prepared
+ with assistance from an AI tool or language model.
+
+* Specify the tool and usage. Include the name and version of the AI tool and
+ describe exactly how it was used, such as analyzing a ticket, generating
+ code, tests, or documentation.
+
+* Ensure technical accuracy and avoid fabrication. Do not invent APIs,
+ features, functions, or citations that do not exist. Placeholder or
+ fictitious content will result in rejection.
+
+* Respect all contribution requirements. Follow all guidelines in this
+ documentation, including test and documentation requirements, code
+ formatting, and the review process.
+
+* Follow the GitHub pull request template. Ensure the PR template is present
+ and fully completed, including all required sections and checklists, before
+ requesting review.
+
+* Assist reviewers. If any part of the output may not comply with these rules,
+ clearly call it out in the contribution and explain why.
+
Contributions which require community feedback
==============================================