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