Commits, branches, and merges
How CMP tracks knowledge changes without using Git as the storage engine.
CMP uses a Git-like commit DAG but does not require storing knowledge in a Git repository. A commit references its parent IDs and the changes applied to a branch.
Conditional commits
expectedHead implements optimistic concurrency control. If another writer advances the branch before your commit, the server responds with a conflict instead of silently overwriting.
Branches
Agents can create independent branches from main or a known revision. Each branch points to its latest knowledge commit.
Merges
The reference server implements a structural three-way merge for non-overlapping changes. If two branches change the same record differently, the merge returns a conflict. It does not call a model to invent a resolution.
Reproducibility
Read a snapshot by commit ID when you need the exact knowledge available at a specific revision. The original commit graph remains append-only.
A future context receipt will record exactly which records and revisions were delivered during agent execution. That feature is not implemented yet.
Next: HTTP API.