AI coding agents are becoming good enough to touch real codebases.
They can refactor files, write tests, change architecture, move logic around, and sometimes modify more code in ten minutes than a human would in an afternoon.
That is powerful.
But it creates a new debugging problem.
Git can tell you what changed.
When an AI agent was involved, you often need to know something deeper:
- Why did this change happen?
- Which prompt caused this line?
- Which model produced it?
- What files did the agent read before writing it?
- What later changes depended on this agent action?
That is the problem I wanted to solve with Causari.
Causari is a local CLI for intent-addressable code.
It records AI agent actions as causal events: prompts, models, reads, writes, diffs, reasoning, cost, and relationships between actions.
The goal is simple:
Git tracks bytes. Causari tracks intent and causality.
Repository: https://github.com/croviatrust/causari
Website: https://causari.dev
The problem
When a human developer changes code, there is usually some context.
A commit message.
A pull request.
A ticket.
A discussion.
A design decision.
With AI coding agents, the workflow is different.
You ask something like this:
Refactor the auth flow and add JWT refresh logic.
The agent reads files, makes assumptions, writes code, maybe fixes tests, maybe changes something unrelated, then moves on.
At the end, you have a diff.
But the diff does not tell the full story.
A suspicious line appears in auth.ts.
Git can show when the line appeared.
But Git cannot answer:
which prompt produced this exact line?
what completion did it come from?
did the agent read the right files first?
was this part of the original request or an accidental side effect?
if I revert this, what downstream work am I also undoing?
That gap becomes bigger as agents become more autonomous.
The more work agents do, the more we need provenance.
Not only code provenance.
Intent provenance.
The idea: intent-addressable code
Causari treats an AI agent action as something that should be traceable.
Not just as a Git diff.
But as an event with cause and effect.
An event can include:
- the prompt
- the model
- the files read
- the files written
- the diff
- the reasoning or message
- token and cost information
- the causal relationship with previous and later events
So instead of only asking:
what changed in this file?
You can ask:
why does this line exist?
Example:
re why src/auth.ts:42
Or:
re trace src/auth.ts:42
Or:
re impact <event-id>
This is the core of Causari.
It is not trying to replace Git.
Git is still the source of truth for version control.
Causari sits next to it and answers a different question:
Git answers what changed.
Causari answers why the agent changed it.
Capturing provenance without trusting the agent
One thing I did not want was a system that only works if the AI agent politely reports what it did.
That is fragile.
Agents forget.
Tools differ.
IDE integrations are inconsistent.
Some agents expose hooks, others do not.
Some workflows happen through proxies, some through local tools, some through editors.
So Causari has multiple capture paths.
1. re proxy
Causari can run as a local OpenAI-compatible or Anthropic-compatible LLM proxy.
re proxy
Your agent sends requests through it.
Causari sees the prompt, completion, model, tokens, and cost as they pass through.
The request still goes to the provider.
The difference is that the interaction becomes part of a local causal ledger.
2. re watch
Causari can also watch the filesystem.
re watch
When files change, Causari records snapshots and diffs.
Then it tries to connect the code that appeared on disk with the completions captured through the proxy.
If a completion generated a block of code, and seconds later that same code appears in a file, that is a causal fingerprint.
The provenance is no longer only a self-report.
It is observed from two independent streams:
LLM traffic + filesystem changes
3. re hook
Where an agent exposes lifecycle hooks, Causari can capture more directly.
For example:
re hook claude-code
This allows native capture from the agent runtime when available.
So Causari can work in layers:
proxy capture
filesystem capture
native hook capture
The more signals available, the more precise the provenance becomes.
What you can ask Causari
Once actions are recorded, you can query the causal history.
Some examples:
re why src/auth.ts:42
Show what produced a specific line.
re trace src/auth.ts:42
Show the upstream causal chain behind that line.
re impact <event-id>
Show the downstream blast radius of an agent action.
re lens src/auth.ts
Render a file with per-line provenance annotations.
re find "JWT refactor"
Search prompts, messages, reasoning, and events.
re bisect --test "npm test"
Find which agent action broke the build.
re churn
Measure how much AI-generated code survived versus got rewritten.
re report --open
Generate a local report or dashboard.
This is the part I find most interesting.
With normal version control, the unit of analysis is usually the commit.
With AI agents, the more useful unit may be the agent action.
A single commit may contain 30 agent decisions.
Causari tries to make those decisions inspectable.
Why this matters
At small scale, this may feel like overkill.
If you ask an agent to write a small helper function, maybe you do not care about causal provenance.
But as soon as agents start making larger changes, the workflow changes.
Debugging regressions
A test breaks after many AI-assisted edits.
Instead of reading chat logs manually, you can ask which agent action introduced the break.
re bisect --test "npm test"
Reviewing AI-generated code
A reviewer sees a strange line.
Instead of asking "who wrote this?", they can ask:
re why path/to/file.ts:120
And inspect the prompt and context behind it.
Understanding downstream risk
Before reverting an AI action, you can ask:
re impact <event-id>
Because later changes may depend on that action.
Measuring wasted AI work
If an agent writes a lot of code that gets rewritten shortly after, that matters.
Not only because of cost.
Because it may reveal bad prompts, bad context, bad model choice, or bad workflow.
re churn
This makes AI coding work measurable in a way that normal Git history does not.
Local-first by design
Causari is built as a local developer tool.
The ledger lives in your repo under:
.causari/
The goal is not to send your code or prompts to a third-party dashboard.
The goal is to make the agent activity around your own codebase inspectable locally.
Causari is written in Rust and uses content addressing for events.
The repository describes it as:
intent-addressable code for AI agents
That phrase is important to me.
Because I do not think the future of AI coding is only "generate more code faster".
I think the next problem is:
Can we understand, verify, replay, and debug what the agent did?
Skills: turning verified work into reusable experience
Causari also has an experimental skill layer.
The idea is that completed, verified work can be distilled into signed reusable units.
re skill distill
A skill can contain the task, the steps, the files changed, and the outcome.
Then it can be exported:
re skill export <id>
And verified later:
re skill verify
This is still early, but the idea is important:
Agents should not repeat the same mistake forever.
If a repository already has a verified solution to a class of problem, the next agent should be able to recall that experience before acting.
Not as vague memory.
As signed, local, inspectable provenance.
A small example
Imagine this prompt:
Add JWT refresh logic that rotates tokens every 24 hours.
The agent modifies auth.py.
Later, you inspect a line:
re why auth.py:42
Causari can show that the line came from that prompt, which model produced it, and which event introduced it.
Then you can ask:
re trace auth.py:42
To see the upstream context.
Or:
re impact <event-id>
To see what later work depended on it.
That is the workflow I want:
not only code review,
but intent review.
What I am looking for feedback on
Causari is still young, and I would love feedback from developers who are using tools like:
- Cursor
- Claude Code
- Cline
- Windsurf
- Aider
- Continue
- other agentic coding workflows
The main questions I am trying to answer:
- Would you use provenance/debugging like this in your AI coding workflow?
- Is "which prompt caused this line?" a problem you already feel?
- Should this live mostly as a CLI, an IDE extension, an MCP server, or all of them?
- Is the
re proxy + re watchcapture model practical enough for real developers? - What would make you trust or adopt a tool like this?
Closing thought
AI agents are starting to write and rewrite real software.
That means our tools need to evolve.
Git gave developers a way to track changes.
But AI-generated code needs another layer:
intent
causality
provenance
impact
replay
That is what I am trying to explore with Causari.
If this problem feels real to you, I would love your feedback.
What would you want from a tool like this before trusting it in a real codebase?
Repository: https://github.com/croviatrust/causari
Website: https://causari.dev
Top comments (0)