11# LLVM AI Tool Use Policy
22
33LLVM's policy on AI-assisted tooling is fundamentally liberal -- We want to
4- enable contributors to use the latest and greatest tools available. Our policy
5- guided by two major concerns, the latter of which is the most important:
6-
7- 1 . Ensuring that contributions do not contain copyrighted content.
8- 2 . Ensuring that contributions are not extractive and meet our
9- [ quality] ( #quality ) bar.
10-
11- This policy covers, but is not limited to, the following kinds of
12- contributions:
4+ enable contributors to use the latest and greatest tools available. However,
5+ human oversight remains critical. ** The contributor is always the author and is
6+ fully accountable for their contributions.**
7+
8+ * ** You are responsible for your contributions.** AI-generated content must be
9+ treated as a suggestion, not as final code or text. It is your responsibility
10+ to review, test, and understand everything you submit. Submitting unverified or
11+ low-quality machine-generated content (sometimes called "[ AI
12+ slop] ( https://simonwillison.net/2024/May/8/slop/ ) ") creates an
13+ unfair review burden on the community and is not an acceptable contribution.
14+ Contributors should review and understand their own submissions before asking
15+ the community to review their code.
16+
17+ * ** Start with small contributions:** Open source communities operate on trust
18+ and reputation. Reviewing large contributions is expensive. AI tools have a
19+ tendency to generate large contributions that are expensive to review. We
20+ encourage new contributors to keep their first contributions small until they
21+ build personal expertise and maintainer trust before taking on larger
22+ changes.
23+
24+ * ** Be transparent about your use of AI.** When a contribution has been
25+ significantly assisted by an AI tool, we encourage you to note this in your
26+ pull request description, commit message, or wherever authorship is normally
27+ indicated for the work. For instance, use a commit message trailer like
28+ Assisted-by: <name of code assistant >. This transparency helps the community
29+ develop best practices and understand the role of these new tools.
30+
31+ * ** LLVM values Your Voice.** Clear, concise, and authentic communication is
32+ our goal. Using AI tools to translate your thoughts or overcome language
33+ barriers is a welcome and encouraged practice, but keep in mind, we value your
34+ unique voice and perspective.
35+
36+ * ** Limit AI Tools for Reviewing.** As with creating code, documentation, and
37+ other contributions, reviewers may use AI tools to assist in providing
38+ feedback, but not to wholly automate the review process. Particularly, AI
39+ should not make the final determination on whether a contribution is accepted
40+ or not. The same principle of ownership applies to review comment
41+ contributions as it does to code contributions.
42+
43+ This policy extends beyond code contributions and includes, but is not limited
44+ to, the following kinds of contributions:
1345
1446- Code, usually in the form of a pull request
1547- RFCs or design proposals
1648- Issues or security vulnerabilities
1749- Comments and feedback on pull requests
1850
19- ## Copyright
2051
21- Artificial intelligence systems raise many questions around copyright that have
22- yet to be answered. Our policy on AI tools is similar to our copyright policy:
23- Contributors are responsible for ensuring that they have the right to
24- contribute code under the terms of our license, typically meaning that either
25- they, their employer, or their collaborators hold the copyright. Using AI tools
26- to regenerate copyrighted material does not remove the copyright, and
27- contributors are responsible for ensuring that such material does not appear in
28- their contributions. Contributions found to violate this policy will be removed
29- just like any other offending contribution.
30-
31- ## Quality
52+ ## Extractive Changes
3253
3354Sending patches, PRs, RFCs, comments, etc to LLVM, is not free -- it takes a
34- lot of maintainer time and energy to review those contributions! Recent
35- improvements in AI-assisted tooling have made it easy to generate large volumes
36- of code and text with little effort on the part of the contributor. This has
37- increased the asymmetry between the work of producing a contribution, and the
38- work of reviewing the contribution. Our ** golden rule** is that a contribution
39- should be worth more to the project than the time it takes to review it. These
40- ideas are captured by this quote from the book [ Working in Public] [ 1 ] by
41- Nadia Eghbal:
55+ lot of maintainer time and energy to review those contributions! We see the act
56+ of sending low-quality unreviewed contributions to the LLVM project as
57+ "extractive." It is an attempt to extract work from the LLVM project community
58+ in the form of review comments and mentorship, without the contributor putting
59+ in comensurate effort to make their work worth reviewing.
60+
61+ Our ** golden rule** is that a contribution should be worth more to the project
62+ than the time it takes to review it. These ideas are captured by this quote
63+ from the book [ Working in Public] [ public ] by Nadia Eghbal:
4264
43- [ 1 ] : https://press.stripe.com/working-in-public
65+ [ public ] : https://press.stripe.com/working-in-public
4466
4567> \" When attention is being appropriated, producers need to weigh the costs and
4668> benefits of the transaction. To assess whether the appropriation of attention
@@ -59,15 +81,12 @@ term. We therefore automatically post a greeting comment to pull requests from
5981new contributors and encourage maintainers to spend their time to help new
6082contributors learn.
6183
62- However, we expect to see a growth pattern in the quality of a contributor's
63- work over time. Maintainers are empowered to push back against * extractive*
64- contributions and explain why they believe a contribution is overly burdensome
65- or not aligned with the project goals.
84+ ## Handling Violations
6685
67- If a maintainer judges that a contribution is extractive (i.e. it is generated
68- with tool-assistance or isn't valuable for other reasons ), they should
69- copy-paste the following response, add the ` extractive ` label if applicable,
70- and refrain from further engagement:
86+ If a maintainer judges that a contribution is * extractive* (i.e. it is
87+ generated with tool-assistance or simply requires significant revision ), they
88+ should copy-paste the following response, add the ` extractive ` label if
89+ applicable, and refrain from further engagement:
7190
7291 This PR appears to be extractive, and requires additional justification for
7392 why it is valuable enough to the project for us to review it. Please see
@@ -76,33 +95,27 @@ and refrain from further engagement:
7695
7796Other reviewers should use the label prioritize their review time.
7897
79- Contributors are welcome to improve their work or make the case for why it has
80- value for the community, but they should keep in mind that they may be
81- moderated for excessive extractive communications.
82-
83- While our quality policy is subjective at its core, here are some guidelines
84- that can be used to assess the quality of a contribution:
85-
86- - Contribution size: Larger contributions require more time to read and review.
87- RFCs and issues should be clear and concise, and pull requests should not
88- change unrelated code.
89- - Potential user base: Contributions with more users are inherently more valuable.
90- - Code must adhere to the [ LLVM Coding Standards] ( CodingStandards.html ) .
91- - Pull requests should build and pass premerge checks. For first-time
92- contributors, this will require an initial cursory review to run the
93- checks.
94-
9598The best ways to make a change less extractive and more valuable are to reduce
9699its size or complexity or to increase its usefulness to the community. These
97100factors are impossible to weigh objectively, and our project policy leaves this
98101determination up to the maintainers of the project, i.e. those who are doing
99102the work of sustaining the project.
100103
101- We encourage, but do not require, contributors making large changes to document
102- the tools that they used as part of the rationale for why they believe their
103- contribution has merit. This is similar in spirit to including a sed or Python
104- script in the commit message when making large-scale changes to the project,
105- such as updating the LLVM IR textual syntax.
104+ If a contributor responds but doesn't make their change meaningfully less
105+ extractive, maintainers should escalate to the relevant moderation or admin
106+ team for the space (GitHub, Discourse, Discord, etc) to lock the conversation.
107+
108+ ## Copyright
109+
110+ Artificial intelligence systems raise many questions around copyright that have
111+ yet to be answered. Our policy on AI tools is similar to our copyright policy:
112+ Contributors are responsible for ensuring that they have the right to
113+ contribute code under the terms of our license, typically meaning that either
114+ they, their employer, or their collaborators hold the copyright. Using AI tools
115+ to regenerate copyrighted material does not remove the copyright, and
116+ contributors are responsible for ensuring that such material does not appear in
117+ their contributions. Contributions found to violate this policy will be removed
118+ just like any other offending contribution.
106119
107120## Examples
108121
@@ -119,12 +132,20 @@ the principles of this policy:
119132
120133Our policy was informed by experiences in other communities:
121134
122- - [ Rust policy on burdensome
123- PRs] ( https://github.com/rust-lang/compiler-team/issues/893 )
124- - [ Seth Larson's post] ( https://sethmlarson.dev/slop-security-reports )
135+ - [ Fedora Council Policy Proposal: Policy on AI-Assisted Contributions (fetched
136+ 2025-10-01)] [ fedora ] : Some of the text above was copied from the (very good!) Fedora
137+ project policy proposal, which is licensed under the [ Creative Commons
138+ Attribution 4.0 International License] [ cca ] . This link serves as attribution.
139+ - [ Rust draft policy on burdensome PRs] [ rust-burdensome ]
140+ - [ Seth Larson's post] [ security-slop ]
125141 on slop security reports in the Python ecosystem
126142- The METR paper [ Measuring the Impact of Early-2025 AI on Experienced
127- Open-Source Developer
128- Productivity] ( https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/ ) .
129- - [ QEMU bans use of AI content
130- generators] ( https://www.qemu.org/docs/master/devel/code-provenance.html#use-of-ai-content-generators )
143+ Open-Source Developer Productivity] [ metr-paper ] .
144+ - [ QEMU bans use of AI content generators] [ qemu-ban ]
145+
146+ [ fedora ] : https://communityblog.fedoraproject.org/council-policy-proposal-policy-on-ai-assisted-contributions/
147+ [ cca ] : https://creativecommons.org/licenses/by/4.0/
148+ [ rust-burdensome ] : https://github.com/rust-lang/compiler-team/issues/893
149+ [ security-slop ] : https://sethmlarson.dev/slop-security-reports
150+ [ metr-paper ] : https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/
151+ [ qemu-ban ] : https://www.qemu.org/docs/master/devel/code-provenance.html#use-of-ai-content-generators
0 commit comments