jev-commit
Pre-commit hook where one Jev call judges whether the commit message matches the staged diff, flags debug leftovers and unmentioned work, and blocks only when it detects a…
# jev-commit
Your agent writes the code, then writes the commit message about the code. Nothing checks
that the two agree. This does, in one call to Jev, before the commit lands.
```yaml
# .pre-commit-config.yaml
repos:
- repo: https://github.com/valentynkit/jev-commit
rev: v0.1.0
hooks:
- id: jev-commit
```
```sh
pre-commit install --hook-type commit-msg
```
Four cents per thousand commits. It warns and gets out of the way. The one thing it stops is
a credential on an added line.
## What it checks
Five questions about the message and the staged diff together, in one request. A high number
is always the bad direction.
| check | flags when |
|---|---|
| message is filler | the message makes no checkable claim: `wip`, `fix`, `update`, a bare label |
| contradicts the diff | a claim in the message is not visible in the hunks it names |
| debug leftovers | a `print` added to trace execution, a commented-out block, a hardcoded localhost, a skipped test |
| unmentioned work | a path the message never names and does not imply |
| secret shaped | a credential value written out on an added line |
```
jev-commit · 2 files · +5 −0 · ~221 tokens · 1 request
jev-1.13.0 · 19 ms · $0.00001
message is filler █░░░░░░░░░░░ 0.07
contradicts the diff █████████░░░ 0.79 ✗
debug leftovers ███████████░ 0.88 ✗
unmentioned work █████████░░░ 0.76 ✗
secret shaped ░░░░░░░░░░░░ 0.04
3 findings, commit allowed
```
The message promised a null check. The diff added one, plus a new endpoint and a
`print("HERE")`. The commit still lands, because a warning you cannot ignore stops being a
warning and starts being an outage.
## Why Jev and not a chat model
Jev is TypeSafe's decision model. It does not write text, it answers type