You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`comment add` is best for one note; `comment apply` is best when an agent already has several notes ready
101
104
-`comment add` requires `--file`, `--summary`, and exactly one of `--hunk`, `--old-line`, or `--new-line`
105
+
-`comment apply` payload items require `filePath`, `summary`, and one target such as `hunk`, `oldLine`, or `newLine`
102
106
- Prefer `--hunk <n>` when you want to annotate the whole diff hunk instead of picking a single line manually
103
-
-`comment add` reveals the note by default; pass `--no-reveal` to keep the current focus
107
+
-`comment add` and `comment apply` both keep the current focus by default; pass `--focus` when you want to jump to the new note or the first note in a batch
108
+
-`comment apply` reads a JSON batch from stdin and validates the full batch before mutating the live session
104
109
-`comment list` and `comment clear` accept optional `--file`
105
110
- Quote `--summary` and `--rationale` defensively in the shell
106
111
@@ -121,13 +126,14 @@ Typical flow:
121
126
1. Load the right content (`reload` if needed)
122
127
2. Navigate to the first interesting file / hunk
123
128
3. Add a comment explaining what's happening and why
124
-
4.Move to the next point of interest -- repeat
129
+
4.If you already have several notes ready, prefer one `comment apply` batch over many separate shell invocations
125
130
5. Summarize when done
126
131
127
132
Guidelines:
128
133
129
134
- Work in the order that tells the clearest story, not necessarily file order
130
135
- Navigate before commenting so the user sees the code you're discussing
136
+
- Use `comment apply` for agent-generated batches and `comment add` for one-off notes
131
137
- Keep comments focused: intent, structure, risks, or follow-ups
132
138
- Don't comment on every hunk -- highlight what the user wouldn't spot themselves
133
139
@@ -140,3 +146,4 @@ Guidelines:
140
146
-**"Pass the replacement Hunk command after `--`"** -- include `--` before the nested `diff` / `show` command.
141
147
-**"Specify exactly one navigation target"** -- pick one of `--hunk`, `--old-line`, or `--new-line`.
142
148
-**"Specify either --next-comment or --prev-comment, not both."** -- choose one comment-navigation direction.
149
+
-**"Pass --stdin to read batch comments from stdin JSON."** -- `comment apply` only reads its batch payload from stdin.
0 commit comments