Re: How should we handle using AI for reviewing commits?

From: Sasha Levin

Date: Thu Mar 12 2026 - 13:01:49 EST


On Thu, Mar 12, 2026 at 12:45:09PM -0400, Theodore Tso wrote:
We recently used an AI review bot while applying an LTS backport to an
internal kernel tree at $WORK. While doing the review, it flagged a
set of concerns which resulted in my creating a patch[1] to address
the issues that it found in the kernel commit.

[1] https://lore.kernel.org/all/20260310122806.1277631-1-tytso@xxxxxxx/

In this commit there is no LLM generated output in the code, but there
*is* LLM generated output in the commit description, since I quoted
the concerns raised by the LLM. Per the our new coding-assistants
process document[2], "When AI tools contribute to kernel development,
proper attribution helps track the evolving role of AI in the
development process. Contributions should include an Assisted-by tag..."

[2] https://www.kernel.org/doc/html/latest/process/coding-assistants.html

When I was considering whether I should add something like:

Assisted-by: Gemini:Gemini-3.1-Pro [TOOL]

There was a couple of things that came to mind. First, should we make
some kind of distintion between exactly how the AI tool assisted in
the development of the commit? There's a big difference between using
an AI assistant to find a potential issue, to an AI assistant which
created new code out of whole cloth, with a spectrum of changes in
between. Given that the stated code was to "track the evolving role
of AI", it occured to me that perhaps we should add some indication
about exactly what was the nature of assistance that was provided.

Why not use Reported-by for these? We already use it for tools (like syzbot),
so this would just be a natural extension.

Reported-by: Gemini:Gemini-3.1-Pro

The second observation that I had was that example set of tools for
[TOOL] was "specialized analysis tools": coccinelle, sparse, smatch,
clang-tidy. I assume the intent was if an AI bot started using tools
like sparse, coccinelle, as an agent?w

Yup, both that as well as just space to list additional tools that the human
used too without adding multiple Assisted-by: lines.

If there is a set of LLM prompts which has a name, would that also be
appropriate for TOOL? Chris Mason's repo has a fairly non-descriptive
name, "review-prompts", but in the future when companies start making
their internal review prompts public, some of them may have more
evocative names that might be more unique and more marketing friendly. :-)

Something like:

Reported-by: Gemini:Gemini-3.1-Pro # https://example.com/my-magical-prompt

?

--
Thanks,
Sasha