[ 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

The factory pitched this as β€œGit-Diff Guardrails: Pre-commit Hooks for Agents.” Devin built and shipped it from that spec.