Skip to content

agents: Add LLM checks, review rules judged by a model - #41350

Draft
def- wants to merge 1 commit into
MaterializeInc:mainfrom
def-:pr-llm-checks
Draft

def- wants to merge 1 commit into
MaterializeInc:mainfrom
def-:pr-llm-checks

Conversation

@def-

@def- def- commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

An LLM check is a review rule in prose, for what no lint or test can enforce. A check is .agents/checks/<name>/CHECK.md: frontmatter with the paths it is about, the model and effort that judge it, and example changes it must flag (red) or pass (green), followed by the rule.

bin/llm-check run judges the working tree against where it branched off main, together with the pull request's description, or the branch's commit messages while there is none. Every check whose paths the change touches gets a model run of its own. The judge is handed the diff of those paths and can read the checkout, but cannot change it. It is claude, codex (--codex) or opencode on OpenRouter (--openrouter). bin/llm-check eval replays the examples, each in a worktree at its own commit, and fails unless every run gives the expected verdict.

Three checks to start with: debug_assert_side_effects, catalog_migration_is_frozen and refactor_changes_no_behavior. The checks run locally only for now. The mz-llm-checks skill runs them from Claude Code and Codex, and .agents/checks/README.md is the guide for adding one. Shell completion offers the commands, the flags and the names of the checks.

An LLM check is a review rule in prose, for what no lint or test can
enforce. A check is `.agents/checks/<name>/CHECK.md`: frontmatter with the
paths it is about, the model and effort that judge it, and example changes
it must flag (red) or pass (green), followed by the rule.

`bin/llm-check run` judges the working tree against where it branched off
`main`, together with the pull request's description, or the branch's
commit messages while there is none. Every check whose paths the change
touches gets a model run of its own. The judge is handed the diff of those
paths and can read the checkout, but cannot change it. It is `claude`,
`codex` (`--codex`) or `opencode` on OpenRouter (`--openrouter`).
`bin/llm-check eval` replays the examples, each in a worktree at its own
commit, and fails unless every run gives the expected verdict.

Three checks to start with: `debug_assert_side_effects`,
`catalog_migration_is_frozen` and `refactor_changes_no_behavior`. The
checks run locally only for now. The `mz-llm-checks` skill runs them from
Claude Code and Codex, and `.agents/checks/README.md` is the guide for
adding one. Shell completion offers the commands, the flags and the names
of the checks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant