Coming from promptfoo
Move the code-review part of a promptfoo suite to replz: hand-written review prompts become pull requests that shipped a bug, assertions become a one-sentence answer key graded per finding, and the report adds controls, recall per stage and a firing count for each check.
replz covers one job promptfoo is often used for: checking that an AI code reviewer catches what it should. It is not a promptfoo alternative in general and claims no compatibility with its config. Keep promptfoo for every prompt that is not a review of a pull request.
The concepts, side by side
| promptfoo | replz |
|---|---|
promptfooconfig.yaml | .sdlc/replz/config.yaml |
prompts | none: the reviewer command builds its own prompt, as it does in CI |
providers | reviewer (the model under test) and grader (the judge), each a shell command |
tests, each with vars | case files, one per pull request: base, head, pr |
assert with llm-rubric | answer, one sentence; the grader asks whether a finding describes it |
contains, regex, javascript asserts | none: a finding about the right file and the wrong bug must not pass |
| a test written by hand | a case drafted by replz propose from a revert or a fix |
| none | controls: clean pull requests, for false alarms |
| none | stages: recall per stage of the reviewer's own pipeline |
| none | checks: how often each CI check fired, and on a real bug |
promptfoo eval | replz run |
promptfoo view, --output | the text report, --json, and --record into history.jsonl |
Migrating
- Install replz in the repository the reviewer reviews:
npm install -D replz. - Point it at your reviewer. Write
.sdlc/replz/config.yamlwith the command CI runs to review a pull request, made to print its findings as JSON. Claude Code as the reviewer is a whole script. Put the judge you used inllm-rubricbehindgrader, reading the prompt from stdin. - Draft cases from history.
npx replz propose --limit 10prints a bug draft for each pull request a revert or fix blamed, and a size-matched control for each. Save them, write each answer key, and runnpx replz check. Drafting cases has the details. - Move the review tests out of the promptfoo suite. A review test with a hand-written diff and a rubric is replaced by a case from your own history. If a hand-written case matters, find or make the pull request it describes and add it as a case file.
- Swap the script.
// package.json
"scripts": {
- "eval:review": "promptfoo eval -c review.promptfooconfig.yaml",
+ "eval:review": "npx replz run --set test",
}- Run it on a schedule, not per pull request. Run replz on a schedule.
What is different on purpose
- The reviewer sees a repository, not a prompt. Each case is a worktree at the commit the reviewer saw, so it can read files beyond the diff, run tools, and follow the rules the repository had then.
- One grader call per finding. A rubric over the reviewer's whole answer can pass a review that mentions the bug in passing among ten other comments; replz asks about each finding separately and counts the case once any one matches.
- No string assertions. promptfoo's deterministic asserts are useful for formats; a review finding is prose, and matching a word in it was rejected in replz's spec.
- A finished run exits 0. promptfoo can fail a CI job on a threshold. replz reports and leaves the threshold to you, because it does not run per pull request.
What is not built
- Other providers built in. There is no provider list: a reviewer or grader is any command. An OpenAI, Anthropic or local model is a CLI call in the config.
- A web viewer, sharing, or caching of model responses.
- Red-teaming, prompt comparison, matrix runs across models.
--modelchanges the grader model only; comparing reviewers is two configs and two runs on the same cases. - Datasets from CSV or other files. Cases are YAML files, one per pull request.
The rest of replz is on replz.
Why replz
What replz measures that a prompt-eval runner does not: a reviewer's recall on bugs that really shipped, replayed at the commit it saw, with clean controls for false alarms, recall per stage, and a firing count for every check. And what it leaves out on purpose.
Claude Code as the reviewer
A reviewer script for replz that gives Claude Code your REVIEW.md as it was at the case's base, the diff, and a two-stage answer format, so replz can grade raw and verified findings separately.