thurview 0.5.0 → 0.6.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 +26 -17
- package/dist/cli.js +69 -3
- package/dist/cli.js.map +1 -1
- package/dist/document/compile.js +81 -1
- package/dist/document/compile.js.map +1 -1
- package/dist/document/schema.js +25 -0
- package/dist/document/schema.js.map +1 -1
- package/dist/interfaces.js +241 -0
- package/dist/interfaces.js.map +1 -0
- package/dist/ui/app.css +121 -0
- package/dist/ui/app.js +97 -0
- package/dist/ui/app.js.map +2 -2
- package/package.json +1 -1
- package/skills/thurview/SKILL.md +22 -5
- package/skills/thurview/references/components.md +34 -0
- package/skills/thurview/references/document-authoring.md +34 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thurview",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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",
|
package/skills/thurview/SKILL.md
CHANGED
|
@@ -113,6 +113,7 @@ definitions-and-references query each grammar ships, so ask it rather than
|
|
|
113
113
|
re-deriving structure from hunks:
|
|
114
114
|
|
|
115
115
|
```sh
|
|
116
|
+
thurview graph interfaces --review <id> # what the change added to, changed in or removed from the visible surface
|
|
116
117
|
thurview graph impact --review <id> # symbols touched, edges added and removed, what reaches them, what tests cover them
|
|
117
118
|
thurview graph callers <symbol> --review <id> # used, or speculative? (--graph base for the old side)
|
|
118
119
|
thurview graph tests-for <symbol> --review <id>
|
|
@@ -128,11 +129,19 @@ plain `truncated` for callers and tests-for, which look at one), the repo has
|
|
|
128
129
|
more supported files than the graph could parse, and that answer is a partial
|
|
129
130
|
view: say so rather than treating an empty result as "nothing there".
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
Read `graph interfaces` first: it is the reader's own first question, and its
|
|
133
|
+
`verdict` is what the browser shows above your document. A `removed` entry is
|
|
134
|
+
the most review-worthy thing the change can contain; `No interface moved`
|
|
135
|
+
means the change is internal, and the document should say why the refactor was
|
|
136
|
+
worth making rather than dress it up as a feature. Do not repeat the entries
|
|
137
|
+
in prose - the panel already lists them. Explain the ones that need it,
|
|
138
|
+
in `data.yaml` (see below).
|
|
139
|
+
|
|
140
|
+
Spend the rest of the review on what the other queries answer: what the change
|
|
141
|
+
reaches that the diff does not show, which boundaries it crosses, what now
|
|
142
|
+
depends on what, what it left untested. Then compare the stated intent (commit
|
|
143
|
+
messages, PR description, the user's own words) with what the code does. The
|
|
144
|
+
gap is the most valuable finding.
|
|
136
145
|
|
|
137
146
|
Do not spend the review on naming, formatting, import order, or missing
|
|
138
147
|
defensive checks. Linters, type checkers and `/code-review` catch those, and a
|
|
@@ -176,6 +185,13 @@ Edit `review.md` and `data.yaml` in the review directory following
|
|
|
176
185
|
Default to anchor links for evidence; use an inline peek only when the reader
|
|
177
186
|
must see the code to follow the main claim.
|
|
178
187
|
|
|
188
|
+
In `data.yaml`, add an `interfaces` entry for each interface change a
|
|
189
|
+
consumer would not understand from its declaration alone, and for the ones
|
|
190
|
+
the graph cannot see - a CLI flag, an HTTP route, a config key, a file
|
|
191
|
+
format. See [Components](references/components.md) for the shape and
|
|
192
|
+
[Document authoring](references/document-authoring.md) for what earns an
|
|
193
|
+
entry. Never write one for a capability the change did not deliver.
|
|
194
|
+
|
|
179
195
|
### 6. Theme the review after the project
|
|
180
196
|
|
|
181
197
|
Read [Theme](references/theme.md). Decide the look in its order: what the
|
|
@@ -207,6 +223,7 @@ Tell the user, in a few lines and nothing more:
|
|
|
207
223
|
- the `url`
|
|
208
224
|
- what the review covers, in one sentence, and where to start: the Review tab
|
|
209
225
|
as a rule; the Files tab when the change is small and the diff is the story
|
|
226
|
+
- the interface delta `verdict`, in its own words
|
|
210
227
|
- which theme source you used: the user's request, the project's design
|
|
211
228
|
system (name the files), or the default skin
|
|
212
229
|
- that you are now waiting for their questions and their decision
|
|
@@ -32,10 +32,44 @@ stores:
|
|
|
32
32
|
schema:
|
|
33
33
|
id: { type: text, pk: true }
|
|
34
34
|
body: { type: text }
|
|
35
|
+
|
|
36
|
+
interfaces:
|
|
37
|
+
spawnPty: # annotate a derived entry
|
|
38
|
+
symbol: src/pty.ts:spawnPty # an id from `thurview graph interfaces`
|
|
39
|
+
capability: Callers get a sized PTY without knowing the fallback.
|
|
40
|
+
dryRun: # declare one the graph cannot see
|
|
41
|
+
name: thurview publish --dry-run # what a consumer types or calls
|
|
42
|
+
change: added # added | changed | removed
|
|
43
|
+
capability: Validate a review without sealing a revision.
|
|
44
|
+
anchor: dryRunFlag # must hold a line the diff moved
|
|
35
45
|
```
|
|
36
46
|
|
|
37
47
|
An anchor without `peek` can label a map node but cannot open code.
|
|
38
48
|
|
|
49
|
+
## interfaces
|
|
50
|
+
|
|
51
|
+
The browser shows the interface delta above the document. thurview derives it
|
|
52
|
+
at `publish` from the code graph at both pinned commits - every symbol the
|
|
53
|
+
diff touched that is visible outside its own file, split into added, changed
|
|
54
|
+
and removed - so the list itself is never authored and never goes stale.
|
|
55
|
+
|
|
56
|
+
Each entry in `interfaces` does one of two things, and never both:
|
|
57
|
+
|
|
58
|
+
- **`symbol`** annotates a derived entry with `capability`, one sentence in a
|
|
59
|
+
consumer's terms. `publish` fails when the change did not move that symbol,
|
|
60
|
+
so an annotation cannot outlive the entry it explains. Take the id verbatim
|
|
61
|
+
from `thurview graph interfaces`.
|
|
62
|
+
- **`name`** declares an interface the graph cannot see: a CLI subcommand or
|
|
63
|
+
flag, an HTTP route, an event kind, a config key, a file format. It needs
|
|
64
|
+
`change` and an `anchor`. `publish` checks the anchor against the pinned
|
|
65
|
+
diff - a `removed` entry needs a `graph: base` anchor covering a deleted
|
|
66
|
+
line, `added` and `changed` need a head anchor covering an added line - so a
|
|
67
|
+
declared interface is evidence, not a claim.
|
|
68
|
+
|
|
69
|
+
`capability` is what a consumer can now do, or can no longer do. Write
|
|
70
|
+
"`thurview publish` gains `--dry-run`", not "added a boolean to
|
|
71
|
+
PublishOptions".
|
|
72
|
+
|
|
39
73
|
## Anchor link
|
|
40
74
|
|
|
41
75
|
```markdown
|
|
@@ -40,12 +40,14 @@ Then fewer than five further sections when practical. Pick those that fit:
|
|
|
40
40
|
|
|
41
41
|
- requirements
|
|
42
42
|
- design
|
|
43
|
-
- interface change
|
|
44
43
|
- lifecycle or data flow
|
|
45
44
|
- state or storage
|
|
46
45
|
- testing evidence
|
|
47
46
|
- decision log
|
|
48
47
|
|
|
48
|
+
There is no interface-change section: the browser derives the interface delta
|
|
49
|
+
and shows it above your document. See [Interface delta](#interface-delta).
|
|
50
|
+
|
|
49
51
|
Add implementation detail only where it lets the reader check an important
|
|
50
52
|
claim. In the decision log, keep the user's requirements in the user's words
|
|
51
53
|
and add the implementation decisions that shaped the result.
|
|
@@ -61,6 +63,37 @@ Collapse optional detail with `{collapsed}` at the end of an H2:
|
|
|
61
63
|
|
|
62
64
|
Progressive disclosure: every `##` heading is a section the reader can fold.
|
|
63
65
|
|
|
66
|
+
## Interface delta
|
|
67
|
+
|
|
68
|
+
The reader's first question is what the change lets them do that they could
|
|
69
|
+
not before, and what it cost. thurview answers it from the code graph rather
|
|
70
|
+
than from your prose: every symbol the diff touched that is visible outside
|
|
71
|
+
its own file, as added, changed or removed, above your document. Read it with
|
|
72
|
+
`thurview graph interfaces` before you write, and let it shape the document:
|
|
73
|
+
|
|
74
|
+
- **A removed entry is the change's most review-worthy fact.** Say what
|
|
75
|
+
depended on it (`thurview graph callers <name> --graph base`) and what
|
|
76
|
+
replaces it. Never let a removal read as a rearrangement.
|
|
77
|
+
- **`No interface moved` is a finding, not an empty result.** The change is
|
|
78
|
+
internal. Write about why it was worth making - the bug it fixes, the
|
|
79
|
+
duplication it folds - and do not dress it up as a capability.
|
|
80
|
+
- **Do not restate the entries in prose.** The panel lists them, with the
|
|
81
|
+
declaration and a link into the file. Your sentences are for what it cannot
|
|
82
|
+
derive: why the surface has this shape, what a consumer does with it, what
|
|
83
|
+
a removal breaks.
|
|
84
|
+
|
|
85
|
+
Add an `interfaces` entry in `data.yaml` (see [Components](components.md))
|
|
86
|
+
only when one of these holds:
|
|
87
|
+
|
|
88
|
+
1. A derived entry's declaration does not tell a consumer what it is for. The
|
|
89
|
+
`capability` line says what they can now do, in their words.
|
|
90
|
+
2. The change moves an interface the graph cannot see - a CLI subcommand or
|
|
91
|
+
flag, an HTTP route, an event kind, a config key, a file format. Declare
|
|
92
|
+
it, with an anchor on the line the diff moved.
|
|
93
|
+
|
|
94
|
+
Anything else is noise: the entry is already there, or there is nothing to
|
|
95
|
+
add. An interface the change did not deliver is never an entry.
|
|
96
|
+
|
|
64
97
|
## Evidence
|
|
65
98
|
|
|
66
99
|
Every claim about code carries an anchor. An anchor is a named source range
|