@davmash/bygone 0.5.2 → 0.7.1
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 +15 -2
- package/README.md +64 -22
- package/bin/bygone.js +72 -38
- package/cli/commandSpec.js +178 -0
- package/cli/completions.js +321 -0
- package/cli/present.js +166 -0
- package/cli/tour.js +189 -0
- package/cli/tourFile.js +26 -0
- package/completions/_bygone +131 -0
- package/completions/bygone +83 -0
- package/completions/bygone.fish +34 -0
- package/docs/change-explanation-plan.md +358 -0
- package/docs/change-tour-format.md +62 -0
- package/docs/generating-change-tours.md +75 -0
- package/docs/releasing.md +342 -0
- package/docs/walkthrough.md +103 -0
- package/examples/bygone-history.bygone.yaml +80 -0
- package/media/editor.worker.js +26 -14250
- package/media/icon.png +0 -0
- package/media/webview.css +1 -9818
- package/media/webview.js +358 -132939
- package/out/changeTour.js +1901 -0
- package/out/standalone-main.js +14698 -8507
- package/out/standalone-preload.js +5 -4
- package/out/tourCoverage.js +1792 -0
- package/package.json +10 -3
- package/schemas/change-tour-source.schema.json +287 -0
- package/standalone/index.html +23 -6
- package/web/index.html +266 -0
- package/web/presenter.css +725 -0
- package/web/web-host.js +149 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Change tour authoring format
|
|
2
|
+
|
|
3
|
+
A `.bygone.yaml` file contains the human-authored reading order and narrative. It points to code with named anchors; it does not store generated hunk indexes or line numbers.
|
|
4
|
+
|
|
5
|
+
Run it against a committed branch range, or omit the refs when the source file pins its own range:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
bygone present <head> --base <base> --tour path/to/review.bygone.yaml
|
|
9
|
+
bygone present --tour path/to/self-contained-review.bygone.yaml
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The optional `range` makes a tour self-contained and reproducible; explicit command-line refs take precedence. The compiler resolves every anchor against the exact merge-base or head commit and writes the resulting commit IDs, line ranges, excerpts, file contents, and diffs into the portable JSON manifest served by the presenter. Compilation fails if an anchor has no match or has multiple matches without an explicit `occurrence`.
|
|
13
|
+
|
|
14
|
+
## Structure
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
version: 1
|
|
18
|
+
title: A reviewer-facing title
|
|
19
|
+
sourceUrl: https://example.test/pull/123
|
|
20
|
+
range:
|
|
21
|
+
base: 0123456789abcdef
|
|
22
|
+
head: fedcba9876543210
|
|
23
|
+
|
|
24
|
+
anchors:
|
|
25
|
+
event-contract:
|
|
26
|
+
file: src/events.py
|
|
27
|
+
revision: head
|
|
28
|
+
contains: " parent_event_id: str | None"
|
|
29
|
+
durable-decision:
|
|
30
|
+
file: src/controller.py
|
|
31
|
+
revision: head
|
|
32
|
+
contains: " store.persist(decision)"
|
|
33
|
+
|
|
34
|
+
connections:
|
|
35
|
+
contract-to-write:
|
|
36
|
+
from: event-contract
|
|
37
|
+
to: durable-decision
|
|
38
|
+
label: The contract is applied before the side effect.
|
|
39
|
+
|
|
40
|
+
chapters:
|
|
41
|
+
- id: causal-chain
|
|
42
|
+
title: The causal chain
|
|
43
|
+
scenes:
|
|
44
|
+
- id: decision-flow
|
|
45
|
+
title: From decision to action
|
|
46
|
+
summary: The short thesis for this walkthrough.
|
|
47
|
+
bullets: [One supporting point]
|
|
48
|
+
tags: [ordering]
|
|
49
|
+
takeaway: What the reviewer should retain.
|
|
50
|
+
steps:
|
|
51
|
+
- id: persist-first
|
|
52
|
+
title: Persist the recommendation
|
|
53
|
+
body: This exact line establishes the ordering guarantee.
|
|
54
|
+
focus: durable-decision
|
|
55
|
+
connection: contract-to-write
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Only the active step's connection is shown. This keeps relationships useful without adding a permanent second layer of curves to Bygone's diff view. The Tour rail contains only authored scenes; the adjacent Files rail independently lists the complete change set. Browsing a file does not move the narrative, and “Return to tour” restores the file and annotation focused by the current scene.
|
|
59
|
+
|
|
60
|
+
See [Bygone's self-referencing history tour](../examples/bygone-history.bygone.yaml) for a complete narrative that pins and explains the commit where branch review was introduced.
|
|
61
|
+
|
|
62
|
+
For agent workflows, see [Generating change tours with an LLM](./generating-change-tours.md) and the machine-readable [JSON Schema](../schemas/change-tour-source.schema.json).
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Generating change tours with an LLM
|
|
2
|
+
|
|
3
|
+
Bygone treats an LLM as a narrative planner and evidence selector, not as the authority on Git or source locations. The model writes `.bygone.yaml`; Bygone resolves its anchors against pinned commits and rejects missing, ambiguous, or structurally invalid references.
|
|
4
|
+
|
|
5
|
+
For agents that support repository skills, use the agent-agnostic [`pr-tour-guide` skill](../skills/pr-tour-guide/SKILL.md). It packages the complete evidence, authoring, validation, and handoff workflow without depending on a particular agent vendor.
|
|
6
|
+
|
|
7
|
+
## Recommended loop
|
|
8
|
+
|
|
9
|
+
1. Generate a deterministic change dossier instead of asking the model to rediscover the Git range:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
bygone tour context HEAD --base origin/main --output change-context.json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The context contains commits, file roles, rename metadata, bounded unified patches, changed line ranges, basic symbol hints, and explicit binary or oversized-patch omissions.
|
|
16
|
+
|
|
17
|
+
2. Inspect the merge-base-to-head change, its commits, production files, tests, renames, and binaries.
|
|
18
|
+
3. Identify the small set of reviewer questions that explain why the change exists and how it works.
|
|
19
|
+
4. Arrange those questions into conceptual chapters rather than filename order.
|
|
20
|
+
5. Attach every walkthrough step to an exact snippet in either the base or head revision.
|
|
21
|
+
6. Add a connection only when it explains a meaningful relationship between two pieces of evidence.
|
|
22
|
+
7. Write the `.bygone.yaml` source.
|
|
23
|
+
8. Validate it and repair every reported problem:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
bygone tour validate review.bygone.yaml --json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
9. Compile or present the verified result:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
bygone tour compile review.bygone.yaml --output review.tour.json
|
|
33
|
+
bygone present --tour review.bygone.yaml
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use `bygone tour schema` to print the current JSON Schema. The checked-in schema is also available at [`schemas/change-tour-source.schema.json`](../schemas/change-tour-source.schema.json).
|
|
37
|
+
|
|
38
|
+
## Narrative constraints
|
|
39
|
+
|
|
40
|
+
- Prefer one reviewer question per scene and three to seven steps per scene.
|
|
41
|
+
- Lead with contracts, invariants, or architectural boundaries before their consumers.
|
|
42
|
+
- Pair behavior with the tests or evidence that prove it.
|
|
43
|
+
- Keep mechanical, generated, and lockfile changes out of the authored narrative unless they alter the reviewer’s conclusion; they remain visible in the complete Files rail.
|
|
44
|
+
- Make each annotation explain why the focused code matters; do not merely paraphrase its syntax.
|
|
45
|
+
- Avoid claims about runtime behavior, safety, or intent that have no linked evidence.
|
|
46
|
+
- Use connections sparingly. A connection should answer “how are these two facts related?”
|
|
47
|
+
- Preserve access to the complete change instead of presenting the tour as exhaustive review.
|
|
48
|
+
|
|
49
|
+
## Anchor rules
|
|
50
|
+
|
|
51
|
+
- Never emit line numbers or generated hunk indexes.
|
|
52
|
+
- Prefer the shortest snippet that is still unique within its file and revision.
|
|
53
|
+
- Include `occurrence` only when repeated text is intentional and the selected occurrence is stable.
|
|
54
|
+
- Pin immutable commit IDs in `range` for a durable artifact.
|
|
55
|
+
- Treat a failed anchor as useful feedback. Do not silently redirect it to nearby code.
|
|
56
|
+
|
|
57
|
+
## Suggested generation prompt
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
Create a Bygone change tour for the supplied Git range.
|
|
61
|
+
|
|
62
|
+
First identify the central reviewer questions and the concrete code evidence for each answer.
|
|
63
|
+
Then produce YAML conforming to the schema returned by `bygone tour schema`.
|
|
64
|
+
|
|
65
|
+
Requirements:
|
|
66
|
+
- pin the exact base and head commits;
|
|
67
|
+
- organize the narrative by concepts, not filenames;
|
|
68
|
+
- link every step to a unique source snippet;
|
|
69
|
+
- connect code locations only when the relationship adds explanatory value;
|
|
70
|
+
- include behavior and its proof;
|
|
71
|
+
- leave secondary files to Bygone's complete Files rail;
|
|
72
|
+
- run `bygone tour validate <file> --json` and repair all errors before finishing.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The generated prose remains a proposal. Validation proves that its evidence exists and is reproducible; a reviewer must still judge whether its interpretation is correct.
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# Releasing Bygone
|
|
2
|
+
|
|
3
|
+
This document describes the current release workflow for Bygone:
|
|
4
|
+
|
|
5
|
+
- VS Code extension package (`.vsix`)
|
|
6
|
+
- npm standalone package
|
|
7
|
+
- desktop artifacts
|
|
8
|
+
- Homebrew formula and cask
|
|
9
|
+
|
|
10
|
+
It is based on the scripts already in this repository. It does not assume any extra tooling beyond what those scripts already call.
|
|
11
|
+
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
Validate without publishing:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm run release:check
|
|
18
|
+
npm run standalone:smoke
|
|
19
|
+
npm run release:build
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Publish everything:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
export BYGONE_HOMEBREW_TAP=/path/to/homebrew-tap
|
|
26
|
+
npm whoami
|
|
27
|
+
gh auth status
|
|
28
|
+
npm run release:publish
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Upload `bygone-<version>.vsix` from the Visual Studio Marketplace publisher
|
|
32
|
+
page. GitHub OIDC support has merged into `vsce`, but Marketplace has not yet
|
|
33
|
+
exposed the trusted-publisher policy needed to authorize a workflow.
|
|
34
|
+
|
|
35
|
+
## What Exists Today
|
|
36
|
+
|
|
37
|
+
The main scripts are:
|
|
38
|
+
|
|
39
|
+
- `npm run release:check`
|
|
40
|
+
- runs tests
|
|
41
|
+
- packages the VSIX
|
|
42
|
+
- stages the npm package
|
|
43
|
+
- dry-runs the npm package
|
|
44
|
+
- `npm run release:build`
|
|
45
|
+
- runs the full local artifact build without publishing
|
|
46
|
+
- `npm run release:publish`
|
|
47
|
+
- publishes npm
|
|
48
|
+
- creates a GitHub release with desktop artifacts
|
|
49
|
+
- updates and pushes the Homebrew tap
|
|
50
|
+
|
|
51
|
+
Related packaging commands:
|
|
52
|
+
|
|
53
|
+
- `npm run package:vsix`
|
|
54
|
+
- `npm run package:npm`
|
|
55
|
+
- `npm run package:npm:dry-run`
|
|
56
|
+
- `npm run package:desktop`
|
|
57
|
+
- `npm run package:desktop:mac`
|
|
58
|
+
- `npm run package:desktop:mac:zip`
|
|
59
|
+
- `npm run package:desktop:linux`
|
|
60
|
+
- `npm run package:desktop:win`
|
|
61
|
+
- `npm run standalone:smoke`
|
|
62
|
+
|
|
63
|
+
## Prerequisites
|
|
64
|
+
|
|
65
|
+
Before publishing, verify:
|
|
66
|
+
|
|
67
|
+
## Accounts You Need
|
|
68
|
+
|
|
69
|
+
You need accounts on three services:
|
|
70
|
+
|
|
71
|
+
### 1. npm
|
|
72
|
+
|
|
73
|
+
This is required for publishing the standalone package.
|
|
74
|
+
|
|
75
|
+
- Sign up: [npm signup](https://www.npmjs.com/signup)
|
|
76
|
+
- Docs: [npm getting started](https://docs.npmjs.com/getting-started)
|
|
77
|
+
|
|
78
|
+
After creating the account:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm login
|
|
82
|
+
npm whoami
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 2. GitHub
|
|
86
|
+
|
|
87
|
+
This is required because the release script creates a GitHub release and uploads desktop artifacts with `gh`.
|
|
88
|
+
|
|
89
|
+
- Sign up: [GitHub signup](https://github.com/signup)
|
|
90
|
+
- Docs: [Creating an account on GitHub](https://docs.github.com/en/get-started/start-your-journey/creating-an-account-on-github)
|
|
91
|
+
|
|
92
|
+
After creating the account, authenticate the CLI:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
gh auth login
|
|
96
|
+
gh auth status
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 3. Visual Studio Marketplace publisher access
|
|
100
|
+
|
|
101
|
+
This is required for publishing the VS Code extension.
|
|
102
|
+
|
|
103
|
+
This is a little different from npm and GitHub. Global Azure DevOps Personal
|
|
104
|
+
Access Tokens are being retired, while GitHub OIDC support is not yet usable
|
|
105
|
+
because Marketplace has not exposed its trusted-publisher policy UI. Until
|
|
106
|
+
that rollout completes, publish the packaged VSIX through the Marketplace
|
|
107
|
+
publisher page.
|
|
108
|
+
|
|
109
|
+
Publisher/admin surface:
|
|
110
|
+
|
|
111
|
+
- Marketplace management: [Visual Studio Marketplace manage](https://marketplace.visualstudio.com/manage)
|
|
112
|
+
|
|
113
|
+
Current practical flow:
|
|
114
|
+
|
|
115
|
+
1. Sign in to the Marketplace manage page with your Microsoft account.
|
|
116
|
+
2. Confirm the publisher that matches `package.json`:
|
|
117
|
+
- current publisher: `davidmashburn`
|
|
118
|
+
3. Open the existing extension's **More Actions** menu and choose **Update**.
|
|
119
|
+
4. Upload `bygone-<version>.vsix` on the update page. Do not use
|
|
120
|
+
**New extension** for a listing that already exists.
|
|
121
|
+
|
|
122
|
+
OIDC support is merged into `microsoft/vscode-vsce` but is not present in its
|
|
123
|
+
latest npm release, 3.9.2. Once Marketplace exposes trusted-publisher policies,
|
|
124
|
+
add a workflow scoped to `davidmashburn/bygone` and use the first stable
|
|
125
|
+
`@vscode/vsce` release that contains `publish --oidc`.
|
|
126
|
+
|
|
127
|
+
### 4. Homebrew tap repo access
|
|
128
|
+
|
|
129
|
+
There is no separate Homebrew account for this flow.
|
|
130
|
+
|
|
131
|
+
What you need is:
|
|
132
|
+
|
|
133
|
+
- a local checkout of the tap repository
|
|
134
|
+
- git push access to that repository
|
|
135
|
+
|
|
136
|
+
Set:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
export BYGONE_HOMEBREW_TAP=/path/to/homebrew-tap
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
This repository should contain the tap structure used by the release script:
|
|
143
|
+
|
|
144
|
+
- `Formula/`
|
|
145
|
+
- `Casks/`
|
|
146
|
+
|
|
147
|
+
### 1. npm authentication
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npm whoami
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
If that fails:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npm login
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 2. GitHub authentication
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
gh auth status
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
This is required because `release:publish` uses `gh release create`.
|
|
166
|
+
|
|
167
|
+
### 3. VS Code Marketplace publishing
|
|
168
|
+
|
|
169
|
+
Package the extension:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npm run package:vsix
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Then upload the resulting VSIX through the publisher page. Do not add a new
|
|
176
|
+
long-lived PAT merely to automate this temporary gap.
|
|
177
|
+
|
|
178
|
+
### 4. Homebrew tap checkout
|
|
179
|
+
|
|
180
|
+
Set:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
export BYGONE_HOMEBREW_TAP=/path/to/homebrew-tap
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
That path must point at a local git checkout of the tap repo. The script writes:
|
|
187
|
+
|
|
188
|
+
- `Formula/bygone.rb`
|
|
189
|
+
- `Casks/bygone-desktop.rb`
|
|
190
|
+
|
|
191
|
+
and then commits and pushes that tap repo.
|
|
192
|
+
|
|
193
|
+
## Recommended Release Flow
|
|
194
|
+
|
|
195
|
+
### Step 1. Confirm the version
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
node -p "require('./package.json').version"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Step 2. Run the validation gate
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
npm run release:check
|
|
205
|
+
npm run standalone:smoke
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
This is the closest thing the repo currently has to a release doctor.
|
|
209
|
+
|
|
210
|
+
It does **not** check credentials or required environment variables. It only validates the build/package pipeline.
|
|
211
|
+
|
|
212
|
+
### Step 3. Build all artifacts locally
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
npm run release:build
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
This builds:
|
|
219
|
+
|
|
220
|
+
- VSIX
|
|
221
|
+
- staged npm package
|
|
222
|
+
- dry-run npm package check
|
|
223
|
+
- macOS desktop artifacts
|
|
224
|
+
- Linux AppImage
|
|
225
|
+
- Windows artifacts
|
|
226
|
+
- Homebrew style validation, if `brew` is available
|
|
227
|
+
|
|
228
|
+
If local packaging is partially unavailable, use the lower-level script:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
node ./scripts/release.mjs --skip-dmg
|
|
232
|
+
node ./scripts/release.mjs --skip-windows
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Step 4. Inspect expected outputs
|
|
236
|
+
|
|
237
|
+
Expected outputs include:
|
|
238
|
+
|
|
239
|
+
- `bygone-<version>.vsix`
|
|
240
|
+
- `dist/npm-package/`
|
|
241
|
+
- `dist/davidmashburn-bygone-<version>.tgz` after pack
|
|
242
|
+
- `dist/Bygone-<version>-arm64.dmg`
|
|
243
|
+
- `dist/Bygone-<version>-arm64-mac.zip`
|
|
244
|
+
- `dist/Bygone-<version>-arm64.AppImage`
|
|
245
|
+
- `dist/Bygone Setup <version>.exe`
|
|
246
|
+
|
|
247
|
+
### Step 5. Publish
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
npm run release:publish
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
This runs the full publish path:
|
|
254
|
+
|
|
255
|
+
1. `npm publish dist/npm-package --access public`
|
|
256
|
+
2. `gh release create v<version> ... --notes-file CHANGELOG.md`
|
|
257
|
+
3. update, commit, and push the Homebrew tap
|
|
258
|
+
|
|
259
|
+
Publish the VS Code extension separately by uploading the already-built
|
|
260
|
+
`bygone-<version>.vsix` through the Marketplace publisher page.
|
|
261
|
+
|
|
262
|
+
## Homebrew Notes
|
|
263
|
+
|
|
264
|
+
Homebrew staging files live in:
|
|
265
|
+
|
|
266
|
+
- `packaging/homebrew/bygone.rb`
|
|
267
|
+
- `packaging/homebrew/bygone-desktop.rb`
|
|
268
|
+
|
|
269
|
+
The publish script will:
|
|
270
|
+
|
|
271
|
+
- pack the staged npm package into `dist/`
|
|
272
|
+
- compute SHA256 for the npm tarball and DMG
|
|
273
|
+
- rewrite the formula and cask in the tap checkout
|
|
274
|
+
- run `brew style`
|
|
275
|
+
- commit and push the tap
|
|
276
|
+
|
|
277
|
+
If you want a manual audit step from a tap checkout:
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
brew audit --new --formula Formula/bygone.rb
|
|
281
|
+
brew audit --new --cask Casks/bygone-desktop.rb
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
The repository-local packaging notes are also in:
|
|
285
|
+
|
|
286
|
+
- [packaging/homebrew/README.md](../packaging/homebrew/README.md)
|
|
287
|
+
|
|
288
|
+
## Troubleshooting
|
|
289
|
+
|
|
290
|
+
### `npm run release:publish` fails immediately
|
|
291
|
+
|
|
292
|
+
Check:
|
|
293
|
+
|
|
294
|
+
- `npm whoami`
|
|
295
|
+
- `gh auth status`
|
|
296
|
+
- `echo $BYGONE_HOMEBREW_TAP`
|
|
297
|
+
|
|
298
|
+
### VS Code publishing is not automated
|
|
299
|
+
|
|
300
|
+
This is currently intentional. `vsce` has merged GitHub OIDC support, but the
|
|
301
|
+
Marketplace policy required to authorize the workflow is not publicly
|
|
302
|
+
configurable. Upload the VSIX manually and revisit the workflow when both the
|
|
303
|
+
Marketplace UI and a stable OIDC-enabled `vsce` release are available.
|
|
304
|
+
|
|
305
|
+
### DMG build fails on macOS
|
|
306
|
+
|
|
307
|
+
Use:
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
node ./scripts/release.mjs --skip-dmg
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Then fix the local DMG toolchain before attempting a full publish.
|
|
314
|
+
|
|
315
|
+
### Windows packaging fails locally
|
|
316
|
+
|
|
317
|
+
Use:
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
node ./scripts/release.mjs --skip-windows
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Homebrew publish fails
|
|
324
|
+
|
|
325
|
+
Check:
|
|
326
|
+
|
|
327
|
+
- `BYGONE_HOMEBREW_TAP` points at a real git checkout
|
|
328
|
+
- the tap checkout has `Formula/` and `Casks/`
|
|
329
|
+
- `brew style` runs successfully
|
|
330
|
+
|
|
331
|
+
## Current Gap
|
|
332
|
+
|
|
333
|
+
There is no dedicated `doctor` command yet.
|
|
334
|
+
|
|
335
|
+
If we add one later, it should check:
|
|
336
|
+
|
|
337
|
+
- npm auth
|
|
338
|
+
- GitHub auth
|
|
339
|
+
- Marketplace publisher-page access
|
|
340
|
+
- `BYGONE_HOMEBREW_TAP`
|
|
341
|
+
- presence of required build tools
|
|
342
|
+
- expected artifacts after `release:build`
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Bygone Walkthrough
|
|
2
|
+
|
|
3
|
+
This walkthrough uses Bygone on the Bygone source tree itself, so every screenshot shows real project data rather than sample filler.
|
|
4
|
+
|
|
5
|
+
Source files used below:
|
|
6
|
+
|
|
7
|
+
- `src/fileComparator.ts`
|
|
8
|
+
- `media/script.js`
|
|
9
|
+
- `media/dom.js`
|
|
10
|
+
- the repository root for Git directory history
|
|
11
|
+
|
|
12
|
+
## 1. Start In Directory History
|
|
13
|
+
|
|
14
|
+
If you launch Bygone with no arguments from the repo root, it opens Git directory history for the current directory:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
cd ~/code/bygone
|
|
18
|
+
./bin/bygone.js
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
You can also be explicit:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
./bin/bygone.js --history ~/code/bygone
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
What to look for:
|
|
30
|
+
|
|
31
|
+
- The timeline controls at the top move commit-by-commit.
|
|
32
|
+
- The left rail defaults to `History`, with `Changed Files` available as a secondary scope.
|
|
33
|
+
- The main panes compare directory snapshots, not individual files.
|
|
34
|
+
- This is the best starting point when you want to answer “what changed in this repo over time?”
|
|
35
|
+
|
|
36
|
+
## 2. Narrow Down To One File
|
|
37
|
+
|
|
38
|
+
For a file-level history view, point Bygone at a single tracked file:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
./bin/bygone.js --history ~/code/bygone/src/fileComparator.ts
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
What to look for:
|
|
47
|
+
|
|
48
|
+
- The history rail stays visible and becomes the primary way to jump between commits for that file.
|
|
49
|
+
- Commit labels stay pinned above the two panes, so it is always clear which revision is on each side.
|
|
50
|
+
- Change navigation sits above the editors. `Cmd/Ctrl+Alt+Up` and `Cmd/Ctrl+Alt+Down` jump between diff hunks.
|
|
51
|
+
- This view is useful when you already know the file and want to understand how a specific implementation evolved.
|
|
52
|
+
|
|
53
|
+
## 3. Open A Direct Two-File Diff
|
|
54
|
+
|
|
55
|
+
For a plain compare outside Git history, pass two files:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
./bin/bygone.js ~/code/bygone/media/script.js ~/code/bygone/media/dom.js
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
What to look for:
|
|
64
|
+
|
|
65
|
+
- There is no history rail here because this is a direct file-to-file compare, not a history session.
|
|
66
|
+
- The compare stays focused on the diff canvas: current change position, copy controls, and hunk traversal.
|
|
67
|
+
- `Editing On` indicates that both panes are editable in this mode.
|
|
68
|
+
- This is the fastest path when you want to compare two working files directly, regardless of Git history.
|
|
69
|
+
|
|
70
|
+
## 4. Recommended Mental Model
|
|
71
|
+
|
|
72
|
+
The current UI makes the most sense if you think about it along two axes:
|
|
73
|
+
|
|
74
|
+
- `file` vs `directory`
|
|
75
|
+
- `git-backed history` vs `direct compare`
|
|
76
|
+
|
|
77
|
+
That yields the core flows:
|
|
78
|
+
|
|
79
|
+
- directory history
|
|
80
|
+
- file history
|
|
81
|
+
- directory diff
|
|
82
|
+
- file diff
|
|
83
|
+
|
|
84
|
+
The shell then stays mostly consistent:
|
|
85
|
+
|
|
86
|
+
- context at the top
|
|
87
|
+
- commit navigation only in history-backed views
|
|
88
|
+
- history or changed-files navigation in the left rail when it adds value
|
|
89
|
+
- change navigation and copy actions close to the diff panes
|
|
90
|
+
|
|
91
|
+
## 5. Practical Shortcuts
|
|
92
|
+
|
|
93
|
+
- `bygone` or `bygone <directory>`: open Git directory history
|
|
94
|
+
- `bygone <file>`: open file history
|
|
95
|
+
- `bygone <left> <right>`: open a direct file or directory compare
|
|
96
|
+
- `Cmd/Ctrl+Alt+Down`: next change
|
|
97
|
+
- `Cmd/Ctrl+Alt+Up`: previous change
|
|
98
|
+
|
|
99
|
+
## 6. When To Use Which View
|
|
100
|
+
|
|
101
|
+
- Start in directory history when the question is “what happened in this area of the repo?”
|
|
102
|
+
- Switch to file history when the question becomes “how did this file get here?”
|
|
103
|
+
- Use direct file diff when you already have two concrete files and just want the compare.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
title: How Bygone learned to review a branch
|
|
3
|
+
sourceUrl: https://github.com/davidmashburn/bygone/commit/75b6d7c0303124ec314aa790d6b808c4a9d9ea0e
|
|
4
|
+
range:
|
|
5
|
+
base: 292fe9248c5c49f762489dc688296fc100d120bc
|
|
6
|
+
head: 75b6d7c0303124ec314aa790d6b808c4a9d9ea0e
|
|
7
|
+
|
|
8
|
+
anchors:
|
|
9
|
+
choose-merge-base:
|
|
10
|
+
file: src/gitComparison.ts
|
|
11
|
+
revision: head
|
|
12
|
+
contains: " const mergeBaseOids = runGit(['merge-base', '--all', baseOid, headOid], repoRoot)"
|
|
13
|
+
describe-range:
|
|
14
|
+
file: src/gitComparison.ts
|
|
15
|
+
revision: head
|
|
16
|
+
contains: " changedPaths: listChangedPaths(repoRoot, mergeBaseOid, headOid, runGit),"
|
|
17
|
+
materialize-boundary:
|
|
18
|
+
file: src/gitComparison.ts
|
|
19
|
+
revision: head
|
|
20
|
+
contains: "export function materializeBranchReviewTrees("
|
|
21
|
+
open-review-surface:
|
|
22
|
+
file: src/fileComparator.ts
|
|
23
|
+
revision: head
|
|
24
|
+
contains: " materializeBranchReviewTrees(range, leftRoot, rightRoot);"
|
|
25
|
+
prove-merge-base:
|
|
26
|
+
file: test/runTests.js
|
|
27
|
+
revision: head
|
|
28
|
+
contains: " assert.equal(range.mergeBaseOid, baseOid);"
|
|
29
|
+
|
|
30
|
+
connections:
|
|
31
|
+
range-to-snapshot:
|
|
32
|
+
from: choose-merge-base
|
|
33
|
+
to: materialize-boundary
|
|
34
|
+
label: The selected historical boundary determines the two trees a reviewer sees.
|
|
35
|
+
snapshot-to-surface:
|
|
36
|
+
from: materialize-boundary
|
|
37
|
+
to: open-review-surface
|
|
38
|
+
label: The Git model is converted into the ordinary directory comparison surface.
|
|
39
|
+
semantics-to-proof:
|
|
40
|
+
from: choose-merge-base
|
|
41
|
+
to: prove-merge-base
|
|
42
|
+
label: A repository fixture locks the branch comparison to merge-base semantics.
|
|
43
|
+
|
|
44
|
+
chapters:
|
|
45
|
+
- id: branch-to-review
|
|
46
|
+
title: A branch becomes a review
|
|
47
|
+
scenes:
|
|
48
|
+
- id: review-pipeline
|
|
49
|
+
title: From Git history to a visual workspace
|
|
50
|
+
summary: Follow the branch-review feature through its historical boundary, portable model, presentation seam, and proof.
|
|
51
|
+
bullets:
|
|
52
|
+
- The comparison starts at merge-base rather than whichever ref happens to be named as the base.
|
|
53
|
+
- Git-specific work ends once two temporary trees have been materialized.
|
|
54
|
+
- Existing directory comparison then provides navigation and drill-down without a second renderer.
|
|
55
|
+
tags: [git, architecture, dogfood]
|
|
56
|
+
takeaway: Bygone reviews its own history using the same boundary it introduced in this commit.
|
|
57
|
+
steps:
|
|
58
|
+
- id: establish-boundary
|
|
59
|
+
title: Establish the historical boundary
|
|
60
|
+
body: The review represents everything introduced since the branch diverged, including changes made around merges.
|
|
61
|
+
focus: choose-merge-base
|
|
62
|
+
- id: make-range-portable
|
|
63
|
+
title: Describe the review as data
|
|
64
|
+
body: Changed paths and commits are collected into a range that neither renderer needs to rediscover.
|
|
65
|
+
focus: describe-range
|
|
66
|
+
- id: turn-history-into-files
|
|
67
|
+
title: Materialize two review trees
|
|
68
|
+
body: The Git-specific layer creates base and head snapshots for only the changed paths.
|
|
69
|
+
focus: materialize-boundary
|
|
70
|
+
connection: range-to-snapshot
|
|
71
|
+
- id: reuse-the-diff-surface
|
|
72
|
+
title: Reuse directory comparison
|
|
73
|
+
body: VS Code hands those snapshots to Bygone's existing directory workflow instead of introducing a branch-only view.
|
|
74
|
+
focus: open-review-surface
|
|
75
|
+
connection: snapshot-to-surface
|
|
76
|
+
- id: lock-the-semantics
|
|
77
|
+
title: Prove the range starts at divergence
|
|
78
|
+
body: The test creates a real repository and asserts the selected merge base, changed paths, and commits.
|
|
79
|
+
focus: prove-merge-base
|
|
80
|
+
connection: semantics-to-proof
|