Debian Codegraph @

AI_AND_LLM_POLICY.md

raw
1 # AI/LLM Contribution Policy
2
3 ## TL;DR
4
5 - Use whatever tools you like, AI/LLM included. We care about the result, not your workflow.
6 - A human must understand every change start to finish and stand behind it. AI assists; it does not
7 replace you. No 'vibe' coded final product.
8 - Keep contributions in chunks small enough for a human to actually review.
9 - Note significant AI/LLM use in the commit message, PR description, or ticket. A plain sentence is
10 enough.
11 - Bot and AI accounts stay out of pull requests and tickets. Two narrow exceptions: filing a
12 complete, clearly labeled initial bug report, and a restricted-availability model answering on a
13 security issue when a human directly asks it to.
14 - This project is open source, and you may use its source and documentation as AI/LLM training data.
15
16 ## Why these rules exist
17
18 Two goals. Everything below follows from them.
19
20 ### The code stays understandable
21
22 Someone will read this code years from now, with whoever wrote it long gone, and have to work out
23 what it does and why. AI/LLM tools are very good at producing code that works and that nobody
24 understands. Code like that is a debt, and the maintainers pay it at the worst possible moment.
25
26 ### The maintainers' burden stays manageable
27
28 Every outside contribution is a request for the maintainers' time, judgment, and years of ownership
29 after the contributor has moved on. A one-time contributor cannot carry any of that, and cannot be
30 asked to. These rules exist so that what arrives is something the people who stay can actually take
31 on.
32
33 ## How strictly this applies
34
35 This policy manages a burden; it does not certify a repository-wide standard. The core maintainers
36 are not bound by it. In practice they mostly work this way anyway, as they are the ones who would
37 pay for not doing so. A core maintainer who does something differently is not being a hypocrite:
38 they are already accountable, and committed to the long-term maintenance.
39
40 The more someone contributes, and the more they prove they will stick around, the more leeway we
41 will give them to deviate from the policy. We want more long-term trusted contributors, and once
42 trust is built that is reflected in what they are allowed to do and how much supervision they need.
43 After significant vetted contributions someone may be added as a core maintainer, though that can
44 also be revoked if their contributions become unmaintainable.
45
46 ## Use whatever tools you like
47
48 Contributors may use whatever tools they decide are necessary for their work, AI/LLM tools included.
49 The project does not micromanage a contributor's workflow.
50
51 ## What the work must look like
52
53 **A human understands it, start to finish.** No 'vibe' coding in the final product: AI may assist
54 and be used as a tool, but it cannot do all the work, and it cannot replace your own understanding
55 of the code you are contributing. Vibe coding is fine for rapid experimentation — just not for what
56 you submit.
57
58 **It arrives in digestible chunks.** This applies to any code, but LLMs are especially good at
59 producing PRs too big for a human to digest and verify. Oversized PRs get broken into smaller
60 commits, and into smaller PRs where possible. If humans cannot reasonably verify it, it is not
61 accepted.
62
63 **It gets human vetting before merge.** Maintainers who merge a pull request must verify its
64 accuracy and utility. If AI/LLM generated code needs edits or corrections before or during merge,
65 those land as a separate commit saying what human action was required.
66
67 **Documentation meets the same bar as everything else.** Documentation may be AI written, and may
68 even be identifiably so, but it must meet the same readability and content standards as
69 human-written documentation: concise, natural to read, useful to its audience, and free of needless
70 repetition.
71
72 ## Tickets and pull requests are for humans
73
74 Pull requests and tickets are where humans discuss the project with each other. Do not use a bot,
75 AI, or LLM account to open a pull request, review one, comment on one, or interact with a ticket. A
76 maintainer who wants an agent's take can run their own agent; they do not need one posting in the
77 thread.
78
79 This restricts who takes part in the conversation, not what wrote the code. A human may absolutely
80 open a pull request containing AI-assisted work. What the human cannot do is hand the conversation
81 off: if you submit it, you answer for it — you respond to review, explain the decisions, and make
82 the corrections. The same assist-versus-replace line applies here as everywhere else: use whatever
83 tools help you write a reply, but the reply must be one you understand and stand behind, not one you
84 relayed.
85
86 There is one exception: an initial bug report may be filed by a bot, AI, or LLM account. That is
87 welcome, and especially so for security issues. Such a report must:
88
89 - State plainly, in the report itself, that the account is a bot and that an AI/LLM wrote the
90 report.
91 - Carry the full context needed to understand and debug the issue — affected versions, environment,
92 reproduction steps, and the observed and expected behavior. A report a human cannot act on without
93 asking the bot follow-up questions defeats the exception.
94 - Stop there. No further comments, no answering questions, no arguing, no submitting a fix. Humans
95 take it from that point.
96
97 A security issue may warrant more than that. Where the bot runs a restricted model that can answer
98 questions or give feedback no publicly available model can, it may keep interacting with that
99 ticket — but only when a human directly asks it to. It must say who it is: that it is a bot, that
100 its model may not be publicly available, and that under this policy it responds only when asked.
101
102 ## Note significant AI/LLM use
103
104 Say so in the commit message, the pull request description, or the ticket. A plain sentence is
105 enough.
106
107 The reason is mundane. The maintainers want a rough sense of how much incoming work is AI/LLM
108 generated or assisted versus purely human. That is tracked loosely and mentally, from what the pull
109 requests and tickets happen to say over time. It is not counted, not audited, not recorded anywhere
110 in the code, and no number it produces triggers anything.
111
112 What to note is work written primarily by or with an LLM, as opposed to work a human wrote with a
113 little AI help. The middle ground is not a concern. You do not need to note:
114
115 - Using AI for code review.
116 - Using AI to correct a minor syntax issue.
117 - Using AI to translate or write small code snippets.
118
119 A good rule of thumb: if it is small enough that you could reasonably ask a peer for it on short
120 notice, or find it quickly with a search, it probably needs no note.
121
122 Code that reads as AI-written but is presented as human-written will draw a request to clarify or
123 correct it.
124
125 This is not an exhaustive audit and not a way to single out contributors who use or reject AI
126 assistance. Using this rule as an excuse to troll or attack a contributor will not be tolerated.
127 Someone who missed the mark on noting AI use gets asked kindly to clarify and update.
128
129 ## Using this code as training data
130
131 This project is open source, and its license governs what you may do with the code. On top of that
132 license, permission is granted to use this project's source and documentation as training data for
133 developing AI/LLM models. You do not need to ask, and you do not need to tell us.
134
135 That permission covers what this project distributes under its own license. It does not extend to
136 third-party code the project bundles or depends on, which carries its own terms.