@davmash/bygone 0.7.0 → 0.8.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/CHANGELOG.md +13 -1
- package/README.md +23 -10
- package/cli/commandSpec.js +5 -5
- package/cli/completions.js +7 -7
- package/cli/tour.js +2 -2
- package/cli/tourFile.js +66 -4
- package/completions/_bygone +5 -5
- package/completions/bygone +2 -2
- package/completions/bygone.fish +2 -2
- package/docs/change-explanation-plan.md +1 -1
- package/docs/change-tour-format.md +42 -5
- package/docs/explore.md +66 -0
- package/docs/generating-change-tours.md +5 -5
- package/docs/present.md +41 -0
- package/docs/product-surface.md +124 -0
- package/docs/repository-search-prototype.md +67 -0
- package/docs/search.md +56 -0
- package/examples/deconstructed-diff.bygone +49 -0
- package/examples/stacked-diff.bygone +55 -0
- package/media/webview.css +1 -1
- package/media/webview.js +154 -154
- package/out/standalone-main.js +2124 -1049
- package/out/tourCoverage.js +1792 -0
- package/package.json +3 -3
- package/web/index.html +13 -0
- package/web/presenter.css +117 -28
- package/web/web-host.js +6 -4
- /package/examples/{bygone-history.bygone.yaml → bygone-history.bygone} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.8.0
|
|
6
|
+
|
|
7
|
+
- Added full-surface search across visible panes, comparison panels, unopened change-set files, file history, authored tours, and repositories, plus previewable safe repository replacement
|
|
8
|
+
- Made authored tours native `.bygone` documents with repository discovery, direct desktop opening on macOS, multiple presentation windows, persistent anchor markers, focused multi-panel navigation, and resizable readable layouts
|
|
9
|
+
- Moved VS Code comparisons into independent, restorable editor tabs with unsaved-document support, contextual commands, editable document bridging, and active file history
|
|
10
|
+
- Simplified desktop discovery and menus, clarified panel mutability, and hardened tour focus restoration, deep-file transitions, performance, and narrow layouts
|
|
11
|
+
|
|
12
|
+
## 0.7.1
|
|
13
|
+
|
|
14
|
+
- Fixed the standalone npm package so the installed `bygone` command includes its tour coverage runtime
|
|
15
|
+
- Made Homebrew release staging update formula and cask versions and declare the cask's macOS requirement
|
|
16
|
+
|
|
5
17
|
## 0.7.0
|
|
6
18
|
|
|
7
19
|
- Expanded directory comparison into an N-panel workspace with asynchronous diff computation, drill-down, and complete file navigation
|
|
@@ -11,7 +23,7 @@
|
|
|
11
23
|
- Added authored, code-connected change tours, bounded LLM context, coverage reporting, stacked and deconstructed explanations, the PR Tour Guide skill, and independent narrative and file navigation
|
|
12
24
|
- Added refreshable sessions, pane-local find, persistent line wrapping, resizable sidebars, and horizontal multi-panel scrolling
|
|
13
25
|
- Adopted the crisp-hybrid Bygone icon and strengthened release packaging across npm, VS Code, desktop, and Homebrew artifacts
|
|
14
|
-
- Added a [guided 0.7 release tour](./tours/v0.7.bygone
|
|
26
|
+
- Added a [guided 0.7 release tour](./tours/v0.7.bygone) covering the complete range from `v0.6.3`
|
|
15
27
|
|
|
16
28
|
## 0.2.0
|
|
17
29
|
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Bygone is a VS Code extension and standalone desktop app for visual diff and fil
|
|
|
24
24
|
- Dynamic adjacent multi-panel diff view
|
|
25
25
|
- Flowing connectors, block contours, and inline change highlighting
|
|
26
26
|
- Git file history viewer with commit-by-commit navigation
|
|
27
|
-
- Local branch-
|
|
27
|
+
- Local branch-change exploration using merge-base-to-tip semantics and changed-file progress
|
|
28
28
|
- Binary-aware comparisons with side-by-side image previews and byte-equality reporting
|
|
29
29
|
|
|
30
30
|
## Status
|
|
@@ -113,9 +113,13 @@ Branch review compares the selected head directly with `merge-base(base, head)`,
|
|
|
113
113
|
|
|
114
114
|
Two-file and directory drill-down comparisons detect binary content before decoding it as text. Images render side by side when they are small enough to preview inline; all binary comparisons report whether the underlying bytes are identical.
|
|
115
115
|
|
|
116
|
-
Change tours can layer an authored, code-connected narrative over the complete generated change set. Pass a `.bygone
|
|
116
|
+
Change tours can layer an authored, code-connected narrative over the complete generated change set. Pass a `.bygone` file with `--tour`; named source anchors compile to exact commit and line references, while an independent Files rail keeps every changed file available without adding filler scenes to the narrative. The legacy `.bygone.yaml` spelling remains supported. Try the self-referencing example with `bygone present --tour examples/bygone-history.bygone`, then see the [change tour format](./docs/change-tour-format.md).
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
Packaged macOS builds register `.bygone` with the desktop app, so Finder can open a presentation directly. Windows and Linux builds currently require opening the file through Bygone or the `bygone` command; they do not install an operating-system file association.
|
|
119
|
+
|
|
120
|
+
Agents can validate anchors and structure with `bygone tour validate <file.bygone> --json`, compile a portable manifest with `bygone tour compile`, and retrieve the authoring contract with `bygone tour schema`. See [Generating change tours with an LLM](./docs/generating-change-tours.md), or give a compatible agent the repository's vendor-neutral [`pr-tour-guide` skill](./skills/pr-tour-guide/SKILL.md).
|
|
121
|
+
|
|
122
|
+
Contributors should consult the internal [product surface overview](./docs/product-surface.md) before adding a command, mode, tour scene, or packaged artifact.
|
|
119
123
|
|
|
120
124
|
`bygone tour context [<head>] --base <base>` produces a provider-neutral change dossier with bounded patches, changed ranges, file roles, symbol hints, commits, renames, and explicit binary omissions for an LLM to consume.
|
|
121
125
|
|
|
@@ -236,14 +240,23 @@ The wrapper scripts are:
|
|
|
236
240
|
|
|
237
241
|
## Commands
|
|
238
242
|
|
|
239
|
-
- `Bygone: Compare
|
|
240
|
-
- `Bygone: Compare
|
|
241
|
-
- `Bygone: Compare Multiple Directories`
|
|
242
|
-
- `Bygone: Compare Multiple Files`
|
|
243
|
+
- `Bygone: Compare Active File With…`
|
|
244
|
+
- `Bygone: Compare Selected Files`
|
|
243
245
|
- `Bygone: Compare with Selected`
|
|
244
|
-
- `Bygone:
|
|
245
|
-
- `Bygone:
|
|
246
|
-
- `Bygone:
|
|
246
|
+
- `Bygone: Cancel Staged Comparison`
|
|
247
|
+
- `Bygone: View Active File History`
|
|
248
|
+
- `Bygone: Open This Comparison in Desktop`
|
|
249
|
+
- `Bygone: Compare Directories in Desktop…`
|
|
250
|
+
- `Bygone: Compare Three or More Files in Desktop…`
|
|
251
|
+
- `Bygone: Explore Current Branch in Desktop`
|
|
252
|
+
- `Bygone: Present Current Branch in Desktop`
|
|
253
|
+
- `Bygone: Open Authored Tour in Desktop…`
|
|
254
|
+
- `Bygone: Install or Open Desktop App`
|
|
255
|
+
|
|
256
|
+
Two-file comparisons open as independent editor tabs. Trusted local worktree
|
|
257
|
+
panes edit through VS Code documents, so changes participate in dirty state,
|
|
258
|
+
undo, save, and external-document updates. Historical and non-local inputs are
|
|
259
|
+
read-only. Desktop hand-offs are unavailable in remote extension hosts.
|
|
247
260
|
|
|
248
261
|
## Limitations
|
|
249
262
|
|
package/cli/commandSpec.js
CHANGED
|
@@ -11,11 +11,11 @@ const CLI_SPEC = Object.freeze({
|
|
|
11
11
|
'bygone --history <path>',
|
|
12
12
|
'bygone --git-diff <ref1> <ref2> [<ref3>...]',
|
|
13
13
|
'bygone review [<head>] [--base <base>]',
|
|
14
|
-
'bygone present [<head>] [--base <base>] [--tour <file.bygone
|
|
15
|
-
'bygone tour validate <file.bygone
|
|
16
|
-
'bygone tour compile <file.bygone
|
|
14
|
+
'bygone present [<head>] [--base <base>] [--tour <file.bygone>]',
|
|
15
|
+
'bygone tour validate <file.bygone> [--json]',
|
|
16
|
+
'bygone tour compile <file.bygone> [--output <tour.json>]',
|
|
17
17
|
'bygone tour context [<head>] [--base <base>] [--output <context.json>]',
|
|
18
|
-
'bygone tour coverage <file.bygone
|
|
18
|
+
'bygone tour coverage <file.bygone> [--json] [--minimum-coverage <0-100>]',
|
|
19
19
|
'bygone tour schema',
|
|
20
20
|
'bygone --branch-diff [-b BRANCH] [-m MAIN]',
|
|
21
21
|
'bygone completion <zsh|bash|fish>',
|
|
@@ -103,7 +103,7 @@ const CLI_SPEC = Object.freeze({
|
|
|
103
103
|
id: 'tour',
|
|
104
104
|
kind: 'option',
|
|
105
105
|
tokens: ['--tour'],
|
|
106
|
-
description: 'Use an authored
|
|
106
|
+
description: 'Use an authored .bygone presentation',
|
|
107
107
|
argument: 'path'
|
|
108
108
|
},
|
|
109
109
|
{
|
package/cli/completions.js
CHANGED
|
@@ -75,7 +75,7 @@ ${legacyOptions}
|
|
|
75
75
|
${historyOptions}
|
|
76
76
|
)
|
|
77
77
|
shells=('zsh:Z shell' 'bash:Bash' 'fish:Fish shell')
|
|
78
|
-
tour_actions=('context:Build structured change evidence' 'validate:Validate source and anchors' 'compile:Compile a portable manifest' 'schema:Print the source schema')
|
|
78
|
+
tour_actions=('context:Build structured change evidence' 'coverage:Measure authored tour coverage' 'validate:Validate source and anchors' 'compile:Compile a portable manifest' 'schema:Print the source schema')
|
|
79
79
|
|
|
80
80
|
if (( CURRENT == 2 )); then
|
|
81
81
|
_describe 'bygone command' root_items
|
|
@@ -99,8 +99,8 @@ ${historyOptions}
|
|
|
99
99
|
compadd -- --base --output -o --max-patch-bytes --max-total-patch-bytes
|
|
100
100
|
_bygone_git_refs
|
|
101
101
|
fi
|
|
102
|
-
elif [[ "$words[3]" == "validate" || "$words[3]" == "compile" ]]; then
|
|
103
|
-
_files -g '*.bygone.yaml'
|
|
102
|
+
elif [[ "$words[3]" == "coverage" || "$words[3]" == "validate" || "$words[3]" == "compile" ]]; then
|
|
103
|
+
_files -g '*.bygone' -g '*.bygone.yaml'
|
|
104
104
|
fi
|
|
105
105
|
;;
|
|
106
106
|
review)
|
|
@@ -113,7 +113,7 @@ ${historyOptions}
|
|
|
113
113
|
;;
|
|
114
114
|
present)
|
|
115
115
|
if [[ "$previous" == ${shellAlternation(tokensFor('tour'))} ]]; then
|
|
116
|
-
_files -g '*.bygone.yaml'
|
|
116
|
+
_files -g '*.bygone' -g '*.bygone.yaml'
|
|
117
117
|
elif [[ "$previous" == ${shellAlternation(tokensFor('base'))} ]]; then
|
|
118
118
|
_bygone_git_refs
|
|
119
119
|
else
|
|
@@ -183,7 +183,7 @@ _bygone() {
|
|
|
183
183
|
;;
|
|
184
184
|
tour)
|
|
185
185
|
if (( COMP_CWORD == 2 )); then
|
|
186
|
-
COMPREPLY=( $(compgen -W 'context validate compile schema' -- "$cur") )
|
|
186
|
+
COMPREPLY=( $(compgen -W 'context coverage validate compile schema' -- "$cur") )
|
|
187
187
|
elif [[ "\${COMP_WORDS[2]}" == "context" ]]; then
|
|
188
188
|
refs="$(_bygone_git_refs)"
|
|
189
189
|
if [[ "$prev" =~ ^(${baseTokens})$ ]]; then
|
|
@@ -210,7 +210,7 @@ _bygone() {
|
|
|
210
210
|
present)
|
|
211
211
|
refs="$(_bygone_git_refs)"
|
|
212
212
|
if [[ "$prev" == "--tour" ]]; then
|
|
213
|
-
COMPREPLY=( $(compgen -f
|
|
213
|
+
COMPREPLY=( $(compgen -f -- "$cur") )
|
|
214
214
|
compopt -o filenames 2>/dev/null || true
|
|
215
215
|
elif [[ "$prev" =~ ^(${baseTokens})$ ]]; then
|
|
216
216
|
COMPREPLY=( $(compgen -W "$refs" -- "$cur") )
|
|
@@ -262,7 +262,7 @@ function generateFishCompletion() {
|
|
|
262
262
|
|
|
263
263
|
lines.push(
|
|
264
264
|
"complete -c bygone -n '__fish_seen_subcommand_from completion' -a 'zsh bash fish' -d 'Shell'",
|
|
265
|
-
"complete -c bygone -n '__fish_seen_subcommand_from tour' -a 'context validate compile schema' -d 'Tour action'",
|
|
265
|
+
"complete -c bygone -n '__fish_seen_subcommand_from tour' -a 'context coverage validate compile schema' -d 'Tour action'",
|
|
266
266
|
"complete -c bygone -n 'string match -q \"*tour context*\" -- (commandline -opc)' -l base -r -a '(__bygone_git_refs)' -d 'Set the change-context base ref'",
|
|
267
267
|
"complete -c bygone -n 'string match -q \"*tour context*\" -- (commandline -opc)' -l output -s o -r -d 'Write the change context'",
|
|
268
268
|
"complete -c bygone -n 'string match -q \"*tour context*\" -- (commandline -opc)' -l max-patch-bytes -r -d 'Maximum included patch size per file'",
|
package/cli/tour.js
CHANGED
|
@@ -55,7 +55,7 @@ function runTourCommand(args, cwd, packageRoot, output = process.stdout) {
|
|
|
55
55
|
function parseTourArgs(args) {
|
|
56
56
|
const [action, ...rest] = args;
|
|
57
57
|
if (!TOUR_ACTIONS.includes(action)) {
|
|
58
|
-
throw new Error(`Usage: bygone tour <${TOUR_ACTIONS.join('|')}> [file.bygone
|
|
58
|
+
throw new Error(`Usage: bygone tour <${TOUR_ACTIONS.join('|')}> [file.bygone]`);
|
|
59
59
|
}
|
|
60
60
|
if (action === 'schema') {
|
|
61
61
|
if (rest.length > 0) throw new Error('tour schema does not accept additional arguments.');
|
|
@@ -88,7 +88,7 @@ function parseTourArgs(args) {
|
|
|
88
88
|
if (sourcePath) throw new Error(`tour ${action} accepts exactly one source file.`);
|
|
89
89
|
sourcePath = arg;
|
|
90
90
|
}
|
|
91
|
-
if (!sourcePath) throw new Error(`tour ${action} requires a .bygone
|
|
91
|
+
if (!sourcePath) throw new Error(`tour ${action} requires a .bygone source file.`);
|
|
92
92
|
if (action === 'validate' && outputPath) throw new Error('--output is only valid with tour compile.');
|
|
93
93
|
if (action === 'compile' && json) throw new Error('--json is only valid with tour validate or coverage.');
|
|
94
94
|
if (action !== 'coverage' && minimumCoverage !== undefined) {
|
package/cli/tourFile.js
CHANGED
|
@@ -1,14 +1,74 @@
|
|
|
1
|
-
const { readFileSync } = require('fs');
|
|
1
|
+
const { readFileSync, statSync } = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
|
-
const {
|
|
3
|
+
const { TextDecoder } = require('util');
|
|
4
|
+
const { loadAll: loadYamlDocuments } = require('js-yaml');
|
|
4
5
|
const { buildChangeTourManifest, parseChangeTourSource } = require('../out/changeTour.js');
|
|
5
6
|
|
|
7
|
+
const DEFAULT_MAX_TOUR_SOURCE_BYTES = 1024 * 1024;
|
|
8
|
+
|
|
6
9
|
function loadTourSource(cwd, sourcePath) {
|
|
7
10
|
const resolvedPath = path.resolve(cwd, sourcePath);
|
|
8
|
-
const source =
|
|
11
|
+
const source = readTourSourceDocument(resolvedPath);
|
|
9
12
|
return { resolvedPath, source };
|
|
10
13
|
}
|
|
11
14
|
|
|
15
|
+
function readTourSourceDocument(sourcePath, options = {}) {
|
|
16
|
+
const maxBytes = options.maxBytes ?? DEFAULT_MAX_TOUR_SOURCE_BYTES;
|
|
17
|
+
if (!Number.isSafeInteger(maxBytes) || maxBytes < 1) {
|
|
18
|
+
throw new Error('The Bygone source size limit must be a positive safe integer.');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const sourceLabel = path.resolve(sourcePath);
|
|
22
|
+
let stats;
|
|
23
|
+
let bytes;
|
|
24
|
+
try {
|
|
25
|
+
stats = statSync(sourceLabel);
|
|
26
|
+
if (!stats.isFile()) {
|
|
27
|
+
throw new Error('path is not a regular file');
|
|
28
|
+
}
|
|
29
|
+
if (stats.size > maxBytes) {
|
|
30
|
+
throw new Error(`file is ${stats.size} bytes; limit is ${maxBytes} bytes`);
|
|
31
|
+
}
|
|
32
|
+
bytes = readFileSync(sourceLabel);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
throw new Error(`Could not read Bygone source ${sourceLabel}: ${errorMessage(error)}`, { cause: error });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (bytes.length > maxBytes) {
|
|
38
|
+
throw new Error(`Could not read Bygone source ${sourceLabel}: file is ${bytes.length} bytes; limit is ${maxBytes} bytes`);
|
|
39
|
+
}
|
|
40
|
+
if (bytes.includes(0)) {
|
|
41
|
+
throw new Error(`Could not decode Bygone source ${sourceLabel}: NUL bytes are not allowed.`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
let text;
|
|
45
|
+
try {
|
|
46
|
+
text = new TextDecoder('utf-8', { fatal: true }).decode(bytes);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
throw new Error(`Could not decode Bygone source ${sourceLabel} as UTF-8: ${errorMessage(error)}`, { cause: error });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
let documents;
|
|
52
|
+
try {
|
|
53
|
+
documents = loadYamlDocuments(text);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
throw new Error(`Could not parse Bygone source ${sourceLabel} as YAML: ${errorMessage(error)}`, { cause: error });
|
|
56
|
+
}
|
|
57
|
+
if (documents.length !== 1) {
|
|
58
|
+
throw new Error(`Could not parse Bygone source ${sourceLabel}: expected one YAML document, found ${documents.length}.`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
return parseChangeTourSource(documents[0]);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
throw new Error(`Invalid Bygone source ${sourceLabel}: ${errorMessage(error)}`, { cause: error });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function errorMessage(error) {
|
|
69
|
+
return error instanceof Error ? error.message : String(error);
|
|
70
|
+
}
|
|
71
|
+
|
|
12
72
|
function buildManifestForTourSource(cwd, source, options = {}) {
|
|
13
73
|
return buildChangeTourManifest(cwd, {
|
|
14
74
|
headRef: options.headRef || source.range?.head,
|
|
@@ -21,6 +81,8 @@ function buildManifestForTourSource(cwd, source, options = {}) {
|
|
|
21
81
|
}
|
|
22
82
|
|
|
23
83
|
module.exports = {
|
|
84
|
+
DEFAULT_MAX_TOUR_SOURCE_BYTES,
|
|
24
85
|
buildManifestForTourSource,
|
|
25
|
-
loadTourSource
|
|
86
|
+
loadTourSource,
|
|
87
|
+
readTourSourceDocument
|
|
26
88
|
};
|
package/completions/_bygone
CHANGED
|
@@ -38,7 +38,7 @@ _bygone() {
|
|
|
38
38
|
'--base:Set the branch-review base ref'
|
|
39
39
|
'-m:Set the branch-review base ref'
|
|
40
40
|
'--main:Set the branch-review base ref'
|
|
41
|
-
'--tour:Use an authored
|
|
41
|
+
'--tour:Use an authored .bygone presentation'
|
|
42
42
|
'-h:Show command help'
|
|
43
43
|
'--help:Show command help'
|
|
44
44
|
)
|
|
@@ -58,7 +58,7 @@ _bygone() {
|
|
|
58
58
|
'--help:Show command help'
|
|
59
59
|
)
|
|
60
60
|
shells=('zsh:Z shell' 'bash:Bash' 'fish:Fish shell')
|
|
61
|
-
tour_actions=('context:Build structured change evidence' 'validate:Validate source and anchors' 'compile:Compile a portable manifest' 'schema:Print the source schema')
|
|
61
|
+
tour_actions=('context:Build structured change evidence' 'coverage:Measure authored tour coverage' 'validate:Validate source and anchors' 'compile:Compile a portable manifest' 'schema:Print the source schema')
|
|
62
62
|
|
|
63
63
|
if (( CURRENT == 2 )); then
|
|
64
64
|
_describe 'bygone command' root_items
|
|
@@ -82,8 +82,8 @@ _bygone() {
|
|
|
82
82
|
compadd -- --base --output -o --max-patch-bytes --max-total-patch-bytes
|
|
83
83
|
_bygone_git_refs
|
|
84
84
|
fi
|
|
85
|
-
elif [[ "$words[3]" == "validate" || "$words[3]" == "compile" ]]; then
|
|
86
|
-
_files -g '*.bygone.yaml'
|
|
85
|
+
elif [[ "$words[3]" == "coverage" || "$words[3]" == "validate" || "$words[3]" == "compile" ]]; then
|
|
86
|
+
_files -g '*.bygone' -g '*.bygone.yaml'
|
|
87
87
|
fi
|
|
88
88
|
;;
|
|
89
89
|
review)
|
|
@@ -96,7 +96,7 @@ _bygone() {
|
|
|
96
96
|
;;
|
|
97
97
|
present)
|
|
98
98
|
if [[ "$previous" == (--tour) ]]; then
|
|
99
|
-
_files -g '*.bygone.yaml'
|
|
99
|
+
_files -g '*.bygone' -g '*.bygone.yaml'
|
|
100
100
|
elif [[ "$previous" == (--base|-m|--main) ]]; then
|
|
101
101
|
_bygone_git_refs
|
|
102
102
|
else
|
package/completions/bygone
CHANGED
|
@@ -23,7 +23,7 @@ _bygone() {
|
|
|
23
23
|
;;
|
|
24
24
|
tour)
|
|
25
25
|
if (( COMP_CWORD == 2 )); then
|
|
26
|
-
COMPREPLY=( $(compgen -W 'context validate compile schema' -- "$cur") )
|
|
26
|
+
COMPREPLY=( $(compgen -W 'context coverage validate compile schema' -- "$cur") )
|
|
27
27
|
elif [[ "${COMP_WORDS[2]}" == "context" ]]; then
|
|
28
28
|
refs="$(_bygone_git_refs)"
|
|
29
29
|
if [[ "$prev" =~ ^(--base|-m|--main)$ ]]; then
|
|
@@ -50,7 +50,7 @@ _bygone() {
|
|
|
50
50
|
present)
|
|
51
51
|
refs="$(_bygone_git_refs)"
|
|
52
52
|
if [[ "$prev" == "--tour" ]]; then
|
|
53
|
-
COMPREPLY=( $(compgen -f
|
|
53
|
+
COMPREPLY=( $(compgen -f -- "$cur") )
|
|
54
54
|
compopt -o filenames 2>/dev/null || true
|
|
55
55
|
elif [[ "$prev" =~ ^(--base|-m|--main)$ ]]; then
|
|
56
56
|
COMPREPLY=( $(compgen -W "$refs" -- "$cur") )
|
package/completions/bygone.fish
CHANGED
|
@@ -16,7 +16,7 @@ complete -c bygone -n '__fish_use_subcommand' -l test -d 'Open the built-in test
|
|
|
16
16
|
complete -c bygone -n '__fish_use_subcommand' -s h -l help -d 'Show command help'
|
|
17
17
|
complete -c bygone -n '__fish_use_subcommand' -s v -l version -d 'Show the installed version'
|
|
18
18
|
complete -c bygone -n '__fish_seen_subcommand_from completion' -a 'zsh bash fish' -d 'Shell'
|
|
19
|
-
complete -c bygone -n '__fish_seen_subcommand_from tour' -a 'context validate compile schema' -d 'Tour action'
|
|
19
|
+
complete -c bygone -n '__fish_seen_subcommand_from tour' -a 'context coverage validate compile schema' -d 'Tour action'
|
|
20
20
|
complete -c bygone -n 'string match -q "*tour context*" -- (commandline -opc)' -l base -r -a '(__bygone_git_refs)' -d 'Set the change-context base ref'
|
|
21
21
|
complete -c bygone -n 'string match -q "*tour context*" -- (commandline -opc)' -l output -s o -r -d 'Write the change context'
|
|
22
22
|
complete -c bygone -n 'string match -q "*tour context*" -- (commandline -opc)' -l max-patch-bytes -r -d 'Maximum included patch size per file'
|
|
@@ -27,7 +27,7 @@ complete -c bygone -n 'string match -q "*--history*" -- (commandline -opc)' -l i
|
|
|
27
27
|
complete -c bygone -n '__fish_seen_subcommand_from review' -l base -s m -l main -r -a '(__bygone_git_refs)' -d 'Set the branch-review base ref'
|
|
28
28
|
complete -c bygone -n '__fish_seen_subcommand_from review' -a '(__bygone_git_refs)' -d 'Git ref'
|
|
29
29
|
complete -c bygone -n '__fish_seen_subcommand_from present' -l base -s m -l main -r -a '(__bygone_git_refs)' -d 'Set the branch-review base ref'
|
|
30
|
-
complete -c bygone -n '__fish_seen_subcommand_from present' -l tour -r -d 'Use an authored
|
|
30
|
+
complete -c bygone -n '__fish_seen_subcommand_from present' -l tour -r -d 'Use an authored .bygone presentation'
|
|
31
31
|
complete -c bygone -n '__fish_seen_subcommand_from present' -a '(__bygone_git_refs)' -d 'Git ref'
|
|
32
32
|
complete -c bygone -n 'string match -q "*--branch-diff*" -- (commandline -opc)' -s b -l branch -r -a '(__bygone_git_refs)' -d 'Set the branch-review head ref'
|
|
33
33
|
complete -c bygone -n 'string match -q "*--branch-diff*" -- (commandline -opc)' -l base -s m -l main -r -a '(__bygone_git_refs)' -d 'Set the branch-review base ref'
|
|
@@ -185,7 +185,7 @@ Support deterministic rendering of scenes to PNG, SVG where practical, or HTML f
|
|
|
185
185
|
|
|
186
186
|
### Live PR Tour Guide Loop
|
|
187
187
|
|
|
188
|
-
Treat the saved `.bygone
|
|
188
|
+
Treat the saved `.bygone` as the shared boundary between an author, an agent, and the open presenter. When the author asks a question, the PR Tour Guide can revise the narrative or its evidence links and save the file; Bygone should validate, compile, and refresh the browser without restarting the presentation.
|
|
189
189
|
|
|
190
190
|
The refresh loop should:
|
|
191
191
|
|
|
@@ -1,15 +1,39 @@
|
|
|
1
1
|
# Change tour authoring format
|
|
2
2
|
|
|
3
|
-
A `.bygone
|
|
3
|
+
A `.bygone` file is a UTF-8, single-document YAML source containing the
|
|
4
|
+
human-authored reading order and narrative. It points to code with named
|
|
5
|
+
anchors; it does not store generated hunk indexes or line numbers. The legacy
|
|
6
|
+
`.bygone.yaml` spelling remains supported for editors that depend on a `.yaml`
|
|
7
|
+
suffix, and explicitly supplied files are validated by content rather than
|
|
8
|
+
rejected by extension.
|
|
9
|
+
|
|
10
|
+
An authored source is Git-backed, not portable: resolving refs and anchors
|
|
11
|
+
requires the corresponding local repository and Git objects. A compiled
|
|
12
|
+
`.tour.json` manifest contains the resolved source snapshots and is the
|
|
13
|
+
portable artifact, although those snapshots may contain sensitive code.
|
|
14
|
+
|
|
15
|
+
Packaged macOS builds register `.bygone` with Bygone, allowing a presentation
|
|
16
|
+
inside its repository to open directly from Finder. Windows and Linux builds
|
|
17
|
+
currently do not install an operating-system file association; open the source
|
|
18
|
+
through Bygone or pass it explicitly to `bygone present --tour`. Direct opening
|
|
19
|
+
discovers the repository from the source file's real location, including when
|
|
20
|
+
the selected path is a symbolic link, and reports an error when no containing
|
|
21
|
+
Git worktree can be found.
|
|
4
22
|
|
|
5
23
|
Run it against a committed branch range, or omit the refs when the source file pins its own range:
|
|
6
24
|
|
|
7
25
|
```sh
|
|
8
|
-
bygone present <head> --base <base> --tour path/to/review.bygone
|
|
9
|
-
bygone present --tour path/to/
|
|
26
|
+
bygone present <head> --base <base> --tour path/to/review.bygone
|
|
27
|
+
bygone present --tour path/to/pinned-review.bygone
|
|
10
28
|
```
|
|
11
29
|
|
|
12
|
-
The optional `range`
|
|
30
|
+
The optional `range` pins the source's revisions for reproducibility; explicit
|
|
31
|
+
command-line refs take precedence. Pinned OIDs still require their Git object
|
|
32
|
+
database. The compiler resolves every anchor against the exact merge-base or
|
|
33
|
+
head commit and writes the resulting commit IDs, line ranges, excerpts, file
|
|
34
|
+
contents, and diffs into the portable JSON manifest served by the presenter.
|
|
35
|
+
Compilation fails if an anchor has no match or has multiple matches without an
|
|
36
|
+
explicit `occurrence`.
|
|
13
37
|
|
|
14
38
|
## Structure
|
|
15
39
|
|
|
@@ -57,6 +81,19 @@ chapters:
|
|
|
57
81
|
|
|
58
82
|
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
83
|
|
|
60
|
-
|
|
84
|
+
The presenter search (`Cmd/Ctrl+Shift+F`) can search narrative and code together
|
|
85
|
+
or restrict either scope. Narrative results open the exact scene or step. Code
|
|
86
|
+
results search the compiled base and head snapshots, open the exact file and
|
|
87
|
+
side, and preserve **Return to tour** so exploration does not lose authored
|
|
88
|
+
context.
|
|
89
|
+
|
|
90
|
+
Use a walkthrough by default. Use a [stacked-diff example](../examples/stacked-diff.bygone)
|
|
91
|
+
only when every panel is a real selected Git revision. Use a
|
|
92
|
+
[deconstructed-diff example](../examples/deconstructed-diff.bygone) when
|
|
93
|
+
the teaching order is clearer than the real commit history; its cumulative
|
|
94
|
+
panels are synthetic explanation stages and must never be described as
|
|
95
|
+
commits. Every changed hunk must be assigned once or explicitly excluded.
|
|
96
|
+
|
|
97
|
+
See [Bygone's self-referencing history tour](../examples/bygone-history.bygone) for a complete walkthrough that pins and explains the commit where branch review was introduced.
|
|
61
98
|
|
|
62
99
|
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).
|
package/docs/explore.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Explore with Bygone
|
|
2
|
+
|
|
3
|
+
Explore is the standalone workspace for investigating differences without a
|
|
4
|
+
prescribed reading order.
|
|
5
|
+
|
|
6
|
+
## Start a comparison
|
|
7
|
+
|
|
8
|
+
- **Compare Files…** accepts two or more files. Two files open a side-by-side
|
|
9
|
+
comparison; additional files open the focused multi-panel strip.
|
|
10
|
+
- **Compare Directories…** accepts two or more directories and compares their
|
|
11
|
+
trees.
|
|
12
|
+
- Drag files or directories into the window for the same selection-count
|
|
13
|
+
behavior.
|
|
14
|
+
- Start without paths to get a blank, writable two-panel comparison.
|
|
15
|
+
|
|
16
|
+
Writable filesystem panels are labeled **Writable file**. Git revisions,
|
|
17
|
+
history, tours, and supplied snapshots are labeled **Read-only snapshot**.
|
|
18
|
+
Replace and save operations are unavailable for read-only content.
|
|
19
|
+
|
|
20
|
+
## Ask Git questions
|
|
21
|
+
|
|
22
|
+
- **View File or Directory History…** follows one path through commits and
|
|
23
|
+
supported index/worktree states.
|
|
24
|
+
- **Explore Current Branch Change** compares the branch tip with its merge
|
|
25
|
+
base and shows the complete changed-file inventory.
|
|
26
|
+
- CLI `--git-diff` compares explicit revisions when you already know the refs.
|
|
27
|
+
|
|
28
|
+
Branch exploration uses committed content. Dirty index and worktree changes
|
|
29
|
+
are reported separately and are never silently folded into a commit snapshot.
|
|
30
|
+
|
|
31
|
+
## Navigate and search
|
|
32
|
+
|
|
33
|
+
The focused strip shows an adjacent pair when space permits and one readable
|
|
34
|
+
panel on narrow windows. Use the strip buttons, panel headers, gutters, wheel,
|
|
35
|
+
or `Alt+Left`/`Alt+Right` to change focus.
|
|
36
|
+
|
|
37
|
+
- `Cmd/Ctrl+F` searches the active pane.
|
|
38
|
+
- `Cmd/Ctrl+Shift+F` searches either the panes currently displayed by the strip
|
|
39
|
+
or every loaded panel in the comparison, using the explicit scope selector.
|
|
40
|
+
- `Cmd/Ctrl+H` replaces only in the active writable pane.
|
|
41
|
+
- `Alt+Z` toggles long-line wrapping.
|
|
42
|
+
- `Cmd/Ctrl+R` refreshes sessions whose source can be rebuilt safely.
|
|
43
|
+
|
|
44
|
+
Search results identify the panel and line they came from. In a directory or
|
|
45
|
+
branch session, choose **Current change set** to search changed text files that are not
|
|
46
|
+
currently open; selecting a result opens its comparison and reveals the exact
|
|
47
|
+
side and line.
|
|
48
|
+
|
|
49
|
+
While viewing one file's history, choose **Git history** and then select the
|
|
50
|
+
query meaning: **Content occurrence** finds every revision snapshot containing
|
|
51
|
+
the text, while **Introduction or removal** finds revisions where the number of
|
|
52
|
+
matches changed. Selecting a result opens that exact parent-to-commit comparison.
|
|
53
|
+
|
|
54
|
+
Use **Edit → Search in Files…** for a read-only filesystem search rooted at a
|
|
55
|
+
directory you choose. It supports literal or regular-expression queries,
|
|
56
|
+
case and whole-word matching, include/exclude globs, hidden files, ignore-file
|
|
57
|
+
policy, cancellation, and explicit result limits. It requires ripgrep 14 or
|
|
58
|
+
newer; **Help → Repository Search Status…** reports the detected capability.
|
|
59
|
+
The [search scopes and semantics](./search.md) reference records the different
|
|
60
|
+
engines, options, limits, provenance, and stale-result rules.
|
|
61
|
+
|
|
62
|
+
## Move into Present
|
|
63
|
+
|
|
64
|
+
**Present Current Branch** creates a guided tour of the committed branch range.
|
|
65
|
+
**Open Authored Tour…** opens a checked and compiled `.bygone` narrative in
|
|
66
|
+
its own presentation window, leaving the Explore window available.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Generating change tours with an LLM
|
|
2
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
|
|
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`; Bygone resolves its anchors against pinned commits and rejects missing, ambiguous, or structurally invalid references.
|
|
4
4
|
|
|
5
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
6
|
|
|
@@ -19,18 +19,18 @@ For agents that support repository skills, use the agent-agnostic [`pr-tour-guid
|
|
|
19
19
|
4. Arrange those questions into conceptual chapters rather than filename order.
|
|
20
20
|
5. Attach every walkthrough step to an exact snippet in either the base or head revision.
|
|
21
21
|
6. Add a connection only when it explains a meaningful relationship between two pieces of evidence.
|
|
22
|
-
7. Write the `.bygone
|
|
22
|
+
7. Write the `.bygone` source.
|
|
23
23
|
8. Validate it and repair every reported problem:
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
bygone tour validate review.bygone
|
|
26
|
+
bygone tour validate review.bygone --json
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
9. Compile or present the verified result:
|
|
30
30
|
|
|
31
31
|
```sh
|
|
32
|
-
bygone tour compile review.bygone
|
|
33
|
-
bygone present --tour review.bygone
|
|
32
|
+
bygone tour compile review.bygone --output review.tour.json
|
|
33
|
+
bygone present --tour review.bygone
|
|
34
34
|
```
|
|
35
35
|
|
|
36
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).
|
package/docs/present.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Present changes with Bygone
|
|
2
|
+
|
|
3
|
+
Present is the guided-reading surface. It combines narrative scenes with exact
|
|
4
|
+
source evidence while keeping the complete changed-file set available.
|
|
5
|
+
|
|
6
|
+
## Generated and authored tours
|
|
7
|
+
|
|
8
|
+
- **Present Current Branch** or `bygone present` generates a deterministic
|
|
9
|
+
reading order for the committed merge-base-to-tip range.
|
|
10
|
+
- **Open Authored Tour…** or `bygone present --tour path.bygone` opens a
|
|
11
|
+
narrative whose anchors have been compiled to exact source locations.
|
|
12
|
+
|
|
13
|
+
The Files rail is independent of the narrative. Browsing another file keeps
|
|
14
|
+
the active tour anchor visible and offers **Return to Tour** to restore the
|
|
15
|
+
scene's intended focus.
|
|
16
|
+
|
|
17
|
+
## Read provenance correctly
|
|
18
|
+
|
|
19
|
+
- Normal walkthrough scenes point to exact committed source evidence.
|
|
20
|
+
- A stacked-diff panel represents a real revision and retains its Git identity.
|
|
21
|
+
- A deconstructed-diff panel is an **Explanation stage** assembled from exact
|
|
22
|
+
change units. It is synthetic and must not be described as a real commit.
|
|
23
|
+
|
|
24
|
+
Tour content is read-only. Author or revise the YAML and recompile it rather
|
|
25
|
+
than editing historical or synthetic panels in the presenter.
|
|
26
|
+
|
|
27
|
+
## Authoring workflow
|
|
28
|
+
|
|
29
|
+
Use the CLI or the repository's tour-generation skill:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bygone tour context HEAD --base origin/main
|
|
33
|
+
bygone tour validate tour.bygone --json
|
|
34
|
+
bygone tour compile tour.bygone --output tour.json
|
|
35
|
+
bygone tour schema
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
See [the change tour format](./change-tour-format.md) and
|
|
39
|
+
[LLM-assisted generation](./generating-change-tours.md) for the complete
|
|
40
|
+
contract. Checked-in examples include real stacked revisions and explicitly
|
|
41
|
+
synthetic deconstructed stages.
|