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

Local Behavioral Monitoring System with MCP Pipeline and Claude Code
A developer built a local behavioral monitoring system called BRAIN that tracks app switches, file operations, and dev sessions, piping data through a custom MCP server to Claude Code. The system runs 100% locally with zero cloud dependency.

Developer Builds LibraHQ App to Solve AI Agent Memory Problem
A developer created LibraHQ, a free notes app that serves as a shared memory layer between chatbots and coding agents. The app records important notes and decisions from chats and stores them for future sessions, addressing the problem of AI agents forgetting previously made decisions.

Zot: A Lightweight Terminal Coding Agent Now Supports Claude Opus 4.8
Zot is a minimal terminal coding agent distributed as a single static Go binary with no runtime or Docker dependencies. It now supports Claude Opus 4.8 along with dozens of other models.

Brain-MCP Developer Documents Tools for Claude AI Instead of Humans
A developer maintaining the Brain-MCP server added a 'For AI Assistants' section to documentation with behavioral instructions, resulting in Claude using tools more intelligently and proactively injecting context when topics change.