provedone
Guides

The gate

provedone gate reads a commit message or a PR body and decides whether it carries a receipt: what passes, what blocks, the fix it prints, its exit codes and its --json envelope.

provedone gate <file> reads one file, a commit message or a pull request body, and asks one question: does it say how the change was checked? It answers in one line, and in enforce mode it exits 1 when the answer is no.

npx provedone gate .git/COMMIT_EDITMSG                 # observe: passes, logs what enforce would block
npx provedone gate pr-body.md --mode enforce           # blocks a body with no receipt

In a commit-msg hook, lefthook passes the message file as {1}; the hook recipe shows the wiring.

What passes

A message with at least one Verified-by: line that has a value.

Output of receipt.txt
feat: faster help

Verified-by: npm test -> exit 0 (sha256:85f7e552faae)
Not-checked: Windows
Output of npx provedone gate receipt.txt --mode enforce
provedone: receipt

A message that says it was not verified, and why.

Output of none.txt
docs: fix a typo

Verified-by: none (typo in a comment)
Output of npx provedone gate none.txt --mode enforce
provedone: unverified, with a reason

A merge commit, whose subject starts with Merge : it carries its parents' receipts.

Output of merge.txt
Merge branch 'main' into faster-help
Output of npx provedone gate merge.txt --mode enforce
provedone: merge commit

What blocks

No Verified-by: line at all.

Output of bare.txt
fix: make CI green

# Verified-by: lines in a commit template's comments are not read.
Output of npx provedone gate bare.txt --mode enforce
provedone: no Verified-by: line. fix: run `provedone stamp --run "<the command that proves it>" --not-checked "<what you did not check>"` and paste its lines, or add `Verified-by: none (<why it needs no check>)`

A none with no reason. "Not verified" is an answer only with the reason beside it.

Output of bare-none.txt
chore: bump

Verified-by: none
Output of npx provedone gate bare-none.txt --mode enforce
provedone: "Verified-by: none" gives no reason. fix: write it as `Verified-by: none (<why it needs no check>)`

Every block ends in fix:, naming the line to add.

What it does not check

The gate reads the shape of the receipt, not its truth. It does not re-run the command, compare the digest, or look at the exit code: a pasted -> exit 1 passes, and so does a typed line that stamp never wrote. What it guarantees is that every commit says something about how it was checked, in a form git log can query. Whether that was enough is for the reviewer who reads it, and, for an intent's success criteria, for provedone done, which reads the stamps that actually ran.

Exit codes

ExitWhen
0a receipt; or any message in observe or off; or the escape let it through
1enforce, no receipt, and fewer than two blocks in this session
2a usage error: no such file, an unknown mode

Modes and the escape covers the modes, and what "two blocks in this session" means.

As data

--json prints burgee's envelope: the verdict, the decision and the fix as fields. The run below names its own session, so the two blocks above do not count against it.

Output of PROVEDONE_SESSION=json-demo npx provedone gate bare.txt --mode enforce --json
{"ok":false,"data":{"exitCode":1,"mode":"enforce","ok":false,"reason":"no Verified-by: line","fix":"run `provedone stamp --run \"<the command that proves it>\" --not-checked \"<what you did not check>\"` and paste its lines, or add `Verified-by: none (<why it needs no check>)`","blocked":true,"bypass":false},"meta":{"provenance":{"mode":{"source":"flag","location":"--mode"}}}}

On this page