Code review
Review is garden’s most differentiated surface, and where GitHub habits will mislead you. Four differences matter.
1. Comments are drafts until you submit
Section titled “1. Comments are drafts until you submit”garden review comment writes a draft only you can see:
garden review comment 42 --file src/api.go --line 88 -b "This needs a bound."garden review status 42 # your pending draftsgarden review submit 42 --approveSo you can work through a whole diff and publish once, with a verdict.
2. Comments anchor to a commit, not a diff position
Section titled “2. Comments anchor to a commit, not a diff position”Each comment records the commit whose file and line it references, and the viewer renders it on whichever side of the diff matches.
The payoff: comments survive rebases and new revisions. When an author amends and pushes, your threads stay attached to the code they were about. Don’t re-post because the diff changed.
Anchors are ranged — path:line[:col][-line[:col]]:
# The whole function, not one marker linegarden review comment 42 --file api/foo.go --line 42 --end-line 48 -b "..."3. Unresolved threads block the merge
Section titled “3. Unresolved threads block the merge”Open threads gate the merge queue alongside owner approval and green CI. There is no “merge and follow up”.
Resolution rides the latest published item in a thread, so a reply carries it without restating the point:
garden review 42 --threads # each thread gets a c:1a2b3c4d handlegarden review comment 42 --reply-to c:1a2b3c4d --resolve -b "Fixed in rev 2."4. Each PR in a stack has its own threads
Section titled “4. Each PR in a stack has its own threads”Comments don’t propagate between a parent and child PR. A stack of five commits is five independent reviews.
Reading a PR
Section titled “Reading a PR”garden review 42 # annotated diff, threads inlinegarden review 42 --threads # thread-centric viewgarden review 42 --unresolved # only what still blocksgarden review 42 --range 1:2 # what changed between revisionsgarden review 42 --json # structured bundleIncremental re-review
Section titled “Incremental re-review”Mark files reviewed up to the current revision; on re-review only later changes show for those files:
garden review mark-reviewed 42 src/api.go src/db.gogarden review mark-reviewed 42 --unmark src/api.goWhole reviews in one document
Section titled “Whole reviews in one document”When an agent produces a full review, garden review apply is the right path —
one YAML document with the verdict, comments, replies, resolutions, and reviewed
marks, applied atomically:
verdict: commentcomments: - at: "api/foo.go:42-48" body: "This allocates on every request." - reply_to: c:1a2b3c4d resolve: true body: "Good catch — fixed."reviewed: ["*"]garden review apply 42 -f review.yamlgarden review apply 42 -f review.yaml --draft # stage without publishingFull schema: review apply, or garden docs review.
Responding on your own PR
Section titled “Responding on your own PR”garden review 42 --threads# fix the codegarden commit --amendgarden pushgarden review comment 42 --reply-to c:1a2b3c4d --resolve -b "Fixed in rev 2."After a new revision, threads anchored to earlier revisions drop out of the
default view. The header says how many and prints the command to bring them
back — usually garden review 42 --range 1:2 --threads.
Confirm the PR is mergeable with garden pr view 42.
CI failures arrive here too
Section titled “CI failures arrive here too”A failing check posts an inline thread on the failing line, authored by
ci-bot. It reopens when a test re-fails and resolves when it passes — even if
a human resolved it in between — and counts toward the merge gate like any other
thread. See Continuous integration.