From 8c961ad99233834400bdccba71e07289e9fb6e41 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 1 Jun 2026 09:19:16 +0200 Subject: [PATCH 1/2] Adopt uv's AI policy --- AI_POLICY.md | 28 ++++++++++++++++++++++++++++ CONTRIBUTING.md | 8 +++----- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 AI_POLICY.md diff --git a/AI_POLICY.md b/AI_POLICY.md new file mode 100644 index 000000000000..099875029068 --- /dev/null +++ b/AI_POLICY.md @@ -0,0 +1,28 @@ +We support using AI (i.e., LLMs) as tools for coding. +However, you remain responsible for any code you publish and we are responsible for any code we merge and release. +We hold a high bar for all contributions to our projects. + +**AI should not be used to generate comments when communicating with maintainers**. +We expect comments on our projects to be written by humans. +We may hide any comments that we believe are AI generated. + +If you are opening an issue, we expect you to describe the problem in your own words. + +If you are opening a pull request, we expect you to be able to explain the proposed changes in your own words. This includes the pull request body and responses to questions. +**Do not copy responses from the AI when replying to questions from maintainers.** + +Due to the foundational nature of our projects, we require a human in the loop who understands the work produced by AI. +**We do not allow autonomous agents to be used to open pull requests or issues to our projects**. +We will close any pull requests that we believe were created autonomously. + +If you wish to include context from an interaction with AI in your comments, it must be in a quote block (e.g., using `>`) and disclosed as such. +It must be accompanied by human commentary explaining the relevance and implications of the context. +Do not share long snippets. + +We understand that AI is useful when communicating as a non-native English speaker. +If you are using AI to edit your comments for this purpose, please take the time to ensure it reflects your own voice and ideas. +If using AI for translation, we recommend writing in your native language and including the AI translation in a quote block. + +This policy was adapted from [uv's AI policy]. + +[uv's AI policy]: https://github.com/astral-sh/.github/blob/c5187e200db51bfe11d56e13053d29bd3793fdd8/AI_POLICY.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e6ab3d75a0cb..b6a2210ca5d7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,10 +34,8 @@ it out of scope (be it due to generally not fitting in with rust-analyzer, or ju maintenance capacity). If there already is a feature issue open but it is not clear whether it is considered accepted feel free to just drop a comment and ask! -## Use of AI tools +## Use of AI -AI tool use is not discouraged on the rust-analyzer codebase, as long as it meets our quality standards. -We kindly ask you to disclose usage of AI tools in your contributions. -If you used them without disclosing it, we may reject your contribution on that basis alone due to the assumption that you have, most likely, not reviewed your own submission (so why should we?). +All use of AI in contributions must follow the [AI Policy](./AI_POLICY.md). -We may still reject AI-assisted contributions if we deem the quality of the contribution to be unsatisfactory as to reduce impact on the team's review budget. +Contributions not following the AI Policy will be closed. From 92d4578a53cbbc154ddbe5dd41ca5174d14d1bd4 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 1 Jun 2026 13:15:18 +0200 Subject: [PATCH 2/2] Update AI_POLICY.md Co-authored-by: Florian Diebold --- AI_POLICY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI_POLICY.md b/AI_POLICY.md index 099875029068..f5912a3c19af 100644 --- a/AI_POLICY.md +++ b/AI_POLICY.md @@ -1,4 +1,4 @@ -We support using AI (i.e., LLMs) as tools for coding. +We allow using AI (i.e., LLMs) as tools for contributing to rust-analyzer. However, you remain responsible for any code you publish and we are responsible for any code we merge and release. We hold a high bar for all contributions to our projects.