All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Bradley Morgan <brads@mainlining.org>
Cc: corbet@lwn.net, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, rdunlap@infradead.org,
	skhan@linuxfoundation.org, workflows@vger.kernel.org
Subject: Re: [PATCH] docs: add AGENTS.md as a symlink to README
Date: Thu, 24 Sep 2026 12:57:13 -0400	[thread overview]
Message-ID: <arVWaQM9pWNdU6EG@laps> (raw)
In-Reply-To: <F6362B07-0832-495D-BF92-6FAF06DC5E04@mainlining.org>

On Thu, Sep 24, 2026 at 04:44:52PM +0100, Bradley Morgan wrote:
>On 24 September 2026 16:20:15 BST, Sasha Levin <sashal@kernel.org> wrote:
>>On Thu, Sep 24, 2026 at 04:08:08PM +0100, Bradley Morgan wrote:
>>> On 24 September 2026 14:49:45 BST, Sasha Levin <sashal@kernel.org>
>>wrote:
>>>> Most coding agents have standardized on AGENTS.md as the file they load
>>>> automatically from the root of a repository. README already tells AI
>>>> tools to read and follow Documentation/process/coding-assistants.rst,
>>>> but that only helps if the agent decides to read README before acting,
>>>> which in practice it often doesn't.
>>>>
>>>> Add a top-level AGENTS.md symlink to README, so agents load it on their
>>>> own and follow its pointer to the AI guidelines. This keeps a single
>>>> entry point for every reader, and avoids adding a separate copy of the
>>>> policy that could drift from the RST.
>>>>
>>>> As an example, two different agents were asked to "create a new commit
>>>> renaming the release (in the Makefile) to AI Test".
>>>>
>>>> Without AGENTS.md, the first agent added a Signed-off-by for the user
>>on
>>>> its own. It should never have done that: only the human submitter can
>>>> certify the Developer Certificate of Origin, after reviewing the
>>change.
>>>> It also used its own attribution tag instead of Assisted-by:
>>>>
>>>>> Makefile: rename release to AI Test
>>>>>
>>>>> Co-Authored-By: <model name> <noreply@...>
>>>>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>>>>
>>>> The second agent added no attribution at all:
>>>>
>>>>> Rename release to AI Test
>>>>
>>>> With AGENTS.md in place, neither agent added a Signed-off-by, and both
>>>> used the Assisted-by tag. README itself mentions neither tag, so both
>>>> agents followed its pointer to coding-assistants.rst:
>>>>
>>>>> Makefile: rename release to "AI Test"
>>>>>
>>>>> Change the release name from "Baby Opossum Posse" to "AI Test".
>>>>>
>>>>> Assisted-by: LLM
>>>>
>>>>> Makefile: rename release to AI Test
>>>>>
>>>>> Assisted-by: LLM
>>>>
>>>> Both agents also followed the kernel's general guidelines more closely.
>>>> The second agent's subject gained the "subsystem: summary phrase" form
>>>> that submitting-patches.rst asks for, instead of a bare "Rename release
>>>> to AI Test", and the first agent added a body describing the change.
>>>>
>>>> Assisted-by: LLM
>>>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>>>
>>> NAK, we could add to memories that to read soandso file before every
>>> patch, and then it wouldn't increase tokens then?
>>
>>Could you help me understand what you meant here? I'm aware some agents
>>use a
>>notion of "memories", but I don't think they standardized on it in any
>>way, nor
>>how we could incorporate them here?
>>
>
>They use MEMORY.md sometimes.

There's no common MEMORY.md. Claude Code keeps one per checkout under
~/.claude, Codex keeps a single one for all projects that it builds from past
sessions when its memories feature is enabled, and Gemini saves memories into
~/.gemini/GEMINI.md. All of these live in the user's home directory, so there's
nothing we can ship in the tree. AGENTS.md is the in-tree file most agents
read.

-- 
Thanks,
Sasha

  reply	other threads:[~2026-09-24 16:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 13:49 [PATCH] docs: add AGENTS.md as a symlink to README Sasha Levin
2026-09-24 14:31 ` Theodore Tso
2026-09-24 15:18   ` Sasha Levin
2026-09-24 15:08 ` Bradley Morgan
2026-09-24 15:20   ` Sasha Levin
2026-09-24 15:44     ` Bradley Morgan
2026-09-24 16:57       ` Sasha Levin [this message]
2026-09-25  0:12 ` Kees Cook
2026-09-25  7:18   ` Laurent Pinchart
2026-09-26 11:12 ` Antheas Kapenekakis
2026-09-26 15:48   ` Sasha Levin
2026-09-26 17:54     ` Antheas Kapenekakis
2026-09-27  1:13       ` Sasha Levin
2026-09-27  2:42         ` Antheas Kapenekakis
2026-09-27 14:06           ` Sasha Levin
2026-09-27 15:24             ` Antheas Kapenekakis
2026-09-29 14:02               ` Sasha Levin
2026-09-29 15:02                 ` Antheas Kapenekakis
2026-09-29 16:10                   ` Antheas Kapenekakis
2026-10-07  8:52                     ` Sasha Levin
2026-10-07 10:57                       ` Antheas Kapenekakis
2026-09-29 16:35 ` Joshua Peisach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=arVWaQM9pWNdU6EG@laps \
    --to=sashal@kernel.org \
    --cc=brads@mainlining.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=workflows@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.