docbridge 0.4.0 → 0.5.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 CHANGED
@@ -7,11 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.4.0] - 2026-06-18
10
+ ## [0.5.0] - 2026-07-05
11
11
 
12
12
  ### Added
13
13
 
14
- - npm distribution support for the Bun-only `speclink` package, including
14
+ - VS Code-compatible extension packaging and manual publishing support:
15
+ release VSIX generation, VSIX verification, Marketplace/Open VSX publish
16
+ commands, Swift/Dart document activation, and bundled `docbridge lsp`
17
+ startup from the extension package.
18
+
19
+ ### Fixed
20
+
21
+ - The release publish workflow now restores executable bits on downloaded
22
+ Swift and Dart scanner artifacts before packing the npm tarball, and
23
+ smoke-tests the installed tarball before publishing.
24
+
25
+ ### Changed
26
+
27
+ - Clarified the current editor delivery state in the English and Japanese
28
+ READMEs, including local VSIX installation and the remaining first-publication
29
+ work for VS Code Marketplace and Open VSX.
30
+
31
+ ## [0.4.1] - 2026-06-21
32
+
33
+ ### Added
34
+
35
+ - `docbridge init` for CLI-driven first-time setup: repository scope discovery,
36
+ safe `docbridge.config.json` creation, and DocBridge agent skill installation.
37
+ - `docbridge init-with-agent` for agent-guided adoption: installs
38
+ `docbridge-adopt` and prints one-shot setup commands without launching an
39
+ agent process.
40
+ - `docbridge-adopt` now installs the companion DocBridge skills after adoption
41
+ scope is confirmed.
42
+
43
+ ## [0.4.0] - 2026-06-20
44
+
45
+ ### Added
46
+
47
+ - npm distribution support for the Bun-only `docbridge` package, including
15
48
  `dist/index.js` as the package binary, a runtime package allowlist, dist
16
49
  verification, packed-package smoke testing, and release workflow publishing.
17
50
  - Platform-staged Swift and Dart scanner binary layout under
@@ -28,21 +61,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
28
61
  - Worker-backed scanner protocol foundation for Swift and Dart adapters,
29
62
  including stdin/stdout JSON invocation and scanner availability/failure
30
63
  diagnostics.
31
- - `speclink graph`: prints the resolved link graph as human-readable output or
64
+ - `docbridge graph`: prints the resolved link graph as human-readable output or
32
65
  as JSON following `schemas/graph-output.schema.json`, including resolvable
33
66
  one-way links, pair completeness, optional lightweight node content, and
34
67
  diagnostics that do not prevent graph construction.
35
- - Distributable adoption skills under `templates/skills/`: `speclink-adopt`
36
- for existing-project setup, `speclink-link` for docs-first annotation
37
- candidate confirmation, and `speclink-review` for whole-graph semantic
38
- review using `speclink graph --json --include-content`.
68
+ - Distributable adoption skills under `templates/skills/`: `docbridge-adopt`
69
+ for existing-project setup, `docbridge-link` for docs-first annotation
70
+ candidate confirmation, and `docbridge-review` for whole-graph semantic
71
+ review using `docbridge graph --json --include-content`.
39
72
 
40
73
  ### Changed
41
74
 
42
- - `speclink context` and `speclink graph --json` now carry code language
75
+ - The project, package, command, configuration file, templates, and repository
76
+ URLs were renamed from SpecLink/`speclink` to DocBridge/`docbridge`.
77
+ - `docbridge context` and `docbridge graph --json` now carry code language
43
78
  metadata for code blocks/nodes so Swift endpoints render and serialize as
44
79
  Swift.
45
- - SpecLink's distributable skills are now dogfooded from `.agents/skills/` and
80
+ - DocBridge's distributable skills are now dogfooded from `.agents/skills/` and
46
81
  `.claude/skills/` as symlinks to the canonical `templates/skills/` entries.
47
82
  - TypeScript scanner endpoints now include `signatureRange` in addition to the
48
83
  existing full `declarationRange`, allowing graph consumers to read the
@@ -135,7 +170,9 @@ Initial release of the SpecLink CLI.
135
170
  - `speclink check` command with `--root`, `--json`, and `--audit` options.
136
171
  - `speclink --version` (alias `-v`) and `speclink --help` (alias `-h`).
137
172
 
138
- [Unreleased]: https://github.com/salan70/docbridge/compare/v0.4.0...HEAD
173
+ [Unreleased]: https://github.com/salan70/docbridge/compare/v0.5.0...HEAD
174
+ [0.5.0]: https://github.com/salan70/docbridge/releases/tag/v0.5.0
175
+ [0.4.1]: https://github.com/salan70/docbridge/releases/tag/v0.4.1
139
176
  [0.4.0]: https://github.com/salan70/docbridge/releases/tag/v0.4.0
140
177
  [0.3.0]: https://github.com/salan70/docbridge/releases/tag/v0.3.0
141
178
  [0.2.0]: https://github.com/salan70/docbridge/releases/tag/v0.2.0
package/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # DocBridge
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/docbridge.svg)](https://www.npmjs.com/package/docbridge)
3
4
  [![Japanese README](https://img.shields.io/badge/README-%E6%97%A5%E6%9C%AC%E8%AA%9E-blue)](docs/ja/README.md)
4
5
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/salan70/docbridge)
5
6
 
@@ -10,99 +11,49 @@ and Markdown documentation, enabling LSP-like experiences such as Hover,
10
11
  Definition, References, and Diagnostics across implementation and specification
11
12
  files.
12
13
 
13
- ## Motivation
14
-
15
- Modern software projects often suffer from a gap between implementation and documentation:
16
-
17
- - Code changes without documentation updates
18
- - Documentation changes without implementation updates
19
- - Difficulty finding which specifications relate to a given implementation
20
- - Difficulty finding which implementation relates to a given specification
21
- - AI coding agents missing relevant context during code modifications
22
-
23
- DocBridge makes relationships between code and documentation explicit, navigable, and machine-readable.
24
-
25
- ## Concept
14
+ ## Installation
26
15
 
27
- Traditional documentation tools often focus on one direction:
16
+ DocBridge is distributed as the `docbridge` npm package and is intended to run
17
+ with Bun:
28
18
 
29
- ```text
30
- Code -> Documentation
19
+ ```sh
20
+ bunx docbridge check
31
21
  ```
32
22
 
33
- DocBridge focuses on both directions:
34
-
35
- ```text
36
- Code <-> Documentation
37
- ```
23
+ The current release is
24
+ [v0.5.0](https://github.com/salan70/docbridge/releases/tag/v0.5.0), published
25
+ as `docbridge@0.5.0` on npm.
38
26
 
39
- DocBridge links supported code declarations to Markdown sections. TypeScript is
40
- scanned in-process; Swift and Dart are scanned through bundled first-party
41
- worker packages.
27
+ The npm package is Bun-only; Node.js runtime compatibility is not part of the
28
+ initial distribution. The package includes prebuilt Swift and Dart scanner
29
+ binaries for `darwin-arm64` and `linux-x64`. TypeScript and Markdown checks run
30
+ without scanner binaries. Configured Swift or Dart projects on unsupported
31
+ platforms report `code_scanner_unavailable` and name the supported platform
32
+ keys.
42
33
 
43
- ## Example
34
+ ## Quick Start
44
35
 
45
- TypeScript:
36
+ Run first-time setup in the project root:
46
37
 
47
- ```ts
48
- /**
49
- * @doc docs/auth.md#login-spec
50
- */
51
- export async function login() {
52
- // ...
53
- }
38
+ ```sh
39
+ bunx docbridge init
54
40
  ```
55
41
 
56
- Markdown:
57
-
58
- ```md
59
- <!-- @code src/auth/login.ts#login -->
60
- ## Login Spec
42
+ For agent-guided adoption, install `docbridge-adopt` and print setup commands.
43
+ The `docbridge-adopt` skill finishes adoption and installs the remaining
44
+ DocBridge skills after scope is confirmed:
61
45
 
62
- Login flow specification.
46
+ ```sh
47
+ bunx docbridge init-with-agent
63
48
  ```
64
49
 
65
- Swift and Dart use the same `@doc` and `@code` model. Their code fragments are
66
- the scanner-produced canonical IDs, so members are type-qualified:
67
-
68
- ```swift
69
- /// @doc docs/auth.md#login-spec
70
- public struct AuthService {
71
- public func login(email: String, password: String) {}
72
- }
73
- ```
50
+ Preview planned file operations without writing:
74
51
 
75
- ```md
76
- <!-- @code Sources/AuthService.swift#AuthService.login(email:password:) -->
77
- ## Login Spec
52
+ ```sh
53
+ bunx docbridge init --dry-run
78
54
  ```
79
55
 
80
- ## Scope
81
-
82
- DocBridge recognizes the following elements.
83
-
84
- Supported code declarations:
85
-
86
- - TypeScript top-level exported declarations: `function`, `class`,
87
- `abstract class`, `interface`, `type`, `const`, `enum`, and supported
88
- `declare` / named default forms
89
- - Swift public/open declarations and configured internal declarations:
90
- top-level and member types, functions, variables, constants, initializers,
91
- and extension members
92
- - Dart public declarations: top-level functions/variables, classes, enums,
93
- mixins, constructors, fields, accessors, methods, and extension members
94
-
95
- Supported Markdown elements:
96
-
97
- - ATX headings
98
- - HTML comments
99
- - `@code` annotations attached to the next heading
100
-
101
- Projects must define scan targets in `docbridge.config.json`. There is no
102
- implicit default configuration; when the config file is missing, DocBridge
103
- reports `config_file_invalid` and does not scan project files.
104
-
105
- Minimal TypeScript configuration:
56
+ You can also create `docbridge.config.json` manually:
106
57
 
107
58
  ```json
108
59
  {
@@ -117,66 +68,56 @@ Minimal TypeScript configuration:
117
68
  }
118
69
  ```
119
70
 
120
- Multilanguage configuration is language-keyed. The old `include.code` array
121
- shape is intentionally invalid; migrate it to a `typescript` entry:
71
+ Link an exported TypeScript declaration to a Markdown section:
122
72
 
123
- ```json
124
- {
125
- "include": {
126
- "code": {
127
- "typescript": { "patterns": ["src/**/*.ts"] },
128
- "swift": { "patterns": ["Sources/**/*.swift"] },
129
- "dart": { "patterns": ["lib/**/*.dart"] }
130
- },
131
- "docs": ["docs/**/*.md"]
132
- }
73
+ ```ts
74
+ /**
75
+ * @doc docs/auth.md#login-spec
76
+ */
77
+ export async function login() {
78
+ // ...
133
79
  }
134
80
  ```
135
81
 
136
- Swift and Dart projects must build their scanner workers in source checkouts
137
- before checking those languages. Run `just build-swift-scanner` for Swift and
138
- `just build-dart-scanner` for Dart, or use the native test recipes below.
82
+ Add the backlink in the Markdown file:
139
83
 
140
- ## Installation
84
+ ```md
85
+ <!-- @code src/auth/login.ts#login -->
86
+ ## Login Spec
141
87
 
142
- DocBridge is distributed as the `docbridge` npm package and is intended to run
143
- with Bun:
88
+ Login flow specification.
89
+ ```
90
+
91
+ Check the project:
144
92
 
145
93
  ```sh
146
94
  bunx docbridge check
147
95
  ```
148
96
 
149
- The npm package is Bun-only; Node.js runtime compatibility is not part of the
150
- initial distribution. The package includes prebuilt Swift and Dart scanner
151
- binaries for `darwin-arm64` and `linux-x64`. TypeScript and Markdown checks run
152
- without scanner binaries. Configured Swift or Dart projects on unsupported
153
- platforms report `code_scanner_unavailable` and name the supported platform
154
- keys.
155
-
156
- ## CLI
97
+ ## Usage
157
98
 
158
99
  Check links:
159
100
 
160
101
  ```sh
161
- just check
102
+ bunx docbridge check
162
103
  ```
163
104
 
164
- Check another root:
105
+ Check another project root:
165
106
 
166
107
  ```sh
167
- just check-example
108
+ bunx docbridge check --root examples/typescript
168
109
  ```
169
110
 
170
111
  Emit JSON:
171
112
 
172
113
  ```sh
173
- just check-example-json
114
+ bunx docbridge check --json
174
115
  ```
175
116
 
176
117
  Run audit diagnostics:
177
118
 
178
119
  ```sh
179
- just audit
120
+ bunx docbridge check --audit
180
121
  ```
181
122
 
182
123
  Audit diagnostics include:
@@ -186,21 +127,20 @@ Audit diagnostics include:
186
127
  List the linked counterparts of changed files:
187
128
 
188
129
  ```sh
189
- git diff --name-only | docbridge related --stdin
130
+ git diff --name-only | bunx docbridge related --stdin
190
131
  ```
191
132
 
192
133
  `docbridge related` is informational: it reports each counterpart and whether it
193
134
  is itself in the change set, and always exits `0` on success. Changed files can
194
135
  also be passed as positional arguments. Add `--gate` to report only the
195
136
  counterparts that are not themselves in the change set and exit `1` when any
196
- exist; `just related-gate` runs this over uncommitted changes. Both modes
197
- support `--root` and `--json`. See [docs/specs/cli.md](docs/specs/cli.md) for
198
- details.
137
+ exist. Both modes support `--root` and `--json`. See
138
+ [docs/specs/cli.md](docs/specs/cli.md) for details.
199
139
 
200
140
  Print the content of the linked counterparts of changed files:
201
141
 
202
142
  ```sh
203
- git diff --name-only | docbridge context --stdin
143
+ git diff --name-only | bunx docbridge context --stdin
204
144
  ```
205
145
 
206
146
  `docbridge context` answers "what do the linked counterparts say": full
@@ -214,14 +154,121 @@ tree has broken links. See [docs/specs/cli.md](docs/specs/cli.md) for details.
214
154
  Inspect the resolved link graph:
215
155
 
216
156
  ```sh
217
- docbridge graph
218
- docbridge graph --json --include-content
157
+ bunx docbridge graph
158
+ bunx docbridge graph --json --include-content
219
159
  ```
220
160
 
221
161
  `docbridge graph` prints the resolved endpoint graph, including resolvable
222
162
  one-way links. JSON output follows
223
163
  [schemas/graph-output.schema.json](schemas/graph-output.schema.json).
224
164
 
165
+ ## Why DocBridge
166
+
167
+ Modern software projects often suffer from a gap between implementation and
168
+ documentation:
169
+
170
+ - Code changes without documentation updates
171
+ - Documentation changes without implementation updates
172
+ - Difficulty finding which specifications relate to a given implementation
173
+ - Difficulty finding which implementation relates to a given specification
174
+ - AI coding agents missing relevant context during code modifications
175
+
176
+ DocBridge makes relationships between code and documentation explicit,
177
+ navigable, and machine-readable.
178
+
179
+ ## Concept
180
+
181
+ Traditional documentation tools often focus on one direction:
182
+
183
+ ```text
184
+ Code -> Documentation
185
+ ```
186
+
187
+ DocBridge focuses on both directions:
188
+
189
+ ```text
190
+ Code <-> Documentation
191
+ ```
192
+
193
+ DocBridge links supported code declarations to Markdown sections. TypeScript is
194
+ scanned in-process; Swift and Dart are scanned through bundled first-party
195
+ worker packages.
196
+
197
+ ## Supported Inputs
198
+
199
+ DocBridge recognizes the following elements.
200
+
201
+ Supported code declarations:
202
+
203
+ - TypeScript top-level exported declarations: `function`, `class`,
204
+ `abstract class`, `interface`, `type`, `const`, `enum`, and supported
205
+ `declare` / named default forms
206
+ - Swift public/open declarations and configured internal declarations:
207
+ top-level and member types, functions, variables, constants, initializers,
208
+ and extension members
209
+ - Dart public declarations: top-level functions/variables, classes, enums,
210
+ mixins, constructors, fields, accessors, methods, and extension members
211
+
212
+ Supported Markdown elements:
213
+
214
+ - ATX headings
215
+ - HTML comments
216
+ - `@code` annotations attached to the next heading
217
+
218
+ Swift and Dart use the same `@doc` and `@code` model. Their code fragments are
219
+ the scanner-produced canonical IDs, so members are type-qualified:
220
+
221
+ ```swift
222
+ /// @doc docs/auth.md#login-spec
223
+ public struct AuthService {
224
+ public func login(email: String, password: String) {}
225
+ }
226
+ ```
227
+
228
+ ```md
229
+ <!-- @code Sources/AuthService.swift#AuthService.login(email:password:) -->
230
+ ## Login Spec
231
+ ```
232
+
233
+ Projects must define scan targets in `docbridge.config.json`. There is no
234
+ implicit default configuration; when the config file is missing, DocBridge
235
+ reports `config_file_invalid` and does not scan project files.
236
+
237
+ Minimal TypeScript configuration:
238
+
239
+ ```json
240
+ {
241
+ "include": {
242
+ "code": {
243
+ "typescript": {
244
+ "patterns": ["src/**/*.ts"]
245
+ }
246
+ },
247
+ "docs": ["docs/**/*.md"]
248
+ }
249
+ }
250
+ ```
251
+
252
+ Multilanguage configuration is language-keyed. The old `include.code` array
253
+ shape is intentionally invalid; migrate it to a `typescript` entry:
254
+
255
+ ```json
256
+ {
257
+ "include": {
258
+ "code": {
259
+ "typescript": { "patterns": ["src/**/*.ts"] },
260
+ "swift": { "patterns": ["Sources/**/*.swift"] },
261
+ "dart": { "patterns": ["lib/**/*.dart"] }
262
+ },
263
+ "docs": ["docs/**/*.md"]
264
+ }
265
+ }
266
+ ```
267
+
268
+ Swift and Dart projects must build their scanner workers in source checkouts
269
+ before checking those languages. Run `just build-swift-scanner` for Swift and
270
+ `just build-dart-scanner` for Dart, or use the native test recipes below.
271
+
225
272
  ## AI agent integration
226
273
 
227
274
  DocBridge's link graph is built to be consumed by AI coding agents:
@@ -231,7 +278,9 @@ DocBridge's link graph is built to be consumed by AI coding agents:
231
278
  with `docbridge related --gate`, and PR reporting.
232
279
  - [examples/hooks](examples/hooks) — copyable agent hook scripts implementing
233
280
  those recipes.
234
- - [templates/skills](templates/skills) — distributable agent skills:
281
+ - [templates/skills](templates/skills) — distributable agent skills installed by
282
+ `docbridge init`; `docbridge init-with-agent` installs `docbridge-adopt`
283
+ first, then `docbridge-adopt` installs the companion skills:
235
284
  `docbridge-annotate`, `docbridge-sync`, `docbridge-adopt`, `docbridge-link`,
236
285
  and `docbridge-review`.
237
286
 
@@ -251,9 +300,25 @@ Definition, and References across linked code and Markdown. It takes no
251
300
  options; the project root comes from the editor's `initialize` request.
252
301
  `docbridge check` is unchanged.
253
302
 
254
- A minimal VS Code-compatible client lives in [editors/vscode](editors/vscode);
255
- see its README to install it into VS Code or Cursor for local testing. Full
256
- behavior is specified in [docs/specs/lsp.md](docs/specs/lsp.md).
303
+ A VS Code-compatible extension lives in [editors/vscode](editors/vscode). It
304
+ packages the language server into a VSIX for VS Code and Cursor. The extension
305
+ has not yet been published to VS Code Marketplace or Open VSX. Until the first
306
+ registry publication, stage the supported `dist/bin/darwin-arm64` and
307
+ `dist/bin/linux-x64` scanner artifacts, then build and install the VSIX
308
+ locally:
309
+
310
+ ```sh
311
+ just package-vsix
312
+ just verify-vsix
313
+ ```
314
+
315
+ Install the generated file from `editors/vscode/.tmp/out/` with **Extensions:
316
+ Install from VSIX...** in VS Code or Cursor. The first Marketplace and Open VSX
317
+ publication is intentionally manual; the repository provides publish commands
318
+ for that release process. Zed integration is tracked separately and is not yet
319
+ implemented. MCP delivery is out of scope until a concrete consumer requires a
320
+ long-lived tool server. Full LSP behavior is specified in
321
+ [docs/specs/lsp.md](docs/specs/lsp.md).
257
322
 
258
323
  ## Diagnostics
259
324
 
@@ -404,14 +469,15 @@ inside their worker packages.
404
469
 
405
470
  ## Roadmap
406
471
 
407
- Completed v0.1–v0.3 capabilities are documented above and in
408
- [CHANGELOG.md](CHANGELOG.md). The current roadmap tracks upcoming work only.
472
+ Completed v0.1–v0.5 capabilities are documented above and in
473
+ [CHANGELOG.md](CHANGELOG.md).
409
474
 
410
- v0.5:
475
+ Remaining editor delivery work:
411
476
 
412
- - MCP server exposing the link graph and `docbridge context` output as tools
413
- - Editor and agent delivery channels built on it (Claude Code, Cursor, Zed,
414
- Codex)
477
+ - Publish the first verified VSIX to VS Code Marketplace and Open VSX
478
+ - Follow-up automation for GitHub Release VSIX attachment and registry
479
+ publishing after the manual flow is proven
480
+ - Add a separate Zed integration path
415
481
 
416
482
  ## Vision
417
483
 
@@ -1,2 +1,2 @@
1
- 4e8638f664e3cb08e36146dd03097d1dfe1c35be39b79219c6d633ea07e7742f speclink-swift-scanner
2
- ef5e2d41194493de9f3cea22bc8f268c35bbd0f69ff63e275e303b6476b658a1 speclink_dart_scanner
1
+ 399b29c29ad2878ca2a2c44b8a3b0685340bfd491b47ae9dcda7fda441e27ef4 speclink-swift-scanner
2
+ a93886519edfd9a7f9aa83d627cc62a6141cd57675bbd554c41e567ce7105d11 speclink_dart_scanner
@@ -1,2 +1,2 @@
1
- 4100cc8c861a24821fca240c758ba188a42f677a403fe40a76bac4271a918bfe speclink-swift-scanner
1
+ a0994f4ffe305736e5c7263c3220fa23d2f5b74b7288a965f5e69d5d763c2381 speclink-swift-scanner
2
2
  2145eac2afd09696ced849e0196a2557d6f7041224f13da1d5ef21c552ecf7bc speclink_dart_scanner
File without changes