home
about
experience
projects
tech stack
contact me
Home / Case studies / Diffwise AI code review

Personal AI engineering case study

Designing Diffwise as a multi-agent AI code review system

Diffwise is my personal project for incremental AI code review across 40+ specialist agents and nine review categories.

Updated September 2026

Quick answer

I designed Diffwise to review changed code with specialist agents instead of sending every file to one prompt. Incremental analysis reduces repeated work, while finding deduplication limits overlapping reports.

Evidence and decision points

40+ agents

Specialist agents inspect changed code through focused review responsibilities.

Nine categories

The review model separates concerns such as security, correctness, performance, and maintainability.

60% token savings

Incremental review avoids repeating unchanged context and reduced token use in project measurements.

Why one broad prompt was not enough

A broad review prompt can miss specialized concerns and repeat generic advice. It can also create duplicate findings when several checks identify the same underlying issue.

Diffwise separates review responsibilities and combines the results through a controlled finding pipeline.

Incremental review architecture

The system focuses analysis on changed code and necessary context. Trigger.dev coordinates long-running review work, Redis supports transient state, and PostgreSQL stores durable review data.

OpenRouter provides model access behind the review workflow. Finding similarity uses Jaccard comparison above 0.4 to identify likely duplicates.

  • Route relevant changes to focused specialist agents.
  • Keep durable review and finding state in PostgreSQL.
  • Coordinate background tasks with explicit review status.
  • Deduplicate overlapping findings before final presentation.

What the project demonstrates

Diffwise demonstrates agent workflow design, background execution, structured findings, model integration, and cost-aware incremental analysis.

It is a personal project. The figures describe project measurements and architecture, not a client result.

Sources and further reading

  • OWASP Top 10 for LLM applications

    OWASP documents risks that apply when models process code and use external tools.

  • NIST AI Risk Management Framework

    NIST provides a general structure for AI risk, measurement, and governance decisions.

Common questions

Is Diffwise client work?

No. Diffwise is my personal project and demonstrates my system design and implementation work.

Why use specialist agents?

Focused responsibilities make review criteria clearer and let the system route work by change type.

Does AI review replace human review?

No. It can find issues and organize evidence. A person still owns acceptance and engineering decisions.

Related resources

Services

AI SaaS development

I build full-stack AI products where models support a defined user workflow. The work can include interfaces, APIs, persistence, routing, tools, retrieval, and operating controls.

Services

LLM integration

I add language-model capabilities to existing products without forcing the complete product into one provider or one opaque workflow.

Guides

How to hire an AI developer

Select an AI developer who can connect model behavior to a reliable product workflow and operating controls.

Discuss a defined project

Send the product context, current stack, expected outcome, constraints, and target timeline. I will reply with fit and next steps.

Email Amar