Running a review

/deltaview feat/my-branch
/deltaview 3f2c1ab

Deltaview always reviews a branch against its target: the diff between the head and its merge-base with the target branch. A branch name uses the branch tip as the head; a commit hash uses that commit, i.e. the branch as it stood then. If the diff is empty, for example because the commit is already on the target, it says so and stops.

Which commits and target

What happens

  1. Checkout. The ref is checked out in a temporary git worktree, so your working copy is untouched. Untracked .env* files are copied into it byte for byte, without being read.
  2. Install. Dependencies install with the package manager your lockfile implies (npm, pnpm, yarn, bun) or the build file's usual install. A failed install is shown and the review stops.
  3. Env check. New env vars are detected from .env.example (and .env.sample, .env.template) and new process.env.X / import.meta.env.X references in the diff. If there are any, you're asked to add them to your .env before the app starts.
  4. Tests. Your test command runs and the result is recorded. Failing tests don't block the review.
  5. Analyse and anchor. Claude groups every hunk into items, starts your dev server, and finds the element each item affects. See How it works.
  6. Review. A local proxy starts in front of your dev server and the review opens in a new Chrome tab. The Deltaview bar sits bottom-left. If any item is on screen, you're asked whether to also start the base version for a side-by-side Before ⇄ after view. That takes a second worktree, install and dev server on another port; if it fails, the review continues without it.
  7. Finish. Clicking Finish review posts the review and the agent reports the result: the review URL, counts per decision, the test result and the manifest path. The dev server is stopped and the worktree removed, along with the base version's if one was started.

Resuming

Decisions are saved to the manifest the moment you make them. If you stop before finishing, run /deltaview on the same ref again: when the head commit is unchanged, the review resumes with the same items and your decisions kept. Analysis and anchoring are skipped, but the app and proxy start again.

If the branch has new commits, a fresh review starts that builds on the earlier one. A finished review is never resumed.

Fixing and re-reviewing

/deltaview:fix feat/my-branch

/deltaview:fix reads the newest review of the branch (or the manifest path you pass, or the newest review of any branch when you pass nothing) and works through its rejected and commented items, rejections first, using each item's hunks, reason and the line it was anchored on. It:

Once the fixes are pushed, run /deltaview <branch> again. Claude keeps the earlier review's grouping, titles and selectors for code that hasn't changed. Items whose edits are byte-identical to an item in the last review get its decision back, marked carried over; the rest are marked changed since your last review.

Ground rules

The agent follows these on every run: