# Boucle

A set of seven standalone Claude Code hooks, plus an enforce-hooks component, that block dangerous shell commands and other tool calls Claude Code's own permission system can miss, backed by over 1,900 tests and a corpus of known permission gaps.

Boucle is a collection of Claude Code hooks meant to enforce rules that CLAUDE.md text and the built-in permission system do not reliably catch: CLAUDE.md is only read at session start and can be ignored as context grows, and the permission system has known gaps such as wildcards not matching compound commands, deny rules not checking piped segments, and rules bypassed with multi-line comments.

Its seven standalone hooks intercept tool calls directly, so a blocked command such as an unsafe rm -rf never runs and Claude is shown a safer alternative instead of a confirmation dialog. A companion enforce-hooks component turns CLAUDE.md policy into enforced checks, and an audit mode reports whether hooks are installed, how many payload checks ran, and whether the setup fails open.

Installation includes a temporary first test, a full audit run from the project root, a strict verification mode, and guidance for Windows, secret pre-push checks, custom hook testing, CI and team rollout; the project also maintains a searchable corpus of known Claude Code gaps with severity ratings and workarounds, and includes a separate, optional Boucle Framework for autonomous agents with structured memory and loop management.

Website: https://framework.boucle.sh/
