On every pull request, Correctness, Security, and Architecture run in parallel through OpenRouter, return JSON findings validated against a Zod schema, and the aggregator dedupes them into a single review post. Reviewer focus and model are configurable per repo via .ai-review.yml.
Each reviewer accepts a custom name, model, focus list, and behavior controls. Pro and higher plans can save custom panels at the account level or override the panel per repo.
Each reviewer returns a list of findings with severity, confidence, file, line, title, body, and an optional suggestion. The aggregator filters by min_confidence, dedupes by (file, line, title), sorts by severity, and truncates at max_inline_comments (default 10).
1. System prompt
Reviewer focus list, merged with your .ai-review.yml policy
2. PR diff
Sent verbatim to OpenRouter chat-completions
3. Structured output
Zod-validated JSON, parsed in the Inngest function
4. Confidence floor
Drop anything below min_confidence (default 0.75)
Finding · structured output
{
"severity": "high", // low | medium | high | critical
"confidence": 0.87, // 0..1, dropped below min_confidence
"file": "src/billing/stripe-webhooks.ts",
"line": 142,
"title": "Webhook signature verified after side-effects",
"body": "...prose for humans...",
"suggestion": "...diff-shaped fix..." // optional, posted as GH suggestion
// reviewerId is added by the runtime
}
Configure the panel per repo
Drop an .ai-review.yml in the repo root. Override the model, raise min_confidence, or skip draft PRs.