Skip to content

chore: Add just review-file for context-only reviews#865

Merged
JeanMertz merged 1 commit into
mainfrom
just-review-file
Jul 9, 2026
Merged

chore: Add just review-file for context-only reviews#865
JeanMertz merged 1 commit into
mainfrom
just-review-file

Conversation

@JeanMertz

Copy link
Copy Markdown
Collaborator

just review-file FILE [FILE ...] [-- JP_ARGS ...] lets you send files with no VCS changes through the same revdiff annotation flow as just review. It uses revdiff --only so unchanged files are shown in full and stay annotatable, while files that do have uncommitted changes still show their diff. Each file is attached to the jp query call so the assistant sees the full content even though the diff is empty, e.g. just review-file docs/rfd/001-jp-rfd-process.md.

just review-file delegates to just review, so it shares its conversation-target prompt (active conversation / new conversation / quit), the personas/review-triager persona, and annotation handling. The shared triager persona is new: it grounds each revdiff note against the reviewed content and prior conversation history, and replies with a per-note verdict (accept / amend / dismiss / defer) and a concrete recommendation, without editing files itself. Acting on the verdicts is a separate follow-up turn, e.g. jp q --cfg=personas/dev "apply the accepted items".

jp query's stdin handling changes to support piping these multi-line annotation blocks: stdin is now read verbatim with io::read_to_string instead of joined line-by-line, so interior blank lines and fenced code blocks in the piped annotations survive intact. Only a trailing line terminator is stripped.

`just review-file FILE [FILE ...] [-- JP_ARGS ...]` lets you send files
with no VCS changes through the same `revdiff` annotation flow as
`just review`. It uses `revdiff --only` so unchanged files are shown in
full and stay annotatable, while files that do have uncommitted
changes still show their diff. Each file is attached to the `jp query`
call so the assistant sees the full content even though the diff is
empty, e.g. `just review-file docs/rfd/001-jp-rfd-process.md`.

`just review-file` delegates to `just review`, so it shares its
conversation-target prompt (active conversation / new conversation /
quit), the `personas/review-triager` persona, and annotation handling.
The shared triager persona is new: it grounds each `revdiff` note
against the reviewed content and prior conversation history, and
replies with a per-note verdict (accept / amend / dismiss / defer) and
a concrete recommendation, without editing files itself. Acting on the
verdicts is a separate follow-up turn, e.g. `jp q --cfg=personas/dev
"apply the accepted items"`.

`jp query`'s stdin handling changes to support piping these multi-line
annotation blocks: stdin is now read verbatim with `io::read_to_string`
instead of joined line-by-line, so interior blank lines and fenced
code blocks in the piped annotations survive intact. Only a trailing
line terminator is stripped.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz JeanMertz merged commit 3922459 into main Jul 9, 2026
16 checks passed
@JeanMertz JeanMertz deleted the just-review-file branch July 9, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant