AI Code Review and Spec Verification: Running Both on Every Pull Request
Your AI reviewer comments on the diff; spec verification checks the code against the rules you validated. How to run both on one pull request.
November 2, 2026 · 5 min read
If your team already runs an AI reviewer on every pull request, keep it. This article starts from that setup and adds a second check next to it. The goal is simple. Each pull request gets two kinds of feedback, from two tools that look at different things and rarely step on each other.
What each layer reads
An AI reviewer reads the diff. AI code review tools such as CodeRabbit comment on style, likely bugs, risky patterns and known vulnerabilities. They work from the code in front of them, and they do that job well, at a volume no human team can match.
Spec verification reads something else. It starts from the validated spec, meaning the business rules, journeys and invariants your team agreed on, and checks the delivered code against each one. In Lyriks that check runs on a deterministic engine, built on graph rewriting: same code, same spec, same verdict. Same code, same spec, same answer every time.
The first tells you how the code is written. The second tells you whether it does what was decided. Before a merge, you want both answers.
One pull request, two reports
Here is an illustrative case. A SaaS product has a plan change feature, and its validated spec holds two rules.
- Upgrade mid-cycle. The customer pays the price difference, prorated to the days left in the current period, and the new plan starts right away.
- Downgrade mid-cycle. The current plan stays active until renewal. The lower price applies from the next period, with no refund for days already paid.
A developer asks a coding assistant to add annual billing. The assistant adds annual plans, updates the pricing code and, while it’s in there, merges the upgrade and downgrade paths into one shared function. Less code to maintain. Tests pass.
The pull request opens and both checks run.
The AI reviewer comments. It flags a date calculation that ignores time zones. It suggests pulling a hardcoded number into a named constant. It notes that a currency amount is stored as a float. All three are fair, and the developer fixes them in a few minutes.
The implementation report comes back. Every rule lands in one of four statuses.
- Conformant. Upgrades still charge the prorated difference and switch plans immediately.
- Regression. Downgrades now apply the lower price at once and credit the unused days, because the shared function treats both directions alike. The report names the rule and the function.
- Addition. Annual plans prorate by month instead of by day. Nobody asked for that, so someone has to decide whether to keep it.
- Omission. The spec sends a confirmation email on downgrade. The new code path skips it.
The two lists don’t overlap. The reviewer had no way to know downgrades were meant to wait for renewal, since that intent never appears in the diff. The verification engine has no opinion about floats or constant names. Each one covered a blind spot of the other.
What each one catches that the other can’t
AI review is strong on anything visible in the code itself. Unsafe input handling, a missing null check, a slow query, a confusing name, a dependency with a known flaw. None of that needs to know your business.
Verification is strong on anything that depends on intent. A rule quietly rewritten during a refactor. A feature added without anyone asking. A requirement that was planned and never built. Behavior that used to work and now doesn’t. You can only see those by comparing the code to a reference outside it.
This matters because people are already stretched. In Sonar’s State of Code Developer Survey (January 2026, more than 1,100 developers), 96% said they don’t fully trust AI-generated code, yet only 48% always verify it before committing. Two focused reports are easier to act on than one long diff read under time pressure.
Where each check sits
Run the AI reviewer as soon as the pull request opens, so the developer cleans up quality issues while the context is fresh.
Treat the implementation report like a failing test. A regression or an omission should stop the merge until someone fixes the code or changes the spec on purpose. Additions are different. They go to whoever owns the rules, who keeps them or sends them back.
Verification can also start earlier than the pull request. Once the annual billing change is described, the validated spec goes to your coding assistant (Claude Code, Cursor or Copilot through MCP) with each rule and its source. The engine checks what comes back, rule by rule, and every gap returns to the assistant until all the rules hold. Often the report is already clean by the time a human looks at it.
Setup checklist
- Leave your AI reviewer in place. Nothing about it needs to change.
- Pick one module. Billing, pricing, or whichever part of the code your team hesitates to touch. A pilot on one or two modules is enough to judge.
- Get its rules into a spec. For existing code, reverse-specify the module so each rule points to the code that implements it, then have the rule owner validate the result.
- Connect your coding assistant over MCP. It should receive the validated rules with their sources, not a paraphrase.
- Agree on merge policy. Block on regressions and omissions. Route additions to the rule owner.
- Name the readers. Developers act on review comments. The people who own the business rules act on the implementation report.
- Look at both outputs after a few releases. Check whether anything slipped through that neither layer flagged, and adjust which modules come next.
Two reports, two readers
The developer who opened the pull request reads the review and tidies the code. The person who owns the plan change rules reads the implementation report and decides what to do with each gap. Neither has to read the other’s report closely, and nobody has to hunt for a misplaced proration rule in a long diff.
The Verify AI code page shows the full loop. To try it next to your current reviewer, on one module of your own, book a demo.