RFC: add AGENTS.md - #21924
Conversation
|
Good idea and good content already, thanks for that.
I think claude code is the only tool which insists to not support the https://agents.md/ convention, it seems Google, Github Copilot, Windsurf, OpenAI Codex have implemented it. There is even documentation around this proprietary behavior: https://code.claude.com/docs/en/memory#agents-md Hence I suggest to also create a CLAUDE.md file with the only content
Sounds fine, even if those lines will be part of every prompt context.
I don't have a strong opinion on that.
I didn't find an obvious violation of our (unwritten) project pratices, hence it's such a good idea to finally agree on common accepted practices ;) |
AI-assisted contributions arrive with a recurring set of problems the existing docs do not speak to: commit series where only the final commit compiles, which leaves git bisect useless, and patches written by inferring an API instead of reading the page that documents it. The conventions are not new. They are collected from the Developer's guide, dev-doc/ and the existing history into the file name that most coding assistants read by default. Two wiki corrections are folded in: .clang-format and tools/beautify_style.sh no longer exist, having been removed in 46b054c and b734b01. Related: darktable-org#21881
Claude Code reads CLAUDE.md and does not pick up AGENTS.md on its own. The `@AGENTS.md` import keeps the conventions in one file rather than duplicating them, and a one-line pointer works where a symlink would not, such as checkouts with core.symlinks disabled.
3d1c4b3 to
55fb335
Compare
Added. |
|
Thanks @andriiryzhkov, LGTM. To allow for customization, maybe you could add |
@masterpiga - How will agents behave if this file is mentioned but does not exist? Will they process it correctly and not consider it an error? If everything is fine, I wouldn't add an empty file to the repo because it just looks a bit sloppy. |
|
The last line in |
|
@masterpiga : The core idea is that Is similar multi-layer approach something you can adopt? |
|
Sure, I am adaptable. I thought that it would be nice to have a way to make it easier to integrate specific developer instructions, but if it's controversial just forget about it 👍 |
I don't think it is controversial and it is a right place to discuss it. But I never saw such extensions so far and majority of AI platforms have support for instructions on different levels - project, user, etc. I probably need to check better instructions layering on different platforms and I will come back with more educated opinion and maybe suggestions on that topic. |
As I mentioned before, I don't feel strongly about it, and I wouldn't want you to waste your time on it. It's just that AGENTS.md is the only almost-standard way to instruct agents on a specific project. If I want to use different agents for the same project with a different/additional set of instructions (but the same instructions for all), I have to create N separate instruction files (or N symlinks), one for each agent/platform, and then add them one by one to |
Related: #21881
This is a first pass at the
AGENTS.mdidea from the bisect RFC. It is meant as a starting point for discussion, not a finished policy – if the consensus is that we don't want this file at all, that's a fine outcome too.Why
We're getting more AI-assisted patches, and they go wrong in the same few ways. The one that hurts most is the bisect problem from #21881: a series where only the last commit builds. The others are familiar – an API inferred from its name instead of read, a claim that something works when it was never run, a diff with half the file reformatted around the actual change.
None of that is addressed anywhere an agent will look. The Developer's guide and
dev-doc/are excellent, but nothing points an assistant at them, andAGENTS.mdin the repo root is the filename most coding tools now read by default. So this is mostly a signpost with the sharp edges called out.What's in it
The rules aren't new – they're collected from the Developer's guide,
dev-doc/and what the history already does. Where I couldn't find a written rule I measured the tree instead of inventing one, which is how the commit-message and comment sections ended up the way they did.Two things in it contradict the wiki, and I think the wiki is wrong:
.clang-formatandtools/beautify_style.shdon't exist any more (removed in 46b054c and b734b01), but the guide still points people at the script.What I'd like feedback on
AGENTS.mdthe right name? Some tools want their own filename; a symlink or a short pointer file could cover those.Fixes #Nin commit messages because the history does it, but if maintainers would rather close issues from the PR only, that should change.Written with AI assistance. Every rule in it was checked against the tree or the history before it went in, but that checking was done by the same assistant, so a second pair of eyes on the specifics would be welcome.