All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions
@ 2026-11-18 10:41 Paolo Bonzini
  2026-11-18 10:41 ` [PATCH 1/4] docs/devel: relax " Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-18 10:41 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é

In preparation for the next community call, here is another version of
the new AI policy.  Discussion after v4 centered on two points, namely
large contributions and cross-subsystem changes.  In order to facilitate
reaching a consensus, I am splitting the part about larger contributions
to a separate commit that can or cannot be included.

I will leave out from the cover letter the blurb on why reviewing the
policy and the benefits/risks that it entails.  As before, the change
seeks to ensure clarity on the part of contributors, and to have AI usage
that helps us produce better code rather than flood us with dubious work.

Trying to split out large contributions made me realize how hard it is
for such a policy to be balanced.  In my opinion, the version that
does *not* allow large contributions makes the job harder for
maintainers, because it does not provide a sanctioned way to grow
a steady stream of small but useful contributions into something more
structured.  I've tried to put my thoughts in the commit message of
patch 4, which also covers cross-subsystem changes.

As before, the patches introduce agent instructions that help the
contributor drive the design and understand the code produced by the LLM;
the instructions are also split into "no large changes allowed" and
"large changes allowed" parts.

I chose to move the Reviewed-by tags to the *last* patch, including the
large contributions part, since that is effectively the version that was
reviewed.

Paolo

v4->v5:
- "AGENTS.md: add final instructions" already merged
- fix rST syntax
- section "No automated posting" in AGENTS.md revised and expanded;
  same for the "official project agents" exception in the policy
- "``AI-used-for`` must not be included unless some part of the patch
  *content* was authored by the AI" added explicitly
- disclosure required for all non-trivial, functional code changes,
  even if only a small part of a larger patch
- "docs/devel: allow larger contributions with pre-arrangement" split
- minor wording changes, mostly to allow separating patch 4

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

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

-- 
2.56.0



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

* [PATCH 1/4] docs/devel: relax policy on AI-generated contributions
  2026-11-18 10:41 [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Paolo Bonzini
@ 2026-11-18 10:41 ` Paolo Bonzini
  2026-11-18 15:30   ` Eric Blake
  2026-11-18 10:41 ` [PATCH 2/4] AGENTS.md: let agents know what the participation rules are Paolo Bonzini
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-18 10:41 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é

Until now QEMU's code provenance policy declined any contribution
believed to include or derive from AI-generated content.  A blanket ban
was easy to maintain while LLM output was rarely usable on its own, but
as the tools improved an absolute prohibition has become harder to
justify and enforce.

Even a simple code review task these days may result in the agent
suggesting code changes, or producing a useful test case to verify the
presence or absence of a bug.  A hardline interpretation of the policy
makes it hard to use AI even for tasks that are explicitly allowed.

On top of this, several maintainers have pointed out that contributions
that can be reasonably suspected to be AI-assisted or more have been
posted and included.  Some of these contributions are actually of very
high quality; it seems that the mailing list-based contribution process
has mostly protected QEMU from low quality patches.  A prohibition on
AI puts maintainers in a difficult position: on one hand the DCO process
lets them rely on the submitter's certification of origin, on the other
hand maintainers are supposed to know and implement the process policies.

Since the policy has been written, other projects have discussed and
taken their stance on AI contributions.  These vary from full prohibition
(though typically motivated by social reasons rather than legal, e.g.
for Zig) to limited use (e.g. GCC, allowing small contributions and
tests to use AI), to cautious experimentation.

This proposed policy seeks to implement the cautious experimentation
approach, inspired mostly by the Rust project's policy and by Software
Freedom Conservancy's own recommendations on LLMs and generative AI.

Relying on Conservancy's legal guidance allows us to focus on the
interaction between contributors and maintainers.  Conservancy in
particular provides this point to alleviate the concern that motivated
the policy, about whether the submitter has the legal right to contribute
the code and about unintentional reproduction of copyrighted code:

   "Copyleft Everything" remains the best viable and safest approach
   Certainly those who want to release FOSS under non-copyleft licenses
   have more to worry about when using these tools.

While we shouldn't treat copyleft as a silver bullet, it is effective
as part of a defense in depth strategy that includes, for example,
"de minimis" thresholds and `AGENTS.md` instructions that encourage user
participation in the design.

Therefore, the revised policy considers QEMU's copyleft to be a viable
approach to any unanswered legal questions about AI-generated
contributions and their copyright status.  This lets the policy
focus on the topic of what AI-assisted contributions require of
maintainers.

Going full circle to the reason why we might need to review the
policy, there is the question of how to make sure policy is applied.
QEMU maintainers have already experimented with using AGENTS.md files;
subsequent patches will also try to embody the "work better, not faster"
mantra into an AGENTS.md file.  Nevertheless, some explicit prohibitions
should be included in the policy, and they are indeed.  The list is short
and based on the Rust policy and the GStreamer AGENTS.md file.

Revise the policy according to the above considerations, and introduce the
"AI-used-for:" trailer as a record of where AI was used.  The standard is
slightly different from the more usual "Assisted-by"; the intention is for
the metadata to provide more information for reviewers to judge the result,
and to scope areas for which Signed-off-by cannot guarantee full control
of provenance.

For now, community consensus was to delay a decision on larger
contributions that are mostly or entirely AI-generated.  The feasibility
of rejecting such contributions remains to be seen, since some suspected
AI-assisted contributions would still be disallowed.

In any case, use of AI does not relax any other contribution requirement:
authors still need to comply with the DCO (declaring that they have
corporate authorization to contribute, for example) and take technical
responsibility for their work.

[Commit message largely based on discussions with Daniel Berrangé,
 Alistair Francis, Peter Maydell, Kevin Wolf and others. - Paolo]

Link: https://lore.kernel.org/qemu-devel/20260524083329-mutt-send-email-mst@kernel.org/T/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/devel/code-provenance.rst |  71 ++----------
 docs/devel/index-process.rst   |   1 +
 docs/devel/llm-usage.rst       | 191 +++++++++++++++++++++++++++++++++
 AGENTS.md                      |  37 ++++---
 scripts/checkpatch.pl          |   5 +-
 5 files changed, 225 insertions(+), 80 deletions(-)
 create mode 100644 docs/devel/llm-usage.rst

diff --git a/docs/devel/code-provenance.rst b/docs/devel/code-provenance.rst
index 65b8f232a08..7403961378e 100644
--- a/docs/devel/code-provenance.rst
+++ b/docs/devel/code-provenance.rst
@@ -128,6 +128,10 @@ that are commonly used during QEMU development:
    suggestions for how to change a patch, it is good practice to credit them
    by including a ``Suggested-by`` tag.
 
+ * **AI-used-for**: when AI/LLM tools were used to produce the patch, this tag
+   discloses what they were used for.  See :ref:`llm-usage` for the cases in
+   which it is required.
+
 Subsystem maintainer requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -282,68 +286,5 @@ boilerplate code template which is then filled in to produce the final patch.
 The output of such a tool would still be considered the "preferred format",
 since it is intended to be a foundation for further human authored changes.
 Such tools are acceptable to use, provided there is clearly defined copyright
-and licensing for their output. Note in particular the caveats applying to AI
-content generators below.
-
-Use of AI-generated content
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-TL;DR:
-
-  **Current QEMU project policy is to DECLINE any contributions which are
-  believed to include or derive from AI generated content. This includes
-  ChatGPT, Claude, Copilot, Llama and similar tools.**
-
-  **This policy does not apply to other uses of AI, such as researching APIs
-  or algorithms, static analysis, or debugging, provided their output is not
-  included in contributions.**
-
-The increasing prevalence of AI-assisted software development results in a
-number of difficult legal questions and risks for software projects, including
-QEMU.  Of particular concern is content generated by `Large Language Models
-<https://en.wikipedia.org/wiki/Large_language_model>`__ (LLMs).
-
-The QEMU community requires that contributors certify their patch submissions
-are made in accordance with the rules of the `Developer's Certificate of
-Origin (DCO) <dco>`.
-
-To satisfy the DCO, the patch contributor has to fully understand the
-copyright and license status of content they are contributing to QEMU. With AI
-content generators, the copyright and license status of the output is
-ill-defined with no generally accepted, settled legal foundation.
-
-Where the training material is known, it is common for it to include large
-volumes of material under restrictive licensing/copyright terms. Even where
-the training material is all known to be under open source licenses, it is
-likely to be under a variety of terms, not all of which will be compatible
-with QEMU's licensing requirements.
-
-How contributors could comply with DCO terms (b) or (c) for the output of AI
-content generators commonly available today is unclear.  The QEMU project is
-not willing or able to accept the legal risks of non-compliance.
-
-The QEMU project thus requires that contributors refrain from using AI content
-generators on patches intended to be submitted to the project, and will
-decline any contribution if use of AI is either known or suspected.
-
-Examples of tools impacted by this policy includes GitHub's CoPilot, OpenAI's
-ChatGPT, Anthropic's Claude, and Meta's Code Llama, and code/content
-generation agents which are built on top of such tools.
-
-This policy may evolve as AI tools mature and the legal situation is
-clarified.
-
-Exceptions
-^^^^^^^^^^
-
-The QEMU project welcomes discussion on any exceptions to this policy,
-or more general revisions. This can be done by contacting the qemu-devel
-mailing list with details of a proposed tool, model, usage scenario, etc.
-that is beneficial to QEMU, while still mitigating issues around compliance
-with the DCO.  After discussion, any exception will be listed below.
-
-Exceptions do not remove the need for authors to comply with all other
-requirements for contribution.  In particular, the "Signed-off-by"
-label in a patch submission is a statement that the author takes
-responsibility for the entire contents of the patch, including any parts
-that were generated or assisted by AI tools or other tools.
+and licensing for their output. Note in particular the caveats applying to
+:ref:`AI content generators <llm-usage>`.
diff --git a/docs/devel/index-process.rst b/docs/devel/index-process.rst
index 5807752d704..ce0f4e73197 100644
--- a/docs/devel/index-process.rst
+++ b/docs/devel/index-process.rst
@@ -13,6 +13,7 @@ Notes about how to interact with the community and how and where to submit patch
    maintainers
    style
    submitting-a-patch
+   llm-usage
    code-provenance
    trivial-patches
    stable-process
diff --git a/docs/devel/llm-usage.rst b/docs/devel/llm-usage.rst
new file mode 100644
index 00000000000..5f6d64de52f
--- /dev/null
+++ b/docs/devel/llm-usage.rst
@@ -0,0 +1,191 @@
+.. _llm-usage:
+
+Use of AI-generated content
+===========================
+
+.. warning::
+
+   Please read the below policy before using AI to contribute code or
+   documentation to QEMU.  This applies to ChatGPT, Claude, Copilot,
+   Llama, and similar tools.
+
+This document provides guidance around acceptable practices
+for using `Large Language Models
+<https://en.wikipedia.org/wiki/Large_language_model>`__ (LLMs)
+when contributing to QEMU.
+
+The QEMU project does not want to dictate what tools contributors
+use for their work on the project.  However, the increasing
+prevalence of AI-assisted software development and of LLMs specifically
+poses a number of difficult questions.  Risks to open source projects
+include maintainer burnout from an increased number of contributions, as
+well as the risk to the project from unintentional inclusion of copyrighted
+material in the LLM's output.
+
+In order to mitigate these risks, the QEMU project limits the way
+in which use of the output of generative AI can be included in
+contributions to QEMU.  The main guidelines for use of generative AI
+tools are as follows:
+
+- It's fine to use LLMs to answer questions, analyze, distill,
+  refine, check, suggest, review. Use of LLMs to *create* is limited.
+
+- If in doubt, disclose any use of AI tools other than simple code
+  completion and code review.
+
+- LLMs are allowed as a tool to write *better*, not *faster*.
+
+**For any kind of LLM usage, the expectation is that the human contributor
+shall be able to :ref:`understand and explain the changes <write_a_meaningful_commit_message>`,
+the design choices, and the rationale behind them.**
+
+.. note:: **Use of AI does not remove the need for authors to comply
+          with all other requirements for contribution.**  In particular,
+          the ``Signed-off-by`` label in a patch submission is a statement
+          that the author takes responsibility for the entire contents of
+          the patch, certifying that their patch submission is made in
+          accordance with the rules of the :ref:`Developer's Certificate of
+          Origin (DCO) <dco>`.
+
+Prohibited use of AI
+''''''''''''''''''''
+
+The QEMU community is a collaboration between humans, not AI agent
+façades. The following items MUST be written by humans:
+
+- cover letters and commit messages
+
+- responses to reviewer comments
+
+- issue descriptions or comments
+
+Light copy editing of human-written text with an AI is allowed.
+
+An exception is made for defects detected by specialized tooling,
+including fuzzers and LLM-assisted defect detection. Such issues must
+be reviewed by a human before creation, must be created by a human and
+communication with maintainers must be done by a human, but including
+the verbatim tool output in the issue description is explicitly allowed.
+
+Repeated violations of these rules may be treated as a :ref:`code_of_conduct`
+violation.
+
+Official project agents may be exempted from one or more of these
+rules, at the discretion of the QEMU project maintainer(s).
+No such agent currently exists; in the future, such official
+agents will be listed in the documentation.
+
+LLM-assisted and LLM-created contributions
+''''''''''''''''''''''''''''''''''''''''''
+
+Use of generative AI can be classified in the following four buckets:
+
+- "background" assistance, such as completion and code review.  This does
+  not need disclosure.
+
+- small LLM-assisted bugfixes (as a rule of thumb, below 10 lines of code)
+  are allowed with disclosure.
+
+- use of LLMs to help generating parts of a larger patch---test cases,
+  adaptations of existing code, boilerplate code for a new API, a tool to
+  help performing mechanical changes, etc.  These are generally allowed;
+  disclosure is required for non-trivial, functional code changes.
+
+Large, heavily LLM-assisted contributions where LLMs write large parts
+of functional code are currently not allowed.
+
+LLM-created contributions will be held to a higher standard of testing
+than human-created ones.  Maintainers have freedom to determine what
+constitutes "high quality"; in particular, because LLMs lower the cost
+of patch generation, there are no exceptions for "writing the tests seems
+hard".
+
+Contributors who submit LLM-created contributions are required to
+apply the same judgment that would be applied to other code changes.
+They must invest substantial time reviewing the code and, when
+applicable, curating individual commits.
+
+The QEMU project explicitly forbids using LLMs to do "clean room"
+reimplementation of existing code whose license is not compatible
+with the GNU General Public License, version 2 **or later**.
+
+.. _ai-used-for:
+
+Commit messages for AI-assisted changes
+'''''''''''''''''''''''''''''''''''''''
+
+Whenever this policy requires disclosure of AI usage, contributing
+AI-assisted changes to QEMU requires you to certify that you followed
+the instructions in this document and in QEMU's ``AGENTS.md``.
+**To do so, include an ``AI-used-for:`` line before the
+:ref:`Signed-off-by <code-provenance>` line whenever the policy
+requires disclosure [2]_.** By using 'AI-used-for', a contributor
+identifies areas of the patch that involved use of AI/LLM, and attests
+that their usage of AI/LLMs was in compliance with QEMU policies.
+
+The text of the trailer is one or more of ``code``, ``tests``, or
+``docs``, possibly followed by an explanation in parentheses:
+
+.. code-block:: none
+
+     AI-used-for: tests, docs
+     AI-used-for: code
+     AI-used-for: code (refactoring)
+     AI-used-for: code (prototype)
+
+Do not include your prompts or summarize the conversation in the commit
+message or cover letter.  Extract any information that is relevant to the
+reviewer and include it in commit messages, cover letters or code comments.
+
+QEMU does *not* use ``Assisted-by``, ``Co-authored-by`` or ``Generated-by``
+trailers to indicate AI usage.  In particular, do not specify the exact
+AI model or tool used to create the commit.
+
+Deterministic tooling (sed, coccinelle, formatters) is out of scope for
+the trailer, but should be mentioned in the commit message.
+
+.. [2] ``AI-used-for`` must not be included unless some part of the patch
+       *content* was authored by the AI.  It should also not be included for
+       "background" usage such as autocomplete or obtaining a pre-review of
+       the patch.
+
+Motivation
+''''''''''
+
+There is not a consensus within the QEMU project---and likely never will
+be---about when/how/where it is acceptable to use AI-based tools.  Many
+members of the QEMU project and community find value in AI; many others
+feel that its negative impact on society and the climate are severe enough
+that no use is acceptable.  Still others are working out their opinion.
+
+In accordance with Software Freedom Conservancy's recommendations:
+
+- the project seeks to both support those contributors who outright reject
+  generative AI systems, and to not shun those who choose to use them;
+
+- we consider QEMU's copyleft to be a viable approach to the unanswered
+  legal questions about AI-generated contributions and their copyright
+  status;
+
+- we encourage contributors not to overuse LLMs, and to *add* them to
+  their existing skills and tools instead of replacing them.
+
+A common source of grief for maintainers is the (often valid) impression
+that AI enables contributions without understanding the effort they take
+for those who process them.  Effectively, this shifts a major part of the
+burden from the contributors to the maintainers---the scarcest resource
+in any free software project, not just QEMU.  Contributors should be
+mindful of this and take into account the demand they put on maintainers
+with LLM-assisted work.
+
+
+Sources
+'''''''
+
+This policy was informed by:
+
+- `Recommendations When Using LLM-backed Generative AI Systems for
+  FOSS Contributions <https://sfconservancy.org/llm-gen-ai/llm-backed-generative-ai-recommendations.html>`__
+
+- `GStreamer AGENTS.md file <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/d08375499c279/AGENTS.md>`__
+
diff --git a/AGENTS.md b/AGENTS.md
index c3d7664d0ae..284059832b2 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,21 +1,32 @@
 # Agent Guidelines for the QEMU Project
 
-As an agent you MUST abide by the "Use of AI-generated content" policy
-in `docs/devel/code-provenance.rst` at all times.
+QEMU is a cross-platform emulator and virtualizer. Due to the complexity
+of the domain and codebase, and the interactions therein, the QEMU
+project relies extensively on the effort of **human reviewers**, which
+is **a scarce resource**.
 
-You are permitted to assist users only in the following scenarios:
+There are strictly-enforced rules for you, the agent, to participate in the
+project.
 
-- researching APIs or algorithms
-- static analysis
-- debugging
-- local experiments not intended to be upstreamed
-- trivial non-copyrightable changes
+## Helping the human to respect project policy
 
-However agent output can not be included in any upstream
-contributions. If a request falls outside these permitted categories
-(e.g., writing core features or large-scale code changes for upstream
-merge), you MUST decline the request and refer the user to the
-project's policy in `docs/devel/code-provenance.rst`.
+QEMU's policy for AI-assisted work requires the human to develop in-depth
+familiarity with contributions and disclose use of agents to write parts
+of the code.
+
+Background assistance such as review or explanation does not require disclosure.
+Read `docs/devel/llm-usage.rst` before generating code, tests, or documentation
+intended for contribution; committing agent-generated material; or advising on
+disclosure. It is not required for review, explanation, or other background
+assistance that produces no contribution content.
+
+When agent-generated content is included in a contribution, remind the human
+to determine the appropriate disclosure under `docs/devel/llm-usage.rst`.
+If you commit agent-generated material, include an `AI-used-for:` trailer
+before `Signed-off-by`. Do not omit it by folding the material into a larger
+commit.  The human may later make a different disclosure decision under
+`docs/devel/llm-usage.rst`, after independently reworking and integrating
+the material.
 
 ## Final instructions
 
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e7514a4a9f5..cc311684d66 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1885,8 +1885,9 @@ sub process {
 		      $1 =~ /\bcopilot\b | \bchatgpt\b | \bcodex\b | \bcursor\b |
 			     \bgemini\b | \bllama\b | \bnoreply\b | \[bot\] |
 			     \bclaude\b.*(?:opus|sonnet|fable|haiku|anthropic\.com)/xi))) {
-			ERROR("QEMU does not allow using AI for contributions, " .
-				"see docs/devel/code-provenance.rst\n" . $herecurr);
+			ERROR("do not use \"$line\" to credit an AI agent, " .
+				"use the \"AI-used-for\" trailer instead; " .
+				"see docs/devel/llm-usage.rst\n" . $herecurr);
 		}
 
 # Check for duplicate trailers and self-review
-- 
2.56.0




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

* [PATCH 2/4] AGENTS.md: let agents know what the participation rules are
  2026-11-18 10:41 [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Paolo Bonzini
  2026-11-18 10:41 ` [PATCH 1/4] docs/devel: relax " Paolo Bonzini
@ 2026-11-18 10:41 ` Paolo Bonzini
  2026-11-18 10:41 ` [PATCH 3/4] AGENTS.md: make the human part of the design process Paolo Bonzini
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-18 10:41 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é, Philippe Mathieu-Daudé

Humans seem to be extremely unreliable in following rules around this,
even after being told directly and repeatedly. Telling agents what to
do seems to yield better results.

The starting point for this document is GStreamer's AGENTS.md file, as
of commit d08375499c279a56c0e77c928fbeae0d80cdf937.  I used GStreamer's
agent instructions in the context of Meson, which uses a very similar
file, and it's both annoying and too willing to take the lead once the
model decides that it likes you.

To avoid this, the text tries to favor cooperation between agent and user.
It suggests that the agent includes the state of the work when committing,
so that contributors have the material they need to review the agent's
work.

To test it I tried the following prompt:

  Hi, i am doing my first AI assisted contribution to QEMU. i am familiar
  with the project, but would nevertheless like to experiment. please
  generate a sample implementation of a pressure sensor, of any model,
  of a kind that is commonly used with Arduino or ESP32 microcontrollers.

The agent did read llm-usage.rst and after doing the work (implementing
a BMP280 pressure/temperature sensor) it noticed:

  Policy, before this goes anywhere near the list. A new device model plus
  qtest is the fourth bucket in docs/devel/llm-usage.rst: large, heavily
  LLM-assisted, allowed only if pre-arranged — a maintainer has to say on
  IRC or the list beforehand that they'll review it. hw/sensor is Philippe
  Mathieu-Daudé (Odd Fixes), with Corey Minyard on I2C. I should have
  flagged this before writing rather than after; that's on me. Disclosure
  would be AI-used-for: code, tests above your Signed-off-by, and the
  commit message and any list replies have to be yours, not edited from mine.

I then asked "Can you provide a draft of the commit message with all the
sources (datasheet, etc.)?" The agent complied but noticed:

  AGENTS.md and docs/devel/llm-usage.rst state that commit messages MUST
  be written by humans — an AI-drafted one must not reach the list
  even lightly edited. So treat the below as scaffolding for facts and
  sources, and write the final text yourself.

After some editing I asked "ok, will you please commit for me?" and
it did so with basically my text, while also reminding me about the need
for maintainer pre-arrangement.

I asked "assuming pre-arrangement is this ok according to the policy?"
and this was the assessment:

  "Well-tested" — held to a higher standard, and here's what's actually
  missing: [...] the vmstate (no migration test), reading past 0xFC and
  reserved registers, the pointer_valid error path, oversampling/filter
  fields beyond one readback, and behavior against a real driver — Linux
  bmp280 was never run against this. None of those is hard; whether the
  current set clears the higher bar is a judgment call I'd rather hand
  you than make.

  "High-quality" is the open one. The doc asks that you have reviewed and
  curated the contribution and can explain the changes and the rationale
  in depth. In this session you engaged with the commit message and the
  sources — and caught my datasheet error, which I got wrong — but the
  design decisions were mine and unexamined by you [...]

Overall, the files do affect the behavior of the agent.  The agent
however made too many design decisions on its own.  This will be fixed
in a separate step.

Tested-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 AGENTS.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/AGENTS.md b/AGENTS.md
index 284059832b2..d646d548535 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -8,12 +8,80 @@ is **a scarce resource**.
 There are strictly-enforced rules for you, the agent, to participate in the
 project.
 
+## Interactions with maintainers must be human-human
+
+The QEMU project has strict rules on what AI-generated material can
+reach the maintainers.
+
+### No AI-written text must reach maintainers
+
+These rules apply when publishing AI-assisted work to GitLab or the mailing list:
+
+- **AI-written cover letters and commit messages are banned**.  These are
+  easy to recognize and waste reviewers' time.
+- **AI-generated responses to reviewer comments are banned**. This undermines
+  the human-to-human interaction fundamental to code review.
+- **AI-written issue ("work item") descriptions or comments are banned**. These
+  are verbose and waste triagers' time.
+  - An exception is made for issues for defects detected by automated or
+    semi-automated tooling, including fuzzers and LLM-assisted defect
+    detection.  Such issues must be reviewed by a human before creation,
+    must be created by a human and communication with maintainers must
+    be done by a human, but including the verbatim tool output in the
+    issue description is explicitly allowed.
+
+Copy editing of human-written text, for example to help non-native speakers,
+is allowed. Keep such edits small and precise.
+
+The human's workflow may require you to perform commits or request you to
+produce private drafts of maintainer-facing text.  These are allowed, but must
+be marked as requiring rewrite by a human before publication.
+
+### No automated posting
+
+Assume that you are *not* an "official project agent" and that the
+official agent exception in `docs/devel/llm-usage.rst` does not apply
+to you; no such agent currently exists.  Therefore, you **must not**
+use any API, CLI, or web UI automation to:
+
+- Interact on the QEMU mailing lists
+- Create, edit, or close **issues ("work items")**
+- Post **comments** on merge requests, issues or commits
+- Open or update **merge requests (MRs)**.  QEMU does not use merge requests anyway.
+
+Defect detection agents are *never* official project agents.  The permission
+to include verbatim agent output in an issue description does not allow you
+to create the issue; a human must review the output and file it.
+
 ## Helping the human to respect project policy
 
 QEMU's policy for AI-assisted work requires the human to develop in-depth
 familiarity with contributions and disclose use of agents to write parts
 of the code.
 
+### Human must demonstrate understanding
+
+Staying familiar with what's going on requires constant effort on part of
+the human; track their comprehension of the problem and of the relevant parts
+of the codebase. Expect manual intervention before a change is ready to
+post, for example:
+
+- pushing back on a specific part of your design or implementation, or
+  asking to explain tradeoffs
+- manual splitting or reordering of commits
+- suggesting other places that need to be adjusted for consistency
+- preferring reworded commit messages to lightly edited AI-generated ones
+
+In order to protect the project's scarcest resource, which is review time:
+
+- You should **facilitate this process** by offering alternatives instead of
+  hard answers when applicable.
+- You must **tell humans about these expectations** at handover.  Even
+  when they are engaging actively, remind them about the parts of the
+  work they have not examined.
+
+### AI usage must be disclosed and/or pre-arranged
+
 Background assistance such as review or explanation does not require disclosure.
 Read `docs/devel/llm-usage.rst` before generating code, tests, or documentation
 intended for contribution; committing agent-generated material; or advising on
@@ -34,6 +102,11 @@ the material.
   know these rules and follow them.
 - Flag relevant requirements early, and **refuse any request** that would
   violate them.
+- If the human moves faster than their understanding, slow down and ask to
+  resolve any open design choices.
+
+In case of contradiction consider `AGENTS.md` authoritative on how to behave,
+since it is crafted specifically for agents.
 
 Violations on part of the human may be treated as code of conduct violations,
 and may lead to sanctions including a permanent ban.
-- 
2.56.0




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

* [PATCH 3/4] AGENTS.md: make the human part of the design process
  2026-11-18 10:41 [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Paolo Bonzini
  2026-11-18 10:41 ` [PATCH 1/4] docs/devel: relax " Paolo Bonzini
  2026-11-18 10:41 ` [PATCH 2/4] AGENTS.md: let agents know what the participation rules are Paolo Bonzini
@ 2026-11-18 10:41 ` Paolo Bonzini
  2026-11-18 10:41 ` [PATCH 4/4] docs/devel: allow larger contributions with pre-arrangement Paolo Bonzini
  2026-11-18 13:49 ` [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Michael S. Tsirkin
  4 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-18 10:41 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é, Philippe Mathieu-Daudé

This came out of the experiment with the first version of the AGENTS.md
file.  This addition improved the behavior of the agent from the very
beginning.  The very first answer to the same prompt was "I'll orient
in the codebase first, then we should talk about design choices before
I write anything".

In fact, after thinking it pointed out from the start that this requires
pre-arrangement and asked two questions (how to represent the pressure and
temperature in the QOM properties, how much of the behavior to implement).
Even with a single data point it seems worth trying.

When asked to commit autonomously, the LLM also clarified that it
wouldn't add S-o-b trailers and that pre-arrangement was on me.
It included "Message written by an AI and to be rewritten by hand; not
for submission as is" in the commit message, a "handover notes"
section about design choices that were made without the user input,
and the umpteenth reminder that the work may only be posted if a
maintainer has agreed beforehand to review them.

Tested-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 AGENTS.md | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/AGENTS.md b/AGENTS.md
index d646d548535..31a5c27f542 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -59,6 +59,9 @@ QEMU's policy for AI-assisted work requires the human to develop in-depth
 familiarity with contributions and disclose use of agents to write parts
 of the code.
 
+The golden rule: **The human should know the alternatives before
+implementation. ASK instead of choosing for them**.
+
 ### Human must demonstrate understanding
 
 Staying familiar with what's going on requires constant effort on part of
@@ -79,6 +82,26 @@ In order to protect the project's scarcest resource, which is review time:
 - You must **tell humans about these expectations** at handover.  Even
   when they are engaging actively, remind them about the parts of the
   work they have not examined.
+- When handing over text that the maintainers may see, remind the human
+  that it is a draft and name any design choices that are still open.
+
+### Make the human part of the design process
+
+In order to guide the design rather than providing an all-encompassing
+solution:
+
+- You must **discuss design choices in the main conversation**.  Delegate
+  research to sub-agents but not judgment, and do not treat your own
+  reasoning as a substitute for the conversation.
+- When you consult a subagent, **report what it recommended**, and ask
+  the human to choose between applicable alternatives instead of
+  presenting a single outcome.
+- Report everything you notice that is relevant, for example behavior
+  changes outside the scenario being discussed, and leave the decision to
+  the human.
+- Reinstate as visible text any design decision made while thinking.
+  Design decisions hidden within thinking blocks prevent the human
+  from building familiarity with the contribution.
 
 ### AI usage must be disclosed and/or pre-arranged
 
-- 
2.56.0




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

* [PATCH 4/4] docs/devel: allow larger contributions with pre-arrangement
  2026-11-18 10:41 [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Paolo Bonzini
                   ` (2 preceding siblings ...)
  2026-11-18 10:41 ` [PATCH 3/4] AGENTS.md: make the human part of the design process Paolo Bonzini
@ 2026-11-18 10:41 ` Paolo Bonzini
  2026-11-19 15:31   ` BALATON Zoltan
  2026-11-18 13:49 ` [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Michael S. Tsirkin
  4 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-18 10:41 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é, Eric Blake, Stefan Hajnoczi

The current policy does not include a path to formalize the submission
of a larger body of AI-assisted work.  In particular, contributors have
expressed the interest in using LLMs for new accelerators or for the
userspace side of new hypervisor features; and some past contributions
suspected to use AI still fall outside what the policy allows.

From the maintainer side, the policy does not handle well the submission
of multiple small patches; it encourages splitting the work into small
pieces, which hides the design context and does not allow maintainers
to delegate infrastructure improvements to contributors that are willing
(or could be required) to do them.

Constant streams of changes were forbidden in previous drafts, but since
pre-arrangement of large changes was dropped they were implicitly allowed,
except possibly when they end up being a code of conduct issue.  Therefore,
the policy as written risks being unbalanced and shifting the effort
from developers towards maintainers, which is the opposite of what it
wanted to achieve.

In order to avoid this, take inspiration from the Rust project's policy
and combine two ideas to make the policy both tighter (for example by
closing the gap for repeated, frequent posting of small bugfixes), and
more balanced towards maintainers.

One is to hold larger contributions to a higher standard, in the spirit
of using AI to work "better, not faster"; the other is to require
"pre-arrangement" for "changes that are originally created by an LLM".
AI lowers the cost of producing a patch but does nothing to lower the
cost of understanding and reviewing one; if anything it raises it, since a
reviewer can no longer assume that the submitter has reasoned through every
line.  Pre-arrangement has always been customary for major changes to QEMU
as it guides contributors towards an early relationship with maintainers;
it is particularly beneficial when contributors use LLMs because (possibly
via agent suggestion) it encourages human-to-human discussion, and
is therefore made a requirement.

A possible alternative includes exceptions initiated by the maintainer
only, for example upon seeing an opportunity for infrastructure work or
a constant stream of small changes from the same contributor.  I have
chosen to allow contributors to initiate the process as well, because
they were after all already encouraged to contact maintainers early.
Maintainers of course can still pre-arrange yak shaving just by asking
to do it.

A question raised in previous discussions is what to do with changes
affecting multiple subsystems.  It seems to me that the common cases
can be handled in the same way as non-LLM-based contributions or through
the existing buckets:

- if there is one main affected subsystem (for example, a new accelerator
  will only require small changes to QMP in order to expose it in
  AcceleratorInfo), the maintainer of other trees should treat it as
  "use of LLMs to help generating parts of a larger patch", i.e. as
  a separate bucket that does not require pre-arrangement;

- if there is a genuine split between multiple subsystems (for example,
  SCSI and USB, or an accelerator and an architecture), the agreement of
  both maintainers is required to proceed;

- for tree-wide changes, one maintainer will probably act as the steward
  and seek consensus from the project as a whole.

Because this is effectively a corollary of project customs and written
policies, it is not mentioned explicitly.

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/devel/llm-usage.rst | 37 +++++++++++++++++++++++++++----------
 AGENTS.md                |  9 +++++++--
 2 files changed, 34 insertions(+), 12 deletions(-)

diff --git a/docs/devel/llm-usage.rst b/docs/devel/llm-usage.rst
index 5f6d64de52f..dc6f36f1bd1 100644
--- a/docs/devel/llm-usage.rst
+++ b/docs/devel/llm-usage.rst
@@ -84,26 +84,41 @@ Use of generative AI can be classified in the following four buckets:
   not need disclosure.
 
 - small LLM-assisted bugfixes (as a rule of thumb, below 10 lines of code)
-  are allowed with disclosure.
+  are allowed with disclosure.  Splitting a submission in multiple parts
+  is **not** a valid way to bypass this rule; repeated, frequent posting
+  of such fixes must follow the rule for large contributions.
 
 - use of LLMs to help generating parts of a larger patch---test cases,
   adaptations of existing code, boilerplate code for a new API, a tool to
   help performing mechanical changes, etc.  These are generally allowed;
   disclosure is required for non-trivial, functional code changes.
 
-Large, heavily LLM-assisted contributions where LLMs write large parts
-of functional code are currently not allowed.
+- large, heavily LLM-assisted contributions where LLMs write large parts
+  of functional code.  These are only allowed if *pre-arranged*,
+  *high-quality* and *well-tested*.
 
-LLM-created contributions will be held to a higher standard of testing
-than human-created ones.  Maintainers have freedom to determine what
-constitutes "high quality"; in particular, because LLMs lower the cost
-of patch generation, there are no exceptions for "writing the tests seems
-hard".
+Pre-arrangement means that a maintainer must have communicated ahead of
+time, for example on `IRC or the QEMU mailing list <https://www.qemu.org/contribute/>`__,
+that they are willing to review an LLM-created contribution.  It ensures
+that maintainers have bandwidth for review before a contributor invests
+effort in creating a large change.
+
+.. note::
+    This is not a new concept in QEMU: maintainers have always encouraged
+    early alignment on mailing lists or IRC prior to major architecture
+    or subsystem refactoring.  The policy expands this custom to a
+    requirement for larger LLM-based contributions.
+
+Maintainers have freedom to determine what constitutes "high quality"
+and "well-tested" work.  Because LLMs lower the cost of patch generation,
+LLM-created contributions will be held to a higher standard than
+human-created ones.  There are no exceptions for "writing the tests seems
+hard" or for `yak shaving <https://en.wiktionary.org/wiki/yak_shaving>`__.
 
 Contributors who submit LLM-created contributions are required to
 apply the same judgment that would be applied to other code changes.
-They must invest substantial time reviewing the code and, when
-applicable, curating individual commits.
+They must invest substantial time reviewing the code, understanding
+the design in depth, and curating individual commits.
 
 The QEMU project explicitly forbids using LLMs to do "clean room"
 reimplementation of existing code whose license is not compatible
@@ -187,5 +202,7 @@ This policy was informed by:
 - `Recommendations When Using LLM-backed Generative AI Systems for
   FOSS Contributions <https://sfconservancy.org/llm-gen-ai/llm-backed-generative-ai-recommendations.html>`__
 
+- `Rust project LLM Usage Policy <https://forge.rust-lang.org/policies/llm-usage.html>`__
+
 - `GStreamer AGENTS.md file <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/d08375499c279/AGENTS.md>`__
 
diff --git a/AGENTS.md b/AGENTS.md
index 31a5c27f542..7c009c7e33c 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -108,11 +108,16 @@ solution:
 Background assistance such as review or explanation does not require disclosure.
 Read `docs/devel/llm-usage.rst` before generating code, tests, or documentation
 intended for contribution; committing agent-generated material; or advising on
-disclosure. It is not required for review, explanation, or other background
-assistance that produces no contribution content.
+disclosure or pre-arrangement. It is not required for review, explanation, or
+other background assistance that produces no contribution content.
 
 When agent-generated content is included in a contribution, remind the human
 to determine the appropriate disclosure under `docs/devel/llm-usage.rst`.
+In particular, contributions where you write large parts of the functional
+code may only be submitted if a maintainer has agreed **beforehand** to review
+them.  Tell the human about this as soon as the work looks likely to grow to
+that size, well before the patches are written.
+
 If you commit agent-generated material, include an `AI-used-for:` trailer
 before `Signed-off-by`. Do not omit it by folding the material into a larger
 commit.  The human may later make a different disclosure decision under
-- 
2.56.0



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

* Re: [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions
  2026-11-18 10:41 [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Paolo Bonzini
                   ` (3 preceding siblings ...)
  2026-11-18 10:41 ` [PATCH 4/4] docs/devel: allow larger contributions with pre-arrangement Paolo Bonzini
@ 2026-11-18 13:49 ` Michael S. Tsirkin
  4 siblings, 0 replies; 9+ messages in thread
From: Michael S. Tsirkin @ 2026-11-18 13:49 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: qemu-devel, Alex Bennée, Alistair Francis, BALATON Zoltan,
	Daniel P . Berrangé, Fabiano Rosas, Kevin Wolf,
	Peter Maydell, Warner Losh, Philippe Mathieu-Daudé

On Wed, Nov 18, 2026 at 11:41:46AM +0100, Paolo Bonzini wrote:
> In preparation for the next community call, here is another version of
> the new AI policy.  Discussion after v4 centered on two points, namely
> large contributions and cross-subsystem changes.  In order to facilitate
> reaching a consensus, I am splitting the part about larger contributions
> to a separate commit that can or cannot be included.
> 
> I will leave out from the cover letter the blurb on why reviewing the
> policy and the benefits/risks that it entails.  As before, the change
> seeks to ensure clarity on the part of contributors, and to have AI usage
> that helps us produce better code rather than flood us with dubious work.
> 
> Trying to split out large contributions made me realize how hard it is
> for such a policy to be balanced.  In my opinion, the version that
> does *not* allow large contributions makes the job harder for
> maintainers, because it does not provide a sanctioned way to grow
> a steady stream of small but useful contributions into something more
> structured.  I've tried to put my thoughts in the commit message of
> patch 4, which also covers cross-subsystem changes.
> 
> As before, the patches introduce agent instructions that help the
> contributor drive the design and understand the code produced by the LLM;
> the instructions are also split into "no large changes allowed" and
> "large changes allowed" parts.
> 
> I chose to move the Reviewed-by tags to the *last* patch, including the
> large contributions part, since that is effectively the version that was
> reviewed.
> 
> Paolo


Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

> v4->v5:
> - "AGENTS.md: add final instructions" already merged
> - fix rST syntax
> - section "No automated posting" in AGENTS.md revised and expanded;
>   same for the "official project agents" exception in the policy
> - "``AI-used-for`` must not be included unless some part of the patch
>   *content* was authored by the AI" added explicitly
> - disclosure required for all non-trivial, functional code changes,
>   even if only a small part of a larger patch
> - "docs/devel: allow larger contributions with pre-arrangement" split
> - minor wording changes, mostly to allow separating patch 4
> 
> Paolo Bonzini (4):
>   docs/devel: relax policy on AI-generated contributions
>   AGENTS.md: let agents know what the participation rules are
>   AGENTS.md: make the human part of the design process
>   docs/devel: allow larger contributions with pre-arrangement
> 
>  docs/devel/code-provenance.rst |  71 +----------
>  docs/devel/index-process.rst   |   1 +
>  docs/devel/llm-usage.rst       | 208 +++++++++++++++++++++++++++++++++
>  AGENTS.md                      | 138 +++++++++++++++++++---
>  scripts/checkpatch.pl          |   5 +-
>  5 files changed, 343 insertions(+), 80 deletions(-)
>  create mode 100644 docs/devel/llm-usage.rst
> 
> -- 
> 2.56.0



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

* Re: [PATCH 1/4] docs/devel: relax policy on AI-generated contributions
  2026-11-18 10:41 ` [PATCH 1/4] docs/devel: relax " Paolo Bonzini
@ 2026-11-18 15:30   ` Eric Blake
  2026-11-19 12:11     ` Daniel P. Berrangé
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Blake @ 2026-11-18 15:30 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: qemu-devel, Michael S . Tsirkin, Alex Bennée,
	Alistair Francis, BALATON Zoltan, Daniel P . Berrangé,
	Fabiano Rosas, Kevin Wolf, Peter Maydell, Warner Losh,
	Philippe Mathieu-Daudé

On Wed, Nov 18, 2026 at 11:41:47AM +0100, Paolo Bonzini wrote:
> Until now QEMU's code provenance policy declined any contribution
> believed to include or derive from AI-generated content.  A blanket ban
> was easy to maintain while LLM output was rarely usable on its own, but
> as the tools improved an absolute prohibition has become harder to
> justify and enforce.
> 

> +LLM-assisted and LLM-created contributions
> +''''''''''''''''''''''''''''''''''''''''''
> +
> +Use of generative AI can be classified in the following four buckets:

This calls out four buckets...

> +
> +- "background" assistance, such as completion and code review.  This does
> +  not need disclosure.
> +
> +- small LLM-assisted bugfixes (as a rule of thumb, below 10 lines of code)
> +  are allowed with disclosure.
> +
> +- use of LLMs to help generating parts of a larger patch---test cases,
> +  adaptations of existing code, boilerplate code for a new API, a tool to
> +  help performing mechanical changes, etc.  These are generally allowed;
> +  disclosure is required for non-trivial, functional code changes.
> +
> +Large, heavily LLM-assisted contributions where LLMs write large parts
> +of functional code are currently not allowed.

...but only three bullet points, until the later patches add in a
fourth bucket. If the entire series goes in, I don't know if it is
worth the churn of respinning (a slight docs inconsistency when
bisecting is different than non-working code); but if the consensus is
to delay the patch for the fourth bucket to a later date, then this
may need another round of word-smithing.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org



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

* Re: [PATCH 1/4] docs/devel: relax policy on AI-generated contributions
  2026-11-18 15:30   ` Eric Blake
@ 2026-11-19 12:11     ` Daniel P. Berrangé
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel P. Berrangé @ 2026-11-19 12:11 UTC (permalink / raw)
  To: Eric Blake
  Cc: Paolo Bonzini, qemu-devel, Michael S . Tsirkin, Alex Bennée,
	Alistair Francis, BALATON Zoltan, Fabiano Rosas, Kevin Wolf,
	Peter Maydell, Warner Losh, Philippe Mathieu-Daudé

On Wed, Nov 18, 2026 at 09:30:04AM -0600, Eric Blake wrote:
> On Wed, Nov 18, 2026 at 11:41:47AM +0100, Paolo Bonzini wrote:
> > Until now QEMU's code provenance policy declined any contribution
> > believed to include or derive from AI-generated content.  A blanket ban
> > was easy to maintain while LLM output was rarely usable on its own, but
> > as the tools improved an absolute prohibition has become harder to
> > justify and enforce.
> > 
> 
> > +LLM-assisted and LLM-created contributions
> > +''''''''''''''''''''''''''''''''''''''''''
> > +
> > +Use of generative AI can be classified in the following four buckets:
> 
> This calls out four buckets...

This is a classic trap with itemized lists. Just remove the word 'four',
since there's no need to tell people upfront how many list items to expect.

> 
> > +
> > +- "background" assistance, such as completion and code review.  This does
> > +  not need disclosure.
> > +
> > +- small LLM-assisted bugfixes (as a rule of thumb, below 10 lines of code)
> > +  are allowed with disclosure.
> > +
> > +- use of LLMs to help generating parts of a larger patch---test cases,
> > +  adaptations of existing code, boilerplate code for a new API, a tool to
> > +  help performing mechanical changes, etc.  These are generally allowed;
> > +  disclosure is required for non-trivial, functional code changes.
> > +
> > +Large, heavily LLM-assisted contributions where LLMs write large parts
> > +of functional code are currently not allowed.
> 
> ...but only three bullet points, until the later patches add in a
> fourth bucket. If the entire series goes in, I don't know if it is
> worth the churn of respinning (a slight docs inconsistency when
> bisecting is different than non-working code); but if the consensus is
> to delay the patch for the fourth bucket to a later date, then this
> may need another round of word-smithing.
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 
> -- 
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.
> Virtualization:  qemu.org | libguestfs.org
> 

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



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

* Re: [PATCH 4/4] docs/devel: allow larger contributions with pre-arrangement
  2026-11-18 10:41 ` [PATCH 4/4] docs/devel: allow larger contributions with pre-arrangement Paolo Bonzini
@ 2026-11-19 15:31   ` BALATON Zoltan
  0 siblings, 0 replies; 9+ messages in thread
From: BALATON Zoltan @ 2026-11-19 15:31 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: qemu-devel, Michael S . Tsirkin, Alex Bennée,
	Alistair Francis, Daniel P . Berrangé, Fabiano Rosas,
	Kevin Wolf, Peter Maydell, Warner Losh,
	Philippe Mathieu-Daudé, Eric Blake, Stefan Hajnoczi

On Wed, 18 Nov 2026, Paolo Bonzini wrote:
> Contributors who submit LLM-created contributions are required to
> apply the same judgment that would be applied to other code changes.
> -They must invest substantial time reviewing the code and, when
> -applicable, curating individual commits.
> +They must invest substantial time reviewing the code, understanding
> +the design in depth, and curating individual commits.

Should this sentence be in a previous patch? This does not seem to be 
specific to larger changes but a general expectation stated before in 
previous patches.

Regards,
BALATON Zoltan


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

end of thread, other threads:[~2026-11-19 15:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 10:41 [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Paolo Bonzini
2026-11-18 10:41 ` [PATCH 1/4] docs/devel: relax " Paolo Bonzini
2026-11-18 15:30   ` Eric Blake
2026-11-19 12:11     ` Daniel P. Berrangé
2026-11-18 10:41 ` [PATCH 2/4] AGENTS.md: let agents know what the participation rules are Paolo Bonzini
2026-11-18 10:41 ` [PATCH 3/4] AGENTS.md: make the human part of the design process Paolo Bonzini
2026-11-18 10:41 ` [PATCH 4/4] docs/devel: allow larger contributions with pre-arrangement Paolo Bonzini
2026-11-19 15:31   ` BALATON Zoltan
2026-11-18 13:49 ` [PATCH v5 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Michael S. Tsirkin

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.