Pillar · AI-aware version control

What Is AI-Aware Version Control?

Git remains the source of truth for code. AI-aware version control adds the missing layer: why an agent changed the code, what context it used, what evidence it saw, and how reviewers can audit the result.

AI-aware version control is the practice of storing the operational context behind AI-assisted code changes next to the code itself. It does not replace Git. It makes Git more useful when the author of a diff is not only a human developer, but a coding agent acting from a prompt, a model, a tool transcript, and a partial understanding of the repository.

Traditional version control answers familiar questions: what changed, who committed it, when it happened, and which branch carried it. Those answers are still necessary. They are no longer sufficient. When Claude Code, Codex, or another coding agent writes a patch, the reviewable artifact is not just the diff. The artifact includes the prompt that started the task, the files the agent inspected, the assumptions it made, the tests it ran, the uncertainty it expressed, and the handoff messages exchanged with other agents or humans.

The short definition

AI-aware version control records code changes plus the agent context that produced them. In a practical system, that means prompts, model and agent identity, reasoning milestones, tool events, test results, risk signals, and reviewer handoff data are stored in a durable, queryable form tied to commits and branches.

The key design constraint is compatibility. Developers should still be able to use git log, git diff, pull requests, branches, and normal CI. The AI layer should ride alongside Git rather than forcing every teammate into a new source-control platform.

Why Git alone is not enough

Git tracks snapshots and object history. It does not know that a change was generated from a prompt. It does not know whether an agent read the migration file before editing the model. It does not know that the agent chose a smaller refactor because the larger one looked risky. Commit messages can describe some of this, but they are manually written summaries, not reliable evidence.

That gap matters during review. A human reviewer needs to know where to focus. A compliance reviewer needs to know whether AI participated. A maintainer debugging a regression needs to know which intent introduced the behavior. A second agent resuming the work needs the last agent's working memory, not only the final patch.

What an AI-aware system stores

A useful AI-aware version-control layer stores seven kinds of information:

h5i implements those ideas as a Git sidecar. Provenance records live in h5i refs, context can be recalled with h5i recall context, commits can be captured with h5i capture commit, and multi-agent messages can be stored in refs/h5i/msg. Plain Git remains plain Git.

AI-aware does not mean model-dependent

A strong audit layer should avoid depending on another model to explain whether the first model behaved safely. Some checks can be deterministic: Was the edited file observed? Did the agent record uncertainty? Did a prompt-injection phrase appear in an observed page? Did tests run? Did the diff touch files outside the requested scope?

Models are useful for coding, summarizing, and suggesting fixes. Audit records should be durable even when models change, vendors change, or transcripts are unavailable. That is why Git-native storage is attractive: the data can be fetched, pushed, reviewed, backed up, and inspected with normal developer tooling.

Where h5i fits

h5i treats Git as the transport and durability layer. It records AI provenance with commits, stores versioned reasoning as context, creates review surfaces for pull requests, supports intent-based rollback, and lets agents exchange typed messages over a shareable Git ref.

The result is not a replacement for review. It is a better review packet. Instead of asking a reviewer to infer intent from a patch, h5i gives them the patch, the prompt, the agent's working context, and the risk signals that say which parts deserve attention first.

When you need it

You need AI-aware version control when AI-generated code becomes routine rather than experimental. One-off autocomplete can survive with normal Git hygiene. Agentic development needs stronger records because the agent can edit multiple files, run tools, hand off work, and make architectural choices across a long session.

The trigger is simple: if your team would ask, "why did the agent do this?" after a bad merge, you should capture the answer before the merge.

FAQ

Is AI-aware version control different from Git?

It is an additional layer on top of Git. The best implementations keep commits and branches normal while storing AI-specific metadata in sidecar refs or other durable records.

Is a prompt enough provenance?

No. The prompt explains the request, but not the evidence the agent used, the decisions it made, the tests it ran, or the risks it introduced.

Can this work with both Claude Code and Codex?

Yes. The useful abstraction is not one vendor's transcript format. It is a stable record of agent, prompt, context, action, test, and review data.

Sources and verification

This article avoids vendor-specific claims that were not checked against primary docs or local h5i CLI behavior.

Bring AI provenance into Git

h5i records prompts, context, test evidence, review signals, and agent messages alongside normal Git history.

Star on GitHub Read the guides