thurview 0.3.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thurview",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Guided, evidence-anchored reviews of agent-written code. A coding agent authors the review; you read, ask, comment and decide in the browser.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -64,22 +64,25 @@ write `theme.yaml`.
64
64
 
65
65
  ## Workflow
66
66
 
67
- ### 1. Resolve the review
67
+ ### 1. Pin the change
68
68
 
69
- Run `thurview info` in the source worktree. It lists reviews bound to that
70
- worktree with `inSync` (HEAD equals the pinned head). Reuse a review that
71
- matches the requested change. Otherwise run `thurview scaffold` with the
72
- matching flags:
69
+ Run `thurview scaffold` in the source worktree with the flags that match the
70
+ request:
73
71
 
74
72
  ```sh
75
- thurview scaffold # current branch vs trunk fork point
76
- thurview scaffold --pr 123 # pull request (needs gh)
73
+ thurview scaffold # current branch vs its trunk fork point
74
+ thurview scaffold --pr 123 # pull request (needs gh)
77
75
  thurview scaffold --base <ref> --head <ref>
78
- thurview scaffold --new # another review for the same binding
79
- thurview scaffold --update --review <id> # re-pin after the branch moved
80
76
  ```
81
77
 
82
- Record from the scaffold output: `review.id` (short id accepted everywhere),
78
+ An active review bound to the same branch, pull request or range is reused
79
+ and re-pinned (`review.reused` is true), so a second run for the same request
80
+ continues the same review; pass `--new` for a separate one. After the branch
81
+ moves, `thurview scaffold --update --review <id>` re-pins. `thurview info`
82
+ lists the reviews bound to the worktree, with `inSync` (HEAD equals the pinned
83
+ head), when you need to choose between several.
84
+
85
+ Record from the output: `review.id` (the short id, accepted everywhere),
83
86
  `review.dir`, `review.base`, `review.head`, `files.document`, `files.data`,
84
87
  `files.map`, `files.theme`, `change` (files, additions, deletions) and
85
88
  `guidance`.
@@ -87,18 +90,19 @@ Record from the scaffold output: `review.id` (short id accepted everywhere),
87
90
  Resolve refs before passing them. Pass commit ids or plain ref names; do not
88
91
  pass `<rev>^` inside a jj workspace.
89
92
 
90
- ### 2. Show small changes at once
93
+ ### 2. Let the reader start on a small change
91
94
 
92
- When `change.additions + change.deletions` is under 300, publish first and
93
- land the reader on the diff, then write the document:
95
+ When `change.additions + change.deletions` is under 300, publish the stub now
96
+ and land the reader on the diff:
94
97
 
95
98
  ```sh
96
99
  thurview publish --review <id> --view files --open
97
100
  ```
98
101
 
99
- The scaffolded stub validates as long as `README.md` exists at head; if it
100
- does not, point the `entry` anchor at any file that does. Larger changes skip
101
- this step.
102
+ The stub tells the reader the walkthrough is on its way, so they read the diff
103
+ while you write it, and the page offers the next revision as soon as you
104
+ publish again. Skip this for larger changes: a diff that size is not readable
105
+ cold, and the walkthrough is what makes it so.
102
106
 
103
107
  ### 3. Study the change
104
108
 
@@ -118,16 +122,17 @@ thurview graph architecture --review <id> # file clusters with their hubs,
118
122
  The graph covers TypeScript, JavaScript, Python, Go, Rust and Java; other
119
123
  files are absent from it, not empty. References resolve by name, so treat
120
124
  `unresolved` as the size of what it could not place, and `<module>` as code
121
- outside any definition. If `truncated` is true — `truncated.base`/
125
+ outside any definition. If `truncated` is true (`truncated.base` and
122
126
  `truncated.head` for impact and architecture, which look at both commits; a
123
- plain `truncated` for callers and tests-for, which look at one — the repo has
127
+ plain `truncated` for callers and tests-for, which look at one), the repo has
124
128
  more supported files than the graph could parse, and that answer is a partial
125
- view — say so rather than treating an empty result as "nothing there".
129
+ view: say so rather than treating an empty result as "nothing there".
126
130
 
127
131
  Spend the review on what those answer: what the change reaches that the diff
128
- does not show, which boundaries it crosses, what now depends on what, what it left untested. Then compare the stated
129
- intent (commit messages, PR description, the user's own words) with what the
130
- code does. The gap is the most valuable finding.
132
+ does not show, which boundaries it crosses, what now depends on what, what it
133
+ left untested. Then compare the stated intent (commit messages, PR
134
+ description, the user's own words) with what the code does. The gap is the
135
+ most valuable finding.
131
136
 
132
137
  Do not spend the review on naming, formatting, import order, or missing
133
138
  defensive checks. Linters, type checkers and `/code-review` catch those, and a
@@ -136,26 +141,11 @@ reader who wanted them would have run those instead.
136
141
  Read every range you anchor from the pinned commit, not the working tree:
137
142
  `git show <head>:<path>` or `git show <base>:<path>`.
138
143
 
139
- ### 4. Author the document
140
-
141
- Edit `review.md` and `data.yaml` in the review directory following
142
- [Document authoring](references/document-authoring.md). Keep it short.
143
- Default to anchor links for evidence; use an inline peek only when the reader
144
- must see the code to follow the main claim.
145
-
146
- ### 5. Theme the review after the project
147
-
148
- Read [Theme](references/theme.md). Decide the look in its order: what the
149
- user asked for, then the reviewed project's own design system read from its
150
- files at head, then the default skin. Write `theme.yaml` in the review
151
- directory when steps 1 or 2 yield tokens; leave it empty otherwise. Say
152
- which source you used when you hand over the review.
153
-
154
- ### 6. Author the map
144
+ ### 4. Start the map
155
145
 
156
146
  Dispatch one sub-agent to write `map.yaml` per
157
- [Software map](references/software-map.md) while you write the document, with
158
- this prompt filled in:
147
+ [Software map](references/software-map.md) now, so it works while you write
148
+ the document, with this prompt filled in:
159
149
 
160
150
  ```text
161
151
  Use the thurview skill's software-map reference (`thurview skill` prints the
@@ -179,6 +169,20 @@ report the errors you could not fix.
179
169
  Without a sub-agent facility, write the map yourself after the document, or
180
170
  leave `nodes: []` and say the map is not published.
181
171
 
172
+ ### 5. Author the document
173
+
174
+ Edit `review.md` and `data.yaml` in the review directory following
175
+ [Document authoring](references/document-authoring.md). Keep it short.
176
+ Default to anchor links for evidence; use an inline peek only when the reader
177
+ must see the code to follow the main claim.
178
+
179
+ ### 6. Theme the review after the project
180
+
181
+ Read [Theme](references/theme.md). Decide the look in its order: what the
182
+ user asked for, then the reviewed project's own design system read from its
183
+ files at head, then the default skin. Write `theme.yaml` in the review
184
+ directory when steps 1 or 2 yield tokens; leave it empty otherwise.
185
+
182
186
  ### 7. Publish
183
187
 
184
188
  ```sh
@@ -187,39 +191,55 @@ thurview publish --review <id>
187
191
 
188
192
  Read every row of `diagnostics`. Fix each `error` and publish again. A
189
193
  `warning` does not block. `publish` refuses (code `THREADS_OPEN`) when a
190
- submitted comment thread is still open (see step 9). On success `published`
194
+ submitted comment thread is still open (see step 10). On success `published`
191
195
  carries `rev` and `url`; the status becomes `awaiting-review`.
192
196
 
193
- Then open it for the reader:
197
+ Then open it for the reader, unless step 2 already did:
194
198
 
195
199
  ```sh
196
200
  thurview open --review <id> # prints url; --view files|commits|map
197
201
  ```
198
202
 
199
- Give the user the `url` from the output.
203
+ ### 8. Hand over
204
+
205
+ Tell the user, in a few lines and nothing more:
206
+
207
+ - the `url`
208
+ - what the review covers, in one sentence, and where to start: the Review tab
209
+ as a rule; the Files tab when the change is small and the diff is the story
210
+ - which theme source you used: the user's request, the project's design
211
+ system (name the files), or the default skin
212
+ - that you are now waiting for their questions and their decision
200
213
 
201
- ### 8. Wait for the reader
214
+ The page explains its own controls; do not describe them.
215
+
216
+ ### 9. Wait for the reader
202
217
 
203
218
  ```sh
204
- thurview wait --review <id>
219
+ thurview wait --review <id> --timeout <seconds>
205
220
  ```
206
221
 
207
- It blocks until the reader needs you and prints `wait.reason` with the
208
- threads that need you:
222
+ It blocks until the reader needs you or `--timeout` seconds pass (default
223
+ 3600). Your shell tool has a limit of its own, and a command it kills prints
224
+ nothing: keep `--timeout` under that limit and run `wait` again on `timeout`.
225
+ When the tool can run a command in the background and wake you when it exits,
226
+ run `wait` that way, so the user has the terminal back while they read.
227
+
228
+ `wait.reason` says what happened, with the threads that need you:
209
229
 
210
230
  - `question`: an "Ask now" thread. Answer each thread in `threads` with
211
231
  `thurview threads reply <threadId> --review <id> --body "<answer>"`. Do
212
232
  not change the document for a question. Wait again.
213
233
  - `awaiting-agent-updates`: the reader submitted with "Request changes".
214
234
  `threads` lists what to address and `wait.decision` the summary. Go to
215
- step 9.
235
+ step 10.
216
236
  - `accepted`: approved. Report and stop.
217
237
  - `closed`: the reader ended the review without approving it. Report and stop.
218
238
  - `review-dismissed` or `review-deleted`: stop.
219
- - error `TIMEOUT` (exit code 1, after `--timeout` seconds, default 3600):
220
- wait again, or report that the reader has not responded.
239
+ - `timeout`: nothing happened. Wait again, or tell the user the reader has not
240
+ responded and stop.
221
241
 
222
- ### 9. Address requested changes
242
+ ### 10. Address requested changes
223
243
 
224
244
  For each thread in `thurview threads list --review <id> --open`:
225
245
 
@@ -232,8 +252,9 @@ For each thread in `thurview threads list --review <id> --open`:
232
252
  - `thurview threads resolve <threadId> --review <id>` once the requested
233
253
  change is present. Do not resolve a thread you did not address.
234
254
 
235
- Then publish again (step 7), and wait again (step 8). A republish requires
236
- zero open submitted comment threads; questions do not block.
255
+ Then publish again (step 7), tell the user what changed since the previous
256
+ revision in a line or two, and wait again (step 9). A republish requires zero
257
+ open submitted comment threads; questions do not block.
237
258
 
238
259
  ## Architecture reviews
239
260
 
@@ -250,3 +271,7 @@ Report completion only when all of these hold:
250
271
  - Every `error` diagnostic is resolved.
251
272
  - The map is published, or you said why it is not.
252
273
  - The review is waiting on the reader, accepted, closed, dismissed or deleted.
274
+
275
+ Close with the decision and its summary (`wait.decision`), and the URL. When
276
+ the reader has not responded, say so and leave the review open; a later
277
+ session picks it up from `thurview` in the same worktree.
@@ -82,8 +82,11 @@ switch between revisions in the browser.
82
82
  `thurview wait --review <id> [--timeout <s>]` polls the review and returns
83
83
  `wait.reason` in `question`, `awaiting-agent-updates`, `accepted`,
84
84
  `closed`, `review-dismissed`, `review-deleted`, with the threads that need
85
- you. After the timeout it fails with code `TIMEOUT` (exit 1). A question
86
- already answered by the agent is not reported again.
85
+ you, or `timeout` once `--timeout` seconds (default 3600) pass with nothing
86
+ to report. A timeout is a result, not a failure: the command exits 0. Keep
87
+ the timeout under your shell tool's own limit, since a command the tool kills
88
+ prints nothing. A question already answered by the agent is not reported
89
+ again.
87
90
 
88
91
  `thurview threads get <id>` truncates bodies over 1500 characters; pass
89
92
  `--full` when the hint says so.
@@ -53,11 +53,11 @@ fonts:
53
53
  - { family: Acme Sans, path: web/public/fonts/acme-sans.woff2, weight: "400 700" }
54
54
 
55
55
  shape:
56
- radius: 8px # 0 in the default skin
57
- bevel: false # pixel bevels on panels and buttons
58
- glow: false # neon text glow on headings and tabs
59
- scanlines: false # CRT overlay
60
- headingTransform: none # uppercase in the default skin
56
+ radius: 8px # 6px in the default skin
57
+ headingTransform: none # none in the default skin
58
+ bevel: true # retro extras, all off unless set: pixel
59
+ glow: true # bevels on panels, neon glow on headings
60
+ scanlines: true # and tabs, a CRT overlay
61
61
 
62
62
  code: # syntax palette; any key optional
63
63
  keyword: "#7c3aed"
@@ -80,8 +80,7 @@ Rules:
80
80
 
81
81
  - Keep contrast readable: body text against `bg`, code against `code`.
82
82
  - A light project gets `mode: light` and light backgrounds; the default skin
83
- is dark and its bevels, glow and scanlines are off by default only when you
84
- set them so.
83
+ is dark and neutral, with one blue accent.
85
84
  - `fonts.files` paths must exist at the pinned head commit; `publish`
86
85
  rejects a missing one. Font stylesheets are fetched by the reader's
87
86
  browser.