CommitLore
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Stop re-reviewing the same bad idea.
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.
English ·
한국어 ·
日本語 ·
简体中文
Install once. Then initialise each repository where you want it to work.
Prefer to read the installer first?
It installs a pinned source checkout and a wrapper that runs
node /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.
What CommitLore does
| | Behavior | Product path |
|---|---|---|
| **Captures** | Preserves constraints, rejected alternatives, and warnings that a diff cannot show. Candidates are checked against the session transcript and the staged diff. | commitlore capture |
| **Preserves** | Stores accepted records in Git trailers or notes instead of a hosted memory database. | commit hooks · refs/notes/commitlore |
| **Tracks lifecycle** | Keeps active, superseded, and expired decisions distinct. | commitlore stale |
| **Scopes** | Selects decisions for the path an agent is about to edit. | commitlore context |
| **Grades trust** | Delivers records as directives, claims, or withheld content. | default / signed mode |
| **Delivers** | Gives supported agents current context before an edit. | plugin hook · MCP |
Most commits should carry no record. CommitLore is for judgment the code cannot
preserve, not for narrating every change.
60 seconds to decision-aware agents
1. Install the CLI
macOS and Linux:
Windows:
Requires Node.js 22.23.2+ and Git. The script checks both before it writes anything.
2. Connect your agent
Claude Code:
Codex:
The plugin puts no commitlore on PATH, 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.
3. Initialize a repository
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 with commitlore auto on. That policy is repository-owned and
applies to the team, so it is not silently enabled by this page.
What the agent receives
Before editing src/pricing.ts:
[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.
Security model →
Why Git?
**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.
Finding an old decision is not enough
A general memory or retrieval system asks:
> Which old text looks related?
CommitLore 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.
How it works
1. **Capture** — an agent drafts only decision context the diff cannot show.
2. **Verify** — CommitLore checks the draft against the session and staged diff.
3. **Preserve** — the accepted record lives in Git with identity and lifecycle.