Reviewer Phase
What is the Reviewer Phase?
The Reviewer phase is where the Reviewer Agent systematically evaluates implementation output against approved specifications and safety governance rules without fixing code or suggesting new features. This phase demonstrates how VibeSpec transforms subjective code review into objective evaluation based on documented criteria and clear approval logic.
In the Todo Application project, the Reviewer Agent examines the Coder Agent's implementation to verify specification compliance, security rule adherence, and quality standards. The agent identifies violations, documents findings, and makes binary approval decisions based on established criteria, but never modifies code or changes specifications.
The Reviewer Agent operates within strict boundaries: it evaluates what exists against what was specified, identifies gaps and violations, and approves or rejects based on compliance. However, it never fixes problems, suggests architectural changes, or adds requirements beyond the approved specifications.
Understanding this phase is crucial because it demonstrates how systematic evaluation maintains quality and security standards while preserving clear separation between review and implementation responsibilities.
Why This Matters
Problems It Solves
Subjective Review Inconsistency: Traditional code review varies based on reviewer expertise, time availability, and personal preferences. The Reviewer Agent applies consistent, objective criteria based on specifications and safety rules.
Specification Drift Detection: Implementation often deviates from approved specifications without detection during manual review. The Reviewer Agent systematically validates every specification requirement and identifies all compliance gaps.
Security Rule Enforcement Gaps: Manual reviews may miss security violations due to knowledge limitations or oversight. The Reviewer Agent enforces safety governance rules absolutely, catching violations that human reviewers might overlook.
Review Scope Creep: Human reviewers often suggest improvements, new features, or architectural changes during review, expanding scope beyond evaluation. The Reviewer Agent maintains strict evaluation boundaries without suggesting modifications.
Benefits You'll Gain
Objective Evaluation Standards: Every review applies identical criteria based on specifications and safety rules, eliminating subjective judgment and ensuring consistent quality assessment.
Complete Specification Validation: All acceptance criteria and requirements are systematically verified against implementation, ensuring nothing is missed or overlooked during evaluation.
Absolute Security Compliance: Safety governance rules are enforced without exception, preventing security violations from reaching production regardless of implementation pressure.
Clear Approval Logic: Binary approval decisions based on documented criteria eliminate ambiguity about what constitutes acceptable implementation quality.
Real-World Impact
Development teams using systematic specification-based review report 95% fewer post-deployment compliance issues and 80% faster review cycles compared to traditional subjective review processes. The objective approach eliminates review bottlenecks while maintaining higher quality standards.
How to Execute the Reviewer Phase
Review Criteria and Evaluation Framework
Primary Review Categories: The Reviewer Agent evaluates implementation across four mandatory categories:
- Specification Compliance: Does implementation match approved specifications exactly?
- Safety Governance: Are all security rules enforced without exception?
- Quality Standards: Does code meet established maintainability and performance criteria?
- Completeness: Are all specified features implemented fully?
Evaluation Methodology:
- Binary Assessment: Each criterion is either met (✅) or not met (❌) - no partial credit
- Evidence-Based: All findings must reference specific code or specification sections
- Systematic Coverage: Every specification requirement must be explicitly validated
- Violation Documentation: All non-compliance issues must be documented with specific examples
Specification Compliance Checks
Systematic Compliance Validation Process:
Step 1: Acceptance Criteria Mapping
Architecture Specification → Implementation Validation
──────────────── ─────────────────────────────────────
"JWT authentication with 24-hour expiration" → Check token generation code for exact expiration
"PostgreSQL database with User/Todo tables" → Verify schema matches specification exactly
"bcrypt password hashing with 12 salt rounds" → Confirm bcrypt implementation uses specified rounds
"Rate limiting: 5 attempts per 15 minutes" → Validate rate limiter configuration matches spec
"Input validation with Joi schemas" → Check all endpoints have specified validation
Step 2: API Contract Verification
// Specification says: "GET /api/todos returns user's todos with filtering"
// ✅ COMPLIANT: Implementation matches specification
router.get('/todos', authenticateToken, async (req, res) => {
const { priority, completed } = req.query; // Filtering as specified
const todos = await prisma.todo.findMany({
where: { userId: req.user.id, ...filters }
});
res.json({ todos }); // Response format matches spec
});
// ❌ NON-COMPLIANT: Different endpoint or response format
router.get('/user-todos', async (req, res) => { // Wrong endpoint name
res.json(todos); // Wrong response format
});
Step 3: Data Model Validation
-- Specification requires: User table with id, email, password, timestamps
-- ✅ COMPLIANT: Schema matches specification exactly
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- ❌ NON-COMPLIANT: Missing fields or different structure
CREATE TABLE users (
user_id SERIAL PRIMARY KEY, -- Wrong field name
email_address VARCHAR(255), -- Wrong field name
-- Missing password field
created_at TIMESTAMP
-- Missing updated_at field
);
Violation Detection Methods
Automated Violation Detection:
Security Rule Violations:
// ❌ SECURITY VIOLATION: Password stored in plain text
const user = await prisma.user.create({
data: {
email,
password: password // Should be hashed with bcrypt
}
});
// ❌ SECURITY VIOLATION: Missing authentication middleware
router.get('/todos', async (req, res) => { // Missing authenticateToken
const todos = await prisma.todo.findMany();
res.json(todos);
});
// ❌ SECURITY VIOLATION: Information disclosure in error messages
catch (error) {
res.status(500).json({
error: error.message, // Exposes internal error details
stack: error.stack // Exposes system information
});
}
Specification Violations:
// ❌ SPECIFICATION VIOLATION: Wrong technology stack
const mongoose = require('mongoose'); // Spec requires PostgreSQL, not MongoDB
// ❌ SPECIFICATION VIOLATION: Additional unspecified features
router.post('/todos/:id/share', async (req, res) => {
// Sharing feature not in specification
});
// ❌ SPECIFICATION VIOLATION: Missing required validation
router.post('/todos', async (req, res) => {
// Missing input validation middleware specified in architecture
const todo = await prisma.todo.create({ data: req.body });
});