Mneme: A PreToolUse Hook That Blocks Claude Code Edits Violating Architecture Decisions

Marcus Dillavou built Mneme, a PreToolUse hook that intercepts Claude Code edits and checks them against a recorded architecture decisions file before they hit disk. The goal: prevent banned libraries, rejected patterns, and forgotten conventions from reappearing in new files.
Installation
pip install mneme python scripts/install_claude_code.py
This writes the hook entry into .claude/settings.json and installs four slash commands:
/mneme-check— run a violation check/mneme-context— pull context for current file/mneme-record— record a new decision/mneme-review— review existing decisions
How It Works
When Claude attempts an edit, Mneme compares the operation against keyword-indexed decisions. If a violation is detected, the hook blocks the operation and returns the decision ID as feedback. Claude sees the restriction, understands why, and adjusts its output — no manual override needed.
The hook fails open: if Mneme isn't on PATH or times out, it exits 0 and Claude Code proceeds normally. It only blocks when mneme check actually returns a violation verdict.
Edge Cases
Retrieval is keyword-based, so scope of decisions matters. The author is actively looking for real-world feedback on whether the hook fires correctly in production projects.
📖 Read the full source: r/ClaudeAI
👀 See Also

Vyra: Intelligent Web Video Editor for Claude Agents via MCP
Vyra indexes footage so Claude can semantically search and edit video directly—supports motion graphics, music sync, smart masking, transcript editing, color grading, and 30+ effects.

OpenClaw Browser Relay Chrome Extension Alternative to Manual Configs
A Reddit user reports success with a Chrome extension for OpenClaw browser relay after manual configuration attempts caused system crashes and debugging headaches.

Browser39: A Headless Web Browser for AI Agents
Browser39 is a headless web browser designed specifically for AI agents that converts web pages to token-optimized Markdown locally, runs JavaScript, manages cookies and sessions, queries the DOM, and fills forms. It's a single binary with no external browser needed, no fees, and no external service.

Kula: Self-contained Linux server monitoring with zero dependencies
Kula is a lightweight Linux server monitoring tool that runs as a single binary with no external dependencies or databases. It collects system metrics every second from /proc and /sys, stores them in a built-in tiered ring-buffer, and provides both web dashboard and terminal TUI interfaces.