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

Heddle: Trust Enforcement and Audit Logging for Claude Desktop MCP Connections
Heddle is an open-source tool that adds trust tiers, access controls, and audit logging to Claude Desktop's MCP connections, allowing secure management of multiple services through a single interface with six starter packs included.

Open-Sourced CLAUDE.md Keeps Claude Code Agents Productive for Hours, Not Looping
A single 70-line CLAUDE.md file stops Claude Code agents from drifting into narration and looping on fixes. Sessions go from 3-hour failures to full productive lifecycles.

ATLAS: Adaptive Test-time Learning Framework Outperforms Claude Sonnet on Coding Benchmarks with $500 GPU
ATLAS achieves 74.6% pass@1-v(k=3) on LiveCodeBench with a frozen 14B model on a single consumer GPU, outperforming Claude 4.5 Sonnet's 71.4% at a fraction of the cost using constraint-driven generation and self-verified iterative refinement.

Eä: A SIMD Compiler for Python Written in Rust
A developer built Eä, a compiler for SIMD kernels in ~12k lines of Rust that generates shared libraries and Python wrappers from .ea files, achieving 6.6× speedups over NumPy without ctypes or build systems.