@davmash/bygone 0.8.13 → 0.8.16
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/CHANGELOG.md +16 -0
- package/README.md +2 -2
- package/cli/commandSpec.js +12 -2
- package/cli/completions.js +1 -1
- package/cli/present.js +42 -1
- package/cli/tour.js +13 -2
- package/cli/tourHistory.js +90 -0
- package/completions/_bygone +2 -1
- package/completions/bygone +1 -1
- package/completions/bygone.fish +1 -0
- package/docs/change-tour-format.md +46 -6
- package/docs/explore.md +36 -10
- package/docs/present.md +9 -1
- package/docs/product-surface.md +18 -14
- package/docs/releasing.md +25 -29
- package/media/diff.worker.js +3 -3
- package/media/webview.css +1 -1
- package/media/webview.js +173 -173
- package/out/changeTour.js +953 -410
- package/out/gitComparison.js +354 -0
- package/out/standalone-main.js +7678 -2124
- package/out/tourCoverage.js +992 -402
- package/package.json +1 -1
- package/schemas/change-tour-source.schema.json +58 -3
- package/skills/pr-tour-guide/SKILL.md +16 -7
- package/standalone/index.html +5 -0
- package/web/index.html +14 -0
- package/web/presenter.css +101 -0
- package/web/web-host.js +5 -5
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["version", "anchors", "connections", "chapters"],
|
|
9
9
|
"properties": {
|
|
10
|
-
"version": { "
|
|
10
|
+
"version": { "enum": [1, 2] },
|
|
11
11
|
"title": { "$ref": "#/$defs/nonEmptyString" },
|
|
12
12
|
"windowTitle": {
|
|
13
13
|
"$ref": "#/$defs/nonEmptyString",
|
|
@@ -58,6 +58,46 @@
|
|
|
58
58
|
"items": { "$ref": "#/$defs/chapter" }
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
|
+
"allOf": [
|
|
62
|
+
{
|
|
63
|
+
"if": { "properties": { "version": { "const": 1 } }, "required": ["version"] },
|
|
64
|
+
"then": {
|
|
65
|
+
"properties": {
|
|
66
|
+
"chapters": {
|
|
67
|
+
"items": {
|
|
68
|
+
"properties": {
|
|
69
|
+
"scenes": {
|
|
70
|
+
"items": {
|
|
71
|
+
"if": { "properties": { "kind": { "const": "stacked-diff" } }, "required": ["kind"] },
|
|
72
|
+
"then": { "properties": { "stack": { "minItems": 3 } } }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"if": { "properties": { "version": { "const": 2 } }, "required": ["version"] },
|
|
83
|
+
"then": {
|
|
84
|
+
"properties": {
|
|
85
|
+
"chapters": {
|
|
86
|
+
"items": {
|
|
87
|
+
"properties": {
|
|
88
|
+
"scenes": {
|
|
89
|
+
"items": {
|
|
90
|
+
"if": { "properties": { "kind": { "const": "deconstructed-diff" } }, "required": ["kind"] },
|
|
91
|
+
"then": { "required": ["stack", "steps"] }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
],
|
|
61
101
|
"$defs": {
|
|
62
102
|
"nonEmptyString": { "type": "string", "minLength": 1 },
|
|
63
103
|
"stringArray": {
|
|
@@ -106,6 +146,18 @@
|
|
|
106
146
|
"takeaway": { "$ref": "#/$defs/nonEmptyString" }
|
|
107
147
|
}
|
|
108
148
|
},
|
|
149
|
+
"requirement": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"required": ["id", "text"],
|
|
153
|
+
"properties": {
|
|
154
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
155
|
+
"text": { "$ref": "#/$defs/nonEmptyString" },
|
|
156
|
+
"status": { "enum": ["fulfilled", "gap"] },
|
|
157
|
+
"source": { "$ref": "#/$defs/nonEmptyString" },
|
|
158
|
+
"confidence": { "enum": ["high", "medium", "low"] }
|
|
159
|
+
}
|
|
160
|
+
},
|
|
109
161
|
"step": {
|
|
110
162
|
"type": "object",
|
|
111
163
|
"additionalProperties": false,
|
|
@@ -116,7 +168,8 @@
|
|
|
116
168
|
"body": { "$ref": "#/$defs/nonEmptyString" },
|
|
117
169
|
"focus": { "$ref": "#/$defs/nonEmptyString" },
|
|
118
170
|
"connection": { "$ref": "#/$defs/nonEmptyString" },
|
|
119
|
-
"depth": { "enum": ["mentioned", "explained", "contextualized"] }
|
|
171
|
+
"depth": { "enum": ["mentioned", "explained", "contextualized"] },
|
|
172
|
+
"requirement": { "$ref": "#/$defs/requirement" }
|
|
120
173
|
}
|
|
121
174
|
},
|
|
122
175
|
"coverageExclusion": {
|
|
@@ -194,7 +247,7 @@
|
|
|
194
247
|
"bullets": { "$ref": "#/$defs/stringArray" },
|
|
195
248
|
"tags": { "$ref": "#/$defs/stringArray" },
|
|
196
249
|
"takeaway": { "$ref": "#/$defs/nonEmptyString" },
|
|
197
|
-
"stack": { "type": "array", "minItems":
|
|
250
|
+
"stack": { "type": "array", "minItems": 2, "maxItems": 6, "items": { "$ref": "#/$defs/stackEntry" } },
|
|
198
251
|
"files": { "$ref": "#/$defs/stringArray" },
|
|
199
252
|
"steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/stackStep" } }
|
|
200
253
|
}
|
|
@@ -255,6 +308,8 @@
|
|
|
255
308
|
"takeaway": { "$ref": "#/$defs/nonEmptyString" },
|
|
256
309
|
"base": { "$ref": "#/$defs/nonEmptyString" },
|
|
257
310
|
"target": { "$ref": "#/$defs/nonEmptyString" },
|
|
311
|
+
"stack": { "type": "array", "minItems": 2, "maxItems": 6, "items": { "$ref": "#/$defs/stackEntry" } },
|
|
312
|
+
"steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/step" } },
|
|
258
313
|
"stages": {
|
|
259
314
|
"type": "array",
|
|
260
315
|
"minItems": 1,
|
|
@@ -164,12 +164,13 @@ Retrieve the current contract:
|
|
|
164
164
|
bygone tour schema > /tmp/change-tour-source.schema.json
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
Write a `.bygone` file. The legacy `.bygone.yaml` spelling remains
|
|
168
|
-
generic YAML tooling requires it. Treat
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
Write a version 2 `.bygone` file. The legacy `.bygone.yaml` spelling remains
|
|
168
|
+
valid when generic YAML tooling requires it. Treat the authored source and its
|
|
169
|
+
compiled `.tour.json` as Git-backed, non-portable artifacts: pin `range.base`
|
|
170
|
+
and `range.head` to the exact OIDs from the context, and keep them with the
|
|
171
|
+
corresponding repository so Bygone can resolve those objects and live history.
|
|
172
|
+
For every deconstructed scene, author the underlying real `stack` explicitly;
|
|
173
|
+
do not infer it from the synthetic explanation stages or Git history.
|
|
173
174
|
|
|
174
175
|
Set optional `windowTitle` when the tour should appear in the native window
|
|
175
176
|
title — for example a pull request number (`PR-1234`) so multiple open tours
|
|
@@ -184,6 +185,13 @@ For every step:
|
|
|
184
185
|
- connect behavior to tests, error handling, or other concrete proof;
|
|
185
186
|
- add a connection only when the relationship between two locations materially improves understanding.
|
|
186
187
|
|
|
188
|
+
Keep deconstructed-tour coordinates distinct:
|
|
189
|
+
|
|
190
|
+
- A **stage** is a conceptual phase or cumulative comparison state; a **tour step** is one navigable explanation item within that stage.
|
|
191
|
+
- Do not refer to either by an unqualified ordinal such as "Stage 2" or "Step 11" in authored titles, summaries, narration, or takeaways. Prefer the stable descriptive title so the reference survives edits.
|
|
192
|
+
- When an ordinal is necessary, qualify the coordinate: "stage 2 of 4" versus "tour step 11 of 46."
|
|
193
|
+
- Treat presenter-generated labels as UI context; do not repeat them in authored prose unless the distinction itself needs explanation.
|
|
194
|
+
|
|
187
195
|
Never emit generated line numbers or hunk indexes. Verify candidate snippets against the pinned object when uncertain:
|
|
188
196
|
|
|
189
197
|
```sh
|
|
@@ -212,6 +220,7 @@ Treat this as a required self-audit, not a claim the validator can prove. For ea
|
|
|
212
220
|
- tests are connected to the behavior they prove;
|
|
213
221
|
- connections express causal, contractual, data-flow, ordering, or proof relationships;
|
|
214
222
|
- binary files and omitted patches are surfaced explicitly;
|
|
223
|
+
- deconstructed tours contain no unqualified "Stage N" or "Step N" references, and comparison stages and navigable tour steps use distinct nouns;
|
|
215
224
|
- the final step supplies proof or a clear reviewer conclusion.
|
|
216
225
|
|
|
217
226
|
## Always print the open command
|
|
@@ -236,7 +245,7 @@ Tour tooling that does not open the app (`tour context`, `tour validate`, `tour
|
|
|
236
245
|
|
|
237
246
|
## Compile or present
|
|
238
247
|
|
|
239
|
-
Compile a
|
|
248
|
+
Compile a repository-bound manifest when the user needs an artifact:
|
|
240
249
|
|
|
241
250
|
```sh
|
|
242
251
|
bygone tour compile review.bygone --output review.tour.json
|
package/standalone/index.html
CHANGED
|
@@ -168,6 +168,11 @@
|
|
|
168
168
|
</div>
|
|
169
169
|
</div>
|
|
170
170
|
<div id="directory-diff" class="dir-view hidden">
|
|
171
|
+
<div id="directory-view-tabs" class="directory-view-tabs" hidden>
|
|
172
|
+
<button id="directory-overview-tab" type="button" title="Show change overview" aria-pressed="true">Overview</button>
|
|
173
|
+
<button id="directory-files-tab" type="button" title="Show all changed files" aria-pressed="false">Files</button>
|
|
174
|
+
</div>
|
|
175
|
+
<section id="directory-overview" class="directory-overview" aria-label="Change overview" hidden></section>
|
|
171
176
|
<div class="dir-headers">
|
|
172
177
|
<div class="dir-col-header" id="dir-left-header">Left</div>
|
|
173
178
|
<div class="dir-header-gutter" aria-hidden="true"></div>
|
package/web/index.html
CHANGED
|
@@ -12,11 +12,19 @@
|
|
|
12
12
|
<header class="tour-overview">
|
|
13
13
|
<button id="tour-sidebar-hide" class="tour-sidebar-hide" type="button" title="Hide tour sidebar" aria-label="Hide tour sidebar">‹</button>
|
|
14
14
|
<h1 id="tour-title"></h1>
|
|
15
|
+
<div id="tour-mode-controls" class="tour-mode-controls" hidden>
|
|
16
|
+
<label for="tour-mode-select">Mode</label>
|
|
17
|
+
<select id="tour-mode-select"></select>
|
|
18
|
+
<label for="tour-history-select" id="tour-history-label" hidden>Revision</label>
|
|
19
|
+
<select id="tour-history-select" hidden></select>
|
|
20
|
+
<div id="tour-mode-status" role="status" aria-live="polite"></div>
|
|
21
|
+
</div>
|
|
15
22
|
<a id="tour-source" class="tour-source" target="_blank" rel="noreferrer" hidden>Open source ↗</a>
|
|
16
23
|
<div class="tour-meta">
|
|
17
24
|
<div id="tour-range" class="tour-range"></div>
|
|
18
25
|
<div id="tour-stats" class="tour-stats"></div>
|
|
19
26
|
</div>
|
|
27
|
+
<div id="tour-authoring-coverage" class="tour-authoring-coverage" aria-label="Tour authoring coverage" hidden></div>
|
|
20
28
|
</header>
|
|
21
29
|
<section class="tour-search" aria-label="Search tour">
|
|
22
30
|
<div class="tour-search-controls">
|
|
@@ -99,6 +107,7 @@
|
|
|
99
107
|
<div class="tour-narrative-side">
|
|
100
108
|
<div id="tour-step" class="tour-step" hidden>
|
|
101
109
|
<div id="tour-step-title" class="tour-step-title"></div>
|
|
110
|
+
<div id="tour-step-requirement" class="tour-step-requirement" hidden></div>
|
|
102
111
|
<p id="tour-step-body" class="tour-step-body"></p>
|
|
103
112
|
<div id="tour-connection" class="tour-connection" hidden></div>
|
|
104
113
|
</div>
|
|
@@ -279,6 +288,11 @@
|
|
|
279
288
|
</div>
|
|
280
289
|
</div>
|
|
281
290
|
<div id="directory-diff" class="dir-view hidden">
|
|
291
|
+
<div id="directory-view-tabs" class="directory-view-tabs" hidden>
|
|
292
|
+
<button id="directory-overview-tab" type="button" title="Show change overview" aria-pressed="true">Overview</button>
|
|
293
|
+
<button id="directory-files-tab" type="button" title="Show all changed files" aria-pressed="false">Files</button>
|
|
294
|
+
</div>
|
|
295
|
+
<section id="directory-overview" class="directory-overview" aria-label="Change overview" hidden></section>
|
|
282
296
|
<div class="dir-headers">
|
|
283
297
|
<div class="dir-col-header" id="dir-left-header">Left</div>
|
|
284
298
|
<div class="dir-header-gutter" aria-hidden="true"></div>
|
package/web/presenter.css
CHANGED
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
--tour-narrative-height: 296px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
.tour-mode-controls { display: grid; gap: 6px; margin: 12px 0; }
|
|
14
|
+
.tour-mode-controls[hidden], .tour-mode-controls [hidden] { display: none; }
|
|
15
|
+
.tour-mode-controls select { width: 100%; min-width: 0; padding: 6px; color: var(--tour-body); background: var(--tour-surface); border: 1px solid var(--tour-border); border-radius: 4px; font: inherit; }
|
|
16
|
+
#tour-mode-status { color: var(--tour-muted); }
|
|
17
|
+
body.tour-derived-mode { --tour-narrative-height: 0px; }
|
|
18
|
+
body.tour-derived-mode #tour-narrative { display: none; }
|
|
19
|
+
|
|
13
20
|
.tour-shell {
|
|
14
21
|
position: fixed;
|
|
15
22
|
inset: 0 auto 0 0;
|
|
@@ -134,6 +141,10 @@ body.tour-mode.tour-discussion #container {
|
|
|
134
141
|
text-decoration: none;
|
|
135
142
|
}
|
|
136
143
|
|
|
144
|
+
.tour-source[hidden] {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
137
148
|
.tour-source:hover {
|
|
138
149
|
color: #fff;
|
|
139
150
|
}
|
|
@@ -158,6 +169,59 @@ body.tour-mode.tour-discussion #container {
|
|
|
158
169
|
white-space: nowrap;
|
|
159
170
|
}
|
|
160
171
|
|
|
172
|
+
.tour-authoring-coverage {
|
|
173
|
+
display: grid;
|
|
174
|
+
gap: 8px;
|
|
175
|
+
margin-top: 12px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.tour-authoring-coverage[hidden] {
|
|
179
|
+
display: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.tour-coverage-item {
|
|
183
|
+
display: grid;
|
|
184
|
+
gap: 5px;
|
|
185
|
+
padding-left: 8px;
|
|
186
|
+
border-left: 2px solid var(--tour-accent-bright);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.tour-coverage-item[data-metric="assignment"] {
|
|
190
|
+
border-left-color: #74d6ad;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.tour-coverage-heading {
|
|
194
|
+
display: flex;
|
|
195
|
+
gap: 8px;
|
|
196
|
+
justify-content: space-between;
|
|
197
|
+
color: var(--tour-muted);
|
|
198
|
+
line-height: 1.35;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.tour-coverage-heading strong {
|
|
202
|
+
flex: none;
|
|
203
|
+
color: var(--tour-body);
|
|
204
|
+
font-weight: 600;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.tour-coverage-meter {
|
|
208
|
+
height: 3px;
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
border-radius: 999px;
|
|
211
|
+
background: rgba(255, 255, 255, 0.1);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.tour-coverage-meter span {
|
|
215
|
+
display: block;
|
|
216
|
+
height: 100%;
|
|
217
|
+
border-radius: inherit;
|
|
218
|
+
background: var(--tour-accent-bright);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.tour-coverage-item[data-metric="assignment"] .tour-coverage-meter span {
|
|
222
|
+
background: #74d6ad;
|
|
223
|
+
}
|
|
224
|
+
|
|
161
225
|
.tour-search {
|
|
162
226
|
padding: 10px 12px;
|
|
163
227
|
border-bottom: 1px solid var(--tour-border);
|
|
@@ -775,6 +839,7 @@ body.tour-discussion .tour-narrative-resizer {
|
|
|
775
839
|
}
|
|
776
840
|
|
|
777
841
|
.tour-step[hidden],
|
|
842
|
+
.tour-step-requirement[hidden],
|
|
778
843
|
.tour-connection[hidden] {
|
|
779
844
|
display: none;
|
|
780
845
|
}
|
|
@@ -782,6 +847,42 @@ body.tour-discussion .tour-narrative-resizer {
|
|
|
782
847
|
.tour-step-title { color: #fff; font-size: 13px; font-weight: 750; }
|
|
783
848
|
.tour-step-body { margin: 3px 0 0; color: var(--tour-body); line-height: 1.45; }
|
|
784
849
|
|
|
850
|
+
.tour-step-requirement {
|
|
851
|
+
display: flex;
|
|
852
|
+
flex-wrap: wrap;
|
|
853
|
+
align-items: baseline;
|
|
854
|
+
gap: 6px;
|
|
855
|
+
margin-top: 4px;
|
|
856
|
+
color: var(--tour-muted);
|
|
857
|
+
line-height: 1.45;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.tour-requirement-chip {
|
|
861
|
+
padding: 1px 6px;
|
|
862
|
+
border: 1px solid rgba(166, 140, 255, 0.34);
|
|
863
|
+
border-radius: 9px;
|
|
864
|
+
color: var(--tour-body);
|
|
865
|
+
font-size: 12px;
|
|
866
|
+
font-weight: 700;
|
|
867
|
+
white-space: nowrap;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.tour-requirement-chip[data-status="fulfilled"] {
|
|
871
|
+
border-color: rgba(122, 214, 160, 0.42);
|
|
872
|
+
background: rgba(122, 214, 160, 0.1);
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
.tour-requirement-chip[data-status="gap"] {
|
|
876
|
+
border-color: rgba(240, 168, 120, 0.46);
|
|
877
|
+
background: rgba(240, 168, 120, 0.12);
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.tour-requirement-meta {
|
|
881
|
+
flex-basis: 100%;
|
|
882
|
+
color: var(--tour-faint);
|
|
883
|
+
font-size: 12px;
|
|
884
|
+
}
|
|
885
|
+
|
|
785
886
|
.tour-connection {
|
|
786
887
|
margin-top: 7px;
|
|
787
888
|
padding-top: 7px;
|