Lgit (llm-git)
The Semantic Source Control System for the AI Era. Traditional Git tracks what changed; llm-git tracks why it changed — capturing the prompts, intents, and models behind every code evolution.
Architecture
Why llm-git?
In an era where a large share of code is AI-assisted, messages like "fix bug" aren't enough. You need to know:
- Which prompt led to this specific logic?
- What was the intent defined by the user?
- Which model (GPT-4o, Claude, Gemma...) was used?
- How did the prompt evolve over branches?
llm-git answers these by treating AI metadata as a first-class citizen in the version control DAG — turning the repository into a searchable knowledge base of AI interactions.
Under the Hood
DAG, not a linear log
Commits are nodes in a directed acyclic graph connected by parent links. Branches diverge and merge like git — but each node also carries the intent, prompt, and model that produced it.
SHA-256 content addressing
Every snapshot is hashed into an immutable object ID. Identical content always maps to the same hash — the storage layer auto-deduplicates and every reference is cryptographically verifiable.
Semantic store
AI metadata is persisted alongside topology, so you can later answer "which prompt produced this code?" by walking the DAG — not by grepping commit messages.
Rich terminal UX
CLI output is rendered with rich/click — tables, trees, and colored diffs, with a React dashboard companion for visual exploration.
Command Reference
| Command | Purpose | Semantic Flags |
|---|---|---|
| ./lgit init | Bootstrap a semantic repository | — |
| ./lgit add . | Stage the working tree into a snapshot | — |
| ./lgit commit | Persist a snapshot as a DAG node | --intent · --prompt · --model |
| ./lgit branch | Fork the DAG (parallel prompt experiments) | — |
| ./lgit checkout | Move HEAD, restore snapshot | — |
Core Workflow
# Track an AI-assisted change with full semantic context
./lgit init
./lgit add .
./lgit commit -m "Implement Auth" \
--intent "Add JWT security" \
--prompt "Write a Python login script using JWT" \
--model "GPT-4"
# Test different prompts in parallel realities
./lgit branch experimental-prompt
./lgit checkout experimental-prompt
./lgit commit -m "Attempt recursive approach"