CommitLore

by monglong0214

Not rated
GitHub

About

Git-native decision memory for coding agents, stored as git trailers and refs/notes.

Details

Author
monglong0214
Categories
Developer Tools, Other, AI

Setup

Install CommitLore in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/monglong0214/commitlore

Follow the installation instructions in the repository README, then restart your MCP client.

Decision authority for coding agents, owned by Git.
Keep constraints, rejected alternatives, and warnings in Git — then deliver only what is still in force, so an agent is not handed a decision the repository already reversed.

No hosted memory. The repository owns the record.

Install once.Then initialise each repository where you want it to work.

curl -fsSL https://raw.githubusercontent.com/MongLong0214/commitlore/v1.2.0/install.sh | sh -s v1.2.0
curl -fsSLO https://raw.githubusercontent.com/MongLong0214/commitlore/v1.2.0/install.sh sh install.sh v1.2.0 # Or skip the script: the checkout it makes is one you can make yourself. git clone --depth 1 --branch v1.2.0 https://github.com/MongLong0214/commitlore node commitlore/dist/commitlore.mjs --version

It installs a pinned source checkout and a wrapper that runsnode <checkout>/dist/commitlore.mjs— no compiled download, no build step.

The code survives. The judgment doesn't.

An agent proposes an approach. Your team rejects it because of a non-obvious constraint. The final code preserves the outcome, but usually not why the alternative was rejected. A later agent sees only the code and proposes the same idea again.

CommitLore keeps that judgment beside the code.

Most commits should carry no record. CommitLore is for judgment the code cannot preserve, not for narrating every change.

curl -fsSL https://raw.githubusercontent.com/MongLong0214/commitlore/v1.2.0/install.sh | sh -s v1.2.0
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/MongLong0214/commitlore/v1.2.0/install.ps1))) v1.2.0

Requires Node.js 22.23.2+ and Git. The script checks both before it writes anything.

/plugin marketplace add MongLong0214/commitlore /plugin install commitlore@commitlore

The plugin puts nocommitloreonPATH, so the commands below need the CLI install as well. The installers also detect and wire supported MCP hosts where they can do so safely; the exact matrix is below.

cd your-repository commitlore init commitlore context .

Start a new agent session after installing or updating a plugin: a running session keeps the runtime it loaded.

Then work and commit normally. On supported skill integrations, CommitLore is considered during ordinary commit requests and stays silent when there is nothing worth preserving. You do not need to name CommitLore on every commit.

Want accepted records to stage without a per-record prompt? The repository can opt in once withcommitlore auto on. That policy is repository-owned and applies to the team, so it is not silently enabled by this page.

commitlore: active records for src/pricing.ts Limit [claim] r-price01 calculatePrice owns final checkout pricing only Ruled-out [claim] r-price01 Reuse it for admin quotes | eligibility and rounding semantics differ

[claim]means "weigh this as information." A repository can opt into the stronger signed-authority mode. Delivery gives the agent context; it does not block the edit.

The repository should own the judgment behind its code.

CommitLore stores records in ordinary Git trailers and notes, so they branch, merge, clone, review, and survive provider changes with the code they explain.

SQLite is only a rebuildable index. Delete it and Git still holds the record.

A general memory or retrieval system asks:

Which recorded decisions still apply to this path now?

A superseded decision can be highly relevant and still be wrong as current guidance. Relevance and authority are different questions.
- Capture— an agent drafts only decision context the diff cannot show.
- Verify— CommitLore checks the draft against the session and staged diff.
- Preserve— the accepted record lives in Git with identity and lifecycle.
- Deliver— before a later edit, only active records for that path are returned.

Most commits carry no record. The commit hook validates a record when one is present; it does not invent one.

An existing hook is not overwritten.commitlore inithonourscore.hooksPath, moves any hook already installed to<hook>.commitlore-chained, and calls it first;commitlore hooks uninstallputs it back.

"Available" means the prepare → verify → stage workflow exists. It does not mean every eligible commit is assessed automatically.

Users on supported skill hosts do not need to say "record this in CommitLore" on every commit. The remaining limitation is host initiation, not a required per-record user command.

One run, on an unrelated repository, by someone installing v1.2.0 for the first time. Nothing here was measured and none of it is in the evidence logs. It is on this page because the paragraph above asserts a loop that no table here covers.

They asked an agent to fix a rounding bug, mentioned in passing that a decimal library had already been considered and dropped, and ended with "commit it". CommitLore was never named. Part of what the commit carried:

Ruled-out: adopting a decimal library such as Decimal.js | the backend is a number contract, so it is meaningless Warn: do not revert the test file to console.assert: it exits 0 even on failure, so CI passes silently Provenance: drafted

TheWarnwas not dictated to the agent. It hit the trap while working and left it for whoever came next.Provenance: draftedrecords that no human read the record, which grades itclaim— delivered as a report to weigh, not an order.

A later session with no shared history was asked to adopt the decimal library after all. It did not, and named the record as its reason. It also read the grade: aclaimis not an instruction, so it checked the stated reason against the code before agreeing with it.

CommitLore is intentionally narrower. It is not a general user-memory system, conversation archive, or vector database replacement.

Index build time follows the number ofrecords, not the number of commits: the expensive pass runs once per record, so a long history that has recorded little builds faster than a short one dense with records.

Path scope is what keeps a large history from reaching the model. On the #167 corpus, only 2 of 10,002 records did:

That measures exposure and recall at a fixed two-record budget — not token cost, billed cost, accuracy, or agent behaviour. One corpus, one query, one pinned embedding model.

The agent study does not establish a universal model effect. Delivery is not proof that a model read or followed a record.

[Methods, full tables, exclusions, and negative results →

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.