Replies: 1 comment 1 reply
|
description was deliberately scoped as metadata, not a primary review surface. That shape was settled in #130 (which proposed the same sidebar pane) when it shipped as the info popup behind the "virtual file" shape already exists: for the iterative aspect, your code-diff loop has a different shape than a single-document revision (multi-file diff; agent evolves both code and annotations between rounds), so revdiff-planning doesn't drop in directly. But VCS gives you the rolling delta for free: the protocol-in-description part is what convinces me B is wrong-shaped. That's workflow tutoring, and revdiff isn't the right place to host one workflow's onboarding. So on B: not in scope. If the agent-driven code-review skill you're prototyping turns out broadly useful, a plugin under |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context
--description/--description-file(#130) feeds the info popup, reachable viai. That works well when the description is a short addendum, but it falls short when the description is the entry point to the review.I'm experimenting with an agent-driven review loop where the agent writes a description file (problem statement + protocol reminder for the reviewer) alongside an annotations file, then launches revdiff. The description is the first thing the I should read, not an optional aside. Today there's no way to surface it without me reminding to
iwhich is something I keep forgetting.I suspect this generalizes beyond agent flows - PR descriptions, release notes alongside a diff, "read me before reviewing" context for a teammate.
Options I've considered
A. Auto-open the info popup on startup (
--show-infoor implicit when--description*is set)B. Render the description as a virtual file in the sidebar with a new flag
_review.md?[notes]?), ordering (top of tree?), behavior when the tree is hidden and god knows what elseWhat I'm looking for
A read on whether B is in scope and worth exploring, or if there's a third framing I'm missing.
Related
--descriptioncli flag so the agent can explain the diff to the user in a dedicated pane. #130Agent skill
Click to view skill
revdiff conversation loop
Turn-based, line-anchored conversation between agent and user, on top of a real diff. Agent writes annotations into a file. revdiff loads them inline. User edits, replies, adds their own. Quit returns the merged set. Repeat until quit-clean.
Protocol
Agent always prefixes its notes with
[agent]. User prefixes nothing. Anything without[agent]is user content.One-sided by design — user just types, agent does the bookkeeping. Always include this protocol in the description file so the user reads it before typing.
The loop
Pick a session id
<sid>(timestamp like20260507-1432). Reuse it for all three files in a round.Write the annotations file at
/tmp/revdiff-conv-<sid>.md. Every note starts with[agent]plus an intent tag —[agent][explain],[agent][question],[agent][must-fix],[agent][nit]. Without the prefix, the next round misreads it as user content. Lead with what was done and why on key lines. One or two sentences each.Write the description file at
/tmp/revdiff-desc-<sid>.md:[agent]at the start is treated as yours."Launch revdiff in a stacked zellij pane, blocking until quit:
Replace
<STACKED_LAYOUT_FLAGS>with whatever produces a stacked layout (zellij run --help).Read the reply file at
/tmp/revdiff-reply-<sid>.md. Same format as the input.Reconcile by walking each note in the reply:
[agent]and matches the original → unchanged, ignore[agent]but text differs → user edited in place, treat as user reply[agent]→ user content, address itApply code changes, answer questions.
Next round (only if step 5 found user content). Fresh
<sid>. The new annotations file:[agent]notes for lines the agent still has commentary on (e.g. "made the change you asked for, here's what's different")[agent][question]notes anywhere a user reply needs more clarificationLoop back to step 2.
Stopping
Loop ends when a reply file has no user content — every note still has
[agent]unchanged, no new non-[agent]notes. Summarize what landed across all rounds and stop. No "confirmation" relaunch.Annotation format
After the user's pass:
Reading: question on 67-89 answered, must-fix on store.go resolved with test pointer, file-level note on file.go ignored (untouched), 43 ignored (untouched), new user question on handler.go to address.
Format rules
pathis relative to repo root, case-sensitive, must match the diff(+)added,(-)removed,(file-level)file-wide:Nsingle,:N-Mspan##need a single space prefix (revdiff reserves##for record headers)Intent tags
Pair
[agent]with one:[explain]— narrate what changed and why on lines the user wouldn't otherwise understand. Pick 3–10 consequential lines, not every change.[question]— a real choice the user should weigh in on. Not rhetorical; only ask if you'd actually act on the answer.[must-fix]— agent itself is uncertain, wants confirmation.[nit]— minor, skippable.One or two sentences each. TUI on a single diff line; walls of text don't fit. Longer context goes in the description file.
Don't
[agent]— your own note becomes user content next round[user]prefix — protocol is one-sided[question]answer as if you knew all along. "No, do X" → "got it, switching to X."Reference
revdiff flags:
--annotations=<file>— preload from markdown--description-file=<path>— info popup content (ikey)--output=<file>— write final set on quit[ref]— git ref or rangezellij flags:
--block-until-exit— block calling process until command exits or pane closes--close-on-exit— close pane on exit (no re-run prompt)<STACKED_LAYOUT_FLAGS>— placeholder, fill fromzellij run --helpFull revdiff docs: https://revdiff.com/docs
All reactions