claude said done. gotcha said otherwise.
// proof-of-work receipts for Claude Code
The Problem
Ask Claude to fix a bug. It says "done!" with confidence. Which files did it actually touch? Did it run the tests, or just assume they would pass? You find out the hard way - in review, in a failed deploy, at 2am.
"Done! I've patched the null check in the auth handler, updated the tests, and everything should be passing now."
Every claim is verified this session, or labeled [GUESS] in plain sight. Exact files, exact commands, exact exit codes. No ambiguity.
The Receipt
Every task ends with a structured receipt. Two independent sources: Claude writes one in prose; the bash hooks write another directly from the tool log. They can be compared.
That comparison is the whole point.
Architecture
Claude writes the receipt in prose. The hooks write it independently from the raw tool log. Claude cannot influence the hook receipt. That redundancy is the guarantee.
Loads at session start and instructs Claude to emit the receipt format after every task. Enforces the [GUESS] rule: unverified claims must be labeled, not softened, not omitted.
Run outside Claude's context window entirely. They produce the ground-truth receipt from bash and the JSONL tool log. Claude does not write it and cannot influence it.
| Script | Fires on |
|---|---|
| snapshot-git.sh | SessionStart - captures git SHA baseline |
| log-tool.sh | PostToolUse - logs every Bash/Edit/Write call |
| build-receipt.sh | Stop - generates the hook-verified receipt |
Commands
Print the last receipt from the current session.
Pass a number to see the last N receipts.
/gotcha:receipt 3
Re-run every command from the last receipt and cross-check
every file against git diff --stat. Returns a verdict:
Clear the session log and start fresh. Use when starting a new task and you do not want previous session noise in your audits.
Install
Install gotcha into Claude Code. The skill auto-activates on any coding task. No setup required. Receipts show up automatically.
Prefer to clone manually? git clone + claude --plugin-dir ./gotcha