[ Shipped Oct 16, 2026 ] Idea #4
diffrails
Instruction files drift; hooks don't. diffrails reads the conventions in your AGENTS.md / CLAUDE.md, turns the ones a diff can show into rules, and checks every commit against them, whether a person or a coding agent wrote it.
The pitch
A CLI that reads your AGENTS.md or CLAUDE.md conventions and generates pre-commit hooks that inspect the git diff, for example flagging direct calls that should go through your diagnostics library. It can also replay recent agent commits to show which rules got violated most.
Why now
Geoffrey Huntley argues that hooks beat instruction files, which drift. Claude Code and Codex are shipping new releases, and Anthropic is rebuilding source control around the surge in agent-written changes.
Sparked by
- anthropics/claude-code v2.1.300
- openai/codex 0.163.0
- Redesigning source control at Anthropic
- Quoting Geoffrey Huntley
The factory pitched this as βGit-Diff Guardrails: Pre-commit Hooks for Agents.β Devin built and shipped it from that spec.