Repository navigation
Releases
v1.7.5
init can leave the working tree exactly as it found it
If a script runs commitlore init as part of checking that a checkout is clean,
this is the release you want.
init writes one file inside the working tree: the PreToolUse injection hook
at .claude/settings.json. It is untracked, so after init the tree is no
longer clean — and a caller whose whole job is to verify a clean checkout then
sees its own observation as a change:
git status --porcelain --untracked-files=all # empty
commitlore init --mcp-scope none --no-unattended </dev/null
git status --porcelain --untracked-files=all # ?? .claude/settings.json--mcp-scope none reads as "register nothing", but it never covered that file:
everything else init wires lands under .git/, in git config, or in the
host's own configuration, and git status reports none of it.
commitlore init --no-agent-hooks
Skips that one write and changes nothing else. Measured against a scratch
repository with an empty HOME:
- all eight steps run and report 0 — release, hooks, trust, index, agent
integration, MCP registration, policy, final check; - all four git hooks are installed:
commit-msg,prepare-commit-msg,
post-commit,pre-push; - the directive author string is set in git config;
git status --porcelain --untracked-files=allis empty;- the verdict is
init: ready, exit 0.
The step still reports what it did not do, rather than going quiet about a step
it skipped.
The verdict had to survive it too
With the hook declined, inject-runtime is the only doctor row that needs
attention — so a first version of this handed back a clean checkout and exit
1, which trades a dirty tree for a failed verdict. The final check now leaves
that row out of its verdict when the caller declined the hook, out of the
verdict only and never out of the report: the row still prints, with a line
saying why it was not counted. Anything else still fails the verdict — with a
policy file the resolver rejects, the same flag reports exit 1.
Reproducing it needs a fresh HOME
With the Claude Code plugin installed, the step already skips the write, so a
run against a developer's own HOME looks like a non-reproduction. The
fresh-HOME case is the automated one, which is where the report came from.
init --help now says which steps write inside the working tree and which write
outside it.
This is a patch release. It adds one flag and changes no default.
Canonical source: efb6563; Canonical
dist/commitlore.mjs SHA-256:
f6a8b8e65a0e46abe3c1ebbe3104eb52127aa540acb7d5e4ac5df4d6d9fd4531
Full Changelog: v1.7.4...v1.7.5
v1.7.4
Two production advisories, and the three capture faults a 118.7 MB transcript uncovered
Take this one. It patches a high and a critical advisory in dependencies
that ship with the CLI.
| package | severity | advisory |
|---|---|---|
@modelcontextprotocol/sdk → 1.32.1 |
high | OAuth client could send credentials to an authorization server the MCP server chose (GHSA-6qxp-vccf-f47h) |
proxy-addr → 2.0.8 |
critical | IP spoofing via an IPv4-mapped IPv6 trust subnet (GHSA-jqcg-44mw-7w3h) |
source-map-js moves to 1.2.2 as well — dev-only, so no gate was watching it.
npm audit --omit=dev --audit-level=low is 0.
A large transcript could not be captured at all (#1168)
A 118,728,820-byte session transcript produced this:
{"outcome":"usage","error":"Staging rejected: this transaction was bound by a verification that issued a receipt, and none was presented. …"}
Receipt handling was working. The quote matcher built one array element per
character, and Array.push refuses past V8's FixedArray ceiling — measured
here at 112,813,858 elements, which is why 100 MB passed and 118.7 MB did
not. The verifier caught that RangeError, bound the transaction to an empty
verification, issued a receipt and then returned without it. The nonce was left
bound to a verification nobody could stage.
The matcher now builds nothing proportional to its input: a quote is matched
against the original text by a pattern that reproduces the whitespace collapse,
and the lines around a match are found by walking outward from it. The
matching rule has not moved — a new suite holds it to the rule the module
documents, from both sides, including twelve cases where a regex
metacharacter in a quote must stay literal.
A verification that cannot run no longer binds anything: the transaction stays
prepared, carries reason: "internal-error" with the exception's own message,
and can be verified again.
An empty verification now says which empty it is (#1169)
Unfetched notes, an unreadable history, a held lock and an internal error all
answered with the same bytes:
{"validation_result":"empty","accepted":[],"rejected":[],"incomplete":true}
Each now carries a reason code and a detail sentence naming the move that
resolves it — for an unfetched mirror, commitlore doctor --fix or fetching
refs/notes/*. verify_capture forwards both. On the CLI the three host
conditions report as operational (exit 3); internal (exit 4) stays for the
exception nobody anticipated.
A staged capture can be withdrawn (#1170)
commitlore pending rm <nonce> --force withdraws a staged transaction before
the commit. applied stays refused with or without the flag: its trailer is
already in a commit message and only the post-commit hook can finish the job.
A second stage on the same tree no longer replaces the first in silence. It
stamps superseded_by, the capture output names what it replaced, pending ls
shows superseded-by <nonce>, and doctor reports superseded captures as
superseded instead of as captures that "expired before reaching a commit and
were dropped".
What it does not do is collect them: a staged file is never garbage
collected, because withdrawing its replacement makes it the newest candidate
again.
This is a patch release. One flag is added, pending rm --force; no trailer key
or host setting changes.
Canonical source: 71db889; Canonical
dist/commitlore.mjs SHA-256:
f56490048e6baedb9999019aeaef3a150f67659ef50a6de244dfd074456fe771
Full Changelog: v1.7.3...v1.7.4
v1.7.3
A paragraph that holds no record was being inherited as one
If you squash-merge with squash-preserve, take this one.
A squash merge in another repository was refused by commitlore validate and
could not land:
shape failed · 169: unknown-key Claude-Session — got "Claude-Session", want "a key from SPEC §3, or X-Claude-Session if this is your own metadata"
The range held an ordinary merge commit with no record at all. Its last
paragraph was a single line:
Claude-Session: https://claude.ai/code/session_…
squash-preserve collected that paragraph as an inherited record, stamped
Provenance: inherited <sha> onto it, and composed a message its own validator
then refused — blocking the merge the command had been run to protect.
Why it happened
Git decides what a trailer block is, and a message's last paragraph qualifies
whatever its keys mean. So the paragraph cannot be refused at parse time; the
question has to be asked of what the parse returns. types.ts isCommitLoreKey
already answers it for the index, where paragraphs like sha256: and Tests:
were once served to agents as recorded decisions (#335). The squash path never
asked.
What changes
An inherited block now carries only the keys SPEC §3 defines, and a block left
with none contributes nothing.
The filter is per trailer, not per block: a paragraph mixing Limit: with a
foreign key is a real record, so dropping the whole block would lose it while
inheriting it whole would still fail validate. Signed-off-by: goes the same
way as any other key outside the vocabulary — it is an attestation about the
commit that carried it, and inheriting it would assert a sign-off on a commit
nobody signed.
The identity-collision check had to agree. Stripping those keys makes a faithful
copy differ from its origin, so the mixed case stopped failing on unknown-key
and started failing on duplicate-id. An inherited copy is now compared by its
record content — the same exemption 1.7.2 made for the transport stamp, one key
class over.
Known residual
A commit that already landed with an inherited non-record block re-squashes to a
block whose only key is Provenance:. It validates, and it says nothing. That
shape is recorded as a Warn: on the fix rather than filtered, because nothing
reported it and the output is valid.
Also in this release
@modelcontextprotocol/sdk 1.30.1, js-yaml 5.4.2 (dev), and
docker/setup-qemu-action v4.4.0 in CI. @types/node stays on 22.x:
engines.node is >=22.23.2, and types from a later major admit APIs that
runtime does not have — the only thing that would refuse them is the type
checker.
This is a patch release. No command, flag, trailer key, or host setting changes.
Canonical source: c04d20a; Canonical
dist/commitlore.mjs SHA-256:
9e3b770f9248d50e2abc86a5616de65bf195260cce9085faa7273036d5df5919
Full Changelog: v1.7.2...v1.7.3
v1.7.2
Canonical source: fa9909a; Canonical dist/commitlore.mjs SHA-256: db1595e3a073918cfceff43c108164e42c8aa3b9e9bdffddc05c32a517c5af0c
Full Changelog: v1.7.1...v1.7.2
v1.7.1
Canonical source: 76bf06b; Canonical dist/commitlore.mjs SHA-256: 6c3568419505cb650e93f5c4ce8d8aec7b3b14ceab6b7e98e1e736c27029203b
What's Changed
- Fix trailer visibility, inherited records, and squash preservation by @MongLong0214 in #1146
Full Changelog: v1.7.0...v1.7.1
v1.7.0
Five fixes found while upgrading a machine to 1.6.0. In each case something
reported success, or reported nothing, while part of the install was not
working.
After upgrading, run commitlore hooks install once in each repository. It
used to rewrite only commit-msg. The prepare-commit-msg, post-commit and
pre-push hooks that init installs beside it kept the stub their build
wrote, and a stub from before 1.1.3 cannot follow an upgrade. Under the PATH
a GUI client or IDE gives a hook, such a stub skips: the commit succeeds with
no staged record attached, and a push publishes no notes. Both exit 0.
hooks install now also refreshes each of the three that is already a
commitlore stub from another build. It still installs none that is missing and
leaves a hook without the marker alone. hooks status and doctor's
commit-msg-hook row name an out-of-date one (#1135). If a refresh fails,
hooks install exits 2 after writing commit-msg.
- doctor's transport checks are bounded (#1136).
notes-refspecand
notes-pushreached each remote with no time limit and with the ordinary
interactive environment, so a remote that stopped answering held the whole
report. They now wait 15 seconds, with terminal prompts turned off and
batch-mode SSH, and report a remote that does not answer ascould not verify (origin: no answer within 15s).COMMITLORE_DOCTOR_REMOTE_TIMEOUT_MSsets
another limit, in milliseconds. - The
pre-pushhook keeps your SSH command (#1138). The notes push set
GIT_SSH_COMMANDunless you had, and git reads that variable beforeGIT_SSH
andcore.sshCommand. An SSH command chosen either of those ways carried the
branch, and the notes push that followed used plainsshand could fail. The
hook and doctor now set it only when none of the three is set. - The installer judges the plugins by the version they end at (#1134). The
Claude Code and Codex plugin rows took "installed" as success, so a plugin left
at an older version was reported as installed. Both rows now read the version
after updating and fail, naming the command that moves it, when the plugin is
still behind the CLI.plugin install-codexupgrades a Codex plugin that is
behind instead of stopping at "already installed". - The installer's host rows run one at a time (#1137). They all started at
once, and the synchronous steps held the event loop past an MCP probe's
timeout. On a first run, healthy registrations were reported asinitialize timed out, and as healthy on the next run.
Minor rather than patch: COMMITLORE_DOCTOR_REMOTE_TIMEOUT_MS is a new setting,
and hooks install has a new way to exit 2.
v1.6.0
commitlore sync no longer publishes to every remote
If your repository has a remote you only read from, such as a contributor's
fork added to check out a pull request, this one is worth taking.
With no --remote, commitlore sync wrote refs/notes/commitlore to every
configured remote:
fork failed remote not found
origin in-sync in-sync
pr270-fork failed ... ! [remote rejected] refs/notes/commitlore (permission denied)
pr54-fork failed ... ! [remote rejected] refs/notes/commitlore (permission denied)
Those forks refused only because the account could not write to them. A fork
whose pull request allows edits by maintainers accepts the push, and the mirror
carries every record in the repository: its limits, ruled-out alternatives and
warnings (#1128).
What changes for you
Run by hand with no --remote, sync now writes only where your branch's code
goes:
- the remotes listed in
commitlore.syncRemote, if you set any
(git config --add commitlore.syncRemote <remote>, once per remote); - otherwise the branch's push remote, in the order
git pushreads it:
branch.<name>.pushRemote, thenremote.pushDefault, thenbranch.<name>.remote; - otherwise
origin; - otherwise the only remote.
Every other remote is named and left alone:
origin pushed published the local mirror
not synced: pr54-fork — sync writes only to this branch's push remote; name one with --remote to sync it
If there are several remotes and none of those applies, sync writes nowhere,
exits 2, and asks you to name one. --remote still syncs exactly what you name.
The pre-push hook already synced only the remote being pushed to, and still
does.
If you relied on sync reaching more than one remote, list them in
commitlore.syncRemote.
A dry run says what it would do
--dry-run reported its planned writes as pushed, fetched and merged, so
the outcome column read as a record of what happened. They are now
would-push, would-fetch and would-merge, in the table and in --json.
--json also gains skipped (the remotes left alone) and source (why these
remotes were chosen). A script that matched a dry run's pushed needs
would-push.
Minor rather than patch: commitlore.syncRemote is a new configuration key, and
a dry run's --json outcomes changed names.
Also in this release
commitlore commit --recordsis all or nothing (#1127). A draft whose
records all verified and then exceededmax_records_per_commitwas committed
with none of them, and reported as a complete answer. A draft with one bad
record staged the survivor before the refusal was reported, so your next
plaingit commitcarried it. Now any rejection or failed capture stops the
commit with nothing bound. The max-records refusal also tells you to merge
the trailers into fewer records or raise the limit.commitlore capture
still stages the survivors and names the rest.commitlore commit --amendchecks evidence against the commit it produces
(#1129). A quote of the amended commit's own content was refused, a
message-only amend had nothing to cite, and a record carried over from the
replaced commit was refused withduplicate-record-id. Evidence is now
checked against HEAD's parent to the index (the empty tree for a root
commit).
Upgrade: re-run your installer one-liner. No migration. Hooks already
installed in a repository keep working. The only surface changes are the new
commitlore.syncRemote key and the renamed dry-run outcomes above.
v1.5.1
Records the two channels agreed on were being withheld
If you merge with squash, this one is worth taking.
A merge commit carrying more than one record had its records served as
nothing. commitlore context said:
commitlore: 9 trailer key(s) are withheld because a record's commit message and
its note on refs/notes/commitlore declare different values for them
…and the two declarations agreed. Both note blocks were exact subsets of the
message's.
Why it happened
The two channels are written by different hands. A forge composes the squash
message; writeRecordBlocks writes the note. Only one of them separates
record blocks with a blank line, so git read the message's two records as a
single folded block while the note arrived as two. Grouped by the first
Record-Id, the folded block and the note block declaring that same id compared
unequal — thirteen trailers against eight on the reported commit — and every key
that differed was withheld.
Nothing contradicted anything.
What changes for you
On the reporting repository, one file went from
| before | after | |
|---|---|---|
Limit: |
4 | 8 |
Ruled-out: |
2 | 4 |
Warn: |
6 | 12 |
Those are the lines you are meant to see before editing, and they were the ones
going missing. If you have been seeing "N trailer key(s) are withheld" on
squash-merged commits, check whether the two sides actually disagree — on this
shape they did not.
A real disagreement still withholds. A note that changes a value declares a
pair the message does not carry, and that key is withheld exactly as before.
What it gives up, stated plainly
A folded block carries both records' pairs, so a note that attributes the
second record's content to the first record's identity is now served rather
than withheld. Reaching that takes a hand-edited or corrupted note rather than
an ordinary workflow, and the alternative was leaving every squash-merged
repository withholding records that agree. It is recorded in the source beside
the predicate.
Also in this release
The native efficacy study (bench/de) was closed and removed. It never shipped
in the package and its removal changes nothing you run.
Upgrade: re-run your installer one-liner. No configuration changes, no
migration, no change to any command's surface.
v1.5.0
Something now starts the capture.
commitlore auto status has said the gap plainly for a long time:
unattended start: an agent host must initiate capture; init installs no initiator — ordinary git commits only apply a staged transaction.
On this repository's own history, 204 of 249 substantive commits carry a record. The missing 18% was never a capability gap. It was a product that required five things to be remembered in order.
One call in place of five
commitlore commit -m "chore: tidy the fixture"
commitlore commit -m "feat: hash with sha256" --transcript session.txt --records draft.jsonIt composes no commit message of its own — the records reach the commit through the prepare-commit-msg hook, the same path a person uses after staging a capture by hand. Building a second route would mean two places that know how a record becomes a trailer block, and their first disagreement would be silent.
All or nothing. A draft with any refused record commits nothing and binds nothing, and the result names both legal next moves: correct the quotes against the transcript, or record nothing. Committing the survivors would hide the refusal at the moment it matters most.
Recording nothing is a complete answer
Nothing anywhere checks that a record exists. That is the design, not a gap in it.
An agent that must produce a record will produce one, and a false record is permanent — rewriting history does not reach the clones that already fetched it. So what can be enforced honestly is that the flow ran, never what came out of it. records: [] clears every check exactly as completely as ten records do.
The plugin refuses an unconsidered commit
A PreToolUse hook on Bash asks one question — was this tree considered — and when the answer is no it names the command that clears it, in the directory it graded, carrying --amend and -a through from the command it refused.
It steps aside for a merge, a rebase, --dry-run, a repository whose policy is not auto, anything it cannot parse, and a mechanically trivial change: one file and five lines, documentation only, fixup!/squash!, or a release: commit touching only release paths.
Everything it cannot answer is an allow. A gate that blocks on its own confusion is one people disable, and the thing it protects is worth less than committing is.
If you already use the five-step flow, nothing changes
prepare_capture → verify_capture → stage_capture → git commit satisfies the gate. It writes the same consideration commitlore commit does, from the shared code both routes pass through.
What this does not promise
Not 100% recorded — 100% considered, and only on one host. A person at a terminal, CI, a script, and every host without a Bash PreToolUse hook are unchanged: they get a simpler command and no enforcement. The ceiling on records is still the agent's judgement.
An agent that always answers records: [] satisfies the gate. That is deliberate. The alternative — requiring a record — manufactures them.
Upgrading
curl -fsSL https://raw.githubusercontent.com/MongLong0214/commitlore/v1.5.0/install.sh | sh -s v1.5.0The gate arrives with the plugin, not the CLI:
claude plugin marketplace update commitlore
claude plugin update commitlore@commitlore
An upgrade does not reach a session already running — a host resolves its MCP launcher once at session start and holds it until the session ends. Reconnect with /mcp in Claude Code, which is cheaper than restarting. commitlore doctor reports which build is actually answering you.
A new file appears under the git directory: .git/commitlore/considered.json, one per worktree, never committed.
v1.4.2
Where the MCP server gets registered stopped being a decision this tool made for
you, and the one place it made that decision wrongly for itself is fixed.
commitlore init asks which scope
commitlore init --mcp-scope user|project|local|none
…or the question itself, when there is a terminal to ask at.
| scope | what it means |
|---|---|
user |
one registration covering every repository you open. Not committed. |
project |
.mcp.json in the repository — committed, so it applies to everyone who clones it. What init used to write unconditionally. |
local |
this repository, for you only. Not committed. |
none |
write nothing — the right answer when the Claude Code or Codex plugin already carries the server. |
The three writable names are the host's own, from claude mcp add --scope, so
there is no second vocabulary to learn.
The default is user, and it is the default in both directions: what a bare
Enter takes, and what a run with no terminal uses. A script and a person who
pressed Enter end up in the same state.
If you relied on init writing .mcp.json, pass --mcp-scope project. That
path is unchanged: it still merges without disturbing other servers in the file,
still refuses to overwrite an entry you chose, and still writes the portable
commitlore mcp pair rather than a path to the machine that ran it.
user and local are written by claude, not by this tool. That file belongs
to the host and has already changed shape once; a second writer for it is a guess
that goes stale without announcing itself.
A user or local scope asked of a machine with no claude on PATH is not a
failed install and no longer reports as one — the plugin paths carry the server
themselves, so it reports clean and names the command for later.
One measurement shaped the rest
claude mcp add exits 0 on a fresh add and 1 both when the name already
exists and when it genuinely refuses — the only difference is prose. Re-running
init has to be a success, so the question is asked again in a form whose answer
is an exit code (claude mcp get), and a real refusal still reaches you in the
host's own words. That answer does not say which scope holds the name, so the
report does not claim one.
The plugin's MCP declaration moved off .mcp.json
.mcp.json at a repository root is read by two loaders: the plugin loader, which
defines ${CLAUDE_PLUGIN_ROOT}, and Claude Code's project configuration for any
session opened in a checkout, which never does. One file cannot be correct for
both, and three attempts each left every session in a CommitLore checkout with a
server that failed to connect.
The declaration is plugin-mcp.json now, named by both plugin manifests and
reached no other way. Nothing about the launch changed, and nothing about
installing or updating either plugin changes.
This only ever affected people working inside a clone of this repository.
Upgrading
curl -fsSL https://raw.githubusercontent.com/MongLong0214/commitlore/v1.4.2/install.sh | sh -s v1.4.2
An upgrade does not reach a session already running, or a plugin pinned to an
older version:
claude plugin marketplace update commitlore
claude plugin update commitlore@commitlore
…and reconnect the server in any open session (/mcp in Claude Code).