liveBook · Manning

Two-pass review architecture

As explained in Vibe Engineering

A first-pass filter is a preliminary low-cost evaluation that selects items requiring a more expensive subsequent evaluation.

A two-pass review architecture uses a cheap first-pass filter to scan every changed file, then routes flagged files—and security-sensitive paths—to an expensive deep review. It reduces cost by concentrating model attention where risk is higher, but silently inherits the filter’s false negatives. section 9.5.5 section 9.2.4

Implement the pattern with explicit routing and measurement:

  • Run the inexpensive model across every changed file for formatting, naming, imports, dead code, and obvious logic defects. section 9.5.5
  • Send first-pass findings and files touching authentication, payments, or data access to the deeper reviewer. section 9.5.5
  • Sample roughly one in twenty files cleared by the filter and compare results with the full review to measure missed issues. section 9.2.4

CI cost routing

One pipeline ran Haiku at about $0.001 per file and escalated selected files to Sonnet at about $0.02. In the reported workload, Sonnet reviewed 15 of 45 daily files and monthly cost fell from $620 to $175 while reported issue coverage stayed the same; another configuration reported a 56% reduction, demonstrating that savings depend on routing and workload. section 9.5.5 section 9.2.4

Table 9.1 Change of costs between models
Task Type
Sonnet
Haiku
GPT-4.1-mini
 
Model to be selected
Tab completion
94%
93%
92%
Any (≈)
Import statements
97%
96%
96%
Any (≈)
Boilerplate generation
91%
88%
87%
Any (≈)
Unit test scaffolding
89%
82%
80%
Sonnet*
Inline refactoring
90%
83%
81%
Sonnet*
Function implementation
88%
74%
72%
Sonnet
Complex debugging
85%
61%
58%
Sonnet
Multi-file refactoring
82%
52%
49%
Sonnet
Architecture planning
79%
41%
38%
Sonnet

Compare model performance by task complexity before deciding which tasks deserve escalation. section 9.2.4

How Vibe Engineering covers it

How deep it goes
Explains routing, security bypasses, costs, and shadow evaluation, but stops short of specifying a complete implementation.
Examples
Uses changed-file review, Haiku-to-Sonnet escalation, security-sensitive paths, cost figures, and random cleared-file sampling.
What it assumes
Assumes changed-file CI events, model API access, and defined security-sensitive paths.
What you can do after
Operate/configure a CI review pipeline with cheap triage, targeted escalation, and measured false-negative risk.
How it connects
Connects CI pipelines with model routing, security scanning, and shadow evaluation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.