docbridge 0.7.0 → 0.9.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 +111 -1
- package/README.md +55 -372
- package/dist/bin/darwin-arm64/SHA256SUMS +2 -2
- package/dist/bin/darwin-arm64/docbridge-swift-scanner +0 -0
- package/dist/bin/darwin-arm64/docbridge_dart_scanner +0 -0
- package/dist/bin/linux-x64/SHA256SUMS +2 -2
- package/dist/bin/linux-x64/docbridge-swift-scanner +1 -1
- package/dist/bin/linux-x64/docbridge_dart_scanner +0 -0
- package/dist/index.js +2502 -947
- package/docs/README.md +66 -0
- package/docs/user/automation.md +104 -0
- package/docs/user/commands.md +75 -4
- package/docs/user/configuration.md +13 -3
- package/docs/user/getting-started.md +6 -2
- package/docs/user/linking.md +202 -0
- package/docs/user/troubleshooting.md +62 -22
- package/package.json +2 -1
- package/schemas/docbridge.links.schema.json +39 -0
- package/schemas/scanner-worker.schema.json +1 -0
- package/templates/skills/README.md +16 -23
- package/templates/skills/docbridge/SKILL.md +125 -0
- package/docs/user/agent-integration.md +0 -70
- package/docs/user/annotations.md +0 -52
- package/templates/skills/docbridge-adopt/SKILL.md +0 -96
- package/templates/skills/docbridge-annotate/SKILL.md +0 -99
- package/templates/skills/docbridge-link/SKILL.md +0 -80
- package/templates/skills/docbridge-review/SKILL.md +0 -62
- package/templates/skills/docbridge-sync/SKILL.md +0 -68
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docbridge-review
|
|
3
|
-
description: Review all existing DocBridge links for semantic validity. Use after adoption or periodically to find valid-but-wrong links, stale docs, excessive links, or ambiguous docs/code relationships.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# docbridge-review
|
|
7
|
-
|
|
8
|
-
Review the semantic validity of the entire DocBridge graph. This is not a
|
|
9
|
-
change-set or pull-request review. It checks whether valid links actually
|
|
10
|
-
connect a docs section to the code symbol that implements or represents that
|
|
11
|
-
specification.
|
|
12
|
-
|
|
13
|
-
This skill requires `docbridge graph --json --include-content`.
|
|
14
|
-
|
|
15
|
-
## Procedure
|
|
16
|
-
|
|
17
|
-
1. **Build the graph.**
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
docbridge graph --json --include-content
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
If the repository uses a wrapper, use the native invocation instead. Read
|
|
24
|
-
`diagnostics` first. Mechanical failures from `docbridge check` should be
|
|
25
|
-
fixed or acknowledged before relying on semantic findings.
|
|
26
|
-
|
|
27
|
-
2. **Batch by docs file.** Review all links, but process them in batches:
|
|
28
|
-
- docs file is the default batch boundary
|
|
29
|
-
- split a batch further when it contains too many sections or links
|
|
30
|
-
- keep notes so repeated patterns are applied consistently across batches
|
|
31
|
-
|
|
32
|
-
3. **Read both sides.**
|
|
33
|
-
- For docs nodes, use the graph range to read the full Markdown section.
|
|
34
|
-
- For code nodes, start with graph content: JSDoc plus signature. Read the
|
|
35
|
-
implementation only when necessary to judge the relationship.
|
|
36
|
-
- Compare behavior, contract, input/output, constraints, and design intent.
|
|
37
|
-
|
|
38
|
-
4. **Classify findings.**
|
|
39
|
-
- High: clearly wrong link, stale docs fixed in place by a link, or a link
|
|
40
|
-
to a section that is not a specification.
|
|
41
|
-
- Medium: partial overlap, unclear representative symbol, overly broad
|
|
42
|
-
section, or multiple linked symbols with ambiguous roles.
|
|
43
|
-
- Low: cleanup opportunity, duplicate docs, excessive links, or missing
|
|
44
|
-
explanation of why multiple links are needed.
|
|
45
|
-
|
|
46
|
-
5. **Report findings and fixes.** For each finding include:
|
|
47
|
-
- severity
|
|
48
|
-
- doc endpoint and code endpoint
|
|
49
|
-
- evidence from both sides
|
|
50
|
-
- recommended fix
|
|
51
|
-
|
|
52
|
-
Do not edit annotations automatically. If the user approves a fix, use
|
|
53
|
-
`docbridge-link` or `docbridge-annotate` rules to make the change.
|
|
54
|
-
|
|
55
|
-
## Principles
|
|
56
|
-
|
|
57
|
-
- `docbridge check` proves link mechanics; this skill reviews meaning.
|
|
58
|
-
- Do not rubber-stamp links because the target resolves.
|
|
59
|
-
- Do not delete annotations merely to silence uncertainty. Explain the
|
|
60
|
-
uncertainty and ask for a decision.
|
|
61
|
-
- Prefer fewer, clearer links over broad many-to-many links without explicit
|
|
62
|
-
roles.
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docbridge-sync
|
|
3
|
-
description: Triage DocBridge related-gate findings — linked counterparts of changed files that were not themselves updated. Use when a Git hook, CI comment, or docbridge related --gate run flags unchanged counterparts, to judge divergence with docbridge context and then update or justify each one.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# docbridge-sync
|
|
7
|
-
|
|
8
|
-
Resolve `docbridge related --gate` findings. A gate violation means a changed
|
|
9
|
-
file has a linked counterpart that nobody updated — it does **not** mean the
|
|
10
|
-
counterpart must change; it means nobody has decided yet. This skill makes
|
|
11
|
-
that decision explicit, per counterpart.
|
|
12
|
-
|
|
13
|
-
Run DocBridge with the project's native invocation: `docbridge` on `PATH`, a
|
|
14
|
-
repo recipe such as `just related-gate`, or
|
|
15
|
-
`bun run /path/to/docbridge/src/cli/index.ts`.
|
|
16
|
-
|
|
17
|
-
## Procedure
|
|
18
|
-
|
|
19
|
-
1. **Collect the violations.** Use the gate report you were given (a Git
|
|
20
|
-
hook's output, a CI comment), or produce one over the change set:
|
|
21
|
-
|
|
22
|
-
```sh
|
|
23
|
-
git diff --name-only HEAD | docbridge related --stdin --gate
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Each violation names a changed endpoint and its unchanged counterpart
|
|
27
|
-
endpoint.
|
|
28
|
-
|
|
29
|
-
2. **Fetch the counterpart content.** If the report did not include it, run
|
|
30
|
-
the context command over the changed files; its output is the counterparts'
|
|
31
|
-
content:
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
git diff --name-only HEAD | docbridge context --stdin
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Read the block for each flagged counterpart: the full spec section for a
|
|
38
|
-
doc counterpart, the full declaration including JSDoc for a code one.
|
|
39
|
-
|
|
40
|
-
3. **Judge divergence, per counterpart.** Compare what the counterpart says
|
|
41
|
-
with what the change did:
|
|
42
|
-
- Behavior, contract, format, or constraint described by the counterpart no
|
|
43
|
-
longer matches → **update the counterpart** in the same change set.
|
|
44
|
-
- The change is internal (refactoring, comments, test-only, formatting) and
|
|
45
|
-
every documented statement still holds → **no update**, with a written
|
|
46
|
-
justification.
|
|
47
|
-
- The link itself is wrong (points at the wrong section or symbol) → fix
|
|
48
|
-
the annotation pair instead; follow the `docbridge-annotate` skill.
|
|
49
|
-
|
|
50
|
-
4. **Re-run the gate** after updates. Counterparts you edited leave the
|
|
51
|
-
violation list; what remains must be covered by justifications.
|
|
52
|
-
|
|
53
|
-
5. **Report every decision.** In the final response (and the PR description
|
|
54
|
-
when one exists), list each flagged counterpart with either the update made
|
|
55
|
-
or the justification. A justification must reference the counterpart's
|
|
56
|
-
actual content ("the section documents the exit codes, which this change
|
|
57
|
-
does not alter"), not just assert irrelevance.
|
|
58
|
-
|
|
59
|
-
## Principles
|
|
60
|
-
|
|
61
|
-
- Never silence a violation by deleting or rewriting annotations to detach
|
|
62
|
-
the link; that defeats the graph the gate protects.
|
|
63
|
-
- Do not rubber-stamp: if the counterpart content was not read, the judgment
|
|
64
|
-
has no basis.
|
|
65
|
-
- Updating a spec section to match changed code is a _decision about the
|
|
66
|
-
contract_, not bookkeeping — when the change contradicts an explicit
|
|
67
|
-
documented promise, surface it to the user instead of quietly rewriting the
|
|
68
|
-
promise.
|