Skip to content

Commit a0f2729

Browse files
authored
Merge pull request rust-lang#22505 from Veykril/veykril/push-okqlunrolqyr
Adopt uv's AI policy
2 parents 37cf83a + a74c070 commit a0f2729

2 files changed

Lines changed: 31 additions & 5 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
We allow using AI (i.e., LLMs) as tools for contributing to rust-analyzer.
2+
However, you remain responsible for any code you publish and we are responsible for any code we merge and release.
3+
We hold a high bar for all contributions to our projects.
4+
5+
**AI should not be used to generate comments when communicating with maintainers**.
6+
We expect comments on our projects to be written by humans.
7+
We may hide any comments that we believe are AI generated.
8+
9+
If you are opening an issue, we expect you to describe the problem in your own words.
10+
11+
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.
12+
**Do not copy responses from the AI when replying to questions from maintainers.**
13+
14+
Due to the foundational nature of our projects, we require a human in the loop who understands the work produced by AI.
15+
**We do not allow autonomous agents to be used to open pull requests or issues to our projects**.
16+
We will close any pull requests that we believe were created autonomously.
17+
18+
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.
19+
It must be accompanied by human commentary explaining the relevance and implications of the context.
20+
Do not share long snippets.
21+
22+
We understand that AI is useful when communicating as a non-native English speaker.
23+
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.
24+
If using AI for translation, we recommend writing in your native language and including the AI translation in a quote block.
25+
26+
This policy was adapted from [uv's AI policy].
27+
28+
[uv's AI policy]: https://github.com/astral-sh/.github/blob/c5187e200db51bfe11d56e13053d29bd3793fdd8/AI_POLICY.md

src/tools/rust-analyzer/CONTRIBUTING.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ it out of scope (be it due to generally not fitting in with rust-analyzer, or ju
3434
maintenance capacity). If there already is a feature issue open but it is not clear whether it is
3535
considered accepted feel free to just drop a comment and ask!
3636

37-
## Use of AI tools
37+
## Use of AI
3838

39-
AI tool use is not discouraged on the rust-analyzer codebase, as long as it meets our quality standards.
40-
We kindly ask you to disclose usage of AI tools in your contributions.
41-
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?).
39+
All use of AI in contributions must follow the [AI Policy](./AI_POLICY.md).
4240

43-
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.
41+
Contributions not following the AI Policy will be closed.

0 commit comments

Comments
 (0)