thurview 0.1.5 → 0.3.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.1.5",
3
+ "version": "0.3.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",
@@ -32,9 +32,18 @@
32
32
  "@toon-format/toon": "2.3.1",
33
33
  "axi-sdk-js": "0.1.11",
34
34
  "diff": "9.0.0",
35
+ "graphology": "0.26.0",
36
+ "graphology-communities-louvain": "2.0.2",
35
37
  "markdown-it": "15.0.1",
36
38
  "open": "11.0.2",
37
39
  "shiki": "4.4.3",
40
+ "tree-sitter-go": "0.25.0",
41
+ "tree-sitter-java": "0.23.5",
42
+ "tree-sitter-javascript": "0.25.0",
43
+ "tree-sitter-python": "0.25.0",
44
+ "tree-sitter-rust": "0.24.0",
45
+ "tree-sitter-typescript": "0.23.2",
46
+ "web-tree-sitter": "0.27.0",
38
47
  "yaml": "2.9.0",
39
48
  "zod": "4.5.4"
40
49
  },
@@ -42,6 +51,7 @@
42
51
  "@types/diff": "8.0.0",
43
52
  "@types/node": "26.4.1",
44
53
  "esbuild": "0.28.2",
54
+ "graphology-types": "0.24.8",
45
55
  "prettier": "3.9.6",
46
56
  "tsx": "4.23.13",
47
57
  "typescript": "7.0.2",
@@ -102,11 +102,36 @@ this step.
102
102
 
103
103
  ### 3. Study the change
104
104
 
105
- Read the whole diff once (`git diff <base> <head>`). Then read each changed
106
- symbol's callers and callees at head. Trace the main flow through storage,
107
- network and configuration boundaries. Compare the stated intent (commit
108
- messages, PR description, the user's own words) with what the code does. The
109
- gap is the most valuable finding.
105
+ Read the whole diff once (`git diff <base> <head>`). The diff tells you what
106
+ changed. The code graph tells you what it means, which is what the review is
107
+ for. thurview builds it from the pinned commits with tree-sitter and the
108
+ definitions-and-references query each grammar ships, so ask it rather than
109
+ re-deriving structure from hunks:
110
+
111
+ ```sh
112
+ thurview graph impact --review <id> # symbols touched, edges added and removed, what reaches them, what tests cover them
113
+ thurview graph callers <symbol> --review <id> # used, or speculative? (--graph base for the old side)
114
+ thurview graph tests-for <symbol> --review <id>
115
+ thurview graph architecture --review <id> # file clusters with their hubs, the edges between them, the file-level diff
116
+ ```
117
+
118
+ The graph covers TypeScript, JavaScript, Python, Go, Rust and Java; other
119
+ files are absent from it, not empty. References resolve by name, so treat
120
+ `unresolved` as the size of what it could not place, and `<module>` as code
121
+ outside any definition. If `truncated` is true — `truncated.base`/
122
+ `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
124
+ 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".
126
+
127
+ 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.
131
+
132
+ Do not spend the review on naming, formatting, import order, or missing
133
+ defensive checks. Linters, type checkers and `/code-review` catch those, and a
134
+ reader who wanted them would have run those instead.
110
135
 
111
136
  Read every range you anchor from the pinned commit, not the working tree:
112
137
  `git show <head>:<path>` or `git show <base>:<path>`.
@@ -141,6 +166,10 @@ Source worktree: <worktree>
141
166
  Base commit: <base>
142
167
  Head commit: <head>
143
168
 
169
+ Seed the structure from `thurview graph architecture --review <id>` rather
170
+ than guessing it: communities and their hubs become nodes, its edges the
171
+ edges, and its diff the difference between base and head.
172
+
144
173
  Author <dir>/map.yaml: the head structure under nodes/edges and the base
145
174
  structure under base. Do not edit review.md or data.yaml. Do not publish.
146
175
  Return when `thurview publish --review <id>` reports no map.yaml errors, or
@@ -185,6 +214,7 @@ threads that need you:
185
214
  `threads` lists what to address and `wait.decision` the summary. Go to
186
215
  step 9.
187
216
  - `accepted`: approved. Report and stop.
217
+ - `closed`: the reader ended the review without approving it. Report and stop.
188
218
  - `review-dismissed` or `review-deleted`: stop.
189
219
  - error `TIMEOUT` (exit code 1, after `--timeout` seconds, default 3600):
190
220
  wait again, or report that the reader has not responded.
@@ -219,4 +249,4 @@ Report completion only when all of these hold:
219
249
  - The reader has the URL of a published revision.
220
250
  - Every `error` diagnostic is resolved.
221
251
  - The map is published, or you said why it is not.
222
- - The review is waiting on the reader, accepted, dismissed or deleted.
252
+ - The review is waiting on the reader, accepted, closed, dismissed or deleted.
@@ -25,10 +25,11 @@ warns when the branch moved past them.
25
25
  | `awaiting-review` | Reader reads, asks, comments, decides. |
26
26
  | `awaiting-agent-updates` | Agent addresses threads, resolves them, republishes. |
27
27
  | `accepted` | Terminal. Cannot be republished. |
28
- | `rejected` | Terminal. |
28
+ | `closed` | Terminal. Ended without approval. Cannot be republished. |
29
29
 
30
30
  "Ask now" does not change the status. "Submit review" with "Request changes"
31
- sets `awaiting-agent-updates`; with "Approve" sets `accepted`.
31
+ sets `awaiting-agent-updates`; with "Approve" sets `accepted`; with "Close"
32
+ sets `closed`.
32
33
 
33
34
  Dismissal is separate: the reader removes the review from the active list and
34
35
  `wait` returns `review-dismissed`. A new publication restores it.
@@ -80,7 +81,7 @@ switch between revisions in the browser.
80
81
 
81
82
  `thurview wait --review <id> [--timeout <s>]` polls the review and returns
82
83
  `wait.reason` in `question`, `awaiting-agent-updates`, `accepted`,
83
- `rejected`, `review-dismissed`, `review-deleted`, with the threads that need
84
+ `closed`, `review-dismissed`, `review-deleted`, with the threads that need
84
85
  you. After the timeout it fails with code `TIMEOUT` (exit 1). A question
85
86
  already answered by the agent is not reported again.
86
87