Imagine you walk into a massive, ancient library. The shelves are packed with books (the code), but if you pick one up, the pages only show the final story. They don't tell you why the author chose that plot twist, what other endings they considered, or why they decided the hero should wear a hat instead of a helmet.
Over time, the library becomes a "legacy" mess: the books work, but nobody knows the logic behind them. If a new writer (or an AI) tries to fix a story, they have to guess the original intent, often making mistakes because the "why" is missing.
This paper, titled Lore, proposes a simple but powerful fix for this problem in the world of software and AI.
The Problem: The "Decision Shadow"
The author calls the missing information the Decision Shadow.
- What we have: A record of what changed (e.g., "I fixed the login button").
- What we lost: The why (e.g., "I fixed the button because the old one crashed when users clicked it twice, but we couldn't use a faster solution because of security rules").
Right now, when AI agents write code, they are great at generating the "what," but they are terrible at remembering the "why" for the next person. They leave the library with the same missing context, making the problem worse.
The Solution: Lore (The "Time-Travel Note")
The author suggests we stop treating the Git Commit Message (the note attached to every code change) as just a simple label. Instead, we should turn it into a structured decision record.
Think of a Git Commit Message like a time capsule or a sticky note left on a specific page of a book.
- Current State: The note says, "Fixed the typo."
- Lore State: The note says, "Fixed the typo. Why: The old spelling confused the search engine. Rejected: We thought about changing the whole word, but that would break old links. Warning: Don't change this back, or the search will break again."
How It Works (The Magic Trick)
The genius of this idea is that it doesn't require building a new, expensive database or a complex new system. It uses a feature that already exists in every software project called Git Trailers.
Imagine these trailers as standardized tags at the bottom of your note:
Constraint:(The rules we had to follow)Rejected:(The ideas we tried and said "no" to)Directive:(Instructions for the future: "Don't touch this!")Confidence:(How sure we are this is right)
Because these are just text tags, any AI agent or human can read them instantly using a simple command line tool (like a search engine for the library's notes).
Why This is a Big Deal
The paper compares Lore to other solutions:
- vs. Architecture Decision Records (ADRs): ADRs are like separate, heavy encyclopedias kept in a different room. They often get out of sync with the books. Lore is a note inside the book, so it can never get lost or outdated.
- vs. AI Summaries: Current AI tools just summarize what changed. Lore captures the reasoning that was never in the code to begin with.
- vs. Heavy Infrastructure: Some ideas suggest building massive "knowledge graphs" (complex digital brains). Lore is like using a pencil and paper instead of building a supercomputer. It's free, instant, and works everywhere.
The "Agent" Advantage
The paper argues that this is perfect for the future of AI coding.
- Humans are busy and often forget to write these notes.
- AI Agents are tireless. They can automatically generate these rich, structured notes every time they write code.
- Future Agents can read these notes to understand the "rules of the game" before they start working, preventing them from making the same mistakes the previous agent made.
The Bottom Line
Lore is a proposal to stop throwing away the "brain" of the software development process. By turning simple text notes into structured, machine-readable instructions, we create a self-healing library of knowledge.
It turns the software history from a silent movie (where you only see the action) into a documentary with commentary, ensuring that the "Decision Shadows" are finally illuminated, so that both humans and AI can build better software, faster, without losing their minds.
Get papers like this in your inbox
Personalized daily or weekly digests matching your interests. Gists or technical summaries, in your language.