Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ingrain

Problem: your coding agent keeps breaking what your team already settled. It re-adds the dependency you removed, brings back the pattern you banned, and repeats the mistake you corrected last week.

Solution: ingrain keeps those rules in your repo, puts the relevant ones in front of the agent right before it edits a file, and blocks edits, commits and PRs that break them.

Rules come from two places:

  • Decisions you record (or that ingrain decisions extract proposes from your AGENTS.md, PRs, reviews, commits and sessions): “billing calls the payments client, never raw fetch”, with a reason, a scope and optional checks. They live in decisions/.
  • Lint rules learned from your corrections: when you keep fixing the same thing in agent code, ingrain rules mine and ingrain rules propose turn it into an ast-grep rule, tested on your history. They live in .corrections/rules/.

Nothing becomes a rule without a person accepting it.

Where to go next