# ADR 000: Custom Agentic Code Review

- HTML version: https://robbiepalmer.me/projects/agentic-code-review/adrs/000-custom-agentic-code-review
- Project: Agentic Code Review (https://robbiepalmer.me/projects/agentic-code-review.md)
- Status: Deprecated
- Date: 2026-06-21
- Initiatives: Semi-autonomous Software Development (https://robbiepalmer.me/initiatives/semi-autonomous-software-development.md)

## Deprecation

[ADR 001](/projects/agentic-code-review/adrs/001-stateful-ai-code-review)
replaces this stateless GitHub Actions architecture with a stateful Cloudflare
service. It retains the multi-model finding contract and model evaluation, but
stops treating every qualifying push as a new review.

The product boundary survives in
[PDR 000](/projects/agentic-code-review/pdrs/000-own-review-policy-and-rent-inference).
Deprecating this ADR ended one implementation, not the decision to own review
policy and evidence while renting inference.

## Context

The product needed a technical experiment that could compare review
models without committing to another specialist review service. OpenRouter was
already in the repository stack and offered one API for different models and
providers. GitHub Actions could run trusted reviewer code against a Pull Request
diff without introducing an always-on service.

The experiment needed to keep one weak or unavailable scout from failing the
whole review, preserve which model contributed each retained finding, and avoid
publishing duplicate comments from independent reviewers.

## Decision

Implement the first custom reviewer as a GitHub Actions workflow with an
OpenRouter-based multi-model ensemble.

Run the configured scout models concurrently against the eligible diff. Each
scout returns structured findings for correctness, security, reliability, data loss,
concurrency, and material performance. A separate merger deduplicates
candidates and reconciles them with resolved GitHub threads. The merger does
not decide whether a finding is correct.

Treat exact scout models as configuration. Retain or replace a model using its
finding attribution, invalid responses, failures, latency, token use, and cost.
OpenRouter remains the paid gateway and merger route. Eligible free OpenCode
scouts may supplement it. A scout failure reduces reported coverage rather than
failing the review, while a total scout outage publishes an explicit
no-coverage result and skips the merger.

Keep the workflow advisory. Execute only trusted reviewer code from the base
branch, treat Pull Request content as untrusted text, and never execute
contributor code while inference credentials are available.

## Alternatives

### Use one frontier model

One model would simplify orchestration and cost attribution. It would not test
whether independent model families add useful findings. The ensemble was the
point of the experiment, so this remained a valid later configuration rather
than the starting design.

### Adopt an open-source review framework

The evaluated frameworks brought generic workflow abstractions and model
assumptions that did not match the scout-and-merger design. Adapting them
offered little advantage over a focused workflow.

### Build an always-on service immediately

A service could retain Pull Request state and control review timing. The first
experiment did not yet have evidence that justified that operational boundary.
GitHub Actions provided the shorter route to model and finding evidence.

## Consequences

The prototype made model selection measurable and allowed several providers to
contribute through one finding contract. It also kept the initial operational
footprint small.

The workflow was stateless. Every qualifying push resent repeated context,
commit frequency drove spend, and finding reconciliation became harder across
runs. GitHub API changes, provider failures, schema faults, prompt regressions,
and credential safety also became project responsibilities.

Diffs and selected context crossed the OpenRouter and model-provider boundary.
Routing needed explicit data-collection and retention controls, and those
controls could reduce model availability.

## Migration note

This structural edit removes the product scope, target-user policy, and
commercial success criteria now preserved in PDR 000. It keeps the historical
date, Deprecated status, OpenRouter adoption, security boundary, ensemble
design, and technical consequences. No architecture decision changed during
the migration.

---

Markdown index of this site: https://robbiepalmer.me/llms.txt
