]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Add contribution instructions about LLM generated code and comments and automated...
authorSebastián Ramírez <tiangolo@gmail.com>
Sun, 11 Jan 2026 22:22:58 +0000 (14:22 -0800)
committerGitHub <noreply@github.com>
Sun, 11 Jan 2026 22:22:58 +0000 (23:22 +0100)
.github/workflows/issue-manager.yml
docs/en/docs/contributing.md
docs/en/docs/management-tasks.md

index f40ec4dc47f6cc465b17c3925c7a3971a99f0c1c..2ae588da13ac45a725b6a6ecc0d2a04bcb7c9f64 100644 (file)
@@ -41,11 +41,15 @@ jobs:
                 "message": "As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR.",
                 "reminder": {
                     "before": "P3D",
-                    "message": "Heads-up: this will be closed in 3 days unless theres new activity."
+                    "message": "Heads-up: this will be closed in 3 days unless there's new activity."
                 }
               },
               "invalid": {
                 "delay": 0,
                 "message": "This was marked as invalid and will be closed now. If this is an error, please provide additional details."
+              },
+              "maybe-ai": {
+                "delay": 0,
+                "message": "This was marked as potentially AI generated and will be closed now. If this is an error, please provide additional details, make sure to read the docs about contributing and AI."
               }
             }
index be4706f742b4635aa3f7c39cee69b356051a4be7..a4d896109b8aeca221c4c9ba0f4aa159f035cc41 100644 (file)
@@ -219,3 +219,39 @@ Once there are several people in the discussion, the FastAPI team can evaluate i
 Then the docs will be automatically translated using LLMs, and the team of native speakers can review the translation, and help tweak the LLM prompts.
 
 Once there's a new translation, for example if docs are updated or there's a new section, there will be a comment in the same discussion with the link to the new translation to review.
+
+## Automated Code and AI
+
+You are encouraged to use all the tools you want to do your work and contribute as efficiently as possible, this includes AI (LLM) tools, etc. Nevertheless, contributions should have meaningful human intervention, judgement, context, etc.
+
+If the **human effort** put in a PR, e.g. writing LLM prompts, is **less** than the **effort we would need to put** to **review it**, please **don't** submit the PR.
+
+Think of it this way: we can already write LLM prompts or run automated tools ourselves, and that would be faster than reviewing external PRs.
+
+### Closing Automated and AI PRs
+
+If we see PRs that seem AI generated or automated in similar ways, we'll flag them and close them.
+
+The same applies to comments and descriptions, please don't copy paste the content generated by an LLM.
+
+### Human Effort Denial of Service
+
+Using automated tools and AI to submit PRs or comments that we have to carefully review and handle would be the equivalent of a <a href="https://en.wikipedia.org/wiki/Denial-of-service_attack" class="external-link" target="_blank">Denial-of-service attack</a> on our human effort.
+
+It would be very little effort from the person submitting the PR (an LLM prompt) that generates a large amount of effort on our side (carefully reviewing code).
+
+Please don't do that.
+
+We'll need to block accounts that spam us with repeated automated PRs or comments.
+
+### Use Tools Wisely
+
+As Uncle Ben said:
+
+<blockquote>
+With great <strike>power</strike> <strong>tools</strong> comes great responsibility.
+</blockquote>
+
+Avoid inadvertently doing harm.
+
+You have amazing tools at hand, use them wisely to help effectively.
index 6f34afb73152aebe8bba00dc466a68dc15f239f0..fc6e1eb280f9a224267c855bbeeef7c76caa2bfe 100644 (file)
@@ -122,6 +122,8 @@ For these language translation PRs, confirm that:
 
 * If a PR seems to be spam, meaningless, only to change statistics (to appear as "contributor") or similar, you can simply mark it as `invalid`, and it will be automatically closed.
 
+* If a PR seems to be AI generated, and seems like reviewing it would take more time from you than the time it took to write the prompt, mark it as `maybe-ai`, and it will be automatically closed.
+
 * A PR should have a specific use case that it is solving.
 
 * If the PR is for a feature, it should have docs.