Clawback: Hooks-based implementation of leaked Claude verification loops

Clawback is a GitHub project that implements the verification loops from the leaked Claude source map as mechanical hooks rather than prompts. The approach addresses the limitation where prompt-based verification (like iamfakeguru/claude-md's "you are FORBIDDEN from completing without running tsc") can be skipped by the model under context pressure.
Hook architecture
The system splits the problem into two layers:
- Hooks (mechanical, can't be skipped):
- Stop hook: Runs typecheck + lint when Claude tries to complete. If it fails, exits with code 2, forcing Claude to keep fixing. Three consecutive failed blocks trigger a circuit breaker.
- PostToolUse: Auto-formats and lints after every file edit.
- PreToolUse: Blocks edits to .env and lockfiles before Claude touches them.
- PostCompact: Re-injects git state and gotchas.md after context compaction.
- CLAUDE.md (behavioral): For what hooks can't enforce, including phased execution (≤5 files per phase), plan vs build separation, context decay awareness, and mistake logging.
Technical details
The tool auto-detects the stack by looking for configuration files: tsconfig.json, go.mod, Cargo.toml, pyproject.toml, and composer.json. It requires no configuration and has zero dependencies. Clawback works alongside iamfakeguru's CLAUDE.md project, not instead of it.
The implementation is based on the leaked verification loops that were gated behind USER_TYPE === 'ant' in the source map. The GitHub repository is available at https://github.com/LZong-tw/clawback.
📖 Read the full source: r/ClaudeAI
👀 See Also

Workaround for ChatGPT Project Migration Gap: Export Scripts and Prompts
A developer created Python scripts and Claude prompts to migrate conversations from ChatGPT to Claude when ChatGPT's data export lacks project membership information. The solution extracts conversations using titles captured from the interface.

Mastering Antropic Subscription Modes: Haiku, Sonnet, and Opus
Explore Antropic's innovative subscription modes—Haiku, Sonnet, and Opus—designed to enhance your AI coding experience with tailored features and pricing.

SquarePact Word Add-In Connects to OpenClaw Gateway for Agentic Document Editing
SquarePact's Word add-in connects to your own OpenClaw gateway over websocket. The agent proposes edits shown as approval cards, with stale edit detection and retry logic for malformed JSON from smaller models.
Terry Tao Ports 24 Java Applets to JavaScript with LLM Agent — Finds Bugs in Original Code
Terence Tao used an LLM coding agent to port his 1999 Java applets to JavaScript in hours. The agent found two bugs in the original code and introduced only one minor drag-handling issue.