From nobody Mon Nov 23 05:12:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1790758543; cv=none; d=zohomail.com; s=zohoarc; b=X4M4VQ6yHRP3jqcuj2JbU88iaES4ijyCGZqkKgA/wCIYO6wYbFjXC0h2tXVunVSMWSdY02Y9075Jt/onDVeRxuHrLzNdU2VTT4isPHaz5mdgURZgMP90B/y9SPuy/EMxwr9AbYxv1T2QMpQpUpcDnHYHiTZOrC739bb+BAOXzcg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790758543; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2hEHeuDU4XBQGvskatAEqBkl1mEJDjYRgS+ijQhuABk=; b=mgK7dacP+xo6UMq8/ikmBVIHjga96eS2DOZG2g7lEJOJuVk16aLOFxTZHxun1oWI/eDe1I7FiJr2a+LMST+Jqo6GRsGNvBRgcCnhuhThCi+jZhCY0hmt6RuggiQT5peRcJZ4qF6U3rC9pkhCRRZyFoTSJHFufoRE0N+rMNYczVI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790758543032284.8333531833356; Wed, 30 Sep 2026 01:55:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBq5Q-0001og-1d; Wed, 30 Sep 2026 04:54:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBq5O-0001oQ-1j for qemu-devel@nongnu.org; Wed, 30 Sep 2026 04:54:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBq5K-0002lS-M6 for qemu-devel@nongnu.org; Wed, 30 Sep 2026 04:54:45 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-427-yOZYzC_iODWbdGcSqhA3vw-1; Wed, 30 Sep 2026 04:54:39 -0400 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-49e6ba4abdfso51265805e9.1 for ; Wed, 30 Sep 2026 01:54:39 -0700 (PDT) Received: from [192.168.10.48] ([151.49.232.249]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a0174e161bsm62191345e9.5.2026.09.30.01.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2026 01:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1790758481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2hEHeuDU4XBQGvskatAEqBkl1mEJDjYRgS+ijQhuABk=; b=XDuBVSydY+X7E+/eLBBilOtf4UGnwIG2loWeZVTWFaY367Ip/BTjxSp4GGqQ/9RVPw6u6+ FVTTf6sW6fq75YAKpV8nxZpqOmkHGo57+yRouU6CU9Vx/9PgCtHGZ216MQavGBydEyRYfs E7fl9WNX3WAbZsnlrgck93HfHDdvFgE= X-MC-Unique: yOZYzC_iODWbdGcSqhA3vw-1 X-Mimecast-MFC-AGG-ID: yOZYzC_iODWbdGcSqhA3vw_1790758478 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1790758478; x=1791363278; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=2hEHeuDU4XBQGvskatAEqBkl1mEJDjYRgS+ijQhuABk=; b=q7QOZjaotsGn/anw/+pVmmUm696a5h9AK1MBMApnc8WNkfLXCZaMTIavXJ0bZ784be I4LKhJ6eUtUmSeLs+RVHy6FJutrQ7T7Md1PM4vU/h9cJO8ivujXCN8PqawebI03aA4tr mSVtg4hBIRqkyyccb2xfUnpFhUm+Po44x+1EblzZ6msGvwMkqRo0UxmWfySK5cUDw5Ws MQjcT5pmxoQ4iA8Cufq2If5V3+xl4NjKx0pNXFVTxGGQu2xOrkP2pvzSYzfpbn3Q3MLy 2Vvi8hkqFVfTEGTZRWNUH3rCMlak91TlYUXRZ8YCWf0Bghupo8q1riSqdVEjMJ4yE+lx TNaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790758478; x=1791363278; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=2hEHeuDU4XBQGvskatAEqBkl1mEJDjYRgS+ijQhuABk=; b=YL3Si32V5+h5pd+koQr0NxY7FyGMqmT6Rfqnekyq0leGfCQeDeyyGHs5d+IqQtKHXr D72PuFegejfeTCAYK44V7cahfelK3iIaWi0t1Cd96+ApUO+n36V6a6oFjs46F8D1EPCc F3E6QKHvRPgna689ipHk+VYmfdoRaU5jUUv22PLaVBNpkP1K3IJT3/yluYOSQApcuO9r yHKrBcPYPtOP7ZPUwTKpp9fAdJU6IS3xIOb9K+566IB4B78OaEJwAplqZ7FctMkJlQE8 nxrd2eblY88NtzIkNyvUnokmV95Q7i/vasm6tYpI1TDqXZc4LJe1PvxTcT3BqYo9YYe7 Dzyw== X-Gm-Message-State: AFuF++n6gxlvfpvcBvi+kNNPEHeIgUpicyPgOTeDdAWGqfVGQ2lSOIvH AYz/WPFpRLcl42mIwWMWb75hgMbZjK6b7eGhmb2TFgRUnKgn/uhOsl5j8pNS05Qq3a8Ort1Lksu HI0N6Yv0ioxcBmhRaTcZMFC21/Zti5k+m2gJzpGdNH8E3d2LARC47MbGqKakNeRiChM0Xi0Fnyg uTUOvf0ta6cji66qA3YXkIUoJR72fWuJQfe3wz5hi1 X-Gm-Gg: AYBFou0CUaS423S9ya9EA7mE/H+47cu+5c7MCllkRSdNkOtXeobH6lpSrfC+u09UHzF o4iIU5S489nSAJW6FJM3eFM9Sw2LiUCEx3TgKxPPY+6YfcG9xQ3YvPN+HIiDXpwtokBD0A3I8nG VhWVBiVL3l+GSKmzs/XA7EKRq8RH8OcxKXylKUS6KxMxAoOpiJx1jaLQHQtko42ctvS++WGbgL0 kzErJIKbX/W1GXvowmIjarwnweEVUjG+e3c5Ms+rtNbk9KrbOmhlHoc5X6moUKXjvyuEUTduV3u mzSV2xhniCZJ0HA1YbWamKdyA9rCyfFnPqVf2IWzbYFf9zvRSbW+EOzYdAUPVfBh9t8IVf6g/+F qVMsT8ESoEJLPCGAxYSd7D39Akj1wfZBCS0DqFZGBiR+Ymdxhk2WfcBNaPG8WYDQqdFqr66s+Nv 9nNFv/ X-Received: by 2002:a05:600c:3145:b0:49f:bd3c:bc1a with SMTP id 5b1f17b1804b1-4a01b00d9bamr11093915e9.21.1790758478261; Wed, 30 Sep 2026 01:54:38 -0700 (PDT) X-Received: by 2002:a05:600c:3145:b0:49f:bd3c:bc1a with SMTP id 5b1f17b1804b1-4a01b00d9bamr11093535e9.21.1790758477726; Wed, 30 Sep 2026 01:54:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: "Michael S . Tsirkin" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alistair Francis , BALATON Zoltan , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Fabiano Rosas , Kevin Wolf , Peter Maydell , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/4] docs/devel: relax policy on AI-generated contributions Date: Wed, 30 Sep 2026 10:54:30 +0200 Message-ID: <20260930085433.830743-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930085433.830743-1-pbonzini@redhat.com> References: <20260930085433.830743-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.341, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1790758545097158500 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. In that respect, the Rust project's policy combines two unusual ideas. One is to hold them 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 is an attempt to balance the shift of effort from the developer to the maintainer, and the QEMU policy includes the same provision. 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. 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=C3=A9, Alistair Francis, Peter Maydell, Kevin Wolf and others. - Paolo] Cc: Michael S. Tsirkin Cc: Alex Benn=C3=A9e Cc: Alistair Francis Cc: BALATON Zoltan Cc: Daniel P. Berrang=C3=A9 Cc: Fabiano Rosas Cc: Kevin Wolf Cc: Peter Maydell Cc: Warner Losh Cc: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20260524083329-mutt-send-email-mst= @kernel.org/T/ Signed-off-by: Paolo Bonzini Acked-by: Michael S. Tsirkin Acked-by: Warner Losh Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Tested-by: Philippe Mathieu-Daud=C3=A9 --- docs/devel/code-provenance.rst | 71 +---------- docs/devel/index-process.rst | 1 + docs/devel/llm-usage.rst | 213 +++++++++++++++++++++++++++++++++ AGENTS.md | 42 +++++-- scripts/checkpatch.pl | 5 +- 5 files changed, 252 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 th= em by including a ``Suggested-by`` tag. =20 + * **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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 @@ -282,68 +286,5 @@ boilerplate code template which is then filled in to p= roduce 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 copyri= ght -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 AP= Is - or algorithms, static analysis, or debugging, provided their output is n= ot - included in contributions.** - -The increasing prevalence of AI-assisted software development results in a -number of difficult legal questions and risks for software projects, inclu= ding -QEMU. Of particular concern is content generated by `Large Language Models -`__ (LLMs). - -The QEMU community requires that contributors certify their patch submissi= ons -are made in accordance with the rules of the `Developer's Certificate of -Origin (DCO) `. - -To satisfy the DCO, the patch contributor has to fully understand the -copyright and license status of content they are contributing to QEMU. Wit= h 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 con= tent -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, OpenA= I'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 `. 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 an= d 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..0b54f5dd383 --- /dev/null +++ b/docs/devel/llm-usage.rst @@ -0,0 +1,213 @@ +.. _llm-usage: + +Use of AI-generated content +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D + +.. 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 +`__ (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 + `, 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) `. + +Prohibited use of AI +'''''''''''''''''''' + +The QEMU community is a collaboration between humans, not AI agent +fa=C3=A7ades. The following items MUST be written by humans [1]_: + +- 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. + +Repeated violations of this rule may be treated as a :ref:`code_of_conduct` +violation. + +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. + +.. [1] Official project agents may be exempted from one or more of these + rules, at the discretion of the QEMU project maintainer(s). + +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. 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 full 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 highly recommended for non-trivial, functional code. + +- 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*. + +The last case (*"LLM-created contribution"*) is the one that requires +a more careful approach. In particular: + +- "Pre-arranged" means that a maintainer has communicated ahead of time, + for example on `IRC or the QEMU mailing + list `__, that they are willing + to review an LLM-created contribution. + +- "High-quality" means that the contributor must apply the same judgment + that would be applied to other code changes. Contributors must invest + substantial time reviewing their contributions, curating them, and + understanding them in depth. + +- "Well-tested" means the LLM-created contributions will be held to a + higher standard than human-created ones, because LLMs make it easier + to write tests. There are no exceptions for "writing the tests seems + hard" or for `yak shaving `_= _. + +.. note:: + Pre-arrangement ensures maintainers have bandwidth for review before a + contributor invests effort in creating a large change. 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. + + Maintainers have freedom to determine what constitutes "high quality". + Because LLMs lower the cost of patch generation, maintainers may demand + significantly larger revisions than for purely human-written code. + +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 +''''''''''''''''''''''''''''''''''''''' + +In order to disclose your usage of AI/LLM tools, add an ``AI-used-for:`` +line before the :ref:`Signed-off-by ` line. The trailer +is both a reminder of your DCO obligations and a guide to reviewers. The +text is one or more of ``code``, ``tests``, ``docs``, ``research``, possib= ly +followed by an explanation in parentheses: + +To be able to certify the provenance of AI/LLM-generated code that you sub= mit +to QEMU, you must follow the policies outlined in this document and in +QEMU's ``AGENTS.md``. **By using 'AI-used-for', a contributor both +identifies areas of the patch that involved use of AI/LLM, and also +attests that their usage of AI/LLMs was in compliance with the policies +outlined in this document.** + +.. code-block:: none + + AI-used-for: tests, docs + AI-used-for: code + AI-used-for: code (refactoring) + AI-used-for: code (prototype) + AI-used-for: research + +``AI-used-for`` should not be included for "background" usage such as +autocomplete or obtaining a pre-review of the patch. + +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. + +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. Pre-arrangement and the +size limit for small contributions try to avoid putting extra demand +on maintainers due to LLM-assisted work. + + +Sources +''''''' + +This policy was informed by: + +- `Recommendations When Using LLM-backed Generative AI Systems for + FOSS Contributions `__ + +- `Rust project LLM Usage Policy `__ + +- `GStreamer AGENTS.md file `__ + diff --git a/AGENTS.md b/AGENTS.md index 5e3fc071420..8f494ea8ae5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,21 +1,37 @@ # Agent Guidelines for the QEMU Project =20 -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**. =20 -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. =20 -- 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 =20 -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 discl= osure. +Read `docs/devel/llm-usage.rst` before generating code, tests, or document= ation +intended for contribution; committing agent-generated material; or advisin= g on +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 hum= an +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 re= view +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 larg= er +commit. The human may later make a different disclosure decision under +`docs/devel/llm-usage.rst`, after independently reworking and integrating +the material. =20 ## Security Policy =20 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9838a641785..d881cf29375 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1829,8 +1829,9 @@ sub process { $1 =3D~ /\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); } =20 # Check for duplicate trailers and self-review --=20 2.55.0 From nobody Mon Nov 23 05:12:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1790758504; cv=none; d=zohomail.com; s=zohoarc; b=JjbjBeKBw4CuCcheHqgJQDZMfNXhdpm56VUH2NJOh27M0veAgf0asEiUrVyL1+EqgGdF0pa1hA3PS4So+La78MApWBrnUGe6enZO0rv/8SLO2Jxrqb+LZphkZUufgImhBGmRHN8ZesztRK6Coik+KrYoOSYXv+4DIemnDX+YyH0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790758504; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FK6Fvo8eVDBiGUD1bHbm56xjyp3HmnxZUP3vEHhlC+w=; b=jDK7ACuTBZD/PqOlnbRqMb7GN58nDqfEa5C7mgxmy6lRxO1WQaj+aC4k/W29rsqU4P2Uc9ywaeG27xb98F6YpKdVjuVxnScnZ0vcsVaLD0lO7VvdXtlB5tagTegRV0G7CkyNC7FAp3Gk3/Yi32mF1J3QlSh7XLKAhTeZf9RN4hQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17907585046481023.2430709356122; Wed, 30 Sep 2026 01:55:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBq5W-0001pB-Uh; Wed, 30 Sep 2026 04:54:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBq5U-0001ou-2k for qemu-devel@nongnu.org; Wed, 30 Sep 2026 04:54:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBq5S-0002lk-I6 for qemu-devel@nongnu.org; Wed, 30 Sep 2026 04:54:51 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-279-kun1qh3uO8qxPSwUMBVuxA-1; Wed, 30 Sep 2026 04:54:48 -0400 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48af11f8d62so1177946f8f.0 for ; Wed, 30 Sep 2026 01:54:47 -0700 (PDT) Received: from [192.168.10.48] ([151.49.232.249]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48b029fc420sm1814791f8f.28.2026.09.30.01.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2026 01:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1790758489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FK6Fvo8eVDBiGUD1bHbm56xjyp3HmnxZUP3vEHhlC+w=; b=MuweU8q0mA6VfNjk96sWnmMMhfNqf5fuHNli6GUJg/44pnfUsif589oqa3HyGNu3GsaN9c XFmAJS6LRO+aWklF9y9Gh6QMPcCCMDHdGeF9Z4wvjoNTIIfN7L2CXOPStFlJ7iIGoBcm9F h+GmBesEOpCiU2uCrNfProfZRK5U2e8= X-MC-Unique: kun1qh3uO8qxPSwUMBVuxA-1 X-Mimecast-MFC-AGG-ID: kun1qh3uO8qxPSwUMBVuxA_1790758487 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1790758487; x=1791363287; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=FK6Fvo8eVDBiGUD1bHbm56xjyp3HmnxZUP3vEHhlC+w=; b=IUWASHEgFFfB6j3Zg2GAGuG/XQ8dTQY0YUD4+FMToLSXHfTleuk7EhgI+9svDyu6Hm IrG0sMcWddlTpWnGM3WiGwY4oh5VeEGs8n2cIqOVowGIGrVOpjNS/d8w8vIQ7qqadNvl cKuKfDzoyiRiARw52XUxDQpKgKA8bD8K18FzFh7ob/VUoKzK+8CXcovAA5Fgalxd/R/q BXi2nERpdNqFZulogvEj2dKdInWNVyBxXhynffinr3bPK7CyT4TurgOloVVSPx/YDQL9 TGVolj/rB7saEEtYP6yKtgGO7paKFgZeY/FBzL9umfhLfHc+Bv/HZZZtYyNnbpuX1z27 la8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790758487; x=1791363287; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FK6Fvo8eVDBiGUD1bHbm56xjyp3HmnxZUP3vEHhlC+w=; b=EJySI72bW5wCJ3f7oami/Mmj6jsH+9mgk2M5mpGa9EY44JP6ktXh95/aCdHQyAgJrw liwU2D3u+p4CZ4vRYbGpsslYJxWBVrlMa7mgEVnLyPML37BhqxpqTIb1JS2E2tg4hU23 1D8FKLmgm614BzMDPlFXKiF/psF9aYuFlecao+xMhvhILLYf6t8bPnX11Oa+PLt3fIMJ 6F3ypDIAmyADYiJST7fUD2GInb+apdmI+K46pqPYxLWm7pJ1bJLZvq3X93EFS8z1qGjS JUFvQp8l10wzBpo7aSPUt2BYZX44LD8g3DSKV/crr+oKVjzqcvHgBeSVjRypQFwcJTwx z3cA== X-Gm-Message-State: AFq9FYLbpftJ/feewA/G6DhEaTA7gvWUr8SgG7ghRfKZcQgHg48BEvBf 1T7ih9Bmnz7/w4zEkNMqXEcha8r10N0BT93JrH71wp/p0EPDwE3mj/U58dU9eGts+Qs4VARf3yP I+4voak28T40/pkzDHnLQCMKJG52oe2mss8h95zzqzHhVqVYXc1Bft+MeH3IzfwD0vYeisJBZd3 tZQuPZBUem2U1JEf5jRXnXwY+JjZdUGrH5XasxI4up X-Gm-Gg: AYBFou2NU9DCoGeGhAxCEi4joqRMpK+o8ZLjosHsXmwYKV3L7PU6TRQx9kWu6hX/Xc9 kehEhNb8na7grBHVLg3/xbtDAo9qZC1W+NCWy4JHBQf8UzvdUbi19e+yICG5SeQzWI8j/5t1Qe3 /rZbx95BSs3CBl14/4bH30jUrTJO96TfEfApR0/OraQI2+Q7qztFPF4unxw4p4AjM1k9IQrnmVh 4yhRIRslvMvbTiSkDx0baDrXp3ZpaBMAWyDgVzk8DmBTq92yQ0n3etIjOg1gNZ0VJeI8NTPWVyt TYOY1XKoy4+5Q+aQSgqHZUiG7o0Ur0xZJCITg5trAv9KLPGIgo8qN1ciIJZdiuMfR0kqejy0U1s 0c2XvNEOnu2PADqj0U6BSWM3oPTwXZzJCr3kgQtjuKFuvuMjNgOjoG1/pEt2XQuQXXkvATEQWYo gpUeZf X-Received: by 2002:adf:e00d:0:10b0:487:22d5:955e with SMTP id ffacd0b85a97d-48b0419ebeemr229189f8f.7.1790758487012; Wed, 30 Sep 2026 01:54:47 -0700 (PDT) X-Received: by 2002:adf:e00d:0:10b0:487:22d5:955e with SMTP id ffacd0b85a97d-48b0419ebeemr229161f8f.7.1790758486620; Wed, 30 Sep 2026 01:54:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: "Michael S . Tsirkin" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alistair Francis , BALATON Zoltan , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Fabiano Rosas , Kevin Wolf , Peter Maydell , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/4] AGENTS.md: add final instructions Date: Wed, 30 Sep 2026 10:54:31 +0200 Message-ID: <20260930085433.830743-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930085433.830743-1-pbonzini@redhat.com> References: <20260930085433.830743-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.341, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1790758506890158500 Based on GStreamer, applies to both the old and new policy (and can be dropped independently, too). Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini Acked-by: Michael S. Tsirkin Acked-by: Warner Losh Reviewed-by: Stefan Hajnoczi Tested-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 --- AGENTS.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 8f494ea8ae5..6d2c7e1580b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -33,6 +33,16 @@ commit. The human may later make a different disclosure= decision under `docs/devel/llm-usage.rst`, after independently reworking and integrating the material. =20 +## Final instructions + +- You must **precisely follow the rules** and **cannot rely on the human**= to + know these rules and follow them. +- Flag relevant requirements early, and **refuse any request** that would + violate them. + +Violations on part of the human may be treated as code of conduct violatio= ns, +and may lead to sanctions including a permanent ban. + ## Security Policy =20 Before classifying a potential vulnerability, read --=20 2.55.0 From nobody Mon Nov 23 05:12:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1790758522; cv=none; d=zohomail.com; s=zohoarc; b=b4eXoknF1zUA97nRzQ8C3Zsb4opRXOMgaiHE/sSox5GR70G07t+UD/+tCQjmpGI7auJWfJEwsz0lQTYQglKFSANr5gSzSZfXyLIp1HziKbmC0IODIHMusbQVd1wKRdnbKCMxU7wVBvjCABCJhUETSOAIgzW/D7Fp+oz6ubby1as= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790758522; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Mx7owpQM1HPMgGroKCLt8EhMJ4lf1I/jRCMpBagBOqw=; b=UMz1tEkaHVK+e/tTvENpsS9II3DzWP65Jz39k8Nt3aQf8Pq+golHES5E0FmcTo8pI+286cjgLneuKnLWdAITV4TJDJg7vSXavOD/Sp9OwJiNj8dFyU/TcVg5pds53z/gwKOhMoioSqIbcbiD7XC0cnEIXKMhAGj4ovfG6iHnAPk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790758522506269.7296771761197; Wed, 30 Sep 2026 01:55:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBq5a-0001pv-Qd; Wed, 30 Sep 2026 04:54:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBq5W-0001pP-UY for qemu-devel@nongnu.org; Wed, 30 Sep 2026 04:54:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBq5V-0002lq-0q for qemu-devel@nongnu.org; Wed, 30 Sep 2026 04:54:54 -0400 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-632-E6nZheZHMAigfwg0yyw1bQ-1; Wed, 30 Sep 2026 04:54:50 -0400 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-c293e604f0eso489617166b.3 for ; Wed, 30 Sep 2026 01:54:49 -0700 (PDT) Received: from [192.168.10.48] ([151.49.232.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2e22fce6e6sm29757366b.71.2026.09.30.01.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2026 01:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1790758491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mx7owpQM1HPMgGroKCLt8EhMJ4lf1I/jRCMpBagBOqw=; b=e7Dtiel5mFfY/89gaLN4dolwWYsESYsMIls1jpHGo59ZQcPiOEMKl28d/aJoG0XAbdr+Dh Bn0nxEBmHnEd2wosZcXFP09++QmCyzD6noMI2TlNd0/DgcnKDl6gHqxdtjyVsjIczQZfU3 oTnzKSRkxV+Py/iDXUZJ9k+/Ww7OcCI= X-MC-Unique: E6nZheZHMAigfwg0yyw1bQ-1 X-Mimecast-MFC-AGG-ID: E6nZheZHMAigfwg0yyw1bQ_1790758489 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1790758489; x=1791363289; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Mx7owpQM1HPMgGroKCLt8EhMJ4lf1I/jRCMpBagBOqw=; b=PyWqyCurXRxtMs9B8koRZqCP848zU/IxfL60BaGRNhr4VIcqlhCob5DKabE8s8VvqV OtWPopmNaXLjJGyiLFRHvSI9h9Sgvs6KUR4ASGjbA8LAbDx+UHeRh9VFdzMcUb85Qn5j CPTGgCRs+igIMyG1b7HOxgJOy7eQVrH+zrilY7pshMQTyTC0ZoPggYQvxj5fnicS7wUj 4FqLhJxmc35yOGzr5P0xRog9p/rRIcPtlQVeA2SGIsXCFvLYNLD2RFdPLvGmfZgX+ooW dbpwZHSjOFbyZ79oaJYlaIFWfHmu6+V24ZxS/h1Uo7aF5wN/zkAk8PKl2tV1HSanTLin 6D+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790758489; x=1791363289; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Mx7owpQM1HPMgGroKCLt8EhMJ4lf1I/jRCMpBagBOqw=; b=ZTOUmIVp8rgIjYjso8TxnMaz0fpeEGK61LVGiFScc/DVCuCIBg0q0K0g+2NW/MVqzV Zrh7XTOLF5FqJb9bB28H+UKH2je/MR+BBDHoRVGvjo5KipJptE81Ydy4bVO43dck2v4V YhMYq3vqhSae9xg8bIxFel/B+qQHwlFaq7IkSTTVvAn2V2HaU3tGjfg392n4QNpX/Xya z+3xAXB9XisQaFbpwhLlARSzxVrq1KW6bGCWxSTKCSgQDtVrVwB9qjV9Bo0Qiny14q/z KEkq/CzAJ+OTaiAqKTawljOD5g9HXxAf/cXKsKqSVJha4eQnWCj1tk9NDjy3wZJq55Lm 4Z5g== X-Gm-Message-State: AFuF++kj6eL2kfPhmCY5G3E1P4OaAAF8rFmphqlUe4uNjCrXQdd9chXB hyyF7vO7SNGNt3wPkJjJR6NP1kMtLcrLH53xxrypCrqsJjxzjgSBEl7pt/Ha+aUiAbTRFQKB47I 5aB2viZ8OhtiDnLwC8JBgmvt/m/mG7nZnnPoSkvG5tvW4hJvgpuH5yq77Nvz8z3jalrnRDuogQY 14pAWYoihQtQ+KoOHdIAtc+uFlG0xrvust/QpUGyjU X-Gm-Gg: AYBFou3PPWt9SCTinU3VwKgMxvTnmHObSNB8yz0cTTZXQLLpoMcAYlwgEIYIeZAIcqd QcXJErdMggW1giGQ7kACABPxgpRdkj1Pb7nernkqZToKKIQ0WU37oLhX5FMmDdmhGDHrL12DKnP C4LxNimQQ/JKdjkKGEcip3GY8Y40C8nPq8YtulYcSXPAAAbweKsRvKbiP3Kc77zwlYB2q5TKyvU hSZ8UixeoDZ30csBpAFF33SFkn038tGtpW6+9ANv/HBDryULrXwvKj/+5MDH+v/2zWh2GGTz//k S6glZLcrgofdsz8mvA8JTM/X9M6o1AkHmSDn0D5lozIB4khejrsFh0ISuADe+QZEEOF6slMTyc4 jlHwMlKeQt4H50n3p6RXQ3p7ckT74dqm5ddV1ky8miAarGyQQ6wyMLLtqz/XW6HbnMIEsetijA0 90WfZE X-Received: by 2002:a17:907:9708:b0:c29:5b0c:1b44 with SMTP id a640c23a62f3a-c2e23d9d0fcmr54323266b.37.1790758488737; Wed, 30 Sep 2026 01:54:48 -0700 (PDT) X-Received: by 2002:a17:907:9708:b0:c29:5b0c:1b44 with SMTP id a640c23a62f3a-c2e23d9d0fcmr54320866b.37.1790758488250; Wed, 30 Sep 2026 01:54:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: "Michael S . Tsirkin" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alistair Francis , BALATON Zoltan , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Fabiano Rosas , Kevin Wolf , Peter Maydell , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/4] AGENTS.md: let agents know what the participation rules are Date: Wed, 30 Sep 2026 10:54:32 +0200 Message-ID: <20260930085433.830743-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930085433.830743-1-pbonzini@redhat.com> References: <20260930085433.830743-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.341, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1790758524775158500 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 =E2=80=94 a maintainer has to = say on IRC or the list beforehand that they'll review it. hw/sensor is Philippe Mathieu-Daud=C3=A9 (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 min= e. 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 =E2=80=94 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" =E2=80=94 held to a higher standard, and here's what's actu= ally 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 =E2=80=94 = 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 =E2=80=94 and caught my datasheet error, which I got wrong =E2=80= =94 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. Signed-off-by: Paolo Bonzini Acked-by: Michael S. Tsirkin Acked-by: Warner Losh Reviewed-by: Stefan Hajnoczi Tested-by: Philippe Mathieu-Daud=C3=A9 --- AGENTS.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 6d2c7e1580b..8c7407b908e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,12 +8,73 @@ is **a scarce resource**. There are strictly-enforced rules for you, the agent, to participate in the project. =20 +## Interactions with maintainers must be human-human + +The QEMU project has strict rules on what AI-generated material can +reach the maintainers. + +### No automated posting + +Agents **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 reques= ts anyway. + +### No AI-written text must reach maintainers + +These rules apply when publishing AI-assisted work to GitLab or the mailin= g 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 undermi= nes + 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 speaker= s, +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. + ## Helping the human to respect project policy =20 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. =20 +### 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 pa= rts +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 discl= osure. Read `docs/devel/llm-usage.rst` before generating code, tests, or document= ation intended for contribution; committing agent-generated material; or advisin= g on @@ -39,6 +100,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 beha= ve, +since it is crafted specifically for agents. =20 Violations on part of the human may be treated as code of conduct violatio= ns, and may lead to sanctions including a permanent ban. --=20 2.55.0 From nobody Mon Nov 23 05:12:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1790758535; cv=none; d=zohomail.com; s=zohoarc; b=LLZ64bL0IkukCrhaTOoyKF/py8mlmtg6kEyQTQ16LcZ9e3PBN2WicfaastAeZpeYRnByybE+7aYSFJra224HGkAmFlCWA/vWclBjhZd8Y7VhW9Ow/wwH8PPwLVEp2N+ov38Ei9e6+/OOSP4IvBhQLUFxTCz+IQPhHhuBIlHqhfc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790758535; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4zb6j5g3eap32rc7OHohtJSqR8TqT7I9O20j5+utjB4=; b=A+lJVzOWoaViTVZcR8Z8GrVzJXhvJrhnfD+7LrZu6liwlcZoSVfYcUN0FVIqHEW5spUfvtPfmFFxO7rF/A+Fapvb+Hqz3SqREOFYuRtcZiH9FLlB1+yVgAgSiZRTqwUw0b+x0yA22eUVo22XvUdGhH9s+l4FkUUpB3aB6S/C6Qw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790758535916288.8090905850951; Wed, 30 Sep 2026 01:55:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBq5b-0001qJ-FU; Wed, 30 Sep 2026 04:54:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBq5Y-0001pY-80 for qemu-devel@nongnu.org; Wed, 30 Sep 2026 04:54:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBq5W-0002m3-KC for qemu-devel@nongnu.org; Wed, 30 Sep 2026 04:54:56 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-494-EKX4MwLJNGyXApSBrSgN4g-1; Wed, 30 Sep 2026 04:54:52 -0400 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-495689bfcc8so43326615e9.1 for ; Wed, 30 Sep 2026 01:54:52 -0700 (PDT) Received: from [192.168.10.48] ([151.49.232.249]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a015abd9ffsm40265525e9.2.2026.09.30.01.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2026 01:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1790758494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4zb6j5g3eap32rc7OHohtJSqR8TqT7I9O20j5+utjB4=; b=YZvhJ7jIkBceFpsuWl5BFG2AtsC7VIESdMbixhDwR5tpevXo/cg6/YKCHi/hMtgGyUW72X ivpZsrwPy2/Kt1RsaY/YN1/YXLuNEp2JQiS1cndV2Ie7faZUeQva83xxQC2VGFWrTKV/nH 1sjGGQPkcWyOzgKSg48YAUsIpWFOFzI= X-MC-Unique: EKX4MwLJNGyXApSBrSgN4g-1 X-Mimecast-MFC-AGG-ID: EKX4MwLJNGyXApSBrSgN4g_1790758491 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1790758491; x=1791363291; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=4zb6j5g3eap32rc7OHohtJSqR8TqT7I9O20j5+utjB4=; b=qPCl9LrGV5IE96SlGgfh9qjsLnRfN9jhXhDosl0R3ScZWc4ubsoeq+7qbeg9RjGGSU MUksPRe8d/LOTZrytP9L+3T+IynpfXIeIqiYPNHOK2qy1ylrPZZycmlCxgPc2t+QbqNU kBRRmPdTn1MRP5dYEmvmSTnXTplEhz0pWfP1hLKqaByWYHuVQuu1TzPOppebnxYP4KDK ZvOcQ9S5wjBkvcARlWtA6akB9u7FE2+U6cVN7qOWrM1ms4fSuUou9T0P+chEQXaN4ou1 1mbHDkU3EeMIKbpSfl1J9Pav8I1BIHzGExm/2HPa0dH6LBzgq2afl4jLHiQ4btce1tR3 mX4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790758491; x=1791363291; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=4zb6j5g3eap32rc7OHohtJSqR8TqT7I9O20j5+utjB4=; b=Fw8wJwZPOOG4OmhYQ5YPu8mHq43ig35uzhqhhPwzAkHUt2ODe5Q3qvyef+O2SIY3bp xPcGVfdmShLpEksJxJM6GmPTFmBZz87JA+cIE42bfZqdLztlOlZQiGYdtsEuQUsTnSrO b/X2xSrugVMsXlElrlr6amgdAI6URFv+/KV6hsAIglDt2EFCSkHMOxYJ7g66EYlCvmL3 NqAj3v9WgGYuK1pX/5BN2FtqGcUJs9oBkQO2Ix1HELD0BT+ugExiKgHZfPiuuG+zfMSz HsSkW/d4iwOLeVW4l5Snf0nXaPqQ+Ybyua9lINUvZekFxEcU8FK9WfX30bQtFQ6NzW/G RuJg== X-Gm-Message-State: AFuF++n7JulCMN/F9y+RVNOLHG3mtaxOwAoC8N5i+fwMaiX3GxmG7+DV DKeKZjwwjjjviN5mljQqHIAnFWnYsSA6FClqis4jeGlDgwNfn1etRRN5MII0uF1DA+KabXvsJ7y k9O7fdEr+cUgphv9misCjKjMJebD8mp1z2I/zzNj9cDTS7rOYOwTbilTjthWaXvu22yFguNeVtp MNpS+gYFrltHqW+stVWD+vyNKNky8kddkKfLJVv1bl X-Gm-Gg: AYBFou3LguisTZDtWGbRHl3TNdd+Sx6hxjYVb3iYLnIU6TlYSAcD7tRVU1oFh1JpH7O Gv7UAFYfsaFuPvGnuSC4rcJ748CASz7dF/icjZkQA3cHdF3kDfQJ3ygHrcZshP4004d6qPXhpO8 q+Rd5n1OuCGwB2t97/mb6v0wMkXKX+oTzn71ZDXxpi6/le5vmM0cU6h4BqXMKSCYKWRfHddXDUV wsfpP45s3Aa3kMUvri/UYNeBX7PqJvvTHJ4x6gmh9sQjUHv3UV+QOuqPygVl/3jtMnXnknYYycd +r/KJfdRcgTNv//xFhACA9Z2UK1CvE0wFHzZ283nxBL5N4TLjxGWi+myjd6ANiYV0jXIauIXosB jwZ+mQtCAmEDBQDuYUmYrzEGAcRxTtKzv/FXGI0fPKiKWmDObvWw/fWpzsizRE/KuirmWwzPEPW +iTlXv X-Received: by 2002:a05:600c:3486:b0:49d:1f32:c911 with SMTP id 5b1f17b1804b1-4a01ad8edccmr10791765e9.3.1790758491307; Wed, 30 Sep 2026 01:54:51 -0700 (PDT) X-Received: by 2002:a05:600c:3486:b0:49d:1f32:c911 with SMTP id 5b1f17b1804b1-4a01ad8edccmr10791435e9.3.1790758490910; Wed, 30 Sep 2026 01:54:50 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: "Michael S . Tsirkin" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alistair Francis , BALATON Zoltan , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Fabiano Rosas , Kevin Wolf , Peter Maydell , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/4] AGENTS.md: make the human part of the design process Date: Wed, 30 Sep 2026 10:54:33 +0200 Message-ID: <20260930085433.830743-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930085433.830743-1-pbonzini@redhat.com> References: <20260930085433.830743-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.341, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1790758536437158500 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Paolo Bonzini Acked-by: Michael S. Tsirkin Acked-by: Warner Losh Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Stefan Hajnoczi Tested-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 --- AGENTS.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 8c7407b908e..8e18709ee50 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -52,6 +52,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. =20 +The golden rule: **The human should know the alternatives before +implementation. ASK instead of choosing for them**. + ### Human must demonstrate understanding =20 Staying familiar with what's going on requires constant effort on part of @@ -72,6 +75,22 @@ In order to protect the project's scarcest resource, whi= ch 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 + possibly confirm the choice, rather than simply presenting the outcome. +- 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. =20 ### AI usage must be disclosed and/or pre-arranged =20 --=20 2.55.0