← All case studies Case study · Governance

repogenic.com governs its own changes

This site runs on the same three-tier review it recommends to clients: deterministic gates, an advisory AI reviewer, and a human who makes the final call. Here is what each tier caught on one real pull request, and what it cost.

Repository repogenic.com source Stack GitHub Actions, Claude Code Method RepoGenics
pull-request #6
Tier 1   developer + intent
Tier 2a  deterministic gate  ✓ ~20 s
Tier 2b  AI reviewer         ✓ ~2 min
Tier 3   human merge         ✓
Red on 2a: do not merge. 2b is advice, not a vote.
3
Review tiers on every pull request
~20 s
For the deterministic gate: lint, tests, HTML and links
$0.36
Measured API cost of one AI review (about 2 minutes, 9 to 12 turns)
7
Real issues caught before merge on the first PR

The problem

“AI writes the code, and the PRs pile up on my desk.”

If the review is slow, the pipeline is missing tiers, not people.

A common complaint: AI makes code cheap, so the review queue explodes and lands on one tired engineer. The answer is not to slow down generation. It is to make most of the review automatic, so the human sees a change that is already close to right.

The rule we hold ourselves to:

  • If a tool can decide it deterministically, a tool decides it, and the result is pass or fail.
  • The AI reviewer handles judgment: intent drift, risk, scope and deploy safety. It advises and never blocks.
  • A person reads the flags and owns the merge.
  • Every tier leaves evidence on the pull request.

How it works

Three tiers, each doing what it is best at

Tier 2 is split on purpose: certainty from tools, judgment from the model.

1

Developer

Changes start from a written intent with success criteria, so the code arrives already aimed at a checkable outcome.

2a

Deterministic gate

ShellCheck on every deploy script, Python lint and guardrail tests, HTML validation and an internal-link check. No AI, no secrets, pinned versions.

2b

AI reviewer

Claude Code runs a repo-local review skill and a read-only subagent, then posts inline comments and a summary. It is told to skip lint and focus on judgment.

3

Human

The engineer reads a short, ranked list of findings with evidence, then decides. No line-by-line hunting for typos.

✓

Evidence

A pass/fail run, a labelled AI outcome and the review comment stay on the PR as the permanent record.

The evidence

What each tier caught on PR #6

The pull request that added the deterministic gate was the first one reviewed by all three tiers.

Gate: HTML validatorFound invalid markup on the live Case Studies page: a block element nested inside an inline one. Fixed with no visual change.
Gate: guardrail testsWent red on the first run because a test dependency was no longer installed by its parent package. A real gap, caught in seconds.
AI: unpinned dependenciesFlagged that the test job used unpinned SDK versions, so an upstream release could turn the gate red with no change in the repo. Versions are now pinned.
AI: overstated docsNoticed the docs called the checks “required”, but the repository’s plan cannot enforce required checks. The docs now state the real rule: do not merge on red.
AI: link checker blind spotShowed that a link escaping the site folder could pass the check yet 404 in production. The checker now rejects it, and that was verified with a planted bad link.
AI: reviewing its own plumbingOn the final commit it flagged that the outcome-labelling rule was too broad, plus a fragment edge case in the link checker. Both fixed in the follow-up.
Human: the callMerged once the deterministic gate was green, treating the AI findings as advice: fixing the real ones and recording the rest.

Why it matters

Fast review is a design choice

Certainty where it is possible

Lint, tests and link checks are cheap, fast and never wrong in the same way twice. Making them pass/fail means the AI is never the only line of defence.

Judgment where it is needed

The AI reviewer found issues no linter would: docs that overstated a control, a test that depended on someone else’s release schedule, and a gap in the review tooling itself.

Humans on decisions, not nits

At about 36 cents and two minutes per review, the reviewer pays for itself the first time it saves an engineer an hour. The human’s time goes to the call, not the checklist.

GitHub ActionsClaude CodeClaude Code skillsSubagentsShellCheckRuffhtml-validatePython unittestIntent-driven engineering

Want this on your repositories?

Deterministic gates, an AI reviewer tuned to your codebase, and a human in charge. Set up in days, with the evidence on every pull request.

Talk to Repogenic