# Verify before done

> Done means a named check passed with a real exit code - not the model saying so. Enforcement is a Stop hook, so it holds when session discipline decays.

URL: https://bartlomiejkrupa.dev/notes/verify-before-done/
Category: rule | Updated: 2026-07-29
Summary: Done means a named check passed with a real exit code - not the model saying so. Enforcement is a Stop hook, so it holds when session discipline decays.

**Verify before done** is the rule that completion must be machine-checkable: a named check ("tests pass", "linter clean"), its real exit code, an honest report if it fails. "Mostly working" and "tests skipped per request" are not acceptable final answers.

## Rule

1. Define a [verifiable completion condition](/notes/verifiable-completion-condition) before the agent starts.
2. Require proof in the transcript - exit code, command output, clean `git status` - not a prose claim.
3. Enforce with a Stop hook ([hook over prose](/notes/hook-over-prose)), not a skill the agent may ignore.
4. If the evaluator only reads the transcript ([/goal evaluator](/notes/goal-evaluator-transcript-only)), surface the proof in conversation or it cannot be judged.

A skill the agent *may* consult decays as constraints get buried in history. A hook the harness *enforces* holds regardless of context drift. In the [minimal Claude Code harness](/articles/claude-code-harness-starter), that Stop hook is one of three files that change behavior even when nobody remembers they exist.

Copy-paste enforcement: [Stop hook verify-done](/notes/stop-hook-verify-done).

Sources:
- Best practices for Claude Code: https://code.claude.com/docs/en/best-practices
- Keep Claude working toward a goal: https://code.claude.com/docs/en/goal
