Skip to content

delta

delta answers what this branch changed since it was cut: the fork point it diverged at, every file it touched, and the change itself as text.

Terminal window
ingrain delta [--host <host>]
ingrain delta diff [--host <host>] [PATH...]

Runs offline, reading your repository and nothing else. The only thing it writes is the fork point it resolved, recorded in .ingrain-security/ so every later diff reads the same one. Your tracked files are never touched.

Like assessment, you rarely type this yourself: the ingrain-security skill runs it. It is documented because its output decides how much of your change gets reviewed.

Because no single git command covers what a review needs.

A branch’s change lives in four places at once — committed, staged, unstaged, and untracked — and a review that reads only one of them reports on a change nobody made. delta merges all four into one answer, so every part of the review is working from the same change.

  • base_ref — the branch this one was cut from.
  • diff_ref — the merge-base commit, and the run’s fixed basis. delta pins it, so every later diff reads the same change while the working tree keeps moving underneath it.
  • changed_files — [{path, status}] across all four sources.
  • delta_empty — whether there is any change at all. A clean working tree is not evidence that no code exists; a fully committed implementation still has a delta.
  • fallback and reason — set when no fork point resolved.

fallback: true means diff_ref fell back to HEAD, and reason says why — not-a-git-repository, no-commits, no-divergence, no-fork-point, or shallow-history.

A shallow clone defeats merge-base, so the review silently narrows to whatever is uncommitted and reports success on a fraction of the change. In CI a run reporting fallback: true should fail, and a checkout there needs full history (fetch-depth: 0) rather than the default depth of 1.

Renders the change as text.

Terminal window
ingrain delta diff [PATH...]

It reads the basis delta pinned, so every diff in the run is against the same fork point.

Rebasing past that fork point discards the pin: diffing against the old one would report the parent branch’s replayed commits as your change. Commits to either branch leave it in force.

An untracked path prints its contents rather than a diff, because a diff of a file git has never seen is empty — and a reviewer reading that empty output would conclude the file was unchanged rather than brand new.

0 on success · 2 on a bad argument · 1 on a runtime failure.