Skip to content
Open
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
772edeb
Add an LLM policy for `rust-lang/rust`
jyn514 Apr 17, 2026
815da6e
address some of jieyouxu's comments
jyn514 Apr 17, 2026
17a35f4
revert extraneous change
jyn514 Apr 17, 2026
61e5e2c
address some more review comments
jyn514 Apr 18, 2026
8ee5ed4
more review comments
jyn514 Apr 18, 2026
7cd8c17
more wording
jyn514 Apr 18, 2026
2db7465
rewrite "trivial changes" section
jyn514 Apr 21, 2026
9b2b3c2
rewrite intro to 'Allowed with caveats'
jyn514 Apr 21, 2026
e3b1394
Be more specific in "Moderation policy"
jyn514 Apr 21, 2026
e3f2aec
Add explicit conditions for modification or removal
jyn514 Apr 21, 2026
864428f
mention that the policy is intentionally conservative
jyn514 Apr 21, 2026
593d538
extend "Penalties" section with sentencing guidelines
jyn514 Apr 21, 2026
75050a2
be more clear where the CoC is invoked
jyn514 Apr 23, 2026
b6a8662
minor edits; add "Motivation and guiding principles" section
jyn514 Apr 28, 2026
9a944f7
Relax and clarify moderation guidelines
jyn514 Apr 28, 2026
14956c3
Carve out a space for experimentation
jyn514 Apr 28, 2026
8fe7281
fix typo
jyn514 Apr 28, 2026
791e46f
recommend adversarial review from another LLM
jyn514 Apr 28, 2026
8520038
markdown formatting
jyn514 Apr 28, 2026
b14e8ca
more markdown formatting
jyn514 Apr 28, 2026
69b6dc1
Note that explicitly marking LLM content is ok
jyn514 May 13, 2026
d682475
Exempt t-security-response from a few requirements
jyn514 May 13, 2026
ea4e504
Make "solicited" even stricter
jyn514 May 13, 2026
7eeecbb
Carve out a space for experimentation
jyn514 May 13, 2026
cd9aecd
Revert "Exempt t-security-response from a few requirements"
jyn514 May 13, 2026
ee4f26c
address a few of TC's concerns
jyn514 May 14, 2026
7956574
address a few of Jack's concerns
jyn514 May 14, 2026
b88855a
remove the 'additional scrutiny' examples
jyn514 May 14, 2026
4305e14
move 'using an llm to discover bugs' to the caveats section, without …
jyn514 May 14, 2026
ab6f8a4
move LLM-authored code to its own section; add a zulip stream as policy
jyn514 May 14, 2026
d9d8238
add a section about staying on-topic
jyn514 May 14, 2026
83b9363
wording
jyn514 May 14, 2026
9efffad
relax moderation policy guidelines
jyn514 May 14, 2026
24f236c
ban llms from writing safety comments
jyn514 May 15, 2026
f85aac6
Group some "personal use" bullets together
jyn514 May 15, 2026
adfc5e2
remove "by a team" phrase
jyn514 May 15, 2026
014cf85
clarify wording on harrassment policy
jyn514 May 15, 2026
db8fdae
t-lang didn't get a vote, so narrow the policy not to apply to them
jyn514 May 15, 2026
196cf63
clarify wording on modification policy
jyn514 May 15, 2026
6374d57
clarify wording on "be honest" policy
jyn514 May 15, 2026
8a1ce25
s/authored/created/g
jyn514 May 15, 2026
742d9f4
spruce up "spirit of the law" section
jyn514 May 15, 2026
235432b
wording
jyn514 May 16, 2026
9396306
further clarify moderation section
jyn514 May 16, 2026
33b1407
Add a "scope" section
jyn514 May 16, 2026
08a6b17
add back "better, not faster" quote
jyn514 May 16, 2026
3740dc5
wording
jyn514 May 16, 2026
fb37c69
delete confusing review bot sentence
jyn514 May 16, 2026
8444f54
add link to CoC
jyn514 May 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
- [Project groups](./governance/project-groups.md)
- [Policies](./policies/index.md)
- [Crate ownership policy](./policies/crate-ownership.md)
- [LLM usage policy](./policies/llm-usage.md)
- [Infrastructure](./infra/index.md)
- [Other Installation Methods](./infra/other-installation-methods.md)
- [Archive of Rust Stable Standalone Installers](./infra/archive-stable-version-installers.md)
Expand Down
2 changes: 2 additions & 0 deletions src/how-to-start-contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ To achieve this goal, we want to build trust and respect of each other's time an
- Please respect the reviewers' time: allow some days between reviews, only ask for reviews when your code compiles and tests pass, or give an explanation for why you are asking for a review at that stage (you can keep them in draft state until they're ready for review)
- Try to keep comments concise, don't worry about a perfect written communication. Strive for clarity and being to the point

See also our [LLM usage policy](./policies/llm-usage.md).

[^1]: Free-Open Source Project, see: https://en.wikipedia.org/wiki/Free_and_open-source_software

### Different kinds of contributions
Expand Down
198 changes: 198 additions & 0 deletions src/policies/llm-usage.md
Comment thread
oli-obk marked this conversation as resolved.
This comment was marked as a violation of GitHub Acceptable Use Policies
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand you're frustrated, but I don't think this kind of language helps anyone.

About your point: you explicitly state that people are allowed to have their own opinion, but apparently they are not allowed, per you, to have an opinion on whether the discussion of ethics is relevant here.

And for the record, I don't use LLMs and I dislike them for many reasons. But I also think that setting a policy on the basis of the ethical consequences of them is not what we should do.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The missing link to said RFC: rust-lang/rfcs#3959

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not the one who decided to omit ethics from the discussion here; I'm respecting the opinions of the author on that, and conceding that it's fair to get a simpler policy out sooner in this particular case. There are allowed to be concurrent policy decisions and this policy's opinion is that focusing entirely on pragmatic labelling of LLM contributions, alongside calling out certain problematic usages, is the best way to get a policy out sooner.

Is that the best choice? No idea! But I respect the author and their wishes and have an explicit alternative that will almost certainly take longer to figure out. So, instead of bothering jyn about it, I'm inviting the discussion to happen there instead.

Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
## LLM Usage Policy

For additional information about the policy itself, see [the appendix](#appendix).

### Overview
Comment thread
nikomatsakis marked this conversation as resolved.

Using LLMs while working on `rust-lang/rust` is conditionally allowed, when done with care.
LLMs are not a substitute for thought,
and we do not allow them to be used in ways that risk losing our shared social and technical understanding of the project,
nor in ways that hurt our goals of creating a strong community.

The policy's guidelines are roughly as follows:

> It's fine to use LLMs to answer questions, analyze, distill, refine, check, suggest, review. But not to **create**.
Comment thread
jyn514 marked this conversation as resolved.

> We carve out a space for "experimentation" to inform future revisions to this policy.

Comment on lines +16 to +17
Copy link
Copy Markdown
Member

@joshtriplett joshtriplett Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> LLMs work best when used as a tool to write *better*, not *faster*.
> In `rust-lang/rust`, please do not use LLMs as a tool to write *faster*.

Having this as a high-level summary is offering a judgement on LLMs that feels like it isn't necessary for the policy, and makes consensus more difficult to reach. For anti-LLM folks it's saying that they work best when used to write "better", which is a point in dispute. I would also expect (but don't want to put words in people's mouths) that for pro-LLM folks the point that they don't work well when used to work faster may be in dispute.

I've tried to rephrase this in a fashion that, rather than expressing a general statement on when "LLMs work best", is instead expressing what is desired *for rust-lang/rust as that's the scope of this policy.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is adapted from a quote by @ubiratansoares. This edit changes the quote beyond recognition, and I would rather remove it than edit this much.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I think it would be best removed, on the basis that previous line covers similar territory and seems less controversial.

Copy link
Copy Markdown
Member

@Kobzol Kobzol Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh I don't actually understand what this quote is supposed to mean; if anything, I would phrase it the other way around (you can use LLMs to do [things you can already do] to get them done faster, but you shouldn't use them to do things you don't already know how to do yourself).

Copy link
Copy Markdown
Member

@AndyGauge AndyGauge May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, it was the

LLMs work best when used as a tool to write better, not faster.

that I took back to my team and reworked our approach to AI-generated code. I think that statement itself has a lot of weight.

### Rules
#### Legend
- ✅ Allowed
- ❌ Banned
- ⚠️ Allowed with caveats. Must disclose that an LLM was used.
Comment thread
jyn514 marked this conversation as resolved.
- ℹ️ Adds additional detail to the policy. These bullets are normative.

#### ✅ Allowed
The following are allowed.
- Any use of an LLM where you are the only one who sees the output. For example:
- Asking an LLM questions about an existing codebase.
- Asking an LLM to summarize comments on an issue, PR, or RFC.
- ℹ️ This does not allow reposting the summary publicly. This only includes your own personal use.
- Asking an LLM to privately review your code or writing.
- ℹ️ This does not apply to public comments. See "review bots" under ⚠️ below.
- Writing dev-tools for your own personal use using an LLM.
- Using an LLM to generate possible solutions to an issue, learning from them, and then writing something from scratch in your own style.
- Syncing code and documentation into `rust-lang/rust` (e.g., using submodules, subtrees, [josh](https://github.com/josh-project/josh), etc.) from other repositories that do not follow this policy.
- Using an LLM in the creation of experimental code changes that are not meant to be reviewed and will never be merged but must live as draft PRs on `rust-lang/rust` for tooling reasons, such as to run crater or perf.
Copy link
Copy Markdown
Member

@joshtriplett joshtriplett May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be moved to "⚠️ Allowed with caveats", because it needs to disclose that an LLM was used. Sometimes, people take draft PRs and use them as a basis for some other work, or revive them if the original author has abandoned them. Without disclosure, that would amount to unknowingly working from LLM output.

(I agree with the premise that something amounting to "I just want to run perf on this" is...not okay, exactly, but reasonable for us to accept as a compromise. My only concern here is requiring disclosure.)

@rfcbot concern require-disclosure-even-for-draft-prs

View changes since the review

Copy link
Copy Markdown
Contributor

@traviscross traviscross May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consider this as beyond the scope of the teams that are FCPing this. These teams do not exclusively own the rust-lang/rust Project monorepo. They own certain code within the repository and certain activities that take place within the space, e.g., compiler reviews. Something that goes up in rust-lang/rust, for tooling reasons, that does not ask for compiler (or libs, etc.) review and that is not intended to be merged is outside of this scope. That would be a Project matter.

Concern about what someone else might later do is valid (though rather unlikely for the use cases I have in mind), but that applies equally to what someone else might later do with code posted anywhere1 — this policy creates compliance challenges when building on other people's code.

(In fact, I'd suggest it's worth spending some words in the policy discussing this and what we expect people to do. E.g., if we expect people to proactively verify that any code they're building on (e.g., from someone else's fork) is free of LLM generation before they submit the combined result for review, then probably we'd do well to say that.)

Footnotes

  1. The obvious retort is, "yes, but it's more likely if it's in rust-lang/rust". Agreed. I'd consider that a good argument to make on a Project-level policy.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the compromise here is to separate these out by intention (and that was the goal behind the various qualifiers in this item — it's not speaking generally about draft PRs). If you're putting up a draft PR that you do intend to later make a not-draft PR and ask for compiler (or libs, etc.) review, then maybe it'd be better to shift the compliance to the earliest feasible point. Such PRs are distinct due to this intention.

Of course, there still may be practical problems with adding requirements on draft PRs. Often people put these up without any PR description at all. It's perhaps in tension with the idea that a draft PR is "not yet ready for review" to suggest that people could have already violated our policy at that point by the PR description being incomplete — maybe it was in draft because the author wanted to read this policy first and work out wording for a compliant disclosure.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe "suggested" disclosure for them? Empty PR descriptions in drafts is a very real thing, but it would be nice to have disclosure by default for them.

Copy link
Copy Markdown
Member

@joshtriplett joshtriplett May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whether it is "intended" to be merged is beside the point. If a PR is posted to rust-lang/rust, draft or no, people may reasonably consider building upon it. It is not an unreasonable ask to say that LLM usage needs to be disclosed, in order to give a prospective user of that code the information they'd need in order to do so.

Otherwise, a subsequent developer is in the position of potentially submitting a non-draft PR containing that LLM-written code, which would be against the policy. It would be a downgrade from existing practice if they first have to go "did you use an LLM for this?"; part of the point of having this policy is to not have to do that.

Copy link
Copy Markdown
Member Author

@jyn514 jyn514 May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it’s reasonable if they have to ask the original author whether they used an LLM. it’s not so different from due diligence to make sure that the license from another piece of code is compatible, and i don’t think it will generate mistrust in the same way as investigating every incoming PR. it also generalizes nicely if people want to submit code from other projects, like a patch from crossbeam_channel to mpsc.

if the author is unresponsive or we otherwise can’t determine whether it’s LLM authored, we’d assume it is and it would have the same 5 rules as other LLM PRs.

Copy link
Copy Markdown
Member

@jackh726 jackh726 May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(to the concern) Strong disagree on this point. Disclosure has both advantages and disadvantages. Requiring disclosure for things that (at least initially) are not meant for review is not in the spirit of why we want to do so.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it’s not so different from due diligence to make sure that the license from another piece of code is compatible

We don't, today, expect that someone would submit a draft PR containing code that was (for instance) misappropriated from some other project in violation of that project's license. We don't ask "does this draft consist entirely of code we're legally allowed to use". We just tend to assume that if someone submitted it as a draft PR, they didn't do such a thing. And I think that's entirely reasonable to be able to assume.

I'm proposing that we should be able to do the same for LLMs.

To be explicit here, I'm not suggesting that such PRs be disallowed or restricted. I'm observing that it's not an unreasonable ask for a draft perf-test PR to say, for instance, "LLM prototype to perf test an idea".


Comment thread
traviscross marked this conversation as resolved.
Comment thread
traviscross marked this conversation as resolved.
Comment thread
jyn514 marked this conversation as resolved.
#### ❌ Banned
The following are banned.
- Comments from a personal user account that are originally authored by an LLM.
Comment thread
jyn514 marked this conversation as resolved.
Outdated
- ℹ️ This also applies to issue bodies and PR descriptions.
Comment thread
traviscross marked this conversation as resolved.
- ℹ️ This does *not* include stabilization reports, t-lang proposals, and changes to documentation owned by t-lang.
T-lang is free to set their own separate policy for those.
- ℹ️ This does not apply if the LLM content is clearly quoted and marked, you can post that.
However, the content of the comment must stand on its own even without the LLM content; it's not a substitute for your own words.
- ℹ️ See also "machine-translation" in ⚠️ below.
- Documentation that is originally authored by an LLM.
Comment thread
jyn514 marked this conversation as resolved.
Outdated
- ℹ️ This includes non-trivial source comments, such as doc-comments, safety comments, or multiple paragraphs of non-doc-comments.
- ℹ️ This includes compiler diagnostics.
Comment thread
jyn514 marked this conversation as resolved.
LLMs are conditionally allowed to assist with the *logic* surrounding a diagnostic (see "code changes" under ⚠️ below),
but they must not be used to author the message itself.
- Treating an LLM review as a sufficient condition to merge or reject a change.
LLM reviews, if enabled, **must** be advisory-only.
Teams can have a policy that code can be merged without review, and they can have a policy that code must be reviewed by at least one person,
but they may not have a policy that an LLM review substitutes for a human review.
- ℹ️ See "review bots" in ⚠️ below.
- ℹ️ An LLM review does not substitute for self-review. Authors are expected to review their own code before posting and after each change.

#### ⚠️ Allowed with caveats
The following are decided on a case-by-case basis.
In general, new contributors will be scrutinized more heavily than existing contributors,
since they haven't yet established trust with their reviewers.
Comment on lines +61 to +62
Copy link
Copy Markdown
Member

@joshtriplett joshtriplett May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In general, new contributors will be scrutinized more heavily than existing contributors,
since they haven't yet established trust with their reviewers.
In general, new contributors will be scrutinized more heavily than existing contributors,
since they haven't yet established trust with their reviewers.
All contributors are subject to the same uniform policy; this is merely an observation that evaluations based on this policy incorporate an element of trust.

I think it's important to make it clear that this isn't a different set of rules for established project members.

View changes since the review

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In general, new contributors will be scrutinized more heavily than existing contributors,
since they haven't yet established trust with their reviewers.
If you are a new contributor, you should expect to be scrutinized more heavily than existing contributors,
since you haven't yet established trust with yourr reviewers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alice-i-cecile 👍 for that change as well (with s/yourr/your/), which makes this come across even more diplomatically. I don't think it removes the need to also add the note I added above, but I think it's a great improvement.


- Using machine-translation (e.g. Google Translate) from your native language without posting your original message.
Doing so can introduce new miscommunications that weren't there originally, and prevents someone who speaks the language from providing a better translation.
- ℹ️ Posting both your original message and the translated version is always ok, but you must still disclose that machine-translation was used.
- "Trivial" code changes that do not meet the [threshold of originality](https://fsfe.org/news/2025/news-20250515-01.en.html).
Copy link
Copy Markdown

@xtqqczze xtqqczze May 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think "threshold of originality" is the right concept here. That standard concerns whether a work reflects the author’s own free and creative choices, which cannot meaningfully apply to LLM output. If the intent is to exclude mechanically trivial changes, the policy should describe that directly instead of relying on copyright terminology.

View changes since the review

Copy link
Copy Markdown

@clarfonthey clarfonthey May 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree that this is the case, since I've pretty much always interpreted "threshold of originality" to additionally mean that something is unique and substantial enough to be copyrightable.

But would be interested if you have any particular examples of it being used in this context, since if this is a particularly decided matter and that's just not clear, it would be helpful to know.

Side note: I thought that the Foundation's policy used the term, but no, what they actually use is this:

*Materially, in this case, refers to incidences where the AI fundamentally generated, structured, and/or substantively influenced the output, beyond just editorial.

I feel like at least one of the policy examples I sifted through did use the term, but I would be more willing to assume that the legal definition was used correctly from someone like the Foundation who almost certainly had legal counsel give it a pass before publishing. Since they didn't, you might be right, just, I don't know what is the true case here.

Edit: a quick ctrl-F for "originality" in all the policies that were mentioned turns up nothing, so, maybe this was the only place where it was mentioned.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that the proposed policy ties "trivial" changes to the "threshold of originality." If that threshold is understood as the level of originality required for copyright protection, then all LLM-generated output would automatically fall below it, not because the change is necessarily boilerplate or insignificant, but because LLM output is categorically non-copyrightable.


Given that, I think it would be better for the RFC to avoid relying on copyright terminology entirely, and instead define "trivial" directly in terms of the practical distinction it is trying to capture.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, that actually does sound like a compelling argument. I would be okay using different terms for that reason.

- ℹ️ Be cautious about PRs that consist solely of trivial changes.
See also [the compiler team's typo fix policy](https://rustc-dev-guide.rust-lang.org/contributing.html#writing-documentation:~:text=Please%20notice%20that%20we%20don%E2%80%99t%20accept%20typography%2Fspellcheck%20fixes%20to%20internal%20documentation).
- Using an LLM to discover bugs, as long as you personally verify the bug, write it up yourself, and disclose that an LLM was used.
Please refer to [our guidelines for fuzzers](https://rustc-dev-guide.rust-lang.org/fuzzing.html#guidelines).
- ℹ️ This also includes reviewers who use LLMs to discover flaws in unmerged code.
- Using an LLM as a "review bot" for PRs.
Copy link
Copy Markdown
Member

@kennytm kennytm Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm OOTL but I find this section situationally strange — where did the "review bot" come from?

IME AI-powered review bots that directly participates in PR discussions (esp the "app" ones) are configured by repository owner, but AFAIK r-l/r (which this policy applies solely to) did not have any such bots. I highly doubt a contributor will bring in their own review bot in public. So practically this has to be either

  • someone requested a review from Copilot, which may be we can opt-out?
  • the reviewer outsourced the review work to a coding agent, which is already covered in the sections
  • at least one team actually considered enabling such review bots in the future? as this is linked previously in that "Teams can have a policy that code can be merged without review" part, but I don't think this will ever happen given the the stance of this policy

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I highly doubt a contributor will bring in their own review bot in public.

I wish it worked like that :( People can just trigger GitHub copilot, or I suppose any other review bot, and let it comment on a r-l/r PR. Some people don't even do it willingly, but GH does it automatically for them, as GH copilot has a tendency to re-enable itself even if you sometimes disable it.

It is also not possible to opt-out of the PR author requesting a Copilot review, if I remember correctly.

Copy link
Copy Markdown

@xtqqczze xtqqczze Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve seen this behavior elsewhere on GitHub, where contributors effectively use a personal account as a kind of "review bot" to comment on PRs without approval from maintainers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is also not possible to opt-out of the PR author requesting a Copilot review, if I remember correctly.

Yeah currently disabling review is a personal/license-owner setting, it is not possible to configure from the repository PoV 😞 but I think this is something that we may bring up to GitHub.

It may be possible to use content exclusion to blind Copilot, but I'm not sure if this hack is going to produce any overreaching effects (e.g. affecting private IDE usage too).

Copy link
Copy Markdown
Contributor

@apiraino apiraino Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

someone requested a review from Copilot, which may be we can opt-out?

I think this is exactly the point of pointing that out in our policy. Some people trigger a "[at]copilot review" in our repos without asking us for consent. This is rude behaviour and we don't want that.

And, yes, as you point out opting out of this "trigger" is currently only a project-wide setting, not at a repository level so we are looking with GitHub if they could make this setting more fine-grained (here on Zulip a discussion with the Infra team)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, you're right; I deleted the comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve seen this behavior elsewhere on GitHub, where contributors effectively use a personal account as a kind of "review bot" to comment on PRs without approval from maintainers.

Unsolicited review bots are becoming an increasing problem; for example: https://web.archive.org/web/20260426133344/https://github.com/rust-lang/rust-clippy/issues/16893#issuecomment-4321880160

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for flagging xtqqczze - the same bot has commented in 6+ issues on the rust-clippy repo and in my case was giving unsolicited advice in a completely derailing direction (solving a specific case I obviously already worked around rather than the general case rust-lang/rust-clippy#16901 (comment))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xtqqczze both rust-lang/rust-clippy#16893 and rust-lang/rust-clippy#16901 are issues not PRs, and that @QEEK-AI account commented spontaneously without any summoning. So I don't think these instances fall under this "Review Bot" rule (which is still "⚠️ Allowed with caveats"). At the very least these are "Comments […] authored by an LLM" which is "❌ Banned", and they are also outright "spam" that the current CoC can already handle.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this review bot policy to be a messy compromise that doens't seem to be serving anyone particularly well. Speaking from general experience, it is rather frustrating as a reviewer to be met with a review request that has then already been answered by an LLM. Even if a maintainer allows the bot, that doesn't necessarily mean that the reviewer consents to it. I think contributors and reviewers who wish to use LLMs for review are better served by running these tools locally, in compliance with the other policies. I propose removing the language around review bots.

- ℹ️ Review bots that post without being approved by a maintainer will be banned.
- ℹ️ Review bots **must** have a separate GitHub account that marks them as an LLM.
You **must not** post (or allow a tool to post) LLM reviews verbatim on your personal account unless clearly quoted with your own personal interpretation of the bot's analysis.
- ℹ️ Review bot accounts must be blockable by individual users via the standard GitHub user-blocking mechanism. (Note that some GitHub "app" accounts post comments that look like users but cannot be blocked.)
- ℹ️ If a more reliable tool, such as a linter or formatter, already exists for the language you're writing, we strongly suggest using that tool instead of or in addition to the LLM.
- ℹ️ Configure LLM review tools to reduce false positives and excessive focus on trivialities, as these are common, exhausting failure modes.
- ℹ️ LLM comments **must not** be blocking; reviewers must indicate which comments they want addressed. It's ok to require a *response* to each comment but the response can be "the bot's wrong here".
Comment thread
jyn514 marked this conversation as resolved.
Outdated
- In other words, reviewers must explicitly endorse an LLM comment before blocking a PR. They are responsible for their own analysis of the LLM's comment and cannot treat it as a CI failure.
- ℹ️ This does not apply to private use of an LLM for reviews; see ✅ above.

All of these **must** disclose that an LLM was used.

#### Experiment: LLM-authored code changes
Copy link
Copy Markdown

@lumi-me-not lumi-me-not May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like the ethical issues with it are too big to allow something like this. A change being high-quality doesn't fix all of the massive ethical issues with generative models.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it doesn't fix the issues. I don't think we can build a policy on top of the ethical issues, though. I'd like to share (with permission) this comment from @davidtwco on internal channels:

I share some of yours and others' ethical concerns and disagree on some, and I think everyone is entitled to have their views on the ethics of AI/LLMs/the surrounding industry and we should respect those, but I nevertheless don't think the ethical concerns are a solid basis for project policy.

Fundamentally we're never going to get everyone to agree on the ethical concerns - where each of us land on these issues is going to depend on individual values, personal experiences, the cultures we come from, etc. The project is hundreds of people with as many varied backgrounds, we've almost certainly already got variety in opinion on any ethical and political question you can think of. As soon as we start to consider ethical concerns, all sorts of impossible questions come up that force us to prioritise the values of some project members over others - I don't think that will ever work.

As much as possible, we should let people make individual choices that align with their values, that's important - you shouldn't be forced to use AI if you don't want to. But as members of a large project, we need to be okay with being in a project with people who disagree with us on things we feel strongly about (that ship has already sailed), whatever we might think about those positions privately, the important thing is that we all treat each other with dignity and respect in our interactions in the project.

Instead of using ethical concerns as a basis for policy, we should justify policy on the basis of how something is impacting our ability as a project to deliver a really great programming language.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a later comment he also said this:

I generally disagree with the notion that the policies of the Rust Project are particularly influential in setting a benchmark for open source projects or the industry more broadly. Lots of projects have pro-AI policies and lots of them have anti-AI policies, and while they cite each other, I don't get the sense that many projects were fundamentally swayed in their position by what some other project did, or that if we say that we're not going to allow AI contributions, that we'll have much of an impact on the trajectory of LLMs and software engineering. It would be nice if we did have that much sway, but I just don't think we do. There is one place that I think the Rust Project does have a really considerable impact - and that's in what we build. Rust is having an significant impact already and has enormous potential to do more over the coming decades. Everything that we're building here can and will have a tremendous impact on the safety of software worldwide - that's incredibly important. My earlier stance is motivated by the conviction that a Rust Project which is open to different perspectives is a Rust Project that will maximise Rust's impact on the world.

and I'll add to that — I agree with David that I don't think we can affect whether projects adopt LLMs, but I do think we can affect how they do so, to influence those policies to be more thoughtful and less destructive to their own projects and communities.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very sorry,

Instead of using ethical concerns as a basis for policy, we should justify policy on the basis of how something is impacting our ability as a project to deliver a really great programming language.

This is unbelievably irresponsible and a explicit avdocacy of abandonment of any sort of ethical considerations in software development, which I very much did not expect to find here and makes me deeply uncomfortable.

Copy link
Copy Markdown

@garland-culbreth garland-culbreth May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am new to Rust, and not a member of the project, but reading the above compels me to speak.

Seeing in the above quotation that a member of the Rust project is arguing, seriously, that a policy should not be based in ethics is extremely concerning.

Like I said, I'm still new to Rust and only starting to learn and use it. However, I've followed Rust with sentimental interest for years and had hoped one day to contribute to the language in some way. The above quotation, and this broader context, has me strongly reconsidering that.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jyn514 I notice from your profile that you use they/them pronouns. I'm sure you're aware the right of trans, non-binary, intersex and gender-nonconforming people to exist is a hotly contested political issue in many countries, with a certain british billionaire spending inordinate amounts of money lobbying to take rights from trans folks, and many many states in the US passing legislation to persecute trans people. and yet, the code of conduct states that:

We are committed to providing a friendly, safe and welcoming environment for all, regardless of [...] gender identity and expression, sexual orientation

I opine that, as well as being a political issue, standing against bigotry and discrimination is also a moral/ethical one.

in sharing your colleague's comment and not disagreeing with it, I assume you are also claiming that ethics (and politics?) are not "a solid basis for project policy."

the code of conduct is already based in ethics and politics, and I can only assume that you'd prefer it remain that way.

in parting, I leave you a warning: if you as a community continue to insist that ethics and/or politics do not have a place, you will hemorrhage all the good people in the community and end up a nazi bar. I have watched it happen, and it can and will happen to you if you don't prevent it.

Copy link
Copy Markdown
Member Author

@jyn514 jyn514 May 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course I'm aware. There's a reason I no longer live in the USA. Of course I agree that standing against bigotry and discrimination is a moral position.

The problem is that a moderation policy is fundamentally different from a technical policy. If we say that using LLMs is immoral, unacceptable, not allowed, then we're not only saying you can't use them, we're saying we will ban you if you do. As a project, we have consensus that that's the right thing to do for transphobes and homophobes. As a project, we do not have consensus that that's the right thing to do for people using AI. This is something you can't change by arguing with me; you'd have to convince the whole project, and you simply won't be able to do that. Believe me, we've tried. We have the same problem for people working at companies and on projects that others in the project find unethical: many people hate it, but that's not the same as being able to treat it as a Code of Conduct violation.

If you accept that, then you now have the option of saying that we'll build a technical policy based on ethics. This is what David is saying is unworkable: everyone will have a different set of ethics, and some people will refuse to abide by the rules, regardless of what the rules are, because they believe the rules are morally wrong. At that point this reverts to being a moderation policy again and we haven't gained anything.

Given that, we have no choice but to build a policy built on technical concerns. We can be mad about it — I am! Clar Fon is! We can try to limit the use of LLMs as much as we can within those bounds. But that's different from limiting LLM usage on moral grounds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using ethical concerns as a basis for policy, we should justify policy on the basis of how something is impacting our ability as a project to deliver a really great programming language.

Do you know what makes a great community project right? Ethics, a well structured set of ethics that prevent the project from rotting and being taken by bad actors, or, well, in this specific case, the technology that threats to eventually destroy every single open source project. (and so many other things).

LITERALLY policy should be based on ethics. That sentence is a bad omen.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chiming is as rep of the moderation team: please stop rehearsing this argument.

Instead try to understand all the efforts we are doing to navigate this dilemma. If you think it's a boolean matter (yes/no), then you probably didn't have a chance to follow the evolution of our internal discussions (plural).

Which is understandable when coming from outside of our project. But we are not keen to tolerate entitlement and judgemental comments without having a proper context.

Solicited, non-critical, high-quality, well-tested, and well-reviewed code changes that are originally authored by an LLM are allowed, with disclosure.
1. "Solicited" means that a reviewer has communicated *ahead of time* that they are willing to review an LLM-authored PR.
- ℹ️ New contributors cannot use an LLM unless they first talk with a reviewer.
This must be the *same* reviewer who will be assigned to the PR.
2. "Non-critical" means that it is extremely unlikely for the PR to cause a [soundness](https://jacko.io/safety_and_soundness.html) regression.
- ℹ️ Examples:
- Changes to internal tooling like `tidy`, `x setup`, and `linkchecker` are probably ok.
- Changes that have a strong soundness impact, like the trait system, MIR building, or the query system are probably not ok.
3. "High-quality" means that it is held to at least the same standard as other code changes.
Everyone reads code, not just the author and reviewer;
we are not interested in "vibe-coded" PRs that degrade the quality of the codebase.
4. "Well-tested" means that you have covered all edge-cases that either you or the reviewer can think of.
- ℹ️ LLM-authored PRs will be held to a higher standard than human-authored PRs, because LLMs make it easier to write tests.
- ℹ️ If there is no existing test suite for a section of code, you must either write a new test suite or close the PR.
There are no exceptions for "writing the tests seems hard".
5. "Well-reviewed" means the author and reviewer both commit to fully understanding the code.
- ℹ️ All review requirements in [our existing review policy](../compiler/reviews.md#basic-reviewing-requirements) still apply.
- ℹ️ A review from a project member does not substitute for self-review.
Authors are expected to review their own code before posting and after each change.
- ℹ️ We recommend, but do not require, using a second LLM for adversarial local review before publishing your changes.

LLM-authored PRs must be tagged with a new `ai-assisted` label.
All such PRs will be posted to a new (private) Zulip channel, which will be accessible to all members of the `rust-lang` organization.
The goal of the channel is *not* to act as an additional gate-keeper on LLM-authored PRs.
Instead, it's to collect information about *whether this experiment is working*:
Are people doing interesting and useful things with LLMs? Are they learning? Are they making repeat contributions?

Because the new channel is private, it will have higher-than-normal standards for what counts as on-topic.
For example, the following are on-topic:
- Whether a PR meets the criteria for the experiment exception
- Whether a PR follows the policy in general

And the following are off-topic:
- Technical and design discussions. These should be posted directly on the PR or in a public Zulip channel.
- Discussions about effort, communication style, or intent
- General discussions about the LLM policy
## Appendix
### Motivation and guiding principles

There is not a consensus within the Rust project—and likely never will be—about when/how/where it is acceptable to use AI-based tools.
Many members of the Rust project and community find value in AI;
many others feel that its negative impact on society and the climate are severe enough that no use is acceptable.
Still others are working out their opinion.

Despite these differences, there are many common goals we all share:

- Building a community of deep experts in our collective projects.
- Building an inclusive community where all feel welcome and respected.

To achieve those goals, this policy is designed with the following points in mind:

- Many people find LLM-generated code and writing deeply unpleasant to read or review.
- Many people find LLMs to be a significant aid to learning and discovery.
- LLMs are a new technology, and we are still learning how to use, moderate, and improve them.
Since we're still learning, we have chosen an intentionally conservative policy that lets us maintain the standard of quality that Rust is known for;
but leave space open to experiment with LLMs to inform future policies.


### Moderation policy
#### It's not your job to play detective
["The optimal amount of fraud is not zero"](https://www.bitsaboutmoney.com/archive/optimal-amount-of-fraud/).
Don't try to be the police for whether someone has used an LLM.
If it's clear they've broken the rules, point them to this policy; if it's borderline, report it to the mods and move on.
Comment thread
jyn514 marked this conversation as resolved.
Outdated
Comment thread
jyn514 marked this conversation as resolved.
Outdated

#### Be honest
Conversely, lying about whether or how you've used an LLM is considered a [code of conduct](https://rust-lang.org/policies/code-of-conduct/) violation.
Comment thread
jyn514 marked this conversation as resolved.
Outdated
If you are not sure where something you would like to do falls in this policy, please talk to the [moderation team](mailto:rust-mods@rust-lang.org).
Don't try to hide it.

#### Penalties
The policies marked with a 🔨 follow the same guidelines as the code of conduct:
Violations will first result in a warning, and repeated violations may result in a ban.
- 🔨 Violations of the "Be honest" section

Other violations are left up to the discretion of reviewers and moderators.
For minor violations we recommend telling the author that we can't review the PR until it complies with the policy, with pointers to exactly what they need to do.
For major violations or extractive PRs, we recommend closing the PR or issue.

It is **not** ok to harrass a contributor for using an LLM.
All contributors must be treated with respect.
The code-of-conduct applies to *all* conversations in the Rust project.

### Responsibility

Your contributions are your responsibility; you cannot place any blame on an LLM.
- ℹ️ This includes when asking people to address review comments originally authored by an LLM. See "review bots" under ⚠️ above.

### The meaning of "originally authored"

This document uses the phrase "originally authored" to mean "text that was generated by an LLM (and then possibly edited by a human)".
Comment thread
jyn514 marked this conversation as resolved.
Outdated
No amount of editing can change authorship; authorship sets the initial style and it is very hard to change once it's set.
Comment thread
jyn514 marked this conversation as resolved.
Outdated
Copy link
Copy Markdown
Member

@joshtriplett joshtriplett Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
No amount of editing can change authorship; authorship sets the initial style and it is very hard to change once it's set.
In the manner the phrase is used in this policy, no amount of editing changes how something was "originally authored"; authorship sets the initial style and it is very hard to change once it's set.

Taking a different approach here, of narrowing the focus to the phrasing in this policy, rather than trying to get people to agree with the fully general statement.

View changes since the review


For more background about analogous reasoning, see ["What Colour are your bits?"](https://ansuz.sooke.bc.ca/entry/23)

### Non-exhaustive policy
Comment thread
jyn514 marked this conversation as resolved.

This policy does not aim to be exhaustive.
If you have a use of LLMs in mind that isn't on this list, judge it in the spirit of this overview:
- Usages that do not use LLMs for creation and do not show LLM output to another human are likely allowed ✅
- Usages that use LLMs for creation or show LLM output to another human are likely banned ❌
Comment thread
jyn514 marked this conversation as resolved.
Outdated
Comment thread
jyn514 marked this conversation as resolved.
Outdated
Comment thread
jyn514 marked this conversation as resolved.
Outdated

### Conditions for modification or dissolution
This policy is not set in stone, and we can evolve it as we gain more experience working with LLMs.

Minor changes, such as typo fixes, only require a normal PR approval.
Major changes, such as adding a new rule or cancelling an existing rule, require
a simple majority of members of teams using rust-lang/rust (without concerns).
Comment thread
jyn514 marked this conversation as resolved.
Outdated

This policy can be dissolved in a few ways:

- An accepted FCP by teams using rust-lang/rust.
Comment on lines +218 to +223
Copy link
Copy Markdown
Contributor

@traviscross traviscross May 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- A simple majority of members of teams using rust-lang/rust.
- No outstanding concerns from those members.
This policy can be dissolved in a few ways:
- An accepted FCP by teams using rust-lang/rust.
- A simple majority of members of teams using rust-lang/rust and that have ratified the policy.
- No outstanding concerns from those members.
This policy can be dissolved in a few ways:
- An accepted FCP by teams using rust-lang/rust and that have ratified the policy.

Something like this might help in being more clear about which teams need to be involved in these later actions.

View changes since the review

- An objective concern raised about active harm the policy is having on the reputation of Rust, with evidence, as decided by a leadership council FCP.
Comment thread
jyn514 marked this conversation as resolved.
Loading