ILP: Intent Lineage Protocol
A CLI tool for tracing the 'why' behind code. Built it in a day, and it immediately became non-ideal.
Starting point: trying to build the perfect programming language
It started in early February with a single question.
In 2026, when AI can write code, what should humans actually be writing?
My first answer was: a programming language. A new language optimized for the AI era, one that could express intent and specification. Type systems, contracts, formal verification. I wrote eight design documents and defined the grammar in PEG.
But midway through, I realized something. What humans should be writing isn’t code. It’s chains of decisions.
Git records what changed. It doesn’t record why you decided that. In a world overflowing with AI-generated code, it’s not the quantity of code but the quality and traceability of decisions that holds value.
So I changed direction. Instead of a programming language, I’d build a protocol. One that formally records the chain from intent to implementation, traceable at any time. That became ILP.
How it works
You write .spec files that describe the hierarchy from intent to specification.
intent "Why the e-commerce site needs checkout" {
@id intent:checkout
Enable users to purchase products
}
spec calculate_total {
@id spec:calc-total
@links intent:checkout
fn calculate_total(items: List<Item>) -> Money
example "Empty cart is 0" {
calculate_total([]) == Money(0)
}
requires { items.all(|i| i.price > 0) }
ensures { result >= Money(0) }
}
Each element is identified by @id and linked to its parent via @links. This builds a Intent → Spec → Code DAG (directed acyclic graph).
What it can do
| Command | Function |
|---|---|
ilp check | Static analysis of .spec files (duplicate IDs, broken links) |
ilp lineage | Trace upstream/downstream from any element |
ilp generate | Generate test code from spec examples/properties |
ilp verify | Run tests → compute confidence levels |
ilp drift | Detect divergence between spec and code via git history |
ilp retroactive | Reverse-generate spec scaffolding from existing code |
I also built an LSP server and an MCP server. Editor diagnostics, and Claude can read/write specs directly. Written in Rust, 11 subcommands, 30 test cases. I even did self-hosting — describing ILP itself in .spec files.
Built it all in one day.
What I realized the day I built it
The moment it was done, something felt off.
Writing .spec files by hand contradicts the speed of AI.
Things that get decided in an instant during an AI session — you then have to manually transcribe into .spec files. The tool meant to solve “AI is too fast for humans to keep up” was actually adding manual work for humans.
Meanwhile, tools like CLAUDE.md and Cursor Rules were each inventing their own context management. The dual-maintenance problem of specs vs. implementation runs deep. What I’d built had become non-ideal the moment it was finished.
Pivot: from “write it down” to “it just gets captured”
What was actually needed wasn’t a tool for humans to write specs. It was a system where intent gets recorded automatically.
- Auto-extract intent and decisions from AI conversation logs
- Auto-capture context via hooks like git commit
- Auto-generate and update specs from code changes
- Humans don’t write — they just review and approve
ILP’s core insight — traceability of intent — was right. What I got wrong was the method: “humans write it.”
Lessons learned
Any system that demands extra work from humans has the same flaw in the AI era. Only things that “just get captured” and “work transparently” will survive.
This principle influenced the design of this site too. The mechanism where content is automatically generated from daily records is a direct application of what I learned from ILP.
ILP’s assets
ILP itself is no longer ideal as a “manually write .spec files” tool, but its components carry forward.
.specparser and AST → reusable as an output format- Lineage DAG → relationship management for auto-captured intent
- Drift detection → usable as a change trigger
- MCP server → entry point for AI-side invocation
Source code is available on GitHub. Written in Rust, dual-licensed MIT/Apache-2.0.