LLVM AI tool policy: human in the loop

2025-12-313:06215113discourse.llvm.org

Hey folks, I got a lot of feedback from various meetings on the proposed LLVM AI contribution policy, and I made some significant changes based on that feedback. The current draft proposal focuses on…

Hey folks, I got a lot of feedback from various meetings on the proposed LLVM AI contribution policy, and I made some significant changes based on that feedback. The current draft proposal focuses on the idea of requiring a human in the loop who understands their contribution well enough to answer questions about it during review. The idea here is that contributors are not allowed to offload the work of validating LLM tool output to maintainers. I’ve mostly removed the Fedora policy in an effort to move from the vague notion of “owning the contribution” to a more explicit “contributors have to review their contributions and be prepared to answer questions about them”. Contributors should never find themselves in the position of saying “I don’t know, an LLM did it”. I felt the change here was significant, and deserved a new thread.

From an informal show of hands at the round table at the US LLVM developer meeting, most contributors (or at least the subset with the resources and interest in attending this round table in person) are interested in using LLM assistance to increase their productivity, and I really do want to enable them to do so, while also making sure we give maintainers a useful policy tool for pushing back against unwanted contributions.

I’ve updated the PR, and I’ve pasted the markdown below as well, but you can also view it on GitHub.

Policy

LLVM’s policy is that contributors can use whatever tools they would like to
craft their contributions, but there must be a human in the loop.
Contributors must read and review all LLM-generated code or text before they
ask other project members to review it.
The contributor is always the author and is fully accountable for their contributions. Contributors should be sufficiently confident that the contribution is high enough quality that asking

for a review is a good use of scarce maintainer time, and they should be able
to answer questions about their work
during review.

We expect that new contributors will be less confident in their contributions,
and our guidance to them is to start with small contributions that they can fully understand to build confidence. We aspire to be a welcoming community that helps new contributors grow their expertise, but learning involves taking small steps, getting feedback, and iterating. Passing maintainer feedback to an

LLM doesn’t help anyone grow, and does not sustain our community.

Contributors are expected to be transparent and label contributions that
contain substantial amounts of tool-generated content
. Our policy on labelling is intended to facilitate reviews, and not to track which parts of LLVM are generated. Contributors should note tool usage in their pull request description, commit message, or wherever authorship is normally indicated for the work. For instance, use a commit message trailer like Assisted-by: . This transparency helps the community develop best practices

and understand the role of these new tools.

An important implication of this policy is that it bans agents that take action
in our digital spaces without human approval, such as the GitHub @claude
agent
. Similarly, automated review tools that publish comments without human review are not allowed. However, an opt-in

review tool that keeps a human in the loop is acceptable under this policy.

As another example, using an LLM to generate documentation, which a contributor manually reviews for correctness, edits, and then posts as a PR, is an approved

use of tools under this policy.

This policy includes, but is not limited to, the following kinds of
contributions:

  • Code, usually in the form of a pull request
  • RFCs or design proposals
  • Issues or security vulnerabilities
  • Comments and feedback on pull requests

Extractive Contributions

The reason for our “human-in-the-loop” contribution policy is that processing patches, PRs, RFCs, and comments to LLVM is not free – it takes a lot of maintainer time and energy to review those contributions! Sending the

unreviewed output of an LLM to open source project maintainers extracts work

from them in the form of design and code review, so we call this kind of

contribution an “extractive contribution”.

Our golden rule is that a contribution should be worth more to the project than the time it takes to review it. These ideas are captured by this quote

from the book Working in Public by Nadia Eghbal:

"When attention is being appropriated, producers need to weigh the costs and benefits of the transaction. To assess whether the appropriation of attention

is net-positive, it’s useful to distinguish between extractive and


non-extractive contributions. Extractive contributions are those where the marginal cost of reviewing and merging that contribution is greater than the marginal benefit to the project’s producers. In the case of a code contribution, it might be a pull request that’s too complex or unwieldy to

review, given the potential upside." -- Nadia Eghbal

Prior to the advent of LLMs, open source project maintainers would often review any and all changes sent to the project simply because posting a change for review was a sign of interest from a potential long-term contributor. While new tools enable more development, it shifts effort from the implementor to the reviewer, and our policy exists to ensure that we value and do not squander

maintainer time.

Reviewing changes from new contributors is part of growing the next generation of contributors and sustaining the project. We want the LLVM project to be welcoming and open to aspiring compiler engineers who are willing to invest time and effort to learn and grow, because growing our contributor base and recruiting new maintainers helps sustain the project over the long term. Being

open to contributions and liberally granting commit access

is a big part of how LLVM has grown and successfully been adopted all across the industry. We therefore automatically post a greeting comment to pull requests from new contributors and encourage maintainers to spend their time to

help new contributors learn.

Handling Violations

If a maintainer judges that a contribution is extractive (i.e. it doesn’t comply with this policy), they should copy-paste the following response to

request changes, add the extractive label if applicable, and refrain from


further engagement:

This PR appears to be extractive, and requires additional justification for
why it is valuable enough to the project for us to review it. Please see
our developer policy on AI-generated contributions:
http://llvm.org/docs/AIToolPolicy.html

Other reviewers should use the label to prioritize their review time.

The best ways to make a change less extractive and more valuable are to reduce its size or complexity or to increase its usefulness to the community. These factors are impossible to weigh objectively, and our project policy leaves this determination up to the maintainers of the project, i.e. those who are doing

the work of sustaining the project.

If a contributor responds but doesn’t make their change meaningfully less extractive, maintainers should escalate to the relevant moderation or admin

team for the space (GitHub, Discourse, Discord, etc) to lock the conversation.

Copyright

Artificial intelligence systems raise many questions around copyright that have yet to be answered. Our policy on AI tools is similar to our copyright policy: Contributors are responsible for ensuring that they have the right to contribute code under the terms of our license, typically meaning that either they, their employer, or their collaborators hold the copyright. Using AI tools to regenerate copyrighted material does not remove the copyright, and contributors are responsible for ensuring that such material does not appear in their contributions. Contributions found to violate this policy will be removed

just like any other offending contribution.

Examples

Here are some examples of contributions that demonstrate how to apply
the principles of this policy:

  • This PR contains a proof from Alive2, which is a strong signal of
    value and correctness.
  • This generated documentation was reviewed for correctness by a
    human before being posted.

References

Our policy was informed by experiences in other communities:


Read the original article

Comments

  • By Negitivefrags 2025-12-315:029 reply

    At my company I just tell people “You have to stand behind your work”

    And in practice that means that I won’t take “The AI did it” as an excuse. You have to stand behind the work you did even if you used AI to help.

    I neither tell people to use AI, nor tell them not to use it, and in practice people have not been using AI much for whatever that is worth.

    • By themacguffinman 2025-12-315:231 reply

      The difference I see between a company dealing with this as opposed to an open source community dealing with this is that the company can fire employees as a reactive punishment. Drive-by open source contributions cost very little to lob over and can come from a wide variety of people you don't have much leverage over, so maintainers end up making these specific policies to prevent them from having to react to the thousandth person who used "The AI did it" as an excuse.

      • By osigurdson 2025-12-316:58

        When you shout "use AI or else!" from a megaphone, don't expect everyone to interpret it perfectly. Especially when you didn't actually understand what you were saying in the first place.

    • By EE84M3i 2025-12-315:34

      >I neither tell people to use AI, nor tell them not to use it, and in practice people have not been using AI much for whatever that is worth.

      I find this bit confusing. Do you provide enterprise contracts for AI tools? Or do you let employees use their personal accounts with company data? It seems all companies have to be managing this somehow at this point.

    • By bjackman 2025-12-3110:011 reply

      Shouldn't this go without saying though? At some point someone has to review the code and they see a human name as the sender of the PR. If that person sees the work is bad, isn't it just completely unambiguous that the person whose name is on the PR is responsible for that? If someone responded "but this is AI generated" I would feel justified just responding "it doesn't matter" and passing the review back again.

      And the rest (what's in the LLVM policy) should also fall out pretty naturally from this? If someone sends me code for review, and have the feeling they haven't read it themselves, I'll say "I'm not reviewing this and I won't review any more of your PRs unless you promise you reviewed them yourself first".

      The fact that people seem to need to establish these things as an explicit policy is a little concerning to me. (Not that it's a bad idea at all. Just worried that there was a need).

      • By lexicality 2025-12-3110:28

        You would think it's common sense but I've received PRs that the author didn't understand and when questioned told me that the AI knows more about X than they do so they trust its judgement.

        A terrifying number of people seem to think that the damn thing is magic and infallible.

    • By bitwize 2025-12-315:051 reply

      The smartest and most sensible response.

      I'm dreading the day the hammer falls and there will be AI-use metrics implemented for all developers at my job.

      • By locusofself 2025-12-315:061 reply

        It's already happened at some very big tech companies

        • By skeeter2020 2025-12-315:33

          One of the reasons I left a senior management position at my previous 500-person shop was that this was being done, but not even accurately. Copilot usage via the IDE wasn't being tracked; just the various other usage paths.

          It doesn't take long for shitty small companies to copy the shitty policies and procedures of successful big companies. It seems even intelligent executives can't get correlation and causation right.

    • By jeroenhd 2025-12-315:38

      Some people who just want to polish their resume will feed any questions/feedback back into the AI that generated their slop. That goes back and forth a few times until the reviewing side learns that the code authors have no idea what they're doing. An LLM can easily pretend to "stand behind its work" if you tell it to.

      A company can just fire someone who doesn't know what they're doing, or at least take some kind of measure against their efforts. On a public project, these people can be a death by a thousand cuts.

      The best example of this is the automated "CVE" reports you find on bug bounty websites these days.

    • By i2talics 2025-12-315:233 reply

      What good does it really do me if they "stand behind their work"? Does that save me any time drudging through the code? No, it just gives me a script for reprimanding. I don't want to reprimand. I want to review code that was given to me in good faith.

      At work once I had to review some code that, in the same file, declared a "FooBar" struct and a "BarFoo" struct, both with identical field names/types, and complete with boilerplate to convert between them. This split served no purpose whatsoever, it was probably just the result of telling an agent to iterate until the code compiled then shipping it off without actually reading what it had done. Yelling at them that they should "stand behind their work" doesn't give me back the time I lost trying to figure out why on earth the code was written this way. It just makes me into an asshole.

      • By sb8244 2025-12-315:28

        It adds accountability, which is unfortunately something that ends up lacking in practice.

        If you write bad code that creates a bug, I expect you to own it when possible. If you can't and the root cause is bad code, then we probably need to have a chat about that.

        Of course the goal isn't to be a jerk. Lots of normal bugs make it through in reality. But if the root cause is true negligence, then there's a problem there.

        AI makes negligence much easier to achieve.

      • By nineteen999 2025-12-315:50

        If you asked Claude to review the code it would probably have pointed out the duplication pretty quickly. And I think this is the thing - if we are going to manage programmers who are using LLM's to write code, and have to do reviews for their code, reviewers aren't going to be able to do it for much longer without resorting to LLM assistance themselves to get the job done.

        It's not going to be enough to say - "I don't use LLM's".

      • By nradov 2025-12-315:262 reply

        Yelling at incompetent or lazy co-workers isn't your responsibility, it's your manager's. Escalate the issue and let them be the asshole. And if they don't handle it, well it's time to look for a new job.

        • By danaris 2025-12-3113:51

          ...what makes you think i2talics isn't the manager in this situation??

        • By skeeter2020 2025-12-315:30

          >> Yelling at incompetent or lazy co-workers isn't your responsibility, it's your manager's

          First: Somebody hired these people, so are they really "lazy and incompetent"?

          Second: There is no one who's "job" is to yell at incompetent or lazy workers.

    • By darth_avocado 2025-12-315:102 reply

      > At my company I just tell people “You have to stand behind your work”

      Since when has that not been the bare minimum. Even before AI existed, and even if you did not work in programming at all, you sort of have to do that as a bare minimum. Even if you use a toaster and your company guidelines suggest you toast every sandwich for 20 seconds, if following every step as per training results in a lump of charcoal for bread, you can’t serve it up to the customer. At the end of the day, you make the sandwich, you’re responsible for making it correctly.

      Using AI as a scapegoat for sloppy and lazy work needs to be unacceptable.

      • By Negitivefrags 2025-12-315:131 reply

        Of course it’s the minimum standard, and it’s obvious if you view AI as a tool that a human uses.

        But some people view it as a seperate entity that writes code for you. And if you view AI like that, then “The AI did it” becomes an excuse that they use.

        • By atoav 2025-12-315:191 reply

          "Yes, but you submitted it to us."

          If you're illiterate and can't read maybe don't submit the text someone has written for you if you can't even parse the letters.

          • By fourthark 2025-12-316:12

            The policy in TFA is a nicer way of saying that.

      • By fwipsy 2025-12-315:164 reply

        Bad example. If the toaster carbonized bread in 20 seconds it's defective, likely unsafe, possibly violates physics, certainly above the pay grade of a sandwich-pusher.

        Taking responsibility for outcomes is a powerful paradigm but I refuse to be held responsible for things that are genuinely beyond my power to change.

        This is tangential to the AI discussion though.

        • By darth_avocado 2025-12-315:221 reply

          > If the toaster carbonized bread in 20 seconds it's defective, likely unsafe, possibly violates physics, certainly above the pay grade of a sandwich-pusher.

          If the toaster is defective, not using it, identifying how to use it if it’s still usable or getting it replaced by reporting it as defective are all well within the pay grade of a sandwich pusher as well as part of their responsibilities.

          And you’re still responsible for the sandwich. You can’t throw up your arms and say “the toaster did it”. And that’s where it’s not tangential to the AI discussion.

          Toaster malfunctioning is beyond your control, but whether you serve up the burnt sandwich is absolutely within your control, which you will be and should be held responsible for.

          • By fwipsy 2025-12-3115:291 reply

            That's exactly what I said and at odds with your last comment. You take responsibility for making the sandwich if possible. If not, you're not responsible for the sandwich, but for refunding the customer or offering them something else.

            If I'm required to write code using AI without being given time to verify it, then it's also not fair for me to be held responsible for the quality. Agency matters. I will not take responsibility for things that I'm not given the power to address. Of course if I choose to write code with an AI and it comes out badly, that's within my responsibilities.

            It's a bad example because typically "whether to toast the sandwich" depends on customer preference (imposed externally) but "whether to use AI" is still mostly up to the worker.

            • By skydhash 2025-12-3115:44

              That’s why you make some written protest. While it would not save you from layoff, you won’t be made into a scapegoat.

        • By dullcrisp 2025-12-315:22

          No it’s not. If you burn a sandwich, you make new sandwich. Sandwiches don’t abide by the laws of physics. If you call a physicist and tell them you burnt your sandwich, they won’t care.

        • By atoav 2025-12-315:22

          I think it depends on the pay. You pay below the living wage? Better live with your sla.. ah employees.. serving charcoal. You pay them well above the living wage? Now we start to get into they should care-territory.

    • By anonzzzies 2025-12-315:222 reply

      But "AI did it" is not immediate you are out thing? If you cannot explain why something is made the way you committed to git, we can just replace you with AI right?

      • By EagnaIonat 2025-12-315:27

        > we can just replace you with AI right?

        Accountability and IP protection is probably the only thing saving someone in that situation.

      • By tjr 2025-12-315:241 reply

        Why stop there? We can replace git with AI too!

        • By ronsor 2025-12-315:251 reply

          If you generate the code each time you need it, all version control becomes obsolete.

          • By verbify 2025-12-315:291 reply

            They'll version control the prompts because the requirements change.

            • By ronsor 2025-12-315:32

              Not if we AI-generate the requirements!

    • By benhurmarcel 2025-12-3117:38

      That only works if those colleagues care about what you think of them

  • By jonas21 2025-12-315:125 reply

    The title should be changed to "LLVM AI tool policy: human in the loop".

    At the moment it's "We don't need more contributors who aren't programmers to contribute code," which is from a reply and isn't representative of the original post.

    The HN guidelines say: please use the original title, unless it is misleading or linkbait; don't editorialize.

    • By atoav 2025-12-315:40

      I'll say it as it is: if you can't read code, but have a friend write it for you, you are in fact the wrong person to submit it, since you are the most exhausting person to deal with.

      A human in the loop that doesn't understand what is going on but still pushes isn't only useless, but actively harmful.

    • By fmajid 2025-12-3110:22

      Seconded, the original title ("We don't need more contributors who aren't programmers to contribute code") caricatured what seems like an eminently measured and sensible policy change.

    • By pertymcpert 2025-12-318:32

      My original link was to a comment in this thread which I quoted that from. The link's now been changed to the main thread.

    • By SunlitCat 2025-12-315:40

      Additionally, it comes across as pretty hostile toward new contributors, which isn’t the intent of the article at all.

    • By octoberfranklin 2025-12-315:56

      I'd like to know why the title hasn't been fixed.

  • By scuff3d 2025-12-314:547 reply

    It's depressing this has to be spelled out. You'd think people would be smart enough not to harass maintainers with shit they don't understand.

    • By georgeburdell 2025-12-315:20

      It’s happening a lot with me at work. I am a programmer working largely with a hardware team and now they’re contributing large changes that I’m supposed to just roll with the punches. Management loves it

    • By ActionHank 2025-12-315:08

      People who are smart enough to think that far ahead are also smart enough not to fall into the “ai can do all jobs perfectly all the time and just need my divine guidance” trap.

    • By bakugo 2025-12-315:26

      People who rely on a computer algorithm to literally think for them are not going to be very smart.

    • By dvrp 2025-12-315:15

      Not if they're not programmers!

    • By 0xpgm 2025-12-315:26

      I think it's part of the "AI replacing software developers" hype.

      Many beginners or aspiring developers swallow this whole and simply point an AI to a problem and submit the generated slop to maintainers.

HackerNews