@obversa/surface-diff opens a Git diff for inline review. The reviewer
returns a decision and annotations tied to lines in the diff. The command
writes the result as framed JSON on stdout and diagnostics on stderr.
Install
Review a diff
Run from the repository you want to review:--staged reviews the index;
--range reviews the named Git range. --no-open prints the review URL
instead of opening it.
The default result frame starts with <<<REVIEW_RESULT_V1>>> and ends
with <<<END_REVIEW_RESULT_V1>>>. Exit 0 means the reviewer returned,
including a decision that requests changes. Exit 1 means the session did
not complete or the command failed; exit 2 means the arguments were invalid.
Public entry points
The browser session and result framing come from
@obversa/surface-decision. See that page for
session ownership, host placement and browser fallback behavior.
Offline example
This complete file parses a fixed Git diff and checks the line numbers and changed text. It runs offline and does not open a browser. The command above adds the interactive review session.examples/surface-diff.ts, in full:
Source
packages/surface-diff in the repository.