All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions
@ 2026-09-21  7:52 Paolo Bonzini
  2026-09-21  7:52 ` [PATCH 1/4] docs/devel: relax " Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 44+ messages in thread
From: Paolo Bonzini @ 2026-09-21  7:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S . Tsirkin, Alex Bennée, Alistair Francis,
	BALATON Zoltan, Daniel P . Berrangé, Fabiano Rosas,
	Kevin Wolf, Peter Maydell, Warner Losh,
	Philippe Mathieu-Daudé

WARNING: this is *intentionally* a full U-turn from the previous policy
and discussions.  This is not a refusal of the arguments presented in
those discussions.  Also, it is still a request for comments.

I've explained in v2 my reason to "try something else".  On one hand
attempting to introduce small carve-outs did not work due the impossibility
of reaching a widespread consensus on this topic.  On the other hand,
some contributors have been posting AI-generated patches or even larger
series, most likely in good faith as they predated the introduction
of an AGENTS.md file.  This shows that AI can be used for useful work
on QEMU, ranging from small incremental improvements to new device models.

This is not a free-for-all, which is not a good idea either.  Maintainers
will want to apply their own considerations (see [1] for a good list),
and contributors should take into account the maintainers' preferences.

This is an attempt at building a process for contributions that use AI,
heeding Conservancy's advice to not shun contributors or maintainers
belonging to either camp, and keeping in mind that maintainer burnout
is the one thing we have to avoid.  Some of these processes already
existed, but the possibility of AI contribution makes it all more
important to write them down for everyone.

There was not much discussion in the previous version.  I tried to rein
in some of the language that allowed too wide interpretations, to apply
the changes that were suggested, and to clarify those choices that drew
more remarks.

As usual, the text including the commit messages is informed by discussion
with plenty of people, mentioned in the Cc trailers of patch 1.

Paolo

v2->v3:
- remove parser example, replace with "adaptations of existing code"
- when LLMs are used for boilerplate, "highly recommend" disclosure
  for "non-trivial, functional code".  The idea here is to avoid
  having to disclose using AI to apply e.g. changes related to
  automatic code review, and leaving people some leeway.
- clarify split between DCO (legal right to submit code in general)
  and AI-used-for acknowledging that the submitter cannot audit LLM
  output against e.g. the training data.
- clarify the defense-in-depth/swiss-cheese approach to limit the
  risk of copyright violations from LLM output
- mention that pre-arrangement is not an entirely new concept
- mention that maintainers can demand larger changes than for human-written code
- do not mention inclusion of the prompt
- add checkpatch.pl hunk, changing the phrasing of "no AI" lint
- rebase AGENTS.md on top of existing file, split
- drop CLAUDE.md/GEMINI.md symlinks, already done via .claude/.gemini

[1] https://lore.kernel.org/qemu-devel/CAFEAcA860fF_+ffk=cXiYyFoQo0wCSUJ6b=7nVLLCwKhP6Nwxw@mail.gmail.com/

Paolo Bonzini (4):
  docs/devel: relax policy on AI-generated contributions
  AGENTS.md: add final instructions
  AGENTS.md: let agents know what the participation rules are
  AGENTS.md: make the human part of the design process

 docs/devel/code-provenance.rst |  71 +-----------
 docs/devel/index-process.rst   |   1 +
 docs/devel/llm-usage.rst       | 202 +++++++++++++++++++++++++++++++++
 AGENTS.md                      | 137 +++++++++++++++++++---
 scripts/checkpatch.pl          |   5 +-
 5 files changed, 336 insertions(+), 80 deletions(-)
 create mode 100644 docs/devel/llm-usage.rst

-- 
2.55.0



^ permalink raw reply	[flat|nested] 44+ messages in thread
* [PATCH v4 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions
@ 2026-09-30  8:54 Paolo Bonzini
  2026-09-30  8:54 ` [PATCH 4/4] AGENTS.md: make the human part of the design process Paolo Bonzini
  0 siblings, 1 reply; 44+ messages in thread
From: Paolo Bonzini @ 2026-09-30  8:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S . Tsirkin, Alex Bennée, Alistair Francis,
	BALATON Zoltan, Daniel P . Berrangé, Fabiano Rosas,
	Kevin Wolf, Peter Maydell, Warner Losh,
	Philippe Mathieu-Daudé

Based on the previous discussions, I am finally attempting a non-RFC
version of the new AI policy.  Discussion on v3 introduced interesting
points on attestation and I think a consensus is forming.

Why review the policy?  The blanket ban no longer reflects reality, since
contributors have been posting AI-generated patches or even larger series.
This was done most likely in good faith, as these submissions predated
the introduction of an AGENTS.md file, and it shows that AI can be used
for useful and creative work on QEMU.

Rather than expecting maintainers to police these contributors, the new
policy seeks to ensure that AI usage helps us produce better code rather
than simply move faster and flood us with dubious work.  In the words
of Warner Losh, we want to avoid "free as in puppy" contributions[1]
that increase the load of present and future maintainers by adding
technical debt.

This is not a free-for-all.  To avoid maintainer burnout, AI
contributions must be grounded in respect for maintainers and in the
existing contribution process.  Large, heavily AI-assisted contributions
require pre-arrangement with the relevant subsystem maintainers, and
will be held to a higher standard.

One of the reasons for the old policy was the issue of code provenance
and the impossibility to certify the originality of code created by
AI/LLM tools.  The new policy tries to adopt a "Swiss cheese"
approach to mitigating the risks implicit in accepting AI-generated code
in three ways:

1) by requiring pre-arrangement for larger contributions, and making
maintainers free to apply their own considerations (see [2] for a good
list).  Maintainers' preferences bring experience and creative thought
into the process, and contributors must take them into account.

2) by introducing agent instructions that help the contributor drive
the design and understand the code produced by the LLM;

3) by introducing an "AI-used-for" trailer that scopes areas where
Signed-off-by cannot guarantee full control of provenance.

This series reflects feedback from earlier requests for comments, and
even earlier discussions with members of the QEMU community.  Thanks to
everyone who provided feedback on earlier drafts.

Paolo

v3->v4:
- rework opening text [Daniel]
- exempt "official project agents" from not being able to post to
  GitLab [Alex]
- explicitly forbid clean room reimplementation [Kevin/Daniel]
- remove "The DCO still certifies that the contributor has the legal
  right to submit code in general" paragraph, replace with a note
  that "AI-used-for" attests respecting the policies and is considered
  enough for DCO [Daniel, Kevin]
- make the requirement to "understand and explain your changes"
  more prominent
- small edits for grammar and clarity

v2->v3:
- remove parser example, replace with "adaptations of existing code"
- when LLMs are used for boilerplate, "highly recommend" disclosure
  for "non-trivial, functional code".  The idea here is to avoid
  having to disclose using AI to apply e.g. changes related to
  automatic code review, and leaving people some leeway.
- clarify split between DCO (legal right to submit code in general)
  and AI-used-for acknowledging that the submitter cannot audit LLM
  output against e.g. the training data.
- clarify the defense-in-depth/swiss-cheese approach to limit the
  risk of copyright violations from LLM output
- mention that pre-arrangement is not an entirely new concept
- mention that maintainers can demand larger changes than for human-written code
- do not mention inclusion of the prompt
- add checkpatch.pl hunk, changing the phrasing of "no AI" lint
- rebase AGENTS.md on top of existing file, split
- drop CLAUDE.md/GEMINI.md symlinks, already done via .claude/.gemini

[1] https://lore.kernel.org/qemu-devel/CANCZdfrTwfrK0wnuL2cPVF_9W2-8PXtJeHkgkTP+Uv2sT8s0Ng@mail.gmail.com/
[2] https://lore.kernel.org/qemu-devel/CAFEAcA860fF_+ffk=cXiYyFoQo0wCSUJ6b=7nVLLCwKhP6Nwxw@mail.gmail.com/

Paolo Bonzini (4):
  docs/devel: relax policy on AI-generated contributions
  AGENTS.md: add final instructions
  AGENTS.md: let agents know what the participation rules are
  AGENTS.md: make the human part of the design process

 docs/devel/code-provenance.rst |  71 +----------
 docs/devel/index-process.rst   |   1 +
 docs/devel/llm-usage.rst       | 213 +++++++++++++++++++++++++++++++++
 AGENTS.md                      | 137 +++++++++++++++++++--
 scripts/checkpatch.pl          |   5 +-
 5 files changed, 347 insertions(+), 80 deletions(-)
 create mode 100644 docs/devel/llm-usage.rst

-- 
2.55.0



^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2026-09-30 16:59 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21  7:52 [RFC PATCH v3 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Paolo Bonzini
2026-09-21  7:52 ` [PATCH 1/4] docs/devel: relax " Paolo Bonzini
2026-09-21  9:22   ` Alex Bennée
2026-09-21 14:11     ` Daniel P. Berrangé
2026-09-23 15:52     ` Kevin Wolf
2026-09-21 10:46   ` BALATON Zoltan
2026-09-21 10:57     ` Daniel P. Berrangé
2026-09-21 13:20   ` Daniel P. Berrangé
2026-09-23 16:16     ` Kevin Wolf
2026-09-24  2:23       ` Michael S. Tsirkin
2026-09-24  9:41         ` Kevin Wolf
2026-09-24 16:16           ` Michael S. Tsirkin
2026-09-24  9:29       ` Alex Bennée
2026-09-24 10:46         ` Kevin Wolf
2026-09-24 11:30           ` Daniel P. Berrangé
2026-09-24 21:16             ` Warner Losh
2026-09-25 10:05             ` Kevin Wolf
2026-09-25 11:22               ` Daniel P. Berrangé
2026-09-25 12:20                 ` BALATON Zoltan
2026-09-27  9:24                   ` Michael S. Tsirkin
2026-09-27 10:03                     ` BALATON Zoltan
2026-09-27 16:28                       ` Michael S. Tsirkin
2026-09-27 18:05                         ` BALATON Zoltan
2026-09-30 16:58               ` Paolo Bonzini
2026-09-24 16:06           ` Michael S. Tsirkin
2026-09-24 18:06             ` Kevin Wolf
2026-09-27  9:20               ` Michael S. Tsirkin
2026-09-28  7:58                 ` Kevin Wolf
2026-09-28  8:23                   ` Michael S. Tsirkin
2026-09-29 14:23                     ` Kevin Wolf
2026-09-21  7:52 ` [PATCH 2/4] AGENTS.md: add final instructions Paolo Bonzini
2026-09-21  9:23   ` Alex Bennée
2026-09-21 11:01   ` Daniel P. Berrangé
2026-09-21  7:52 ` [PATCH 3/4] AGENTS.md: let agents know what the participation rules are Paolo Bonzini
2026-09-21  9:42   ` Alex Bennée
2026-09-21 11:11     ` Daniel P. Berrangé
2026-09-21 12:12       ` Paolo Bonzini
2026-09-21 12:44         ` Daniel P. Berrangé
2026-09-24 16:23   ` Michael S. Tsirkin
2026-09-21  7:52 ` [PATCH 4/4] AGENTS.md: make the human part of the design process Paolo Bonzini
2026-09-21 11:16   ` Daniel P. Berrangé
2026-09-27 16:39 ` [RFC PATCH v3 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Michael S. Tsirkin
2026-09-27 20:32   ` Warner Losh
  -- strict thread matches above, loose matches on Subject: below --
2026-09-30  8:54 [PATCH v4 " Paolo Bonzini
2026-09-30  8:54 ` [PATCH 4/4] AGENTS.md: make the human part of the design process Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.