thurview 0.15.0 → 0.17.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.15.0",
3
+ "version": "0.17.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",
@@ -170,6 +170,53 @@ Rules:
170
170
  against added lines in the pinned diff. Listing a frame on one side only
171
171
  for contrast is rejected.
172
172
 
173
+ ## flow
174
+
175
+ ````markdown
176
+ ```flow
177
+ label: Sign in
178
+ steps:
179
+ - { id: land, label: Visitor opens /login, actor: visitor, next: post }
180
+ - { id: post, label: Credentials posted, anchor: loginRoute, next: check }
181
+ - { id: check, label: Credentials valid?, anchor: checkUser,
182
+ when: [{ case: valid, to: home }, { case: rejected, to: retry }] }
183
+ - { id: retry, label: Error shown, anchor: renderError, next: post }
184
+ - { id: home, label: Dashboard, anchor: dashboard }
185
+ ```
186
+ ````
187
+
188
+ A user journey and where it branches - the shape `sequence` cannot hold,
189
+ because a decision is not a message. The first step is the entry; a step
190
+ continues with `next` or branches with `when`, and one with neither ends the
191
+ flow. Cycles are fine: a retry loop is what a journey does, and a step that
192
+ leads back up is drawn down a lane on the right, one lane per loop so two
193
+ retries never share a vertical run.
194
+
195
+ Every step is either code or a person: `anchor` is where the code does it and
196
+ the reader opens it by clicking, `actor` is a declared actor doing it outside
197
+ the code, and a step carries at least one of the two. An actor-only step is
198
+ drawn dashed, so the reader can see at a glance which parts open something.
199
+
200
+ `publish` refuses:
201
+
202
+ 1. A step with neither `anchor` nor `actor`, and a block where no step has an
203
+ `anchor` at all - a flow nothing opens is prose in a box.
204
+ 2. `next` and `when` on one step, and a `when` with a single case. One is a
205
+ branch, the other is a `next`.
206
+ 3. A `next` or `to` naming a step the block does not declare, or naming itself.
207
+ 4. A step unreachable from the first one, a duplicate `id`, an unknown `actor`,
208
+ and an anchor with no `peek`.
209
+
210
+ ## Fences thurview does not render
211
+
212
+ `mermaid`, `plantuml`, `puml`, `dot`, `graphviz` and `d2` in a document body are
213
+ a publish error. They used to be neither components nor an error, so the block
214
+ reached the reader as its own source text with nothing saying so. thurview draws
215
+ only what it can anchor at the pinned commit: use `flow` for a journey and
216
+ `sequence` for a message exchange. To quote one of those languages as source -
217
+ reviewing a change to a repository's own diagrams - fence it as `text`, which
218
+ renders as the code block it is.
219
+
173
220
  ## database
174
221
 
175
222
  ````markdown
@@ -142,11 +142,14 @@ A claim you cannot anchor is a question, not a fact. Write it as one.
142
142
  Use the fenced components for behaviour that prose explains badly:
143
143
 
144
144
  - `sequence` for temporal behaviour across actors
145
+ - `flow` for a user journey and where it branches
145
146
  - `callstack` for call-flow differences between base and head
146
147
  - `database` for persisted-state structure and the operations on it
147
148
 
148
- Each message, frame and operation carries an anchor, so the reader can open
149
- the code behind every arrow. See [Components](components.md).
149
+ Each message, frame, step and operation carries an anchor, so the reader can
150
+ open the code behind every arrow. `mermaid` and the other general diagram
151
+ languages are a publish error rather than a fifth option: thurview draws only
152
+ what it can anchor. See [Components](components.md).
150
153
 
151
154
  Add a diagram only when it materially helps. A document with one good
152
155
  sequence diagram beats one with four.
@@ -131,6 +131,7 @@ ${THURVIEW_HOME:-~/.thurview}/
131
131
  ├── THURVIEW.md user guidance (optional)
132
132
  ├── server.json running server, if any
133
133
  ├── agents/<id>.json heartbeat of a running `wait`, removed when it ends
134
+ ├── forge/<id>.json what the forge last said of the change request: head, state, CI, last pass posted
134
135
  ├── passes/<id>.json the submission `forge pass` wrote, for `forge submit`
135
136
  └── reviews/<id>/
136
137
  ├── review.md you edit
@@ -145,6 +146,26 @@ ${THURVIEW_HOME:-~/.thurview}/
145
146
  A failed publish leaves the last sealed revision in place. The reader can
146
147
  switch between revisions in the browser.
147
148
 
149
+ ## The queue
150
+
151
+ The home page lists every document, grouped by repository and ordered by whose
152
+ turn it is. It is read from the store on every load and never published, so it
153
+ cannot go stale. Whose turn, most urgent first:
154
+
155
+ | Turn | When |
156
+ | ------ | ------------------------------------------------------------------------- |
157
+ | you | a decision on a change request that no `forge submit` has posted yet |
158
+ | you | `awaiting-review`, pinned at the change request's head, no thread waiting |
159
+ | agent | the change request's head moved past the pin: `scaffold --update` |
160
+ | agent | a thread `needsAgent`, or `awaiting-agent-updates` |
161
+ | agent | `draft`: nothing published yet |
162
+ | nobody | `accepted`, `closed`, dismissed, or the change request merged or closed |
163
+
164
+ The forge columns come from `forge/<id>.json`, which `scaffold --pr`, `forge
165
+ status` and `forge submit` write for the document bound to that change request.
166
+ Run `thurview forge status --review <id>` to refresh a row; until something
167
+ has, the row says the forge was not read.
168
+
148
169
  ## wait
149
170
 
150
171
  `thurview wait --review <id> [--timeout <s>]` polls the review and returns