drift

Version control for the AI agent era.

01 · the reality
AI agents write most of your code now.
Your version control system has no idea.
Claude Code
writing auth module
Cursor
refactoring tests
Gemini CLI
updating deps
3 agents active
214k tokens spent
47 files changed
0 captured by git
git sees the diff. it never sees the agent, the reasoning, or the goal.
02 · intent over diff
Stop recording what changed. Start recording why.
git commit
  private tokenStore: TokenStore;
- validate(token: string): boolean {
+ validate(token: string): Promise<AuthResult> {
+ const decoded = jwt.verify(token, SECRET);
a3f8c21  refactor auth Who wrote this? Why? What else was tried?
drift intent
Make authentication stateless for horizontal scaling
achieved14 files · 3 checkpoints
1 approach abandoned → JWT chosen over session tokens
C
Claude Code · sonnet 4.5 · 47k tokens · 8m 42s
03 · semantic merge
Git sees lines of text. Drift sees functions, types, and renames.
Agent A
Renames processOrder()handleOrder()
Agent B
Adds new call to processOrder()
git — conflict ✗
<<<<<<< main
  handleOrder(cart);
=======
  processOrder(cart);
>>>>>>> feature
vs
drift — auto-resolved ✓
// Drift applies the rename automatically
  handleOrder(cart);
Zero conflicts. No human needed.
principles

Six design principles

Every decision in Drift follows from these. They are not aspirations—they are constraints.

intent-first
Goals, not snapshots
The primary object is a goal, not a text diff. Code changes are downstream artefacts of goals. Every intent carries a status: achieved, abandoned, or superseded.
session-native
Agent context as data
AI agent interactions—conversations, reasoning traces, tool calls, cost—are first-class objects, not metadata bolted onto commits. Optional, redacted, searchable.
semantic engine
Code, not text
Drift parses source code via tree-sitter. It diffs, merges, and blames at the AST level: functions, types, renames, dependencies. Falls back to text for unsupported languages.
multi-agent
Concurrent by default
Multiple agents and humans work in parallel with optimistic concurrency. Semantic merge resolves intent overlap, not just line overlap. Intent conflicts are flagged separately.
no llm required
Deterministic core
Every feature works without a language model. An optional provider interface lets configured models enhance search and suggest merges. The tool never breaks because an API is down.
radical simplicity
12 commands. That's it.
No staging area. No rebase. No detached HEAD. One configuration file. Two states: working and clean. History is append-only—you cannot lose work.
data model

Five core objects

Every object is immutable and content-addressable. There is no history rewriting, no force push, and no rebase. What happened, happened.

ObjectGit EquivalentPurposeKey Fields
IntentCommit The atomic unit of progress. A goal plus the work that fulfilled it. id, parent, goal, status, author, sessions, changeset, snapshot
Session(no equivalent) A complete record of an AI agent's work towards an intent. agent descriptor, conversation, tool calls, reasoning, checkpoints, cost, redactions
ChangesetDiff (partial) A semantic representation of what changed, at the AST level where possible. structural deltas, dependency deltas, raw file deltas, impact graph
StreamBranch A named, evolving line of development with built-in policy. name, head, policy (review, test, agent rules), upstream
SnapshotTree Full state of the workspace at a point in time. file map, CodeGraph (cross-file deps), dependency manifest
Workspace
  ├── Stream (replaces branches)
        ├── Intent (replaces commits)
              ├── Session (agent interaction record)
                    ├── Conversation trace
                    ├── Tool calls & results
                    └── Reasoning steps
              ├── Changeset (semantic diff)
                    ├── Structural changes
                    ├── Dependency changes
                    └── Raw file changes (fallback)
              └── Snapshot (content-addressable)
command surface

Twelve commands. Learnable in ten minutes.

Git has ~150 commands. Drift maps to four activities: starting and finishing work, navigating history, managing streams, and collaborating.

drift init
Initialise a workspace, or clone from a remote URL. Accepts --from-git to import existing git history.
git init / git clone
drift begin
Start a new intent with a goal description. Opens a session if an agent is active.
(no equivalent)
drift save
Create a checkpoint within the current intent. Lightweight, fast, frequent.
git stash (loosely)
drift finish
Complete the current intent. Records changeset, snapshot, and session.
git add -A && git commit
drift abandon
Mark current intent as abandoned. Preserved in history, searchable, never deleted.
git reset / git revert
drift log
Show intent history. Supports --flat, --tree, --by-goal, --by-agent, --all views.
git log
drift replay
Replay the session that produced an intent. Read-only: does not change state.
(no equivalent)
drift rewind
Jump to a checkpoint within the current session, or to any previous intent's state.
git checkout / git reset
drift search
Full-text search across intents, sessions, and code. Optional semantic search via LLM.
git log --grep / git grep
drift stream
Create, switch, or list streams. Streams carry policies defined in drift.toml.
git branch / git switch
drift flow
Integrate work from one stream into another using semantic merge. Runs policy checks.
git merge
drift sync
Push and pull in a single command. Bidirectional by default. Resumable.
git push / git pull

Intentionally missing

staging area rebase force push detached HEAD cherry-pick
architecture

Eight layers. Written in Rust.

Each layer has a single responsibility and communicates only with its immediate neighbours. Swap the transport layer without touching the CLI.

CLI / Interface
Twelve core commands. Status dashboard. Interactive conflict resolver. IDE plugin API.
Intent Engine
Manages the DAG of intents. Status transitions. Full-text search index. Undo and rewind.
Session Recorder
Captures agent interactions via the Drift Agent Protocol. Redaction engine strips secrets before storage.
Semantic Engine
Parses source via tree-sitter. Structural diffs. Semantic merge. Cross-file CodeGraph. Text fallback.
Storage Engine
Content-addressable blob store. Tiered lifecycle (hot/warm/cold). Large file handling. Virtual workspace.
Sync / Transport
HTTPS and SSH. Resumable transfers. Smart negotiation. Git bridge mode. Webhooks for CI/CD.
Config / Policy
Single drift.toml. Stream policies. Automation hooks. File behaviours for lock files and generated content.
Identity / Signing
SSH-based keys. Multi-party attribution (human + agent + platform). Cryptographic signing of intents.
semantic engine

Merge by structure, not by text

If the semantic engine works reliably, Drift is a fundamentally better tool than git. If it does not, Drift is merely a nicer interface on top of the same text-based operations. Everything depends on this component.

01
Non-overlapping changes
Agent A modifies function foo, Agent B modifies function bar in the same file. No conflict.
auto-merge
02
Overlapping but compatible
Agent A renames processPayment across the codebase. Agent B adds a new callsite. Drift applies the rename to the new call.
auto-merge with verification
03
Overlapping incompatible
Both sides modified the same function body in ways that cannot be mechanically combined. Presented for resolution with intent context.
human resolution
04
Intent-level contradiction
Two intents have contradictory goals. Because intents carry explicit goals, Drift can detect when parallel work pursues conflicting objectives.
arbitrator resolution
comparison

Drift vs Git vs Entire

Each row reflects a real pain point that development teams encounter regularly.

DimensionGitEntire (on Git)Drift
Primary unitCommit (text snapshot)Commit + session on branchIntent (goal + session + semantic changeset)
Code structureNone (text lines)None (inherits git)AST-level via tree-sitter
AI sessionsNot capturedSide branchFirst-class object with redaction
MergeText-basedText-basedSemantic (structure-aware)
PrivacyNoneNone (full transcripts)Redaction engine + access control
StorageGood (packfiles)Poor (session bloat)Tiered (hot / warm / cold)
Multi-agentNot supportedNot supportedOptimistic concurrency + semantic merge
CLI complexity~150 commandsGit + additional12 core commands
DependenciesText filesText filesParsed, tracked, smart merge
History modelMutable (rebase, force push)MutableAppend-only, immutable
CI / automationExternal onlyExternalDrift Actions in drift.toml
ConfigurationScattered filesScattered + moreSingle drift.toml, fully versioned
Version control for the AI agent era.
intent-first
Goals, not snapshots
Every change records what was intended, who did it, and whether it worked.
semantic engine
Code, not text
AST-level diffs and merges via tree-sitter. Understands structure, not lines.
agent-native
Sessions as data
Conversations, reasoning, cost, and checkpoints. First-class, redacted, searchable.
begin save finish flow sync 12 commands. that's it.