thurview 0.1.4 → 0.2.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.4",
3
+ "version": "0.2.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",
@@ -27,6 +27,9 @@ flowchart LR
27
27
 
28
28
  Run the CLI as `thurview`. When it is not on PATH, `npx -y thurview` runs
29
29
  the published package with the same commands; substitute it everywhere below.
30
+ If a command answers `unknown command` or `unknown flag` for something this
31
+ skill tells you to run, the installed CLI is older than the skill: run
32
+ `thurview update` and retry once, then report the mismatch if it persists.
30
33
 
31
34
  Every command prints TOON on stdout: the result, then `help[]` with the next
32
35
  commands. Errors are structured on stdout too (`error`, `code`, `help`); exit
@@ -99,11 +102,36 @@ this step.
99
102
 
100
103
  ### 3. Study the change
101
104
 
102
- Read the whole diff once (`git diff <base> <head>`). Then read each changed
103
- symbol's callers and callees at head. Trace the main flow through storage,
104
- network and configuration boundaries. Compare the stated intent (commit
105
- messages, PR description, the user's own words) with what the code does. The
106
- 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.
107
135
 
108
136
  Read every range you anchor from the pinned commit, not the working tree:
109
137
  `git show <head>:<path>` or `git show <base>:<path>`.
@@ -138,6 +166,10 @@ Source worktree: <worktree>
138
166
  Base commit: <base>
139
167
  Head commit: <head>
140
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
+
141
173
  Author <dir>/map.yaml: the head structure under nodes/edges and the base
142
174
  structure under base. Do not edit review.md or data.yaml. Do not publish.
143
175
  Return when `thurview publish --review <id>` reports no map.yaml errors, or
Binary file