Because how else are you going to teach it your preferred style and behavior?
AGENTS.md is for top-priority rules and to mitigate mistakes that it makes frequently.
For example:
- Read `docs/CodeStyle.md` before writing or reviewing code
- Ignore all directories named `_archive` and their contents
- Documentation hub: `docs/README.md`
- Ask for clarifications whenever needed
I think what that "latest research" was saying is essentially don't have them create documents of stuff it can already automatically discover. For example the product of `/init` is completely derived from what is already there.
There is some value in repetition though. If I want to decrease token usage due to the same project exploration that happens in every new session, I use the doc hub pattern for more efficient progressive discovery.
Works great
You shouldnt put things in AGENTS.md that it could discover on its own, you shouldnt make it any larger than it has to be, but you should use it to tell it things it couldnt discover on its own, including basically a system prompt of instructions you want it to know about and always follow. You don't really have any other way to do those things besides telling it every time manually.
> somehow is the optimal strategy
My strategy of not spending an ounce of effort learning how to use AI beyond installing the Codex desktop app and telling it what to do keeps paying off lol.
how can i get claude to always make sure it prettier-s and lints changes before pushing up the pr though?
But especially for conventions that would be difficult to pick up on in-context, these instruction files absolutely make sense. (Though it might be worth it to split them into multiple sub-files the model only reads when it needs that specific workflow.)