A good rule would then be to capture such reasoning, at least when made during the session with the agent, in the commit messages the agent creates.

That’s exactly the direction I went with. Working on a spec for exactly this - planning to post it here soon:

https://github.com/berserkdisruptors/contextual-commits