You would think git history should be the first thing an agent would look at, as they make so many mistakes before they get to the correct answer. They don't.
I haven't measured, but documenting bug fixes and architecture seems to help, along with TDD patterns, including integration tests.
I would probably add it to Claude.md to look for all of the above when tackling a new bug.