thurview 0.11.1 → 0.13.0
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/README.md +139 -91
- package/dist/cli.js +300 -120
- package/dist/cli.js.map +1 -1
- package/dist/document/compile.js +97 -13
- package/dist/document/compile.js.map +1 -1
- package/dist/forge/submission.js +123 -0
- package/dist/forge/submission.js.map +1 -1
- package/dist/store.js +12 -1
- package/dist/store.js.map +1 -1
- package/dist/thread-state.js +23 -0
- package/dist/thread-state.js.map +1 -1
- package/dist/ui/app.css +12 -0
- package/dist/ui/app.js +68 -44
- package/dist/ui/app.js.map +2 -2
- package/package.json +1 -1
- package/skills/thurview/SKILL.md +18 -3
- package/skills/thurview/references/lifecycle.md +26 -0
- package/skills/thurview-design/SKILL.md +265 -0
- package/skills/thurview-design/references/anchors-and-proposals.md +90 -0
package/README.md
CHANGED
|
@@ -1,83 +1,45 @@
|
|
|
1
1
|
# thurview
|
|
2
2
|
|
|
3
|
-
Guided, evidence-anchored reviews of agent-written code.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
and serves it in your browser: the walkthrough, live code peeks, the diff,
|
|
9
|
-
commits, and a software map. You ask questions, leave anchored comments, and
|
|
10
|
-
approve or request changes. The agent answers and republishes.
|
|
11
|
-
|
|
12
|
-
It also explains a codebase. A **code explainer** is the same document over a
|
|
13
|
-
different unit: one pinned commit instead of a range, so a reader can see the
|
|
14
|
-
architecture well enough to spot design problems themselves. It has no diff and
|
|
15
|
-
nothing to approve, it surfaces structure rather than grading it, and it states
|
|
16
|
-
what it did not examine.
|
|
17
|
-
|
|
18
|
-
It does not review the code for you. It helps you understand it fast enough
|
|
19
|
-
to review it yourself.
|
|
20
|
-
|
|
21
|
-

|
|
23
|
-
|
|
24
|
-
The clip is the `/thurview` skill's loop end to end: `thurview publish`, a
|
|
25
|
-
question arriving in `thurview wait`, the reply, then the reader following an
|
|
26
|
-
anchor into the code, commenting on a line range in the diff, reading the
|
|
27
|
-
answer in the threads panel and requesting changes.
|
|
28
|
-
|
|
29
|
-
## What the reader sees
|
|
30
|
-
|
|
31
|
-
Prose with every claim anchored to code, opened beside the text:
|
|
32
|
-
|
|
33
|
-

|
|
35
|
-
|
|
36
|
-
The diff at the pinned commits, commenting on a selected line range:
|
|
37
|
-
|
|
38
|
-

|
|
40
|
-
|
|
41
|
-
The software map: where the change landed in the system, and what sits next to
|
|
42
|
-
it — the question the diff cannot answer:
|
|
43
|
-
|
|
44
|
-

|
|
46
|
-
|
|
47
|
-
Threads: a question the agent already answered, and a comment held for the
|
|
48
|
-
decision:
|
|
49
|
-
|
|
50
|
-

|
|
52
|
-
|
|
53
|
-
Approve, or send it back with the comments:
|
|
54
|
-
|
|
55
|
-

|
|
57
|
-
|
|
58
|
-
```mermaid
|
|
59
|
-
flowchart LR
|
|
60
|
-
A[Branch, PR or range] --> B[Agent pins base and head]
|
|
61
|
-
B --> C[Agent authors review.md + data.yaml + map.yaml]
|
|
62
|
-
C --> D[thurview publish: validate, seal revision]
|
|
63
|
-
D --> E[You read, ask, comment in the browser]
|
|
64
|
-
E -->|Request changes| C
|
|
65
|
-
E -->|Approve| F[Done]
|
|
66
|
-
```
|
|
3
|
+
Guided, evidence-anchored reviews of agent-written code. A coding agent studies
|
|
4
|
+
a branch, pull request or commit range and writes a short document in which
|
|
5
|
+
every claim is anchored to an exact file and line range at a pinned commit. You
|
|
6
|
+
read it in your browser, ask the agent questions, comment on the code, and
|
|
7
|
+
approve or send it back.
|
|
67
8
|
|
|
68
9
|
## Install
|
|
69
10
|
|
|
70
11
|
Give your agent the skill, with the [skills](https://github.com/vercel-labs/skills)
|
|
71
|
-
CLI
|
|
12
|
+
CLI - it works with Claude Code, Codex, Cursor, OpenCode and every agent that
|
|
72
13
|
reads the Agent Skills format:
|
|
73
14
|
|
|
74
15
|
```sh
|
|
75
16
|
npx skills@latest add https://github.com/Thurbeen/thurview \
|
|
76
17
|
--skill thurview --agent universal claude-code --global --yes
|
|
77
|
-
npx skills@latest add https://github.com/Thurbeen/thurview \
|
|
78
|
-
--skill review-fix --agent universal claude-code --global --yes # optional, see below
|
|
79
18
|
```
|
|
80
19
|
|
|
20
|
+
The skill reaches the `thurview` command through `npx`, so the requirements
|
|
21
|
+
are Node 22 or later and git (`gh` for pull requests, `glab` for merge
|
|
22
|
+
requests). Then, in any repository, ask your agent:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
Use the thurview skill to review my current branch against up-to-date main
|
|
26
|
+
and open it.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+

|
|
31
|
+
|
|
32
|
+
The clip is the reader's half, the agent working off camera: following an anchor
|
|
33
|
+
from the prose into the code, opening a call stack frame, commenting on a line
|
|
34
|
+
range of the diff, seeing on the map what the change added, reading in the
|
|
35
|
+
threads panel the answer to a question already asked, and sending the review
|
|
36
|
+
back with changes requested.
|
|
37
|
+
|
|
38
|
+
<details>
|
|
39
|
+
<summary><b>Other ways to install</b> - pin the skill to a release, install the
|
|
40
|
+
command from npm, run from a checkout, session hooks, the thurview-design and
|
|
41
|
+
review-fix skills</summary>
|
|
42
|
+
|
|
81
43
|
`--global` installs for your user, so one install covers every repository.
|
|
82
44
|
`universal` puts the one real copy in `~/.agents/skills/thurview`, the directory
|
|
83
45
|
no single agent owns, and every other agent you name gets a symlink to it, such
|
|
@@ -103,13 +65,11 @@ The npm package ships the same skill, so `thurview setup skill` links the copy
|
|
|
103
65
|
that matches the command you have installed. Use that when you want the two to
|
|
104
66
|
move together.
|
|
105
67
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
the skill reach it through `npx`:
|
|
68
|
+
Install the command itself, rather than leaving the skill to reach it through
|
|
69
|
+
`npx` on every run:
|
|
109
70
|
|
|
110
71
|
```sh
|
|
111
72
|
npm install -g thurview # or: pnpm add -g thurview
|
|
112
|
-
npx -y thurview # no install; the skill falls back to this
|
|
113
73
|
```
|
|
114
74
|
|
|
115
75
|
The review reasons over a code graph thurview builds itself from the pinned
|
|
@@ -132,14 +92,81 @@ with the reviews of its working directory. `thurview setup skill` links the
|
|
|
132
92
|
skill from this checkout instead of the `skills` CLI copy; use one or the
|
|
133
93
|
other.
|
|
134
94
|
|
|
135
|
-
|
|
95
|
+
Also available: `thurview-design`, which authors the design kind described
|
|
96
|
+
[below](#how-it-works), and `review-fix`, the browserless companion skill
|
|
97
|
+
described [below](#review-and-fix).
|
|
136
98
|
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
|
|
99
|
+
```sh
|
|
100
|
+
npx skills@latest add https://github.com/Thurbeen/thurview \
|
|
101
|
+
--skill thurview-design --agent universal claude-code --global --yes
|
|
102
|
+
npx skills@latest add https://github.com/Thurbeen/thurview \
|
|
103
|
+
--skill review-fix --agent universal claude-code --global --yes
|
|
140
104
|
```
|
|
141
105
|
|
|
142
|
-
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
## How it works
|
|
109
|
+
|
|
110
|
+
thurview validates every anchor against the pinned commits, seals a revision,
|
|
111
|
+
and serves it in your browser: the walkthrough, live code peeks, the diff,
|
|
112
|
+
commits, and a software map. You ask questions, leave anchored comments, and
|
|
113
|
+
approve or request changes. The agent answers and republishes.
|
|
114
|
+
|
|
115
|
+
It also explains a codebase. A **code explainer** is the same document over a
|
|
116
|
+
different unit: one pinned commit instead of a range, so a reader can see the
|
|
117
|
+
architecture well enough to spot design problems themselves. It has no diff and
|
|
118
|
+
nothing to approve, it surfaces structure rather than grading it, and it states
|
|
119
|
+
what it did not examine.
|
|
120
|
+
|
|
121
|
+
And it reads a plan. A **design** is the same document over a change that is
|
|
122
|
+
not written yet: one pinned commit — the code it argues from — anchors on the
|
|
123
|
+
code as it stands, and what it would build declared as proposals, each attached
|
|
124
|
+
to the code it lands in today. An anchor never points at code that does not
|
|
125
|
+
exist; the reader approves the design or sends it back.
|
|
126
|
+
|
|
127
|
+
It does not review the code for you. It helps you understand it fast enough
|
|
128
|
+
to review it yourself.
|
|
129
|
+
|
|
130
|
+
```mermaid
|
|
131
|
+
flowchart LR
|
|
132
|
+
A[Branch, PR or range] --> B[Agent pins base and head]
|
|
133
|
+
B --> C[Agent authors review.md + data.yaml + map.yaml]
|
|
134
|
+
C --> D[thurview publish: validate, seal revision]
|
|
135
|
+
D --> E[You read, ask, comment in the browser]
|
|
136
|
+
E -->|Request changes| C
|
|
137
|
+
E -->|Approve| F[Done]
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## What the reader sees
|
|
141
|
+
|
|
142
|
+
Prose with every claim anchored to code, opened beside the text:
|
|
143
|
+
|
|
144
|
+

|
|
146
|
+
|
|
147
|
+
The diff at the pinned commits, commenting on a selected line range:
|
|
148
|
+
|
|
149
|
+

|
|
151
|
+
|
|
152
|
+
The software map: where the change landed in the system, and what sits next to
|
|
153
|
+
it — the question the diff cannot answer:
|
|
154
|
+
|
|
155
|
+

|
|
157
|
+
|
|
158
|
+
Threads: a question the agent already answered, and a comment held for the
|
|
159
|
+
decision:
|
|
160
|
+
|
|
161
|
+

|
|
163
|
+
|
|
164
|
+
Approve, or send it back with the comments:
|
|
165
|
+
|
|
166
|
+

|
|
168
|
+
|
|
169
|
+
## What's in a review
|
|
143
170
|
|
|
144
171
|
- **Interface delta**: above the document, what the change added to, changed
|
|
145
172
|
in or removed from the surfaces other code can reach - exported functions
|
|
@@ -183,20 +210,21 @@ bar.
|
|
|
183
210
|
|
|
184
211
|
## CLI
|
|
185
212
|
|
|
186
|
-
| Command | Purpose
|
|
187
|
-
| --------------------------------------------------------------------- |
|
|
188
|
-
| `thurview scaffold [--pr N \| --base R --head R]` | Create a review pinned to exact commits (`--update` re-pins)
|
|
189
|
-
| `thurview explain [<path>] [--commit R]` | Create a code explainer of a codebase or subsystem at one commit
|
|
190
|
-
| `thurview
|
|
191
|
-
| `thurview
|
|
192
|
-
| `thurview
|
|
193
|
-
| `thurview
|
|
194
|
-
| `thurview
|
|
195
|
-
| `thurview
|
|
196
|
-
| `thurview
|
|
197
|
-
| `thurview
|
|
198
|
-
| `thurview
|
|
199
|
-
| `thurview
|
|
213
|
+
| Command | Purpose |
|
|
214
|
+
| --------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
215
|
+
| `thurview scaffold [--pr N \| --base R --head R]` | Create a review pinned to exact commits (`--update` re-pins) |
|
|
216
|
+
| `thurview explain [<path>] [--commit R]` | Create a code explainer of a codebase or subsystem at one commit |
|
|
217
|
+
| `thurview design [<path>] [--commit R]` | Create a design of what to build, pinned to the commit it argues from |
|
|
218
|
+
| `thurview info [--all]` | Reviews, explainers and designs bound to this worktree |
|
|
219
|
+
| `thurview publish --review ID [--view T] [--open]` | Validate the document and map, seal a revision |
|
|
220
|
+
| `thurview open --review ID [--view T]` | Start the server if needed and open the browser |
|
|
221
|
+
| `thurview wait --review ID [--timeout S]` | Block until the reader needs the agent |
|
|
222
|
+
| `thurview threads list\|get\|reply\|resolve` | Read and answer threads |
|
|
223
|
+
| `thurview graph interfaces\|impact\|callers\|tests-for\|architecture` | Ask the code graph at a review's pins, or at `--base`/`--head` |
|
|
224
|
+
| `thurview forge status\|prior\|pass\|submit\|reply` | Read a change request through its forge, and post the review back |
|
|
225
|
+
| `thurview serve` / `thurview stop` | Run the server in the foreground / stop the background one |
|
|
226
|
+
| `thurview setup hooks\|skill\|status` | Session hooks, agent skill, install state |
|
|
227
|
+
| `thurview update` | Self-update from npm |
|
|
200
228
|
|
|
201
229
|
thurview is an [AXI](https://axi.md): built for agents that drive it through a
|
|
202
230
|
shell. Output is [TOON](https://toonformat.dev) on stdout, errors are
|
|
@@ -232,6 +260,7 @@ on the change request, through `thurview forge`:
|
|
|
232
260
|
```sh
|
|
233
261
|
thurview forge status --change 123 # what CI actually did, and whether it is a gate at all
|
|
234
262
|
thurview forge prior --change 123 # the previous pass, thread by thread
|
|
263
|
+
thurview forge pass --review <id> # the reader's submitted threads, as the file below takes
|
|
235
264
|
thurview forge submit --change 123 --file pass.json --dry-run
|
|
236
265
|
thurview forge reply <threadId> --change 123 --body "<answer>" --resolve --at <head>
|
|
237
266
|
```
|
|
@@ -242,6 +271,14 @@ a change request from a fork typically runs a fraction of them, and a
|
|
|
242
271
|
cancelled job shows no failure while asserting nothing. `ci.trustworthy` is
|
|
243
272
|
the only field that means the tests really passed.
|
|
244
273
|
|
|
274
|
+
`pass` goes the other way, from a review a reader submitted in the browser to
|
|
275
|
+
that same file: one inline comment per thread anchored to a line, questions and
|
|
276
|
+
resolved threads left out, and threads with no line - a document block, a map
|
|
277
|
+
node, a whole file - gathered into the summary and named in the output, so
|
|
278
|
+
nobody assumes their comment was posted where they wrote it. The verdict comes
|
|
279
|
+
from the reader's decision, `close` becomes a `comment`, and an approve with
|
|
280
|
+
threads still open is refused rather than quietly downgraded.
|
|
281
|
+
|
|
245
282
|
`submit` takes one JSON file so a human can read the pass before it is posted,
|
|
246
283
|
refuses an `approve` without `--confirm`, and warns about comments too long to
|
|
247
284
|
be read. `reply --resolve` takes `--at <sha>` and refuses any commit but the
|
|
@@ -275,12 +312,23 @@ An explainer writes the same files, minus `interfaces`: there is no change to
|
|
|
275
312
|
derive a delta from, and `graph: base` on an anchor is an error because there
|
|
276
313
|
is one commit.
|
|
277
314
|
|
|
315
|
+
A design writes the same files, and `interfaces` means something else in it:
|
|
316
|
+
each entry is a **proposal** — what the design would add, change or remove,
|
|
317
|
+
with the anchor of the code that proposal lands in, replaces or plugs into
|
|
318
|
+
today. `graph: base` is an error for the same reason as in an explainer, a
|
|
319
|
+
`symbol:` entry is an error because no diff derived one, and a design that
|
|
320
|
+
proposes nothing is refused: that document is an explainer. In its `map.yaml`,
|
|
321
|
+
`base` is the structure as it stands and `nodes` the structure it proposes, so
|
|
322
|
+
a proposed part may own files that do not exist yet while a `base` node may
|
|
323
|
+
not.
|
|
324
|
+
|
|
278
325
|
`thurview publish` rejects an anchor whose file or lines do not exist at the
|
|
279
326
|
pinned commit, a call stack frame that claims an added or removed call the
|
|
280
327
|
diff does not show, a storage operation on an unknown field, a map edge
|
|
281
328
|
to an unknown node, an interface annotation for a symbol the change did not
|
|
282
329
|
move, a declared interface whose anchor holds no added or deleted line, and an
|
|
283
|
-
explainer that anchors nothing at all
|
|
330
|
+
explainer that anchors nothing at all, and a design that proposes nothing or
|
|
331
|
+
whose proposal names no site in the code as it stands. The full format is in
|
|
284
332
|
[skills/thurview/references](skills/thurview/references).
|
|
285
333
|
|
|
286
334
|
Optional guidance for the agent: `~/.thurview/THURVIEW.md` for you,
|