Skip to main content
Glama
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

ピン留めされたソースチェックアウトと、node <checkout>/dist/commitlore.mjs を実行するラッパーをインストールする。コンパイル済みダウンロードもビルドステップも不要。


コードは生き残る。判断は生き残らない。

エージェントがアプローチを提案する。チームは非自明な制約のためにそれを却下する。最終的なコードは結果を保持するが、通常は代替案が却下された理由は保持しない。後のエージェントはコードだけを見て、同じアイデアを再び提案する。

CommitLoreはその判断をコードの隣に保持する。

CommitLoreが行うこと

動作

プロダクトパス

キャプチャ

diffでは示せない制約、却下された代替案、警告を保持する。候補はセッショントランスクリプトとステージングされたdiffに対してチェックされる。

commitlore capture

保存

受け入れられた記録をホスト型メモリデータベースではなく、Gitのtrailerまたはnotesに保存する。

commit hooks · refs/notes/commitlore

ライフサイクル追跡

有効、置き換え済み、期限切れの決定を区別して保持する。

commitlore stale

スコープ

エージェントが編集しようとしているパスに対する決定を選択する。

commitlore context

信頼度の格付け

記録を指示、主張、または保留コンテンツとして提供する。

default / signed mode

提供

サポートされているエージェントに編集前に現在のコンテキストを提供する。

plugin hook · MCP

ほとんどのコミットには記録を付けるべきではない。CommitLoreはコードが保持できない判断のためのものであり、すべての変更を説明するためのものではない。

Related MCP server: memini

決定を認識するエージェントまで60秒

1. CLIをインストール

macOSとLinux:

curl -fsSL https://raw.githubusercontent.com/MongLong0214/commitlore/v1.2.0/install.sh | sh -s v1.2.0

Windows:

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/MongLong0214/commitlore/v1.2.0/install.ps1))) v1.2.0

Node.js 22.23.2+ と Git が必要。スクリプトは何かを書き込む前に両方をチェックする。

2. エージェントを接続

Claude Code:

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

Codex:

commitlore plugin install-codex

プラグインは commitlore を PATH に追加しないため、下のコマンドにはCLIのインストールも必要。インストーラーは安全にできる場合、サポートされているMCPホストも検出して配線する。正確なマトリックスは下記の通り。

3. リポジトリを初期化

cd your-repository
commitlore init
commitlore context .

プラグインをインストールまたは更新した後は、新しいエージェントセッションを開始すること。実行中のセッションはロードしたランタイムを保持する。

その後は通常どおり作業してコミットする。サポートされているスキル統合では、CommitLoreは通常のコミットリクエスト中に考慮され、保存する価値がないときは沈黙する。すべてのコミットでCommitLoreを指定する必要はない。

受け入れられた記録をレコードごとのプロンプトなしでステージングしたい? リポジトリは commitlore auto on で一度オプトインできる。そのポリシーはリポジトリ所有でチームに適用されるため、このページで静かに有効化されることはない。

エージェントが受け取るもの

src/pricing.ts を編集する前:

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] は「これを情報として考慮する」という意味。リポジトリはより強力な署名権限モードにオプトインできる。提供はエージェントにコンテキストを与えるだけで、編集をブロックしない。

セキュリティモデル →

なぜGitなのか?

リポジトリは、そのコードの背後にある判断を所有すべき。

CommitLoreは記録を通常のGit trailerとnotesに保存するため、説明するコードとともにブランチ、マージ、クローン、レビュー、プロバイダー変更を生き残る。

SQLiteは再構築可能なインデックスにすぎない。削除してもGitは記録を保持する。

古い決定を見つけるだけでは不十分

一般的なメモリまたは検索システムは尋ねる:

どの古いテキストが関連しているように見えるか?

CommitLoreは尋ねる:

どの記録された決定が今このパスにまだ適用されるか?

置き換えられた決定は非常に関連性が高くても、現在のガイダンスとしては間違っていることがある。関連性と権威は異なる質問である。

仕組み

  1. キャプチャ — エージェントはdiffが示せない決定コンテキストのみをドラフトする。

  2. 検証 — CommitLoreはドラフトをセッションとステージングされたdiffに対してチェックする。

  3. 保存 — 受け入れられた記録はIDとライフサイクルとともにGitに存在する。

  4. 提供 — 後の編集の前に、そのパスに対するアクティブな記録のみが返される。

ほとんどのコミットは記録を持たない。コミットフックは記録が存在する場合に検証するだけで、発明はしない。

既存のフックは上書きされない。commitlore init は core.hooksPath を尊重し、既にインストールされているフックを <hook>.commitlore-chained に移動して最初に呼び出す。commitlore hooks uninstall で元に戻す。

自動的に行われること

ホスト

編集前の提供

検証済みキャプチャワークフロー

決定的な全コミットキャプチャ

Claude Code

プラグイン経由で自動

プラグインスキル経由で利用可能

未認定

Codex

プラグイン経由で自動

プラグインスキル経由で利用可能

未認定

Hermes

commitlore hermes install 後に利用可能

ホストインストール後に利用可能

未認定

Gemini CLI、Cursor、Windsurf、opencode

ホストが登録を使用する場合MCP提供

MCP経由で公開される手順

なし

AGENTS.md ホスト

手順のみ

手順のみ

No

「利用可能」とは、準備 → 検証 → ステージングのワークフローが存在することを意味する。対象となるすべてのコミットが自動的に評価されることを意味するわけではない。

サポートされているスキルホストのユーザーは、すべてのコミットで「これをCommitLoreに記録して」と言う必要はない。残る制限はホストの開始であり、レコードごとのユーザーコマンドの要件ではない。

測定ではなくフィールドレポート

無関係なリポジトリで、初めてv1.2.0をインストールした人による1回の実行。ここにあるものは何も測定されておらず、証拠ログにも含まれていない。上の段落が、ここにあるどのテーブルもカバーしていないループを主張しているため、このページに掲載されている。

彼らはエージェントに丸めバグの修正を依頼し、ついでに小数ライブラリがすでに検討されて破棄されたことに言及し、「コミットして」で締めくくった。CommitLoreは一度も名前を挙げられなかった。コミットが運んだものの一部:

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

Warn はエージェントに指示されたものではない。作業中に罠に落ち、次に来る人のために残した。Provenance: drafted は、人間が記録を読んでいないことを記録し、それを claim と格付けする — 命令ではなく、考慮すべきレポートとして提供される。

共有履歴のない後のセッションは、結局小数ライブラリを採用するよう求められた。それは採用せず、記録をその理由として挙げた。また、格付けも読んだ:claim は指示ではないため、同意する前にコードに対して述べられた理由をチェックした。

メモリストレージとは異なる

一般的なメモリ / RAG

CommitLore

主な質問

どの古いテキストが関連しているか?

どの決定が今ここにまだ適用されるか?

権威

メモリストアまたはプロバイダー

Git

スコープ

意味的類似性

リポジトリパス

ライフサイクル

多くの場合、追記優先

有効 · 置き換え済み · 期限切れ

信頼

取得されたテキスト

指示 · 主張 · ブロック

キャプチャ

トランスクリプトまたはノートストレージ

証拠チェック済みの決定記録

移植性

バックエンド依存

通常のGit

CommitLoreは意図的に範囲を狭めている。一般的なユーザーメモリシステム、会話アーカイブ、ベクターデータベースの代替ではない。

証拠

質問

測定結果

境界条件

登録済み研究において、クレーム級コンテキストは再提案時に変化したか?

CommitLore あり 2.8% (16/580) vs なし 18.8% (109/579)

1モデル、1ハーネス、構築されたタスク

ライフサイクルフィルタリングは、測定されたアクティブ射影において破棄済みレコードを配信したか?

破棄済みレコード 0件

置換済みレコードは存在したが、失効はしていなかった

インデックス付きルックアップはスケールするか?

10万コミットで p50 496 ms

インデックスなしのフォールバックははるかに遅い

インデックス構築時間はコミット数ではなくレコード数に従う。高コストなパスはレコードごとに1回実行されるため、記録が少ない長い履歴は、レコードが密集した短い履歴よりも速く構築される。

パススコープこそが、大規模な履歴がモデルに到達するのを防ぐ仕組みである。#167 コーパスでは、10,002 レコード中わずか 2 件だけが到達した。

ルート

モデル可視レコード

関連レコード

モデル可視トークン

すべて注入

10,002

2/2

1,004,554

top-k 語彙ベース

2

1/2

190

CommitLore パススコープ

2

2/2

335

これは、固定された2レコード予算における露出と再現率を測定したものであり、トークンコスト、課金コスト、精度、エージェントの挙動を測定したものではない。1コーパス、1クエリ、1つの固定埋め込みモデルである。

エージェント研究は普遍的なモデル効果を確立するものではない。配信は、モデルがレコードを読んだ、または従ったことの証明ではない。

方法、完全な表、除外事項、否定的結果 →

制限、信頼、プライバシー

  • キャプチャは支援的であり、決定的ではない。 対応スキルは通常のコミット要求を考慮するが、対象となるすべてのコミットを評価できると認定されたホストは存在しない。

  • デフォルトのディレクティブモードは認証ではない。 これはコミット作成者ヘッダーと照合するものであり、コミットを書ける者なら誰でもそのヘッダーを設定できる。したがって、デフォルトモードの [directive] はポリシーメタデータであり、身元の証明ではない。署名モードはさらに、Git 自身の検証済みステータスと、リポジトリローカルの commitlore.trustedSigner 許可リスト内の一致を要求する。署名者許可リストが存在しない、空、または読み取り不能な場合は誰も承認されないため、このモードはフェイルクローズする。

  • ガードは実験的な助言であり、安全網ではない。 精度 44.8%(95% Wilson CI 32.7%–57.5%)、再現率 22.0%(417 判断コーパス)。ガード結果が空でも、安全性の判定ではない。

  • 配信は、一致するすべてのツール呼び出しでトークンを消費する。 編集前フックは Edit、Write、MultiEdit、NotebookEdit だけでなく Read でも発火するため、編集エージェントがコミットするよりもはるかに頻繁に実行される。発火のたびにペイロード予算(デフォルト 800 トークン、--budget で変更)まで消費する。レコードのないリポジトリは何も消費しない。つまり、これはインストールではなく採用とともに発生するコストである。

  • 回答は部分的であり得る。 カバレッジは開示される。部分的な結果に存在しないことは、レコードが存在しないことの証明ではない。リポジトリ全体のカバレッジ、シンボルアンカー、対話型レコードビルダーは未解決のままである: #32、 #33。

  • コミットトレーラーはクローンとともに移動するが、ノートは移動しない。 Git はデフォルトで refs/notes/* をフェッチしない。したがって、refs/notes/commitlore 内のレコードは、commitlore init がそのミラーを構成するまで、通常のクローンには存在しない。

  • ホスト型バックエンドはない。 しかし、サーバーまたはフックがコンテキストを返すと、ホストは独自のポリシーに基づいてそのコンテキストを処理する。CommitLore はそのデータフローを制御しない。

セキュリティ · 互換性 · エビデンス

レコードはグレード付けされるまで信頼されない。デフォルトの作成者マッチングはポリシーメタデータであり、認証ではない。署名付きディレクティブモードは Git 検証とリポジトリローカルの署名者許可リストを要求する。許可リストが存在しない、または読み取り不能な場合は誰も承認されない。インジェクション形状のペイロードは、モデル可読ルートからは差し控えられる。

完全なセキュリティモデル →

CLI インストーラーは、認識していないリポジトリ内のフックを書き換えることはできず、実行中のホストセッションは読み込んだランタイムを保持する。commitlore doctor は両方の状態とその修復方法を明示し、commitlore upgrade は新しいリリースが存在するかどうかを報告する。

インストールとアップグレード →

レコードは通常の Git トレーラーまたはノートである。プロトコル 2.0 は、ライフサイクル、信頼グレード、検証、互換性を定義する。

人間向けガイド → · 規範的仕様 →

リポジトリは、方法、除外事項、失敗した測定、および元のベンチマークまたは診断が誤っていたケースを公開している。

エビデンス → · 自己監査 →

ドキュメント

コントリビューション

CONTRIBUTING.md は、このリポジトリが自らに課すレコードプロトコル、リリースゲート、およびエビデンスの再現方法をカバーしている。

ライセンス

MIT — LICENSE を参照。

Available Tools

8 tools
commitlore_before_changeA
Read-only

Everything recorded about a path, before editing it: the active decisions, the gaps in what could be verified, and any ruled-out alternative a proposal would revive. Returns active_decisions, verification_gaps, possible_revival_matches, guard_confidence and cache_key. Pass path alone for context. Pass proposal as well to also run the guard against that path's Ruled-out records; without it guard_confidence is "not-run" and possible_revival_matches is empty because nothing was checked, not because nothing matched. The guard is an experimental advisory: precision 44.8%, recall 22.0% on the 417-decision corpus. An empty possible_revival_matches does not guarantee the proposal avoids every ruled-out alternative.

Inputs: path (required), proposal.

commitlore_guardA
Read-only

Check a proposal against the Ruled-out records for a path before acting on it. Returns every record whose alternative matches, with the reason it was rejected. Experimental advisory: precision 44.8%, recall 22.0% on the 417-decision corpus. An empty matched array does not guarantee the proposal avoids every ruled-out alternative.

Inputs: proposal (required), path.

commitlore_prepare_captureA

Prepare a capture transaction: computes binding conditions (HEAD, staged diff, tree, policy hash), generates the prompt contract for the agent to use, and persists a phase:"prepared" pending transaction. Returns the nonce needed for verify and stage. The prompt carries the end of the transcript rather than all of it; transcript_window says which lines, numbered as the whole transcript numbers them. Verification still reads the whole transcript, so quote only what the prompt shows you. The transaction binds to THIS server's checkout, returned as repository; if your working directory is a linked worktree or another clone, pass repository to assert it and this refuses rather than binding to the wrong HEAD.

Inputs: transcript (required), repository, unattended.

commitlore_queryA
Read-only

Active CommitLore records for a path: the constraints, ruled-out alternatives and warnings recorded in git history. Same answer as commitlore <kind> --json.

Inputs: kind (required), path.

commitlore_runtime_identityA
Read-only

Report the exact CommitLore entrypoint, package root, version and index schema this MCP server executes.

Inputs: no named parameters.

commitlore_stage_captureA

Stage a verified capture transaction: advances the pending record from verified to staged, stamps expires_at (staged_at + 5 minutes), and makes it eligible for the prepare-commit-msg hook. All bindings are server-owned and computed from stored state; the only inputs are the nonce and, optionally, the receipt your verification was issued.

Inputs: nonce (required), receipt.

commitlore_staleA
Read-only

Records that are no longer carrying their weight: superseded, past a date-form Expires:, or flagged for review by a condition-form one. Same answer as commitlore stale --json.

Inputs: no named parameters.

commitlore_verify_captureA

Verify a capture draft against the transcript and diff that were hashed at prepare time. Evidence citations are checked mechanically (verbatim match); fabricated quotes are discarded. Stores the verified result in the pending transaction for stage to consume.

Inputs: draft (required), nonce (required), transcript (required), diff.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 8 tools

    Disambiguation3/5

    The capture lifecycle tools (prepare/verify/stage) are clearly separated by phase, and stale/runtime_identity are distinct. However, before_change, query, and guard overlap: before_change already runs the guard when a proposal is supplied, and query also returns ruled-out alternatives for a path. The descriptions help, but an agent could easily pick the wrong one for a pre-edit context lookup.

    Naming Consistency4/5

    All tools share the commitlore_ prefix and use lowercase snake_case, which is a clear and consistent pattern. The capture tools use verb_noun (prepare_capture, verify_capture, stage_capture), but before_change, stale, and runtime_identity are stylistic deviations, so the set is mostly consistent rather than fully uniform.

    Tool Count5/5

    Eight tools is well-scoped for this server's purpose: three for the capture pipeline, three for reading/guarding context, plus stale and runtime identity. Each tool has a place and the set feels neither bloated nor thin.

    Completeness4/5

    The core workflow is covered: retrieving records/context, checking proposals, and the prepare/verify/stage capture pipeline. Minor gaps exist—such as no direct way to update, dismiss, or resolve stale records—but these are workable and may be intentionally outside the MCP surface.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      Local-first memory layer for AI coding agents — captures issues, attempts, fixes, and decisions, and warns at git commit before you repeat a mistake.
      19
      978 PyPI
      877
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Local-first project memory for AI coding agents. Records failed attempts, fragile files, and decisions per repo, and warns the agent via hooks before it repeats a recorded mistake.
      6
      59 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides AI coding agents with git-native persistent memory and a dependency-aware task graph, letting them record and fuzzy-recall architectural decisions, lessons, and gotchas while creating, claiming, and completing tasks that auto-unblock downstream work. Stores everything as plain JSON and Markdown committed inside the repository, so context stays branch-aware, team-shared, and reviewable in pull requests.
      6 npm
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables coding agents to persist and retrieve ADR-style decisions and machine-checkable constraints as git-friendly markdown in a repository, linked to requirement ids, tests and commits. Agents can pull relevant context before a task, check a proposed change against accepted constraints before committing, and record, supersede or search decisions over a local stdio connection.
      7
      23 npm
      MIT