For Claude Code · one interactive file + real hook · works offline

The loop method, made deterministic

The Loop & Goal Playbook for Claude Code — Make "Done" a Check That Exits 0

Everyone's posting about the loop method for AI coding agents. Almost none of them ship the one thing that makes a loop trustworthy: a stop condition a machine can check. Claude Code's real /goal loops until a small evaluator model judges your condition met — but per Anthropic's own docs that evaluator "does not call tools," it reads the transcript, it never runs your tests. This playbook makes "done" a check that exits 0, enforced by a real Stop hook. Same loop; the stop goes from a read of the transcript to an actual run.

Instant download · no install to read · the hook is stdlib Python 3 · works offline

Updated July 2026 (v1.1) Real dogfooded hook Works offline Copy on every command Mobile-friendly
Product cover

The problem

A loop is only as good as its stop condition

"The model thinks it's done" is not a stop condition. An evaluator that reads the transcript can be satisfied by a convincing-looking turn where nothing actually passed.

▌ The loop method, as posted

  • "Keep going until it's done" — with no machine-checkable definition of done
  • A stop that reads the conversation instead of running your tests
  • A convincing transcript can pass even when nothing really did
  • Nothing to install — so nothing actually enforces the finish line

▌ The Playbook

  • "Done" is a check that exits 0 — a real predicate, not a vibe
  • A drop-in Stop hook that BLOCKS a fake "done" until your checks pass
  • A tiny runner that executes your goal's checks and writes the evidence
  • A copy button on every command — the method works with zero install

What it does

The flow, stage by stage

The interactive file walks each stage; the skill runs it for you; the hook keeps it honest.

THE PROMPT

Copy, paste, loop

The copy-paste goal + loop prompt (plus an ultra-short version). Drop in your plan, approve the GOAL block, and let it run. That alone is the method — no install required.

THE SKILL

explore → done → verify

A drop-in Claude Code skill (loop-goal) that runs explore → define-done → loop → verify → review for you, instead of you re-typing the whole method every time.

THE HOOK

Blocks a fake "done"

verify-gate.py — a real Claude Code Stop hook that refuses to let a turn end claiming success when no verification actually ran. stdlib Python 3, fails open, sanitized from my own hook.

THE RUNNER

Done = exit 0

dod-verify parses your goal's Definition-of-Done, runs its checks, and writes timestamped PASS/FAIL evidence — the receipt the Stop hook trusts before it lets "done" through.

THE TEMPLATES

Wire it into your repo

A .dod.md Definition-of-Done template and a standalone check.sh predicate, so you can point the loop at your own repo's real checks in a minute.

What's in the box

What's inside

⚠ Requirements — please read before buying

  • A web browser to read the Playbook (any modern one, works offline)
  • Claude Code + Python 3 to run the skill, hook, and runner (all stdlib — no dependencies)
  • The hook and runner were executed and confirmed before shipping (see the included VERIFY-LOG)
  • Claude Code commands (/goal, /loop) and hook syntax change between versions — confirm against /help in your version

Stop shipping fake "done"

Make the finish line a check, not a judgment call.

The method with zero install, the skill that runs it, and the real hook that enforces it. Same loop — a stop condition a machine can actually check.

Instant download · 30-day Gumroad refund policy applies

Setting up Claude Code from scratch? Start with the Claude Code Setup Playbook — $29.

See all my Claude Code tools → expressive446.gumroad.com