Two Dev.to posts describe a developer’s approach to make an AI assistant’s operating rules verifiable and, over time, self-healing. The starting problem is that rules written as instructions—such as “think before acting”—are not enforced by the system. After many Claude Code sessions, the developer finds some rules were effectively never followed, not because of refusal, but because there is no mechanism to check whether the rule is being satisfied.
To address this, the developer embeds explicit success criteria directly into the rule text using markers like [✓THINK], and stores machine-readable evidence in session transcripts. A Python script (config-health.py), used as a Claude Code Stop hook, greps transcripts for these markers and generates counts. The script logs metrics and identifies rules with low or missing execution rates.
A second component provides persistence across sessions via pending-verifications.md, which lists rules that have not yet met targets. On the next startup, BODY.md reads this file and directs the AI to focus on the pending items. When markers later appear at improved rates, the Stop hook auto-deletes resolved entries, completing a closed feedback loop that measures, remembers, and re-checks without ongoing manual monitoring. The approach relies on mechanical counting (regex/grep), file-based memory, and repeated automatic verification.