mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Antheas Kapenekakis <lkml@antheas.dev>
Cc: corbet@lwn.net, workflows@vger.kernel.org,
	linux-doc@vger.kernel.org, skhan@linuxfoundation.org,
	rdunlap@infradead.org, linux-kernel@vger.kernel.org,
	"kees@kernel.org" <kees@kernel.org>
Subject: Re: [PATCH] docs: add AGENTS.md as a symlink to README
Date: Sat, 26 Sep 2026 11:48:39 -0400	[thread overview]
Message-ID: <arfpV7IXRAHREMzO@laps> (raw)
In-Reply-To: <CAGwozwG0F88Ah8AEYf2u2BM-4bP+QnZe5p1qTFb4_H5acvaFkA@mail.gmail.com>

On Sat, Sep 26, 2026 at 01:12:33PM +0200, Antheas Kapenekakis wrote:
>1) Agents already read the readme. The canonical way to force load the

They didn't in my tests. Without AGENTS.md, neither agent opened README before
committing, and one of them added my Signed-off-by. Could you share how you
tested this?

>readme at least for claude is @README, not just README. Even so, the

With the symlink, README's content is loaded directly, so no @ import is
needed, and neither agent went on to read README's other pointers.

>readme is not tuned for agents and results in context bloat. You say
>that README is small, so it is ok. But it is not, it prompts the agent
>to read a lot of other useless readmes. [...]

It didn't in my tests either. With AGENTS.md pointing at README, one agent read
only coding-assistants.rst, and the other read that plus generated-content.rst,
which coding-assistants.rst references. Neither opened any of README's other
pointers.

> [...] Another issue is that you say
>that it is only read once, but that has not always been true and
>perhaps is still not true. The Claude harness used to append the

Every model call resends the whole context, so that applies to any AGENTS.md,
including a hand-written one. Either way, most of it is served from the prompt
cache.

>agents.md file before every message. Unsure if it still does, I do not
>use Claude. agent.md files should be specifically designed for agents
>and handwritten. Moreover, they usually need to be tuned for the model
>generation in general, if not the provider and model specifically.
>Which brings us to 2.

The rules README points to (DCO, Assisted-by, patch format) are the same for
every model. Personal and model-specific tuning belongs in a personal file.
Your sample shows why the shared part should come from the tree: it asks the
agent to add your Signed-off-by, which coding-assistants.rst says an agent must
never do.

>2) You are suggesting starting to track agents.md on mainline. This
>will make it so you dirty the tree of anyone that uses a custom
>agents.md when they switch to mainline for a submission which is a
>major annoyance. It'd be better to gitignore {agents,claude}.md on
>mainline. This would allow anyone that wants to commit theirs
>downstream to do so, while allowing them to copy their agents.md for
>mainline submissions.

Agents already have personal/override files to handle this.

We also already track .clang-format, .editorconfig and .rustfmt.toml on the
same terms. Ignoring AGENTS.md would leave users who don't write their own with
nothing, and a template has the same problem unless someone actually copies it.

-- 
Thanks,
Sasha

  reply	other threads:[~2026-09-26 15:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 13:49 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
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 [this message]
2026-09-26 17:54     ` Antheas Kapenekakis

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=arfpV7IXRAHREMzO@laps \
    --to=sashal@kernel.org \
    --cc=corbet@lwn.net \
    --cc=kees@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@antheas.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®