feat(cli): add reasonix review subcommand for code review#3518
Merged
Conversation
Add a new `reasonix review` subcommand that runs the built-in review skill as a subagent against git changes and outputs the result. This gives users a one-shot, non-interactive way to review code without opening a chat session. Usage: reasonix review # review uncommitted working-tree changes reasonix review --base main # review current branch vs main reasonix review --commit abc123 # review a specific commit reasonix review --model deepseek # use a specific model reasonix review --instructions ... # add extra review instructions Implementation: 3 files, +154 lines - cli/review.go: reviewCommand + getReviewDiff + buildReviewTask - cli/review_test.go: TestBuildReviewTask (3 sub-cases) - cli/cli.go: register review case in Run()
esengine
approved these changes
Jun 8, 2026
esengine
left a comment
Owner
There was a problem hiding this comment.
Verified end-to-end: builds clean (go build ./...), go vet clean, TestBuildReviewTask passes, and a real reasonix review run against a working-tree change produced a correct review. Flag paths (--model unknown, empty diff) behave as expected. Nice zero-friction addition.
staticcheck QF1012 — keeps the lint job green.
dorokuma
pushed a commit
to dorokuma/DeepSeek-Reasonix
that referenced
this pull request
Jun 10, 2026
) * feat(cli): add reasonix review subcommand for code review Add a new `reasonix review` subcommand that runs the built-in review skill as a subagent against git changes and outputs the result. This gives users a one-shot, non-interactive way to review code without opening a chat session. Usage: reasonix review # review uncommitted working-tree changes reasonix review --base main # review current branch vs main reasonix review --commit abc123 # review a specific commit reasonix review --model deepseek # use a specific model reasonix review --instructions ... # add extra review instructions Implementation: 3 files, +154 lines - cli/review.go: reviewCommand + getReviewDiff + buildReviewTask - cli/review_test.go: TestBuildReviewTask (3 sub-cases) - cli/cli.go: register review case in Run() * fix(cli): use fmt.Fprint instead of WriteString(fmt.Sprint) in review staticcheck QF1012 — keeps the lint job green. --------- Co-authored-by: reasonix <reasonix@deepseek.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.
Summary
Add a
reasonix reviewsubcommand — a one-shot, non-interactive code review that runs the built-in review subagent against git changes.Motivation
Codex has
codex review. Reasonix should too. Currently users must open a chat session, manually gather the diff, and invoke the review skill — cumbersome. This command gives them a zero-friction "review this" experience.Usage
Implementation
internal/cli/review.goreviewCommand+getReviewDiff+buildReviewTask(154 lines)internal/cli/cli.go"review"case inRun()(+3 lines)internal/cli/review_test.goTestBuildReviewTask(3 sub-cases)Architecture: loads config, resolves model, creates a provider via
boot.NewProviderWithProxy, scopes a tool registry to review-allowed tools (read_file, ls, glob, grep, bash), and runs the built-in review skill as a subagent viaagent.RunSubAgent.Testing
The review subcommand --help flag displays correctly.