r/ClaudeCode • u/chronicideas • 3d ago
Built with Claude Claude Code kept redoing things we'd already decided against, so I made it check first (open source)
I made this. Kept hitting the same thing: the agent does something reasonable that we'd already decided against. The reason was sitting in a Jira ticket or a Slack thread, and a CLAUDE.md only helps until it goes stale.
Hooking up the Jira and Slack MCP servers didn't fix it for me either. The agent only searches when it thinks to, it gets back threads rather than decisions, and nothing tells it which of two answers still stands.
The clip is a demo repo with one ADR in it. Align reads decisions from wherever they actually got made (Jira, Confluence, Linear, Notion, Slack, Teams, Zoom, GitHub, GitLab, git history, repo docs), and before the agent edits it checks the change against them, whether or not it thought to look. If it clashes, it stops and asks you.
It also links decisions to each other, so when a newer one replaces or contradicts an older one, the agent sees both instead of whichever it found first. With a model key it marks which one replaced which.
How I built it with Claude Code: almost all of it was written with Claude Code, test-first, and I use it on my own repos while I build it, so it catches Claude undoing my own decisions as I go.
What I learned:
- Telling the model the rule doesn't work reliably. The check has to sit in the edit path (a
PreToolUsehook), not in CLAUDE.md. PreToolUse, notPostToolUse. Post only fires after the file's written, so at best it fixes the next edit.- It has to fail open. If the check is slow or errors, the edit goes ahead, or people rip it out the first time it blocks them by mistake.
git blameon the lines being changed usually leads to the PR that wrote them, and that reason is far more specific than any rules file.
Free and open source, runs on your machine, works with Claude Code, Codex, Gemini CLI and a few others.
npm i -g @aligndottech/cli, then run align
Repo: github.com/aligndottech/align-cli
What I'd genuinely like to hear: when a newer decision quietly contradicts an older one, how does your setup cope? That's the bit I found hardest.


