|
| 1 | ++++ |
| 2 | +title = "LLM contribution policy for Linebender projects" |
| 3 | ++++ |
| 4 | + |
| 5 | +Open-source projects are facing an increasing amount of submissions generated in whole or in part by LLMs. |
| 6 | + |
| 7 | +Maintainers tend to strongly dislike them: they require very little effort to create (since a machine is doing all the work) but a lot of effort to review (since LLMs make mistakes that are hard to track down). |
| 8 | +Because LLMs are good at mimicking high-effort contributors, maintainers often feel pressured to give the benefit of the doubt to the submitter and give a level of feedback that isn't warranted by the effort the submitter made. |
| 9 | + |
| 10 | +Still, LLM agents can produce high-quality code, so we don't want to ban them altogether. |
| 11 | + |
| 12 | +This document outlines Linebender's official policy for LLM contributions, inspired by [this zulip discussion](https://xi.zulipchat.com/#narrow/channel/419691-linebender/topic/AI.20slop.20policy/near/575407715). |
| 13 | + |
| 14 | + |
| 15 | +## Disclosure |
| 16 | + |
| 17 | +Contributors should disclose their LLM usage ahead of time. |
| 18 | +Reviewers will *not* be happy if a contributor only admits to using LLMs after being prodded, and will tend to assume the contributor is downplaying their level of AI use. |
| 19 | + |
| 20 | +This above applies even if the reviewer double-checked everything the LLM wrote. |
| 21 | +In our experience, people overestimate their level of understanding of agent-produced code when the agent had a high level of initiative. |
| 22 | +"Code you wrote yourself" and "Code you read after the LLM wrote it" do not warrant the same level of scrutiny. |
| 23 | + |
| 24 | +Contributors should also disclose content that wasn't written by an agent, but was a direct result of LLM outputs, notably: |
| 25 | + |
| 26 | +- Code or documentation that was created following an outline, plan or architecture proposed by an LLM. |
| 27 | +- Code that was copy-pasted by an AI chat tool (e.g. ChatGPT), even if the code was double-checked or adjusted. |
| 28 | + |
| 29 | +This disclosure should be included in the PR description, so that it appears in the final commit message. |
| 30 | + |
| 31 | +### Copilot-like tools |
| 32 | + |
| 33 | +Tools like Github Copilot or Cursor Tab that do small tab-completion of code you're writing fall in a grey area. |
| 34 | + |
| 35 | +Completing single lines of code or small blocks of boilerplate is fine and doesn't require disclosure. |
| 36 | + |
| 37 | +Completing large blocks of code or entire functions, however, is similar to asking an agent to generate it for you. |
| 38 | +Writing a comment that says "The following does X" and then hitting tab a few times is almost identical to using an agent. |
| 39 | + |
| 40 | +As a rule of thumb, in Rust, by the time Copilot produces completions with multiple `;` characters, you should treat it as LLM code that requires disclosure. |
| 41 | + |
| 42 | +### Non-generation use of LLM |
| 43 | + |
| 44 | +Using LLMs for debugging, exploration, testing (*not* generating test files), spell-checking and grammar-checking is accepted without disclosure. |
| 45 | + |
| 46 | +### Anti-disclosure |
| 47 | + |
| 48 | +Given the above, declaring that a PR *doesn't* include AI-generated content is redundant and unverifiable. |
| 49 | +Please don't include such messages unless asked. |
| 50 | + |
| 51 | + |
| 52 | +## Level of effort |
| 53 | + |
| 54 | +The rule of thumb for all LLM content is "You should not ask someone to read text if reading it would take longer than it took you to create it". |
| 55 | + |
| 56 | +As such, we do not allow LLM bots, PRs that were generated end-to-end by LLMs, or AI-generated PR descriptions (translations are fine with disclosure). |
| 57 | + |
| 58 | +If a PR includes AI-generated content, we fully expect the submitter to review their own PR before asking anyone else to look at it. |
| 59 | +They should spend as much effort on this self-review as they would on a human-authored PR. |
| 60 | + |
| 61 | +In discussion spaces like Github comments and the Zulip server, please avoid posting AI-generated analyses, even if you vetted them. |
| 62 | + |
| 63 | + |
| 64 | +## LLMs and non-English speakers |
| 65 | + |
| 66 | +Most Linebender contributors don't speak English as their first language, and we understand that contributors might struggle with English and feel anxious about it. |
| 67 | + |
| 68 | +As mentioned above, using AI to check your grammar or find ways to reword a sentence is fine and doesn't require disclosure. |
| 69 | + |
| 70 | +Using AI to translate something you wrote in your native language usually doesn't require disclosure. |
| 71 | + |
| 72 | +We consider these cases meaningfully different from asking AI to generate text for you from a prompt or having AI auto-generate doc for a code item, both of which require disclosure. |
| 73 | + |
| 74 | + |
| 75 | +## Agent files |
| 76 | + |
| 77 | +We will not merge agentic markdown files. |
| 78 | + |
| 79 | +Some projects may include common agent files in their `.gitignore`. |
0 commit comments