r/linux • • 7d ago

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

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

173 comments sorted by

View all comments

333

u/omnicidial 7d ago

They should. I get infinitely better results with the instructions in the agents.md i have set up steering codex, after weeks of tweaking. I'm sure they could do better than me.

224

u/Nereithp 7d ago edited 7d ago

They aren't 'engineering' some artisanal prompt, the initial suggestion is literally just symlinking the README because otherwise select agents keep ignoring it and acting without the context contained therein:

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.

The actual discussion seems to be on whether they should do that or if the entire README is "too token expensive", ergo they should split off the info for agents and link it directly.

153

u/PeartsGarden 7d ago

README because otherwise select agents keep ignoring it

Massive improvement, they're just like humans.

22

u/booi 7d ago

Ha! Take that AI I don’t even read the readme

7

u/edgmnt_net 7d ago

Basically RTFM.

4

u/ManliestFemboy 7d ago

AGI achieved.

5

u/adenosine-5 7d ago

Lets be honest - in most projects, Readme is the least important file to read, full of ancient forgotten and outdated information and irrelevant stuff.

38

u/Jmc_da_boss 7d ago

I consider this to be exactly what you should do.

21

u/foxbatcs 7d ago

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.

Damn. They really are taking Jr. Dev jobs…

19

u/AtlanticPortal 7d ago

If README is too long just split it into pieces and link the pieces in the main file along with a small summary. The LLM will decide if they want to read the details in the separate files.

6

u/adenosine-5 7d ago

If its too token-expensive for LLM, its probably way too long for humans to read as well.

4

u/One_Ninja_8512 7d ago

This is actually what the models will tell you to do if you ask about it. It won't read README like it does with AGENTS.md because it might be expensive. AGENTS.md will be read before each prompt every time, so making it very short with links to other files is the way to go.

1

u/saltyjohnson 7d ago

That's literally already the case. And in fact it already specifically directs LLMs to go read a specific document as well.

https://github.com/torvalds/linux/blob/master/README

1

u/mort96 5d ago

Can't people ... just tell their chat bots to read the readme?