From 11b5de13876bdbaf4d233a43320428fab55428de Mon Sep 17 00:00:00 2001 From: Michael Rothgang Date: Wed, 6 May 2026 14:28:01 +0200 Subject: [PATCH] feat(policy): refine AI policy for new contributors Remove the blanket ban on AI-generated refactoring PRs: these may be useful. (All other caveats still apply, but this gives us more flexibility in practice.) --- templates/contribute/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/contribute/index.md b/templates/contribute/index.md index 6aa5d24f9..9c6051a44 100644 --- a/templates/contribute/index.md +++ b/templates/contribute/index.md @@ -67,7 +67,8 @@ Note that using an LLM when writing comments on github or Zulip is not allowed: Using artificial intelligence tools to generate code is becoming more and more common. While this can be practical, their use also poses ethical, ecological, legal and social concerns. We recognise that there are strong differences in opinion on this topic. That said, while individual action alone will not address these concerns, we ask you to consider the effects of your AI use and if it is truly necessary. -We do not accept pull requests opened by new contributors where code is LLM-generated. Mathlib intentionally has very high standards (on generality, integration with the remaining library and maintainability, including code style). As of April 2026, AI-written code fails to meet that bar by a large margin. Getting code to mathlib's standards requires understanding and writing Lean code by hand. If you just want to help and not put in the learning effort, making a PR to mathlib is counterproductive: the effort required from the mathlib maintainers is larger than the benefit, because the time used to improve the quality of the code will not result in a better quality in future PRs. More generally the reviewer team may close a PR containing low-quality code if it appears to be AI-generated. If we notice that you open several PRs without putting in this learning effort and without adhering to our community ethical standards, we retain the right of banning you both from opening new PR's and from the Zulip chat. +We do not accept pull requests opened by new contributors that add new definitions or theorems where code is LLM-generated. +Mathlib intentionally has very high standards (on generality, integration with the remaining library and maintainability, including code style). As of April 2026, AI-written code fails to meet that bar by a large margin. Getting code to mathlib's standards requires understanding and writing Lean code by hand. If you just want to help and not put in the learning effort, making a PR to mathlib is counterproductive: the effort required from the mathlib maintainers is larger than the benefit, because the time used to improve the quality of the code will not result in a better quality in future PRs. More generally the reviewer team may close a PR containing low-quality code if it appears to be AI-generated. If we notice that you open several PRs without putting in this learning effort and without adhering to our community ethical standards, we retain the right of banning you both from opening new PR's and from the Zulip chat. If you use artificial intelligence (such as, by using github's copilot mode, asking an LLM like [ChatGPT](https://chatgpt.com/) or using an agent like [Codex](https://openai.com/codex/), [Claude](https://claude.ai/), [Gemini](https://gemini.google.com/app), or even Lean-dedicated agents like [Aristotle](https://aristotle.harmonic.fun/)), please explain this in the PR description. Explain which tool(s) you used and how you used it. This provides useful context for reviewers: tools make different mistakes than humans, so knowing this makes it easier to spot common errors.