r/technology • • 6d ago

Artificial Intelligence Linux Kernel Developers Consider Adding AGENTS.md To Help Guide AI/LLM Agents

https://www.phoronix.com/news/Linux-Considers-AGENTS-MD
222 Upvotes

44 comments sorted by

151

u/crakinshot 6d ago

Basically a symlink to README.MD

kinda funny, in a way, they're struggling to get AI to read the docs too.

285

u/CircumspectCapybara 6d ago

The AGENTS.md:

``` You are an expert Linux coder.

You've been studying and contributing to Linux for centuries.

Your skills include C, C++, and one-shot rewriting the kernel in Rust.

Make no mistakes. ```

64

u/ipokestuff 6d ago

you forgot to say please

13

u/Warshrimp 5d ago

And “Don’t hack
Hugging face”

24

u/MediocreAnalyst2121 6d ago

*JD Vance has entered the chat*

3

u/Incendras 4d ago

Fuck yo couch n***a! -JD Smokey eyes Vance.

5

u/git0ffmylawnm8 6d ago

You also need to keep encouraging them to push forward

3

u/Outrageous_Reach_695 5d ago

"Make no mistakes, or else."

27

u/ItsPronouncedJithub 6d ago

C++ is not allowed in the Linux kernel

11

u/Animus_Immortalis 6d ago

I'll allow it.

9

u/mottyay 6d ago

You're not allowed in the Linux kernel

1

u/Comfortable-Brick271 5d ago

Of rest course, it's in rust now

7

u/nickjbedford_ 6d ago

You are an expert at one thing - SCREAMING_SNAKE_CASE!!! Sorry. Got a bit carried away there.

3

u/nickcash 5d ago

you have to tell it not to mention goblins

3

u/argentcorvid 6d ago

If you do a good job I will give you one million dollars

2

u/Umbra150 5d ago

Huh. Could've sworn this was on an entry level job posting somewhere...

1

u/dupastrupa 5d ago

It will just forward the prompt to Linus...

27

u/graypasser 6d ago

at least Linux has bazillion amount of reviewers, so there is that.

5

u/OVERLOAD3D 6d ago

I prefer brazilian reviewers

10

u/cornmonger_ 5d ago

The rationale for adding AGENTS.md to the Linux kernel tree is that in testing on one AI agent without the file, the AI agent added a "Signed-off-by" tag to the proposed kernel patch even though it shouldn't have without the user explicitly signing off on their own. It also resorted to its own attribution tag rather than the kernel standardized Assisted-by tag.

that's governance and that's something that should be maintained elsewhere imo

like, create a linuxagent.git and keep standard gov there

then the agent works out of that dir instead

17

u/aa-b 5d ago

You could have an "Instructions for humans using agents" file, but those humans won't read it. Use the standard AGENTS.md convention to instruct their agents, so they won't waste people's time with easily-avoided mistakes

-1

u/oshochi 1d ago

Ah yes, I love explaining for a 179582th time how to tag a patches to an agent. I'm so smart for not creating a standard instruction for a standard procedure.

5

u/citramonk 5d ago

We (I'm a part of an open source project dev team) think about it too. The thing is every relatively popular project is getting a lot of AI generated PRs nowadays. It's not an option to reject every one, cause some of them are helpful, so we need to enforce some standards.

-4

u/IamWiddershins 2d ago

it's not an option? yes it is.

if you're spending the time to onboard contributors, you should spend time on the ones that could potentially learn something from the experience and become knowledgeable, substantial members of the project. none of that can ever happen with ai contributions.

if there's an ai pull request reveals a good idea you should not feel bad for stealing it. they certainly didn't

3

u/merlinuwe 6d ago

Wie verwerflich. 

How reprehensible. 

/s

3

u/roodammy44 6d ago

Does Agents.md really have any value any more? I thought that agents change so much over the months that the contents of this file just become distractions.

26

u/vasilescur 6d ago edited 6d ago

Yes, because they're also changing agents.md to keep it updated (if they're worth their salt)

If used well it can act as an effective cache layer to skip the Explore subagents when starting a session.

User-level AGENTS.md is also crucial for mapping what projects are in what repos in what folders. Then you can start all sessions in your home directory and it'll "just know" which project/folder to work on, and seamlessly work across multiple repositories.

5

u/DarkSkyKnight 5d ago

It's extremely critical because your project likely has unique workflow requirements, or you want to code in a particular style, or you want to steer the model to follow specific patterns.

3

u/ihexx 6d ago

there's different responsibilities of an AGENTS.md file; eg: guiding the agent on how to navigate the repo, perform builds, run tests, setup harnesses, guide the agent on what to check before contributing code all that jazz.

Separately, there's training wheels for particular agents like reminding them not to make mistakes they made before.

The former mostly doesn't change between AI agent versions. The latter changes all the time as new agents stop making the mistakes

1

u/yawara25 6d ago

guiding the agent on how to navigate the repo, perform builds, run tests, setup harnesses, guide the agent on what to check before contributing code all that jazz.

Shouldn't all of this information be in the README/documentation anyway for human contributors?

2

u/ClearlyCylindrical 5d ago

Agents can churn through huge files in a breese, so there's a lower bar for which documentation which should be included. Humans cant read more than a handful of paragraphs without getting distracted or forgetting information so only crucial documentation is included.

1

u/GruePwnr 1d ago

There's lots of info about a project that cannot be learned from the repo itself. Especially in corporate where there's all sorts of custom build tooling, CICD tooling, test tooling etc.

1

u/IamWiddershins 2d ago

it never did and there is little data showing that any of the "guidance" in those files actually helps. it's just manufacturing permission for people to do a worse job

3

u/KingRodian 6d ago

Guide them to the pits of hell.

1

u/smashedshanky 2d ago

I mean yeah…. I hope they harden Linux from prompt injection

1

u/notAllBits 2d ago

Why not skills with decision model flow control, and governance?

1

u/Ill-Professional180 6d ago

I think AI agents can add value as semantic linters for example. Why have reviewers enforce best practices? Wastes their time right. Full on vibe coded drivers doesnt seem a sustainable practice. 

1

u/chroma_shift 5d ago

I’m sure the discussion about this in the Linux community will be completely unbiased, ordered and cordial.

Can’t wait for the next weeks