# Code review

> Code review is the practice of having a second developer read and check code changes before they are merged, to catch bugs, security problems and unclear design, and to keep the codebase understandable to more than one person.

Also called: peer review, pull request review, PR review, code audit. Category: Delivery and quality. Source: https://aibuildindex.com/glossary/code-review

## In the index

- Fix an AI-built app: median $2,900, middle half $500 to $8,400, 552 priced briefs (https://aibuildindex.com/cost/vibe-coded-app-rescue)

Code review puts a second pair of eyes on every change. Before new code joins the main system, another developer reads it, asks questions and suggests fixes. It catches mistakes the author missed, spots security gaps, and keeps the code readable. Just as important for buyers, it means at least two people understand each part of the system, which reduces dependence on any one builder. The term also covers a one-off audit, where an outside builder reviews an existing system to judge its quality.

## In practice

In most teams, review is built into the workflow. A developer opens a change request, often called a pull request, describing what they changed and why. A reviewer reads the diff, runs it if needed and either approves it or asks for changes. A [CI/CD](https://aibuildindex.com/glossary/ci-cd) pipeline runs automated tests alongside, so the reviewer can focus on logic, design and risks the tests cannot judge.

For AI systems, reviewers also look at:

- **Prompts and model settings**, which affect behaviour as much as code does.
- **Handling of model output**, such as whether responses are validated before they trigger actions.
- **Secrets and data**, making sure keys are not exposed and personal data is not logged carelessly.
- **Cost**, such as loops that could call a model many more times than intended.

With [AI coding assistants](https://aibuildindex.com/glossary/ai-coding-assistant) generating more code, review matters more, not less. Generated code often looks plausible while hiding duplication, outdated patterns or security flaws. Systems built by [vibe coding](https://aibuildindex.com/glossary/vibe-coding) with no review are a common source of [technical debt](https://aibuildindex.com/glossary/technical-debt).

## What it means for cost

A single builder working alone has no one to review their work, so review is one of the things an [agency](https://aibuildindex.com/glossary/agency) or team often provides that an individual may not. It adds time to each change but reduces bugs reaching users and keeps later work affordable.

For buyers taking over an existing system, a paid code audit before committing to a larger contract is usually money well spent. It turns a vague worry into a list of specific problems with rough effort attached. Ask a builder:

- Will every change be reviewed by someone other than its author?
- Who reviews your work if you are working alone?
- Can we commission an independent review at handover?

## Common questions

### Can AI tools do code review?

They can help, flagging common bugs, style issues and some security patterns. They do not yet replace a person who understands what the system is meant to do and can judge whether a change fits the design. Many teams use both.

### What does a code audit of an existing system cover?

Typically structure and readability, test coverage, security, dependencies, how secrets and data are handled, and how hard the system would be to change. The result is a list of problems ranked by risk, which helps decide between repair and rebuild.

## Related terms

- [Technical debt](https://aibuildindex.com/glossary/technical-debt): Technical debt is the future cost created when a system is built quickly or carelessly, such as missing tests, tangled code or undocumented shortcuts, which makes every later change slower, riskier and more expensive.
- [CI/CD](https://aibuildindex.com/glossary/ci-cd): CI/CD, short for continuous integration and continuous delivery, is an automated pipeline that tests every code change as it is made and prepares or releases it, so updates reach production quickly and safely.
- [Regression testing](https://aibuildindex.com/glossary/regression-testing): Regression testing is re-running a system's existing tests after every change to confirm that features which already worked still work, catching new bugs or quality drops before they reach users.
- [Vibe coding](https://aibuildindex.com/glossary/vibe-coding): Vibe coding is building software mainly by describing what you want to an AI tool and accepting the code it produces, judging the result by whether it seems to work rather than by reading the code.
- [Handover and documentation](https://aibuildindex.com/glossary/handover): Handover and documentation is the final stage of a build in which the builder transfers code, accounts, credentials and written explanations to the buyer, so the system can be run, changed and supported without them.
- [AI coding assistant](https://aibuildindex.com/glossary/ai-coding-assistant): An AI coding assistant is a tool that uses a language model to suggest, write, explain and change code inside a developer's editor or terminal, from single-line completions to multi-file edits carried out on request.
