AID-45Recommended
Save lessons in the repository instead of chat
When an agent learns something about the project, save it in the repository, where every future session and person can see it.
How to do it
Chat history and an agent's own memory notes disappear, stay on one machine or differ per tool. Put lasting lessons in the instructions file, a decision note or a check. Review memory files like code, because a wrong memory repeats the same mistake. Save each lesson in the docs it changes, as Change the docs in the same pull request says.
How to check
Each lesson from the last month's reviews appears in the instructions file, a decision note or a new check.
Sources
Related rules
- AID-7 Keep one task per session in AI-assisted development
- ENG-29 Change the docs in the same pull request in Engineering
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/lessons-in-repo">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.