Slash Commands
Inside a review thread, ask Vizzini about specific lines. Each command sends the model only the hunks you selected and the thread so far, nothing else from the diff.
| Command | Target | Answer |
|---|---|---|
/explain FILE:START-END [question] |
a line or range | A Markdown explanation of what the lines do and why they changed |
/refactor FILE:START-END [goal] |
a line or range | Replacement code that stays inside the selection |
/docstrings FILE [note] |
a file | Documentation comments for changed declarations, comments only |
/reconsider FILE:START-END [argument] |
the lines of a disputed finding | A verdict, withdrawn or stands, with the reasons (only in vizzini-bot’s finding threads) |
Line ranges use new-file numbers. a.go:44, a.go:44-45 and GitHub-style
a.go:L44-L45 all work.
From mrman (Go)
Section titled “From mrman (Go)”cmd, err := reviewer.ParseCommand("/explain internal/store/users.go:44-45 is this injectable?")if err != nil { return err // errors.Is(err, reviewer.ErrBadCommand)}res, err := engine.RunCommand(ctx, patch, cmd, []reviewer.ThreadMessage{ {Author: "alice", Body: "Is this safe?"},})thread.Append(reviewer.FormatCommandResult(res))From the CLI
Section titled “From the CLI”git diff main...HEAD | pr-review --mode command \ --command "/refactor internal/store/users.go:45-46 bind the parameter" \ --thread thread.json # optional: [{"author": "...", "body": "..."}]Guarantees
Section titled “Guarantees”- Scoped. If the file isn’t in the diff, or the range has no changed lines, the command fails before any request is made.
- Validated.
/explainanswers must match#Explanation,/refactorand/docstringsmust match#ImproveOutput, and/reconsidermust match#Reconsideration. - Anchored. Suggestions must sit in the scoped hunks, and a
/refactorsuggestion that reaches outside the selection is sent back for repair. - Bounded. Only the newest thread messages that fit 1500 tokens are sent.