@eliya-oss/agent-diff 0.1.0-alpha.5 → 0.1.0-alpha.7
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/.agents/prd/README.md +2 -2
- package/CHANGELOG.md +16 -0
- package/README.md +7 -7
- package/dist/main.js +496 -248
- package/package.json +1 -1
- package/skills/adiff/SKILL.md +21 -21
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bin": {
|
|
22
22
|
"adiff": "./bin/adiff.js"
|
|
23
23
|
},
|
|
24
|
-
"version": "0.1.0-alpha.
|
|
24
|
+
"version": "0.1.0-alpha.7",
|
|
25
25
|
"description": "Review agent work across git worktrees like a PR, and hand the comments back to the agent.",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"repository": {
|
package/skills/adiff/SKILL.md
CHANGED
|
@@ -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
|
|
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.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# adiff
|
|
@@ -66,21 +66,21 @@ Read `suggestion` before doing anything else — it names the command that resol
|
|
|
66
66
|
Retry only when `retriable` is true. `UnknownBranch` means this worktree is not one adiff knows
|
|
67
67
|
about, because the reviewer has not opened it; report that rather than looping.
|
|
68
68
|
|
|
69
|
-
## Handing work over: write the
|
|
69
|
+
## Handing work over: write the layers
|
|
70
70
|
|
|
71
71
|
You know the order the change was built in. The reviewer does not, and rebuilding it by reading
|
|
72
72
|
every file is the most expensive way to learn something you already have. When you finish a piece
|
|
73
|
-
of work, write a **
|
|
73
|
+
of work, write a **layers**: an ordered set of layers over the diff, each one a claim about a span of
|
|
74
74
|
code. The reviewer then walks the argument instead of the filesystem.
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
adiff
|
|
77
|
+
adiff layers set --worktree . --json - <<'JSON'
|
|
78
78
|
{
|
|
79
79
|
"summary": "Team invitations, end to end",
|
|
80
|
-
"
|
|
80
|
+
"layers": [
|
|
81
81
|
{
|
|
82
82
|
"title": "Add the invitation data model",
|
|
83
|
-
"note": "The record every later
|
|
83
|
+
"note": "The record every later layer leans on",
|
|
84
84
|
"spans": [{ "path": "src/db/invites.ts", "start": 1, "end": 48 }]
|
|
85
85
|
},
|
|
86
86
|
{
|
|
@@ -99,35 +99,35 @@ adiff story set --worktree . --json - <<'JSON'
|
|
|
99
99
|
JSON
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
Rules that make a
|
|
102
|
+
Rules that make a layers worth reading:
|
|
103
103
|
|
|
104
|
-
- **Order is the point.**
|
|
104
|
+
- **Order is the point.** Layer 1 is what the reader must understand before layer 2 makes sense.
|
|
105
105
|
Data model, then the code that uses it, then the surface, then the mechanical bits last.
|
|
106
106
|
- **A title is a claim, not a file name.** "Add the invitation API", never "changes to
|
|
107
107
|
src/api/invites.ts".
|
|
108
108
|
- **Line numbers are the new side of the diff**, the same numbers `adiff comment take` reports.
|
|
109
|
-
- **Cover everything.** adiff computes coverage itself and answers with the hunks no
|
|
110
|
-
those show up for the reviewer under "not in any
|
|
111
|
-
skips a third of the diff is worse than no
|
|
109
|
+
- **Cover everything.** adiff computes coverage itself and answers with the hunks no layer claims;
|
|
110
|
+
those show up for the reviewer under "not in any layer" whatever you do. A layers that quietly
|
|
111
|
+
skips a third of the diff is worse than no layers, so put the leftovers in a final layer and say
|
|
112
112
|
they are mechanical.
|
|
113
113
|
|
|
114
|
-
The answer to `
|
|
114
|
+
The answer to `layers set` is the honest report — check it before you claim to be done:
|
|
115
115
|
|
|
116
116
|
```json
|
|
117
|
-
{"ok":true,"
|
|
117
|
+
{"ok":true,"layers":{"version":1,"stale":false,"covered":7,"total":9,"uncovered":[{"path":"src/api/router.ts","start":40,"end":52}],"vanished":[],"layers":[{"title":"Add the invitation data model","files":["src/db/invites.ts"]}]}}
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
`covered`/`total` count hunks. `uncovered` names the ones no
|
|
121
|
-
|
|
120
|
+
`covered`/`total` count hunks. `uncovered` names the ones no layer claims — claim them and set the
|
|
121
|
+
layers again. `vanished` names paths a layer points at that this branch does not change, which
|
|
122
122
|
usually means a typo in a path. Read it back at any time with:
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
adiff
|
|
125
|
+
adiff layers show --worktree . --fields covered,total,uncovered
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
Setting a
|
|
128
|
+
Setting a layers again supersedes the previous one and bumps `version`; the layers records the commit
|
|
129
129
|
it was written for, and adiff reports it as `stale` once the branch moves past that commit. After
|
|
130
|
-
you address a review, write the
|
|
130
|
+
you address a review, write the layers again.
|
|
131
131
|
|
|
132
132
|
## Tell the reviewer how to read it
|
|
133
133
|
|
|
@@ -136,11 +136,11 @@ command and the keys. Name the repository they should point at, which is the rep
|
|
|
136
136
|
worktree belongs to:
|
|
137
137
|
|
|
138
138
|
> Open it with `adiff review open --repo <repo>`, then press `enter` on this branch. The sidebar
|
|
139
|
-
> lists the
|
|
140
|
-
>
|
|
139
|
+
> lists the layers in reading order; `j` and `k` move between them and the diff follows. Inside a
|
|
140
|
+
> layer, `]` and `[` walk its files. Select lines with `v`, write a comment with `c`, stage it with
|
|
141
141
|
> `ctrl+a`, and send the whole review with `S`. Press `?` for the rest.
|
|
142
142
|
|
|
143
|
-
Say what you want looked at hardest, and where you are unsure. A reviewer who knows which
|
|
143
|
+
Say what you want looked at hardest, and where you are unsure. A reviewer who knows which layer you
|
|
144
144
|
doubt spends their attention there.
|
|
145
145
|
|
|
146
146
|
## Discovering the rest
|