Reviewing changes
zelk can show you what changed in your repository, and review a change for the defects it introduces. A review runs read-only, in plan mode, whatever mode you are in.
See what changed
Section titled “See what changed”In the terminal UI, Diff in the palette shows the uncommitted changes.
Review in the terminal UI
Section titled “Review in the terminal UI”Review… in the palette asks what to review:
- Uncommitted changes: staged, unstaged and untracked files.
- Against a branch…: the commits on this branch since it left the base branch you name.
- A commit…: the changes one commit introduced.
The review runs as a session of its own, beside the conversation, and opens with its report when it ends. Wait for a run to end before starting one. To stop a review, return to the prompt and press Esc or click the footer’s stop shortcut. Esc first closes an open menu or file finder.
Review from the command line
Section titled “Review from the command line”zelk exec review # staged, unstaged and untracked changeszelk exec review --base main # the branch's commits since its merge base with mainzelk exec review --commit HEAD # what the last commit introducedzelk exec review --commit HEAD --title "Parser fix" "Focus on concurrency"zelk exec review -o findings.json # also write the findings as JSONzelk exec review --json -o findings.json # events as JSON Lines, findings to the fileGive at most one of --uncommitted, --base and --commit; with none,
the review takes the uncommitted changes. Quoted text after the flags, and
piped input, focus the review. A branch review compares the merge base to
HEAD and leaves out uncommitted edits.
zelk gathers the changed files, the diff and the contents of untracked files itself and hands them to the model, which checks each suspected defect before reporting it. The report lists findings by priority, from P0 to P3, each with its file and lines, how it fails and how confident the model is, then an overall verdict:
[P1] add() subtracts instead of adding — calc.py:1-2 (confidence 0.97)The function `add(a, b)` returns `a - b`. Any caller gets the wrong result:add(2, 3) returns -1 instead of 5. …
Verdict: incorrectFiles your rules deny reading, and protected paths, are listed as withheld by policy; their contents never reach the model.
A review that ran exits 0, whatever it found, so check the findings rather
than the exit status. A clean tree, an unknown revision or a target with
nothing in it exits 2 before calling the model. Review sessions are kept
like other exec sessions.
Asking in conversation
Section titled “Asking in conversation”You can also ask for a review in your own words, in the terminal UI or with piped context:
git diff main... | zelk exec "review this diff for error handling"This runs as an ordinary exec task, in plan mode unless you give
-mode, without the structured findings.