Lore: Repurposing Git Commit Messages as a Structured Knowledge Protocol for AI Coding Agents

2026-03-16Software Engineering

Software EngineeringArtificial Intelligence
AI summary

The authors explain that when developers use AI tools to write code, important reasons behind code changes often get lost. They call this lost information the Decision Shadow. To fix this, the authors propose Lore, a simple way to add extra notes to code commits using git itself. Lore captures decisions, alternatives, and checks without needing new software, making it easy for both humans and AI to understand code history better. They also compare Lore to other methods and test how well it works.

AI coding agentssource codecommit messagesgit trailersdecision recordscode diffsinstitutional knowledgesoftware version controlCLI toolsoftware engineering
Authors
Ivan Stetsenko
Abstract
As AI coding agents become both primary producers and consumers of source code, the software industry faces an accelerating loss of institutional knowledge. Each commit captures a code diff but discards the reasoning behind it - the constraints, rejected alternatives, and forward-looking context that shaped the decision. I term this discarded reasoning the Decision Shadow. This paper proposes Lore, a lightweight protocol that restructures commit messages - using native git trailers - into self-contained decision records carrying constraints, rejected alternatives, agent directives, and verification metadata. Lore requires no infrastructure beyond git, is queryable via a standalone CLI tool, and is discoverable by any agent capable of running shell commands. The paper formalizes the protocol, compares it against five competing approaches, stress-tests it against its strongest objections, and outlines an empirical validation path.