DevFest
Warsaw

Workshop · DevFest Warsaw 2026 · Classroom

Build your own
AI code reviewer

Ivan LapaSenior Engineer (UI), Netflix
Independent AI Consultant
Google
Developer
Groups

Before we start

Disclaimer

DevDigest is a personal open-source tool built for educational purposes, not affiliated with Netflix.

All views in this workshop are my own and do not represent Netflix.

Results for CodeRabbit, Greptile, Claude, Codex and other tools come from my own runs on a demo PR. They are subjective and may not reflect how these tools work for you.

Prices are public list prices as of November 2026. Your plan, discounts or contract terms may differ.

Google
Developer
Groups
Opening
Ivan Lapa

About me

Ivan Lapa

Now

Senior Engineer (UI) at Netflix
Independent AI consultant

Before

Engineer and team lead at unicorn companies DataRobot, Gelato

AI

Developing AI tools since 2019: data preparation and feature discovery
Using AI engineering tools daily since early 2024
5+ AI products in daily use at printing companies, 2 autonomous agents

Off work

Ironman full-distance finisher
Enduro, rally, ultra-distance cycling

Google
Developer
Groups
Opening

The goal · 45 minutes from now

A reviewer that blocks a bad PR

What

Your own AI code reviewer

It comments on a real pull request and turns the check red.

Why build it yourself

You see every stage

So you know what to trust: the model is one stage, the rest is plain code.

Who decides

A human merges

The reviewer only advises.

your fork · pull request● Open
feat: post analytics dashboard
✓ build✓ tests✗ AI review
inline comment · file:linesCRITICAL
Rationale: why this breaks.
Suggestion: how to fix it.
Merge: waiting for a human

Illustration, not real output

Google
Developer
Groups
Opening

The plan · four steps

Seven stages. One of them is the model.

PR diffinput
Contextrepo + spec
Promptrules
the only AI callModelOpenRouter
Groundingin the diff?
Gatecount blockers
Inline reviewon GitHub
GivenA real pull request
Step 2Repository context
Step 1Findings you can trust
Step 3Gate + GitHub Action
Step 4More reviewers, ×N
Google
Developer
Groups
Opening

The app · QuickBlog

A small blog platform. This is what we review.

QuickBlog · write, publish, comment, moderate

Site

Stories, search, comments

Admin

Write, publish, moderate

Analytics

Views, trends, day drill-down

Google
Developer
Groups
Opening

The target · QuickBlog · a public demo PR

We are going to review this pull request

QuickBlog · analytics
28

planted defects + 3 traps

In the diff

Bugs you can point at

Only against the spec

Bugs with no line

POST /view is never called.

Same PR as in the talk.

Google
Developer
Groups
Opening

How the repo is organised

Every step has a checkpoint branch

mainstart
step-1-findingsafter step 1
step-2-contextafter step 2
step-3-gate-actionafter step 3
step-4-more-reviewersafter step 4
finaleverything

The rule

Step N starts where step N−1 ended

The start command is on every “Your turn” slide.

Fell behind?

Jump to the solution

$git stash && git checkout <branch>

The exact command is the Lost? line on each step.

Google
Developer
Groups
Opening

Setup · 4 min · do it with me

Initial setup: get the application running!

1
Use this templateall branches · same name · Public
https://github.com/burnjohn/ai-code-reviewer-workshop/generate
2
Cloneor open a Codespace
$git clone https://github.com/<you>/ai-code-reviewer-workshop && cd ai-code-reviewer-workshop
3
Add the keykey in the chat, into .env
$cp .env.example .env
4
Install
$npm ci
5
Smoke testoffline, a recorded answer
$npm run review:mock
+
Optionalprefer clicking? open the UI
$npm run ui
Google
Developer
Groups
Setup

Step 1of 4 · Findings you can trust · 8 min

Shape the findings, check them against the diff

PR diffinput
Contextrepo + spec
Promptrules
ModelOpenRouter
Groundingin the diff?
Gatecount blockers
Inline reviewon GitHub

The problem

Models invent locations

One comment on a line outside the diff, and GitHub rejects the whole review.

What we build

A typed finding + a grounding check

json_schema gives every finding a file, lines and a severity. Code drops what is not in the diff.

What you will see

Severities and DROPPED lines

Every dropped finding prints its reason in your terminal.

Google
Developer
Groups
1 · Findings

Step 1your turn · about 6 min

Your turn: findings you can trust

1
Startthe starting point
$git checkout main
2
Prompt · paste it into your coding agent
Implement Step 1.
Read specs/step-1-findings.md and follow it exactly.
Do not change tests, fixtures or any other file.
Verify: run `npm test -- schema grounding` until 10 passed.
Then run `npm run review:mock` and show me the findings.
Spec · what the agent builds from

specs/step-1-findings.md

  1. The shape of a findingsrc/schema.ts
  2. The rules in the promptsrc/prompt.ts
  3. The grounding checksrc/grounding.ts
3
Checkdone when the tests pass
$npm test -- schema grounding
10 passed
Stuck?take the finished step
$git stash && git checkout step-1-findings
Google
Developer
Groups
1 · Findings

Step 1 · what you should see

Kept, or dropped with a reason

schematic · your terminal shows the same idea
CRITICALfile in diff · lines in diffkept → inline comment
WARNINGfile in diff · lines in diffkept → inline comment
DROPPEDfile is not in the diffreason printed
DROPPEDlines are outside the hunkreason printed

Code checks the model’s output, not the model.

Google
Developer
Groups
1 · Findings

Step 2of 4 · Repository context · 8 min

Give the reviewer repository context

PR diffinput
Contextrepo + spec
Promptrules
ModelOpenRouter
Groundingin the diff?
Gatecount blockers
Inline reviewon GitHub

The problem

A missing call has no line

The diff is only the changed lines. Nothing in it says the client never calls POST /view.

What we build

gatherContext()

Project rules, the linked spec, full changed files and callers. Within a budget, wrapped as untrusted.

What you will see

The spec-only bugs show up

Run it with and without --no-context and compare.

Google
Developer
Groups
2 · Context

Step 2 · how much context is enough

Climb the ladder only as far as the bug needs

RungTokensNoiseInjection
1Rules filesCLAUDE.md · AGENTS.md · READMElowlowlow
2PR intent + linked specwhat it should dolowlowmed
3Full changed filesnot just the hunksmedlowmed
4Repo mapsymbols and structuremedmedlow
5Callerswho uses the changed functionsmedmedlow
6Retrieval / embeddingssearch the repo by meaninghighhighmed
7Agentic tool usethe model reads the repo via tools / MCPhighhighhigh

■ green = the four rungs we build in step 2

Google
Developer
Groups
2 · Context

Step 2your turn · about 6 min

Your turn: repository context

1
Startthe end of step 1
$git stash && git checkout step-1-findings
2
Prompt · paste it into your coding agent
Implement Step 2.
Read specs/step-2-context.md and follow it exactly.
Do not change tests, src/source.ts or src/index.ts.
Verify: run `npm test -- context` until 16 passed.
Then run `npm run review:mock -- --dry-run`, show me the
context log, and run it again with --no-context.
Spec · what the agent builds from

specs/step-2-context.md

  1. Linked docsextractLinkedDocs(body)
  2. Changed symbolsextractSymbols(rawDiff)
  3. CallersfindCallers(symbols, files, maxHits)
  4. The budgetassembleContext(candidates, budget)
  5. Putting it togethergatherContext(source, opts)
3
Checkdone when the tests pass
$npm test -- context
16 passed
Stuck?take the finished step
$git stash && git checkout step-2-context
Google
Developer
Groups
2 · Context

Step 3of 4 · Gate + GitHub Action · 9 min

Add a gate, run it in GitHub Actions

PR diffinput
Contextrepo + spec
Promptrules
ModelOpenRouter
Groundingin the diff?
Gatecount blockers
Inline reviewon GitHub

The problem

The model’s verdict is not a decision

It can say “approve” while listing a CRITICAL finding.

What we build

A gate in code + a GitHub Action

Count blockers by severity, post one inline review, exit 1 when there are blockers.

What you will see

A red check on your pull request

Inline comments in your QuickBlog fork in 2–3 min. A human still merges.

Google
Developer
Groups
3 · Gate + Action

Step 3 · the workflow reads hostile text

Four rules for a safe review workflow

1Trigger

pull_request, never pull_request_target

on: pull_request

2Permissions

Least privilege: only what posting a review needs

permissions: {contents: read, pull-requests: write}

3Fork guard

Skip runs from forks: no secrets for strangers

if: github.event.pull_request.head.repo.full_name == github.repository

4No PR text in run:

Never put ${{ }} with PR text into a script. Pass it through env:

env: { TITLE: ${{ github.event.pull_request.title }} }
Google
Developer
Groups
3 · Gate + Action

Step 3your turn · about 6 min

Your turn: the gate and the workflow

1
Startthe end of step 2
$git stash && git checkout step-2-context
2
Prompt · paste it into your coding agent
Implement Step 3.
Read specs/step-3-github-action.md and follow it exactly.
Do not change tests or any other file.
Do not push, commit or touch any remote.
Verify: run `npm test -- gate workflow` until 9 passed.
Then show me the final workflow file.
Spec · what the agent builds from

specs/step-3-github-action.md

  1. The gatesrc/gate.ts
  2. The workflowexamples/quick-blog-workflow.yml
3
Checkdone when the tests pass
$npm test -- gate workflow
9 passed
Stuck?take the finished step
$git stash && git checkout step-3-gate-action
Google
Developer
Groups
3 · Gate + Action

Step 3 of 4 · your turn · run it in CI

Your turn: a red check on your fork

1
Fork QuickBloguntick “main branch only”
https://github.com/burnjohn/quick-blog
2
Enable Actionsthe Actions tab of your fork
“I understand my workflows, go ahead and enable them”
3
Add your keySecrets → Actions → New secret
OPENROUTER_API_KEY
4
Add the workflowfork → Add file → Create new file; paste your yml
.github/workflows/ai-review.yml
5
Open the PRanalytics → main, in your fork
$gh pr create -R <you>/quick-blog -B main -H analytics -t Analytics -b ""
Keep the analytics branch: untick “Copy the main branch only”.
Google
Developer
Groups
3 · Gate + Action

Step 4of 4 · More reviewers · 7 min

Add more reviewers, merge their findings

PR diffinput
Contextrepo + spec
Promptrules
ModelOpenRouter
Groundingin the diff?
Gatecount blockers
Inline reviewon GitHub

The problem

One generalist misses whole classes

In the talk, 8 diff agents and 1 spec agent each found 22 of 28, and their finds barely overlap.

What we build

Agents as .md files + dedup

Security and spec-conformance run in parallel. The same file, lines and title merge into one finding.

What you will see

A table per agent

Findings, tokens and cost for each agent, then the total after dedup.

Google
Developer
Groups
4 · More reviewers

Step 4your turn · about 6 min

Your turn: more reviewers

1
Startthe end of step 3
$git stash && git checkout step-3-gate-action
2
Prompt · paste it into your coding agent
Implement Step 4.
Read specs/step-4-more-reviewers.md and follow it exactly.
Do not change tests or src/ files other than src/dedup.ts.
Verify: run `npm test` until 45 passed.
Then run `npm run review:mock -- --dry-run` and show me
the three agents.
Spec · what the agent builds from

specs/step-4-more-reviewers.md

  1. Two agent files.reviewer/agents/
  2. The merge stepsrc/dedup.ts
  3. Already wired, nothing to write
3
Checkdone when the tests pass
$npm test
45 passed
Stuck?take the finished step
$git stash && git checkout step-4-more-reviewers
Google
Developer
Groups
4 · More reviewers

Step 4 · from the talk · same PR · 28 core defects

The combination found the most

8 diff agentsdiff-only reviewers
22/28
1 spec agentreads the spec
22/28
Combinedunion of both
27/28

Their finds barely overlap, so dedup + union wins.

Source: DevDigest talk, same QuickBlog PR, 28 core defects

Google
Developer
Groups
4 · More reviewers

Show · 6 minutes

One engine, four doors

CLInpm run review
GitHub Actionevery pull request
MCP toolClaude Code · branch stretch/mcp
UInpm run ui · ours, live
review engine
one pipeline, four ways in
npm run ui · three agents, mock run

At home

$claude mcp add ai-reviewer -- npx tsx mcp/server.ts
Google
Developer
Groups
5 · Show + wrap

Where it grows

The same engine, grown into a product

DevDigest studio · quick-blog PR #44 · recording
Google
Developer
Groups
5 · Show + wrap

After today

Three next moves

More context

Repo map

Give the model the structure of the repo, not only the changed files.

A skeptic

Verifier agent

A second agent tries to refute each finding before it is posted.

A score

Evals

Plant defects in PRs, count what you catch, watch it over time.

Google
Developer
Groups
5 · Show + wrap
DevFest
Warsaw

Thank you · questions?

Build it at home

Workshop repo

https://github.com/burnjohn/ai-code-reviewer-workshop

QuickBlog (the target)

https://github.com/burnjohn/quick-blog

Workshop repo

Google
Developer
Groups

Thank you

Let's stay in touch

LinkedInIvan Lapalinkedin.com/in/ai-consult
Instagram@burning_johnnyinstagram.com/burning_johnny
CodeWorkshop repogithub.com/burnjohn/
ai-code-reviewer-workshop
Google
Developer
Groups