chore: Add just review-file for context-only reviews#865
Merged
Conversation
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
just review-file FILE [FILE ...] [-- JP_ARGS ...]lets you send files with no VCS changes through the samerevdiffannotation flow asjust review. It usesrevdiff --onlyso 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 thejp querycall 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-filedelegates tojust review, so it shares its conversation-target prompt (active conversation / new conversation / quit), thepersonas/review-triagerpersona, and annotation handling. The shared triager persona is new: it grounds eachrevdiffnote 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 withio::read_to_stringinstead 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.