@eliya-oss/agent-diff 0.1.0-alpha.31 → 0.1.0-alpha.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.32
4
+
5
+ ### Patch Changes
6
+
7
+ - The skill publishes a reading order on request, and tells the reviewer how to open the review.
8
+
3
9
  ## 0.1.0-alpha.31
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -64,7 +64,8 @@ A comment is handed over exactly once, so a second `take` returns only what was
64
64
  ## The reading order
65
65
 
66
66
  An agent knows the order it built a change in. Rebuilding that order by reading forty files is the
67
- expensive way to learn something it already has, so it can publish the reading itself:
67
+ expensive way to learn something it already has, so it can publish the reading itself when you ask
68
+ for one:
68
69
 
69
70
  ```bash
70
71
  adiff layers set --worktree . --json -
package/dist/main.js CHANGED
@@ -17143,8 +17143,11 @@ const INSTRUCTIONS = [
17143
17143
  "",
17144
17144
  "Review of work in this repository happens in adiff. Before you say you are done, run",
17145
17145
  "`adiff comment take --worktree . --wait 300` in the background and handle what arrives.",
17146
- "Answer a comment with `adiff comment answer --worktree . --id <id> --body <text>`, and write the",
17147
- "reading order for your diff with `adiff layers set`. `adiff describe` lists the rest.",
17146
+ "Answer a comment with `adiff comment answer --worktree . --id <id> --body <text>`.",
17147
+ "When you hand work over, say it is ready and name the command that opens the review:",
17148
+ "`adiff review open --repo <repo>`, or `adiff review pane --repo <repo>` to open it alongside.",
17149
+ "Publish a reading order with `adiff layers set` only when you are asked for one.",
17150
+ "`adiff describe` lists the rest.",
17148
17151
  END
17149
17152
  ].join("\n");
17150
17153
  const IMPORT = [
@@ -18223,7 +18226,7 @@ const banner = () => [
18223
18226
  "",
18224
18227
  " adiff comment take --worktree . --wait 300 block until a comment arrives",
18225
18228
  " adiff comment answer --worktree . --id <id> --body '…'",
18226
- " adiff layers set --worktree . --json - publish the reading order",
18229
+ " adiff layers set --worktree . --json - publish a reading order, when asked",
18227
18230
  "",
18228
18231
  "Every comment carries an id, and an answer goes back to the reviewer under it.",
18229
18232
  "",
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "bin": {
24
24
  "adiff": "./bin/adiff.js"
25
25
  },
26
- "version": "0.1.0-alpha.31",
26
+ "version": "0.1.0-alpha.32",
27
27
  "description": "A code review your agent can answer: comments carry ids, the agent replies under them, and it publishes the reading order for its own diff.",
28
28
  "license": "MIT",
29
29
  "repository": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: adiff
3
- description: Pick up review comments left on this worktree's diff in the adiff terminal, act on them, and write the layers that explains the diff. Use when the user says they left comments, asks you to check adiff, asks you to watch for review feedback, or asks you to hand work over for review.
3
+ description: Pick up review comments left on this worktree's diff in the adiff terminal, act on them, and answer them by id. Use when the user says they left comments, asks you to check adiff, asks you to watch for review feedback, or asks you to hand work over for review.
4
4
  ---
5
5
 
6
6
  # adiff
@@ -93,11 +93,56 @@ Read `suggestion` before doing anything else — it names the command that resol
93
93
  Retry only when `retriable` is true. `UnknownBranch` means this worktree is not one adiff knows
94
94
  about, because the reviewer has not opened it; report that rather than looping.
95
95
 
96
- ## Handing work over: write the layers
96
+ ## Handing work over
97
97
 
98
- You know the order the change was built in. The reviewer does not, and rebuilding it by reading
99
- every file is the most expensive way to learn something you already have. When you finish a piece
100
- of work, write a **layers**: an ordered set of layers over the diff, each one a claim about a span of
98
+ Finishing is not a reason to publish anything. Say the work is ready, put the review in front of
99
+ them if they asked for one, and say how to read it. That is the whole handover. A reading order is
100
+ extra work you do on request, and it has its own section further down.
101
+
102
+ ## Put the review in front of them
103
+
104
+ When someone asks you for a review, open it rather than describing how:
105
+
106
+ ```bash
107
+ adiff review pane --repo <repo>
108
+ ```
109
+
110
+ It splits the pane they are already looking at, so their next move is to look right rather than to
111
+ type. The answer says what happened:
112
+
113
+ ```json
114
+ {"ok":true,"opened":true,"pane":"tmux","command":"adiff review open --repo /work/api"}
115
+ ```
116
+
117
+ `opened:false` means nothing could be split, which is ordinary: a terminal without tmux, Zellij,
118
+ WezTerm or kitty has nowhere to put a pane. The answer carries `command` either way, so quote that
119
+ line and let them run it.
120
+
121
+ Open a pane when a review was asked for. Finishing work is not a reason on its own, and taking over
122
+ someone's screen uninvited is worse than a line they have to copy.
123
+
124
+ ## Tell the reviewer how to read it
125
+
126
+ Whether or not a pane opened, say what to do with it. Name the repository they should point at,
127
+ which is the repository the worktree belongs to:
128
+
129
+ > Open it with `adiff review open --repo <repo>`, then press `enter` on this branch. The sidebar
130
+ > lists the files; `j` and `k` move down the diff, `]` and `[` walk between files. Select lines with
131
+ > `v`, write a comment with `c`, stage it with `ctrl+a`, and send the whole review with `S`. Press
132
+ > `?` for the rest.
133
+
134
+ Fill the repository path in yourself so nobody has to compose the command.
135
+
136
+ Say what you want looked at hardest, and where you are unsure. A reviewer who knows which part you
137
+ doubt spends their attention there. Offer a reading order rather than writing one: if the change is
138
+ long enough that the order matters, say you can publish one and let them decide.
139
+
140
+ ## Publishing a reading order, when you are asked for one
141
+
142
+ Only when the reviewer asks. A reading order is a real piece of work, it can be wrong, and one
143
+ nobody wanted spends their attention on your summary rather than on the code.
144
+
145
+ When they do ask, write **layers**: an ordered set over the diff, each one a claim about a span of
101
146
  code. The reviewer then walks the argument instead of the filesystem.
102
147
 
103
148
  ```bash
@@ -156,44 +201,13 @@ with:
156
201
  adiff layers show --worktree . --fields covered,partial,total,uncovered
157
202
  ```
158
203
 
159
- Setting a layers again supersedes the previous one and bumps `version`; the layers records the commit
160
- it was written for, and adiff reports it as `stale` once the branch moves past that commit. After
161
- you address a review, write the layers again.
162
-
163
- ## Put the review in front of them
164
-
165
- When someone asks you for a review, open it rather than describing how:
166
-
167
- ```bash
168
- adiff review pane --repo <repo>
169
- ```
170
-
171
- It splits the pane they are already looking at, so their next move is to look right rather than to
172
- type. The answer says what happened:
173
-
174
- ```json
175
- {"ok":true,"opened":true,"pane":"tmux","command":"adiff review open --repo /work/api"}
176
- ```
177
-
178
- `opened:false` means nothing could be split, which is ordinary: a terminal without tmux, Zellij,
179
- WezTerm or kitty has nowhere to put a pane. The answer carries `command` either way, so quote that
180
- line and let them run it.
181
-
182
- Open a pane when a review was asked for. Finishing work is not a reason on its own, and taking over
183
- someone's screen uninvited is worse than a line they have to copy.
184
-
185
- ## Tell the reviewer how to read it
186
-
187
- Whether or not a pane opened, say what to do with it. Name the repository they should point at,
188
- which is the repository the worktree belongs to:
189
-
190
- > Open it with `adiff review open --repo <repo>`, then press `enter` on this branch. The sidebar
191
- > lists the layers in reading order; `j` and `k` move between them and the diff follows. Inside a
192
- > layer, `]` and `[` walk its files. Select lines with `v`, write a comment with `c`, stage it with
193
- > `ctrl+a`, and send the whole review with `S`. Press `?` for the rest.
204
+ Setting layers again supersedes the previous set and bumps `version`; the set records the commit it
205
+ was written for, and adiff reports it as `stale` once the branch moves past that commit. Once a
206
+ reviewer has a reading order, keep it true: write it again after you address their comments.
194
207
 
195
- Say what you want looked at hardest, and where you are unsure. A reviewer who knows which layer you
196
- doubt spends their attention there.
208
+ When you have published one, tell them the sidebar now holds it: `s` swaps between the layers and
209
+ the files, `j` and `k` move between layers with the diff following, and `]` and `[` walk the files
210
+ inside a layer.
197
211
 
198
212
  ## Discovering the rest
199
213