Code provenance: tracing a line back to the session that wrote it
git blame names the person who ran the agent. Provenance for agent-written code needs the session, the model, the instruction and the reasoning, attached to the change and surviving refactors.
Provenance is the ability to take a line of code and recover how it came to exist. With human-written code, git blame plus a pull request is usually enough. With agent-written code the blame line names whoever ran the agent, the commit message was written by the model, and the conversation that contains the reasoning is gone.
What has to be captured
- The session: one identifier covering the run that produced the change.
- The agent and model, with version.
- The instruction: the goal the session was given, in the words it was given.
- The intent: what the session said it did, recorded before the commit.
- The human: who ran it, and who reviewed it.
Capturing it is the easy half. The hard half is keeping it attached when the code moves.
Why line numbers lose it
Attach provenance to a line and it survives until someone reformats the file. Attach it to a symbol, keyed by the structural identity of the function rather than its position, and it survives moves, renames and reformatting, because the identity comes from a content hash of the node rather than from a location. That is the difference between provenance that decays over a quarter and provenance that lasts.
Two things people confuse
| Attribution | Provenance | |
|---|---|---|
| Question | Who or what wrote this? | How did this come to exist? |
| Answer | A name | A chain: instruction, session, change, review |
| Use | Credit and accountability | Understanding and audit |
Attribution alone tends to produce arguments about whether a commit trailer should name a model. Provenance answers the question people actually have six months later, which is why the code is like that.
In practice
Aura records the session, agent, goal and intent with each change, keyed by symbol, so selecting a function in the app shows the session that produced it and the reasoning behind it. The record is stored in the repository, so it clones with the code rather than living in a service you might stop paying for.
See also: making the record tamper-evident and checking the intent against the change.
What is code provenance?
The record of where a piece of code came from: which session produced it, on what instruction, under which model, and what it was checked against. For human code the author is usually enough. For agent code the author is the person who pressed enter.
How do you tell which AI agent wrote a line of code?
git blame gives you the person who committed it, which for agent work is whoever ran the session. Attributing it to the agent means recording session identity at commit time — nothing recoverable afterwards will tell you.
Why is git blame not enough for AI-generated code?
It answers who committed, not who wrote or why. One developer running four agents produces four sets of changes under one name, from four different instructions, with different amounts of review. Blame flattens all of that into a single identity.
What does provenance let you do that history does not?
Answer questions after the fact without archaeology: which changes came from unattended sessions, what instruction produced this function, which model wrote the part that broke. Those are ordinary compliance questions and history has no field for any of them.
Aura Crew vs Claude Code Loops: the autonomous work-loop, compared
Claude Code defines four loop types — turn-based, goal, time, and proactive. Aura Crew is the same idea productized: a dependency-ordered work-loop with proof, collision-safety, and any agent. Full comparison.
Autonomous coding agent loops, explained: turn-based, goal, time, and proactive
A coding agent loop is an agent repeating cycles of work until a stop condition is met. The four types explained — turn-based, goal-based, time-based, proactive — with when to use each and how to keep quality high.
How to run multiple coding agents in parallel without merge conflicts
Running several AI coding agents at once collides on shared files. The fix: a worktree per agent, a live team radar, and soft-to-hard zone claims so parallel agents never touch the same symbol. How Aura Crew does it.
Goal-based agent loops: giving a coding agent a definition of done
A goal-based loop keeps a coding agent iterating until a success criterion is met. The trick is a deterministic definition of done — tests, a score, a proof — not an LLM guessing at "good enough." How to write one.