From nobody Sat Sep 26 20:01:53 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=1789977208; cv=none; d=zohomail.com; s=zohoarc; b=Y/ugNZO2fJZxY0a9eMgvazbu6qYqwXNZNfJIyXjHDNwZM7Z80gnWmmz0Aus5UW3UQ65rbFlEh2/WchhiZwUUqhgRYEx/uBrsBEKcYl51Si2+NRbFHpeAwK7QETZDOTfE/VYHZDKEJRgXhKR4/my2HW1mx7QImDGQT8KzGcWSvDE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1789977208; 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=6GGviedUFLzmeISAKIb8uLwsSE9nfKH2z4XabjFWPHE=; b=Buj7YYp93+H53+ZoTnfeoSD8BRWJGTcS+W2TTeBFuY51BgKVNGX4fr3GyKGKR5/ADR0rpYRQCIUplN+WiaCO3AniusOu5Alm2oktzikkA3jv0F6UhWV/tur6h5qzjYTdemtjHxLAARNCt9+zsoIfR5+2qxXZDvHnda0ZLl7d8j0= 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 1789977208746122.54306362509146; Mon, 21 Sep 2026 00:53:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x8Ypm-00082q-3b; Mon, 21 Sep 2026 03:53:06 -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 1x8Ypk-00082B-5Y for qemu-devel@nongnu.org; Mon, 21 Sep 2026 03:53:04 -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 1x8Ypg-0006uE-Pf for qemu-devel@nongnu.org; Mon, 21 Sep 2026 03:53:03 -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-498-4jDLWTIlMhyQ5OSFy0Y_Mw-1; Mon, 21 Sep 2026 03:52:58 -0400 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-490a767b782so21230885e9.2 for ; Mon, 21 Sep 2026 00:52:57 -0700 (PDT) Received: from [192.168.10.48] ([151.49.232.249]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fc7cba562sm205872785e9.2.2026.09.21.00.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 00:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1789977179; 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=6GGviedUFLzmeISAKIb8uLwsSE9nfKH2z4XabjFWPHE=; b=CyLzRv60qNzuYyCpwUYH2sPU1j3fb4Zt9OzaK95BD506cm7vA7ASbyFCW6IvCVFI2UY0oP T7xO1E2gounMAqP/ypoTLrDa9yy6ylc44ublEeYR/SCoaJl98gOlOzmW2ALsNg6PQo2yKm HpIzj0lEeLfkBw5eMp3AMpG6bK0oLmw= X-MC-Unique: 4jDLWTIlMhyQ5OSFy0Y_Mw-1 X-Mimecast-MFC-AGG-ID: 4jDLWTIlMhyQ5OSFy0Y_Mw_1789977177 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1789977176; x=1790581976; 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=6GGviedUFLzmeISAKIb8uLwsSE9nfKH2z4XabjFWPHE=; b=aAxOjmYQ7B0t9E56hqfrdenEAGgHUFoZhZC+rD5AYsqqX3ompMG0fC2chr4BbxxiwG mXEIC9ajDNU4M9HcjSAS8dkdu3BKwxCXMvEjUbD7bm4XwWmioWcctW8UIPYS+kPesf/a TaWe8UgOCQ0656AqlZ0bWKLKLuoR0pERRo/aXB1j1oRnXX/5P7Og5WHnB6qWSyDxsm5D 8F7JpDSyWRb9IvYqw4bmR/XbGJW8HbsxZpfT0q/vI0NLAc5inxegY6QT7mJRG0iYIinE PkMkjbSCUJqR+hr5o5rNVXn+IoYhPOOXcqsss7F8l9ey0r5KhPX6iOE/xylWimvLpnLs IZqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789977176; x=1790581976; 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=6GGviedUFLzmeISAKIb8uLwsSE9nfKH2z4XabjFWPHE=; b=O9zYz1JhZS1UFGTOu1q75wDqbm/d0ZaRXBWylWBn/RvcuKwfUNVyIzKxRhd9VU0jIg WBCAZimg82XKlfWiroqSAbJVYrgfEW+Jru3ZDZwdbWNtixZyxKKY/gT3jmGQ85Eq32Hx I4+IzIaHSuMtZMsL391dQHyUHoCgDMR/3uaNWsa2iYYw0Pf3bum05f/DVr1ZwyobXJiL 62yDd0FghrRaZsCMc9nuH07bsWyDB0w7fho0tfErsEQNxPGkBgI5neWacq8SzR03IdC8 kztAXN+YgI8L8c9D79gZMJcVguyhDuEQN3vX/iJ/bRQA63A22vxPmrHxg9x4BgO0YZDN GSdw== X-Gm-Message-State: AFuF++llOwu7dbZK0Sg5PQsuDCK2E82fcrpaacvA16W3rd5jY4uvyabA zZEl5pkQMrSxn7U1OjDUGfr3I0D/gam50mUjAIBk51lLCYSKekYuuGXVZATlPgzWShf7K4fNL3X UqyHeZI3li/V4qgbPXsE5RgdH6k8ygDRDz8BDERK2pqHOX2mk6zkaoOUon3jU8JSN49x+v9YUUj ugYXisudJYFdpCwVnV13Q7YRbjW8y4XEPOTXACF5Ga X-Gm-Gg: AYBFou3K/Jm6aOb+GdR/NnBQMZsg2fnaTg73hpXiPYGO/O9F8xXhoB2YNqNPtz/rYCO dyZKm5dZLG2v9pyPWYiuoJ4J1zx/hqq9NyuFfSVBFXDEGoYqkiKzsz1Cf+6lAUBTXwhAWL7UBbP b+s/tGsCvhSu8m9LXgPxbbGuuT3JLORAgy+O3AkLn4XLwScZyBhbdX15vE1yTjepzjzBiBDv71/ YKDtYZtEsAO3z987lnJEWTWkberuZ6pHCJ3IQTMvkFsYfdQiprjy2kasd2oOCxh7Ng/sWV7Ge4r Z/BzzNM4es9SHL6Vd2RDtYlbJxBAhQL0SoxbZbDiir0W7ENRAaZHfrybcOQss/3NJBNEQuPFQdk pY7Py2rYQvwGO3g5zdIW81poNRyk0ewMnXj1/8pJstilUyosGxu9yeHSqOweEm8dk6SFj1HfZlI ZCE3cP X-Received: by 2002:a05:600c:1c01:b0:49c:fc6e:a3d7 with SMTP id 5b1f17b1804b1-49fc5753eb2mr171394275e9.22.1789977176560; Mon, 21 Sep 2026 00:52:56 -0700 (PDT) X-Received: by 2002:a05:600c:1c01:b0:49c:fc6e:a3d7 with SMTP id 5b1f17b1804b1-49fc5753eb2mr171393725e9.22.1789977176028; Mon, 21 Sep 2026 00:52:56 -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: Mon, 21 Sep 2026 09:52:48 +0200 Message-ID: <20260921075251.12831-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921075251.12831-1-pbonzini@redhat.com> References: <20260921075251.12831-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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: 1789977210214158500 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 Reviewed-by: Alex Benn=C3=A9e --- docs/devel/code-provenance.rst | 71 +----------- docs/devel/index-process.rst | 1 + docs/devel/llm-usage.rst | 202 +++++++++++++++++++++++++++++++++ AGENTS.md | 42 ++++--- scripts/checkpatch.pl | 5 +- 5 files changed, 241 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..972436828a6 --- /dev/null +++ b/docs/devel/llm-usage.rst @@ -0,0 +1,202 @@ +.. _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. + +The QEMU project does not want to introduce restrictions on the tools +that contributors use for their work on the project. However, +the increasing prevalence of AI-assisted software development, +and especially the use of content generated by `Large Language Models +`__ (LLMs), +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 roughly +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*. + +.. 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) `. + + Since a submitter cannot audit LLM output against its training + data, the DCO is paired with :ref:`metadata in the commit message + ` about AI-generated parts. The DCO still certifies + that the contributor has the legal right to submit code in gener= al. + +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: + +- 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 issues 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. + +LLM-assisted and LLM-created contributions +'''''''''''''''''''''''''''''''''''''''''' + +Use of generative AI tools for code contributions generally falls into +four buckets: + +- "background" assistance, such as completion and code review. This does + not need disclosure, however you are expected to examine and understand + any code or any changes produced by the tool. + +- 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; in particular, you are still expected to + :ref:`understand and explain your changes + ` and the rationale behind them. + +- "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 changes than for purely human-written code. + +.. _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: + +.. 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..2fa4b4686cf 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 Sat Sep 26 20:01:53 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=1789977217; cv=none; d=zohomail.com; s=zohoarc; b=KSb+qwjTjy45rWvOoj0EuIncWLiFPHV8G8jCn01IpH2LVPCpFIFLUhT0WYFShS5jvupR694XrI3+JUc0s9+XiCGzydHdJxVq/2ny87URdKDEldhh5RQ+oiJSR9FEoo6ui+YS5K/6wiOA7XNFj4LFLOT0v+8fEkTLPS2ZP+KaO2w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1789977217; 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=FqvmX3jAR+WbEO41R1004W3OhvIKtOL2PHmfUKjewwQ=; b=eOs2+BVaMErDxhgdDjttdpLxdz7zuLM6P4qxeUgG1/ZLeWoidMh8lgkIcHaVCU/jDJ/s/VvvFD0fxpX7UpxoiqHqa2zakV7YyAVvNGMwLKOt0sBcJBdvaIW/hhgh5wKeIZrOm3MlnEKaGqdSnnTylV2QL2I9WU6gaps4ZcjtmEE= 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 1789977217104755.7671651712137; Mon, 21 Sep 2026 00:53:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x8Ypl-00082Y-3t; Mon, 21 Sep 2026 03:53:05 -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 1x8Ypk-00082C-6S for qemu-devel@nongnu.org; Mon, 21 Sep 2026 03:53:04 -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 1x8Ypi-0006wS-Md for qemu-devel@nongnu.org; Mon, 21 Sep 2026 03:53:03 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-443-ZMA_eRULNhOJC1MKfaMCBQ-1; Mon, 21 Sep 2026 03:53:00 -0400 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-49cdc4080ddso14699455e9.1 for ; Mon, 21 Sep 2026 00:52:59 -0700 (PDT) Received: from [192.168.10.48] ([151.49.232.249]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fcd10d174sm220592825e9.11.2026.09.21.00.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 00:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1789977181; 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=FqvmX3jAR+WbEO41R1004W3OhvIKtOL2PHmfUKjewwQ=; b=BNv+TDQFTedjWdT+dAjS/LrS76A4OZ42s5rsQTS1Y3nvwWuUPG74Z4sTlxUw8RlYast1Th JVuDvZ9ITsl9te/HCQHpPApshUkofd6Rsiai0zz3tD7RyvXn6q1UWWpaZjNPURzFtgXn72 xlBe7Ov70iHdp/9hozEVKJWyfZsnhYs= X-MC-Unique: ZMA_eRULNhOJC1MKfaMCBQ-1 X-Mimecast-MFC-AGG-ID: ZMA_eRULNhOJC1MKfaMCBQ_1789977179 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1789977179; x=1790581979; 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=FqvmX3jAR+WbEO41R1004W3OhvIKtOL2PHmfUKjewwQ=; b=mqUTToL6eZGMdsnKooqoyugOu8S+MGgWZ+9h7tiJtZ3p3AmR7K+eCg2lXJJcYYVRfl ek4E4+QWsjQz7rg697s8yFofqDJUGrmB8gDpb+gIeyIsSak1FN50d8DcLpOTo872UnGQ RE5OQ5Zqq1QiWNz53GR7xt2PzxW/QpEZfH1u+WY6vQDS7XmMMVh7FLc2EiZ9OD3BOpdX zzYpG4blhtqhc96uA2hTf0wyhO1/2lEpmlMSYe1ToHuThHSpxLoWq1MnICYa0TTwGm8Z 2ehNVvy9NMEJavkw25+4x5EPnSn1twXWxEgHYTEJC/EGPQJshw7ejdJNKnOhx1ZyM3S1 MNRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789977179; x=1790581979; 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=FqvmX3jAR+WbEO41R1004W3OhvIKtOL2PHmfUKjewwQ=; b=D5ui7vO21yTPbjRUwDLXk2UZefPTkVnAbqBfJlcNvHzEL+2/kiQj6gkg0kKnelTttR p2CPDfr4Yyv0wyjjo+C0wg/RglMZBzY3icd4Fsb5VEIUNOXEywCirjvUzOEhsAD8AnLr GeptobsJKtQK+aQCmJ3p114p3Zr1ibqT/EHY+XCe2ObsOj3A7buS6Ct8g2KaKI9LOx5Z +VqOJgx/cXpaLZSee4OmjP87Tox21+dlJv8LPE2q5qbh3bp6HV9JXw1zHP8GAgssCp8N qrTqRx/VEAnMLUEnZOzJL5RbcFPXE6OnuO2OnRoJG3rUr7ivzhiP4nD8VaJaIgcSbGiO GeEQ== X-Gm-Message-State: AFuF++nw2AjqUc89+GTqTfQrwOX4FM2Pfm3y56qL+ICkgQN/zKEFmZ7e IEZIT5VYdu2u1uQghOXz1B+tuSVP4o2pySRmcGgXI3qWUMr2bac0eOrMMlKcaem5JHRRkm8WtyS Hi72EX+PaR+j6doWaWg6dRNzWlFpfBeMDB4DYw0vpLdgFKCKwA2T8hx0XZM+B/pY5NsYPgRvu0Y rT1wR6j4lOPn8qlMztyJgbf9S0SEnIuAor6FEtnInr X-Gm-Gg: AYBFou2hO9gEDYgwW2u9v5zyT4EyuRZ7B4XVNz2EJ9uivLDDXZey66g1JOTOEXsl6HT KqyXIWncyMU0YE3puJVMCTbSYvkOYTVxYsRaSdbLSEG7u9HOyRZ7u1xcyRafOnEyL+GvfijcRje bwOVc3bNXdW05rgOclIHi0JpJj9KILnlAfWD72fXo9TsH+3o1TrjlsmPEXHpQqd5zO+aRtR9qrC mkSnKBQ2I9bySknC1bJdm4dQ30l2yJHMLOl3zque78PNF7fa70cbLwEohPkxHzx9ZbxWYzarBk9 WrQvHWFZW6U/bIWATH1GGxTxKS/g0AZt9iK5BclfZNdaVz5qcA7Cqx2Zdfpmpajoz452iZib0GU 0tijzDlnu1fSm+mCNHIjM1iZChm+B6ieOfIkgoCKR/bq9ES3HCJJ6mgey1caRjfA7wcz3Ttp4dR KDagrt X-Received: by 2002:a05:600c:1d06:b0:49e:8222:3451 with SMTP id 5b1f17b1804b1-49fc5001358mr153421905e9.14.1789977178874; Mon, 21 Sep 2026 00:52:58 -0700 (PDT) X-Received: by 2002:a05:600c:1d06:b0:49e:8222:3451 with SMTP id 5b1f17b1804b1-49fc5001358mr153421495e9.14.1789977178442; Mon, 21 Sep 2026 00:52:58 -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: Mon, 21 Sep 2026 09:52:49 +0200 Message-ID: <20260921075251.12831-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921075251.12831-1-pbonzini@redhat.com> References: <20260921075251.12831-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.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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.01, 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: 1789977218777158500 Content-Type: text/plain; charset="utf-8" Based on GStreamer, applies to both the old and new policy (and can be dropped independently, too). Signed-off-by: Paolo Bonzini Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Daniel P. Berrang=C3=A9 --- AGENTS.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 2fa4b4686cf..478748ab72e 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 Sat Sep 26 20:01:53 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=1789977235; cv=none; d=zohomail.com; s=zohoarc; b=GzNJyzxCmzMzI57JQfSnF/uiKUS9nWe+LCNiToxvUL3+is8zF3ooW7zCf3FzAs4stGloLSe69Oc8GEilL8Re0mVetTeXLtZllDn9SuZC3gCpAM+5/dF7wCVj0ABd7HI4saQFBgZ0mWoiITvo1jVh46QdzpQaqR0VFvzlRfZ+Te0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1789977235; 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=J0NpkFQ4lsdmmwjOYIOXYzyJK9s9YVVPNghbWm7dcCw=; b=VkWS4jIzUjhZY7t8s2LrSu/thEfhFzbB/iWxlJ1f7bx+Zmgik/xpMmhc7YnvlxLrkyNuo6q/tFUODBGOZq/8xJDpdPZ7dOQevkC1NignqPUMAv6QYhEPIcgH8aXj7+FvloQ35B7zej0QHID+VFXn4iDHXgfG3L2mr3U9jZ3Nic0= 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 1789977235118275.3971609528337; Mon, 21 Sep 2026 00:53:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x8Ypu-00083f-Pv; Mon, 21 Sep 2026 03:53:14 -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 1x8Ypt-00083N-Gh for qemu-devel@nongnu.org; Mon, 21 Sep 2026 03:53:13 -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 1x8Ypr-00071Q-B6 for qemu-devel@nongnu.org; Mon, 21 Sep 2026 03:53:13 -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-451-69HD6Hn4N9i9mckwJpeULA-1; Mon, 21 Sep 2026 03:53:08 -0400 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-486f9d150c3so1028940f8f.3 for ; Mon, 21 Sep 2026 00:53:08 -0700 (PDT) Received: from [192.168.10.48] ([151.49.232.249]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48724583250sm20800470f8f.22.2026.09.21.00.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 00:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1789977190; 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=J0NpkFQ4lsdmmwjOYIOXYzyJK9s9YVVPNghbWm7dcCw=; b=WaXRbLyRLqpqcazVHzXJ2S+oa+r609pbVaGdUFjSZ4XGzPShMgxHbijN8s/jZF/X3+8xNK 4szIp6/MpQz/oIcoSfiG7uCkQGBUHJPKl+rR/K1Q/HxncSW/gAZEEPbJMgUO4k8a/H6L8B 4xalrO+tdxQRtH6WhcEuYk/ZylCxvkQ= X-MC-Unique: 69HD6Hn4N9i9mckwJpeULA-1 X-Mimecast-MFC-AGG-ID: 69HD6Hn4N9i9mckwJpeULA_1789977187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1789977187; x=1790581987; 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=J0NpkFQ4lsdmmwjOYIOXYzyJK9s9YVVPNghbWm7dcCw=; b=gXAot/0ZpkQ0WBjruSGScUS9MXi0XmbIAxpyT7KLxnYhDZFtl2f1ZSAOmkeDYJ1FYv 5zdy201GLSomqTKGX1/mypKx6hYngIV/Ku7eXvqxshdKpj8Mac7S+I5WNoQcF78b77vC XKZccIdxcFZDNT5a1thHRlC3lmIXOjJxrHt/H4DHWyDCeO8w+VxGUfL2ARPMiZ0KXlYt HwE5cI1xOOrGCaqqo5vJpJxOMtadOjlpXGxma6CP0/LAh9i9Ays0FmNcCyunp2Kb+GDW yJzeswTirr42kwREok8vNODaXaqDQwIQoZQhDb5Bsd1IRq2Ep7uKaD+l77O25DvHsZ7W F0uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789977187; x=1790581987; 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=J0NpkFQ4lsdmmwjOYIOXYzyJK9s9YVVPNghbWm7dcCw=; b=qV/Czra7I+dENVJdOW6atZXZXlOLd5K9TUwf2e8WB+15xJKnE1eVpHAucR9HRI9Sn1 P+pkdfcU8KDLaoCSewp4QKiucPhEBrAzgBc71CoooHgMpQDkcct0BQ2vItjKqmMjvjWV zAnBN78jgEVr3PBqSaEA/NTutwsv055Fr7ShKUr6u0rE2xWIXCyt/dHxC48rnY2Urz/B ee5lUHnCZ3EmCHO0TVOmXHI3R16vX6Xdk3eJlkI3/NLAkrvmvHHOVb0wp+yafYIKYu4i 0JFsCHodgyDLVfEk8Fjx285dskfhhFaWodC4Oz2J/QB9Q/NEV5+oVHy6iFg8fFdS6sn/ yybA== X-Gm-Message-State: AFuF++ntZOZZu5kFUyvjs2HBVFlXpcl++Ix5J9sV7raLutrlIuZduQ2A kJlj7jIyImGWZ0e+PukiZn7R4DMuROesQxk4jzuDiDitpW7VX02IBPnqqBs4Oj+On6OLlbQDpj4 847ibSEJxy+aNyrHMgMc5C50/vYviTZT9jMVpndJteEXx/vawHP0Dzl/2drIcmhhsFg89WxntiB aJlqPXJfk/ouz9fQb1oz/XFLNiePibgQN9B8dFyhwl X-Gm-Gg: AYBFou3+rb/2nnDKtDHIiqAqLDcGpHTYxhMWjrb1koNaS1gGc3nN3Q5rPcT3JSnDI5K cbLmyUoq1UrW5j+NQRdQG4/ervrE7Ximf8cROhBA5zivrJfskF6jdc3zPxw14uTBhUqUOCjlBbz hHHpcgMB0rIjhWGmlKpbaLu6hB7loEvGngkTg993lG9voLEka06S+Zr0RzXi91cv3LIFkSXimc2 dcryJ0trfSI1brpM+FT98Qd/hBN55s2YXphDF0qhmwl6qo5XgM/H1Jmy2EnZ4RNpL+pJdp+6uxc qnWkji2x2VG8l1goWeaIbw4DkoUx9shrG5vLti8TpBO4RZLLYUWditQqP2CQ2Uh179Dk7NikWu4 Zd2K0TEmsDJPaXWZpem3JMTYsr9rlvnG3ZhkqvSd+SsjDt82qMQwq03YIvnA7x3nNMXW5bjccDu daztJA X-Received: by 2002:a05:6000:4903:b0:486:f301:11df with SMTP id ffacd0b85a97d-4871e20cffcmr12375202f8f.6.1789977187386; Mon, 21 Sep 2026 00:53:07 -0700 (PDT) X-Received: by 2002:a05:6000:4903:b0:486:f301:11df with SMTP id ffacd0b85a97d-4871e20cffcmr12375160f8f.6.1789977186795; Mon, 21 Sep 2026 00:53:06 -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: Mon, 21 Sep 2026 09:52:50 +0200 Message-ID: <20260921075251.12831-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921075251.12831-1-pbonzini@redhat.com> References: <20260921075251.12831-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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.01, 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: 1789977236341158500 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 --- AGENTS.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 478748ab72e..816ba7646c1 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 Sat Sep 26 20:01:53 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=1789977230; cv=none; d=zohomail.com; s=zohoarc; b=ZdGvRcNnn67ArHYxn8Uq3bVsm0ESUaYqbTYckFEiMjnm2IAayXDu2hjASg37BKU6W9n67hJ7QaQCpUUXjegLtDCVwMbeAgaRaXqEQNHqwy/7qPgR+5JoywQm//SiHMwgiMmxQu1R/LHYAvyK8mSKAWvXvCk8af1A+9QxWOnq3x0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1789977230; 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=wnh7DOAB5IFUlWjBOen90LfFp13TtVsUBEpXEZu5ozI=; b=c1GEA0/ns5sxhbx2WR2TYwC14cMOAA56SkyRZr5Fw3nEqwm8hzBrotHHHpxbN+rqCb9ZgrgwJzn0auxlpKoSZol9Ai7i4H7irvpJs0RXFsDI4zQRfJQn7p41YsecM9T0U1bNqhDEJnFeTVS/8CidGGeHLB+d3/T8wzyG2yoK6QA= 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 1789977230853395.2936045071309; Mon, 21 Sep 2026 00:53:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x8Ypx-00084P-5R; Mon, 21 Sep 2026 03:53:17 -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 1x8Ypu-00083g-T8 for qemu-devel@nongnu.org; Mon, 21 Sep 2026 03:53:14 -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 1x8Ypt-00071U-98 for qemu-devel@nongnu.org; Mon, 21 Sep 2026 03:53:14 -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-567-SqcD0o03MSaEm8Tnml0KTg-1; Mon, 21 Sep 2026 03:53:10 -0400 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-49cd83ca361so28930855e9.1 for ; Mon, 21 Sep 2026 00:53:10 -0700 (PDT) Received: from [192.168.10.48] ([151.49.232.249]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fcd0eab91sm228887375e9.1.2026.09.21.00.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 00:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1789977192; 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=wnh7DOAB5IFUlWjBOen90LfFp13TtVsUBEpXEZu5ozI=; b=eLrip6ZK5ilKjyfHaYN0kdjeRwu0ZXI2+8KWlBJ2Wuow0Q92NuG4ZbjEd9p0CjmmBhwKGX naMjVhWosWQMsjw0sJeDY0mTtkdoRrdtF2EU8pvs3IggYT6HZB/+4OKa8JPbXty4hqFHR8 1NTlESztowPY+xGpentkv1Pfq7/cc4I= X-MC-Unique: SqcD0o03MSaEm8Tnml0KTg-1 X-Mimecast-MFC-AGG-ID: SqcD0o03MSaEm8Tnml0KTg_1789977189 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1789977189; x=1790581989; 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=wnh7DOAB5IFUlWjBOen90LfFp13TtVsUBEpXEZu5ozI=; b=WYWtzVCOiVi+M+039WWDiuYIdllqAfiVU4I6dQZuSUoxpryYoIR7vlub/Er2Ywmekq 1QHvkzUtVMKC73zcZ6v11KtDuyAFjcxCPRVpANOpoUOOdtmyo5sraF0SYEmAFNgZdb9l OND67Zh7E21dlsl3t/oJtDGto6nisP5JNM6+HlpB59F9XshB35VOnp5DZ0DT+1SYg+f7 f2V8K+xPzkncDMF0caLMo6ry/wiFohsl2PgQSvUxuOVxJRtSd6h5jcFSIjW497A07aIP xfPzHRF7q8mkgmLYhLmBkpIPQZDxz7lJgHpCmmmIQcFw/pYLDnDDdM0TC6fpESjp3822 dASA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789977189; x=1790581989; 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=wnh7DOAB5IFUlWjBOen90LfFp13TtVsUBEpXEZu5ozI=; b=oNHVF5yN9c8dMFcyKBuFZMcoN6lvkF/LVVi7s+G7Q8IsMW4Kcn11Y1rhm2NmNyhnsR bvrKGpARgrT8c4S/yoj0111YAwdJ/oDbvEplc0+k3OZR7vIQ1RR7Acua2R9k7i4fqJba XCKE46KHb0rlspsqaQ6puzflXcaM4mF8bfu1Iu96KG3ccWxMCcE03UIRo7LL8BYKlReK 8dmotruw9zOfH7OVkIMaVDoWqaMNziZcjdo656dyYX9psreIFvRcsygw4L+Q9GsPi5s8 FE3FHaC5R3RVvKAAZyLR0xQcAedd0C8k4kPfKi4KFCCmkjcp3Nbl2cbKvWXyaEsbyTjL gLwA== X-Gm-Message-State: AFuF++l4APTm5WpfK/xcxzTlgqS/fRClNf7lnAigLBMQpOeynOG5Lhcq aVFTkSoXY1cFqFF9o6v1hw79x7k60Jpe1s/6gzh/qAO54VrVay7Nkz68XyP0+RgeU2JILyPyFin 1fX8+J12iV/quUi4eHjYU7ljHZ+zlt2mdMpBNfm2EDpsrQU8cV3ySYl/7T7GIU+e6ZsaR7CDRDt Mmak70Ew4Wf9To0+gy1Llw8Sa29nfcJBsJ0Ty7v+GZ X-Gm-Gg: AYBFou0AVRagBhSb08eV16fb6mW96grHFlVAEYWZ0kWdy9ygkdIeTzxswY1LelAxty7 GlbpnWY6XauzCILqST6yeMjOpNw0u//b3g+D0sq5FYi05hOPoz8RUkaYJTheuy2qrRnWgcFqxow WbHScwmEQw1a8GSqgVRyuGFJXxET3X3km40l6d4wOFFLqS9uXxQPrb/Ur/cyoH5jsuWNitrScBb kZOPEZl39b/afzVrIgqE9NhT3lJvO2KI6/eXMeT4mo4XNJIOZi29ke2hLj5EUO09YoiN4JWsu5S 0IEJlPPytF6JhLU9gUYZlDFUAjOkFAcXz77ah4uTk7M3QJl96z2vC8awXrsgGc7RgwYFeMCVELC +Q4t5NHvPDpQ7QndJ5Zl2bmAqalMcPLg030T069Ss9DY0MdhpLKRhRv7lQEDFqNECqmVIw+LpRF VxRD05 X-Received: by 2002:a05:600c:3b82:b0:49f:ce72:dfe7 with SMTP id 5b1f17b1804b1-49fce72e040mr99349305e9.35.1789977189301; Mon, 21 Sep 2026 00:53:09 -0700 (PDT) X-Received: by 2002:a05:600c:3b82:b0:49f:ce72:dfe7 with SMTP id 5b1f17b1804b1-49fce72e040mr99348705e9.35.1789977188850; Mon, 21 Sep 2026 00:53:08 -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: Mon, 21 Sep 2026 09:52:51 +0200 Message-ID: <20260921075251.12831-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921075251.12831-1-pbonzini@redhat.com> References: <20260921075251.12831-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.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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.01, 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: 1789977232559158500 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 --- AGENTS.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 816ba7646c1..cb3e6087ee0 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 before 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