Stop putting rules in CLAUDE.md: use Claude Code hooks for deterministic tasks

Pretend_Sell6592 · reddit · 2026-09-07

A developer shares a workflow realization: rules like "run the formatter after edits" or "don't touch this file" were sitting in CLAUDE.md, relying on Claude to remember them. Claude Code's hooks can instead enforce these deterministically at session checkpoints.

The takeaway: if a rule is deterministic, let the tooling enforce it instead of trusting the model to comply.

Original post →

More from coding & agent

coding & agent channel →