All modern agents currently read
AGENTS.md as the initial point of custom instructions. Claude sometimes ignores it, but usually doesn't.For almost a year, I've had the following in my
AGENTS.md:# Lessons learned
When automated checks don't pass, when I correct execution, ask to do
things in a specific way, or instruct in any way meaningful to make a
process from it, write it down in as less words as possible into
`docs/lessons.md`. Refer to it when planning execution.
So far I have 50 lessons written down, and it really helps agents make fewer mistakes.
Some examples that were added:
1. Treat full-suite OOM as a product bug; isolate the test and fix the leaking/reentrant path instead of accepting a memory-limit workaround.
2. Apply UI translation label changes to every locale that owns the key.
3. Prefer built-in framework handlers over custom logging handlers.
4. Include units in timeout/duration constant names.
5. Remove unproven defensive UI fixes when backend handles the real failure.
6. Fix invalid frontend payloads at the source; do not normalize them server-side.
7. Audit final diffs against the target branch; exclude unrelated hunks.
#ai #llm #agents #lessons