@agentskit/doc-bridge 1.1.1 → 1.2.3
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 +39 -1
- package/CONTRIBUTING.md +1 -0
- package/README.md +42 -11
- package/action.yml +27 -23
- package/dist/cli/program.js +18 -5
- package/dist/cli/program.js.map +1 -1
- package/dist/index.d.ts +39 -2
- package/dist/index.js +46 -5
- package/dist/index.js.map +1 -1
- package/docs/DOGFOOD-ROUND2.md +5 -0
- package/docs/DOGFOOD-ROUND3.md +5 -0
- package/docs/DOGFOOD-V1.md +5 -0
- package/docs/DOGFOOD.md +5 -0
- package/docs/MARKETPLACE-ECOSYSTEM-PLAN.md +16 -0
- package/docs/MARKETPLACE.md +45 -0
- package/docs/POSITIONING.md +17 -1
- package/docs/RELEASE.md +19 -10
- package/docs/agent-corpus/INDEX.md +10 -0
- package/docs/agent-corpus/OVERVIEW.md +9 -0
- package/docs/agent-corpus/chat.md +10 -0
- package/docs/agent-corpus/cli.md +10 -0
- package/docs/agent-corpus/conformance.md +10 -0
- package/docs/agent-corpus/doc-bridge.md +10 -0
- package/docs/agent-corpus/doctor.md +10 -0
- package/docs/agent-corpus/gates.md +10 -0
- package/docs/agent-corpus/mcp.md +10 -0
- package/docs/agent-corpus/memory.md +10 -0
- package/docs/agent-corpus/query.md +10 -0
- package/docs/chat-and-rag.md +34 -0
- package/docs/examples.md +14 -1
- package/docs/for-agents.md +39 -0
- package/docs/getting-started.md +15 -0
- package/docs/guides/cli-map.md +153 -0
- package/docs/guides/gate-ci.md +64 -0
- package/docs/guides/index-and-query.md +75 -0
- package/docs/guides/install-and-run.md +84 -0
- package/docs/guides/mcp-agents.md +63 -0
- package/docs/guides/memory-pipeline.md +105 -0
- package/docs/guides/meta.json +11 -0
- package/docs/index.md +58 -0
- package/docs/landing/index.html +1 -1
- package/docs/mcp.md +14 -0
- package/docs/meta.json +26 -0
- package/docs/ollama-demo.md +6 -1
- package/docs/playbook/doc-bridge-pattern.md +4 -2
- package/docs/query.md +58 -0
- package/docs/recipes/index-pipeline.md +6 -1
- package/docs/schemas/agent-handoff-v1.md +5 -0
- package/docs/schemas/doc-bridge-index-v1.md +5 -0
- package/docs/schemas/memory-candidate-v1.md +5 -0
- package/docs/skills/doc-bridge.md +6 -1
- package/docs/spec/cli.md +5 -0
- package/docs/spec/config-v1.md +5 -0
- package/docs/spec/documentation-standard-v1.md +5 -0
- package/docs/spec/playbook-feedback.md +5 -0
- package/docs/spec/registry-agents.md +5 -0
- package/ecosystem-claims.json +2 -2
- package/ecosystem-upstream.json +2 -2
- package/ecosystem.json +122 -40
- package/examples/verify-handoff.mjs +5 -0
- package/package.json +40 -6
- package/src/conformance/ecosystem-contract.ts +22 -3
- package/src/federation/ecosystem-llms.ts +67 -0
- package/src/index.ts +6 -0
- package/src/playbook/doc-bridge-pattern.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Index and query
|
|
3
|
+
description: Build a deterministic index and resolve ownership handoffs without calling a model.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Index and query
|
|
7
|
+
|
|
8
|
+
Layer 0 is **offline and deterministic**. Indexing scans your corpus; querying never re-scans and never calls a model.
|
|
9
|
+
|
|
10
|
+
## Index
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
ak-docs index
|
|
14
|
+
ak-docs index --watch # rebuild on doc changes
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Outputs (defaults):
|
|
18
|
+
|
|
19
|
+
| Path | Role |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| `.doc-bridge/index.json` | Machine index (DocBridgeIndex v1) |
|
|
22
|
+
| `llms.txt` | Concise agent discovery surface |
|
|
23
|
+
| `.doc-bridge/capabilities.json` | Capability map for MCP / tools |
|
|
24
|
+
|
|
25
|
+
After ownership or corpus changes, **always re-index** (or gate in CI will fail).
|
|
26
|
+
|
|
27
|
+
## Query ownership
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
ak-docs query package <id> --agent
|
|
31
|
+
ak-docs query ownership <id> --agent
|
|
32
|
+
ak-docs query package <id> --text # human-readable
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`--agent` returns validated **AgentHandoff** JSON:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"startHere": "docs/for-agents/packages/auth.md",
|
|
40
|
+
"editRoots": ["packages/auth"],
|
|
41
|
+
"checks": ["pnpm test --filter auth"],
|
|
42
|
+
"humanDoc": "docs/guides/auth.md"
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use this **before** an agent edits code. The model should not invent ownership from the full monorepo dump.
|
|
47
|
+
|
|
48
|
+
## Search and ask (local)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
ak-docs list packages --text
|
|
52
|
+
ak-docs ask "where is authentication?"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`ask` stays on the deterministic plane when a known match exists. Only unresolved questions should escalate to optional backend/RAG (see [Chat and RAG](../chat-and-rag.md)).
|
|
56
|
+
|
|
57
|
+
## Agent workflow
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
resolve ownership → read startHere → edit only editRoots → run checks
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
1. `ak-docs query ownership <module> --agent`
|
|
64
|
+
2. Open `startHere` / `readBeforeEditing`
|
|
65
|
+
3. Edit paths under `editRoots` only
|
|
66
|
+
4. Run every command in `checks`
|
|
67
|
+
5. Promote durable learnings via memory pipeline when ready
|
|
68
|
+
|
|
69
|
+
## Related
|
|
70
|
+
|
|
71
|
+
- [Install and run](./install-and-run.md)
|
|
72
|
+
- [For agents](../for-agents.md)
|
|
73
|
+
- [MCP](./mcp-agents.md)
|
|
74
|
+
- [AgentHandoff schema](../schemas/agent-handoff-v1.md)
|
|
75
|
+
- [CLI reference](../spec/cli.md)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Install and run
|
|
3
|
+
description: Install Doc Bridge, run the demo, and index your repository in minutes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Install and run
|
|
7
|
+
|
|
8
|
+
Get a deterministic AgentHandoff from your own docs — no API key required for Layer 0.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pnpm add -D @agentskit/doc-bridge
|
|
14
|
+
# or
|
|
15
|
+
npm i -D @agentskit/doc-bridge
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
CLI binary: **`ak-docs`**.
|
|
19
|
+
|
|
20
|
+
## Prove it in 60 seconds (no project setup)
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx ak-docs demo --text
|
|
24
|
+
npx ak-docs demo --fixture monorepo --text
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
You should see handoffs, a gate red→green path, and an MCP install snippet.
|
|
28
|
+
|
|
29
|
+
## Two-minute path on your repo
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
cd your-repo
|
|
33
|
+
ak-docs init # config + optional demo ownership + AGENTS.md tip
|
|
34
|
+
ak-docs index # build .doc-bridge/index.json
|
|
35
|
+
ak-docs query package example --agent
|
|
36
|
+
ak-docs doctor --text
|
|
37
|
+
ak-docs gate run
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Expected handoff fields:
|
|
41
|
+
|
|
42
|
+
| Field | Meaning |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `startHere` | What the agent reads first |
|
|
45
|
+
| `editRoots` | Where edits are allowed |
|
|
46
|
+
| `checks` | Commands that prove the change |
|
|
47
|
+
| `humanDoc` | Human guide for the same ownership |
|
|
48
|
+
|
|
49
|
+
## Minimal config
|
|
50
|
+
|
|
51
|
+
`doc-bridge.config.json`:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"schemaVersion": 1,
|
|
56
|
+
"corpus": {
|
|
57
|
+
"agent": { "root": "docs/for-agents" }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Required:** `schemaVersion: 1` and `corpus.agent.root`.
|
|
63
|
+
|
|
64
|
+
Ownership comes from (first match wins):
|
|
65
|
+
|
|
66
|
+
1. `routing.options.ownership` in config
|
|
67
|
+
2. Frontmatter on agent docs (`package`, `editRoot`, `checks`)
|
|
68
|
+
3. Monorepo plugin discovery (`pnpm-monorepo`)
|
|
69
|
+
|
|
70
|
+
## Dev loop
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
ak-docs index --watch
|
|
74
|
+
ak-docs list packages --text
|
|
75
|
+
ak-docs ask "where do I change auth?"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Related
|
|
79
|
+
|
|
80
|
+
- [Index and query](./index-and-query.md) — resolve ownership deterministically
|
|
81
|
+
- [Gate and CI](./gate-ci.md) — fail stale context in PRs
|
|
82
|
+
- [MCP for agents](./mcp-agents.md) — wire Cursor / Claude / Codex
|
|
83
|
+
- [Config reference](../spec/config-v1.md)
|
|
84
|
+
- [Examples](../examples.md)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MCP for agents
|
|
3
|
+
description: Expose Doc Bridge handoffs to Cursor, Claude Desktop, and other MCP clients.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# MCP for agents
|
|
7
|
+
|
|
8
|
+
Doc Bridge MCP tools return the **same deterministic handoffs** as the CLI — ownership, start files, edit roots, and checks.
|
|
9
|
+
|
|
10
|
+
## One-command install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
ak-docs mcp install --cursor # writes .cursor/mcp.json
|
|
14
|
+
ak-docs mcp install --claude # merges Claude Desktop config (macOS)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Then index your repo:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
ak-docs index
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Optional skill text: [skills/doc-bridge.md](../skills/doc-bridge.md)
|
|
24
|
+
|
|
25
|
+
## Manual config
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"ak-docs": {
|
|
31
|
+
"command": "npx",
|
|
32
|
+
"args": ["ak-docs", "mcp"],
|
|
33
|
+
"cwd": "/absolute/path/to/your/repo"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Run MCP from the **repository root** (or ensure config discovery resolves there).
|
|
40
|
+
|
|
41
|
+
## Tools
|
|
42
|
+
|
|
43
|
+
| Tool | Purpose |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `handoff.resolve` | Package / ownership → AgentHandoff |
|
|
46
|
+
| Search / list tools | Discover modules and docs without dumping the tree |
|
|
47
|
+
|
|
48
|
+
Prefer `handoff.resolve` **before** any multi-file edit.
|
|
49
|
+
|
|
50
|
+
## Agent loop
|
|
51
|
+
|
|
52
|
+
1. Resolve ownership via MCP or `ak-docs query … --agent`
|
|
53
|
+
2. Read `startHere`
|
|
54
|
+
3. Edit only `editRoots`
|
|
55
|
+
4. Run `checks`
|
|
56
|
+
5. Re-index when docs change
|
|
57
|
+
|
|
58
|
+
## Related
|
|
59
|
+
|
|
60
|
+
- [For agents](../for-agents.md)
|
|
61
|
+
- [Index and query](./index-and-query.md)
|
|
62
|
+
- [MCP deep dive](../mcp.md)
|
|
63
|
+
- [Chat and RAG](../chat-and-rag.md) — optional intelligence plane
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Memory pipeline
|
|
3
|
+
description: Digest agent notes, classify them, and promote reviewable documentation drafts — never silent auto-merge.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Memory pipeline
|
|
7
|
+
|
|
8
|
+
Agent sessions leave durable learnings in local files. Doc Bridge **ingests**, **classifies**, and **promotes** them into draft documentation that humans review. Nothing lands in the corpus without a PR.
|
|
9
|
+
|
|
10
|
+
## Sources (Layer 0)
|
|
11
|
+
|
|
12
|
+
| Source | Path pattern |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| Agent memory notes | `.agent-memory/**/*.md` |
|
|
15
|
+
| Cursor rules | `.cursor/rules/*.mdc` |
|
|
16
|
+
|
|
17
|
+
No API key. Classification is deterministic.
|
|
18
|
+
|
|
19
|
+
## End-to-end commands
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# 1) Normalize raw notes → MemoryCandidate[]
|
|
23
|
+
ak-docs memory ingest
|
|
24
|
+
|
|
25
|
+
# 2) Route each candidate: agent | human | playbook | discard
|
|
26
|
+
ak-docs memory classify
|
|
27
|
+
|
|
28
|
+
# 3) Build a safe draft body (safety scan; never auto-merges)
|
|
29
|
+
ak-docs memory promote
|
|
30
|
+
|
|
31
|
+
# 4) Optional: open a GitHub draft PR via `gh`
|
|
32
|
+
ak-docs memory promote --pr --dry-run
|
|
33
|
+
ak-docs memory promote --pr
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## What a candidate looks like
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"schemaVersion": 1,
|
|
41
|
+
"id": "auth-abort-signal",
|
|
42
|
+
"source": "agent-memory",
|
|
43
|
+
"rawPath": ".agent-memory/auth.md",
|
|
44
|
+
"fact": "Auth handlers must forward AbortSignal.",
|
|
45
|
+
"why": "Run cancellation must stop network work.",
|
|
46
|
+
"howToApply": "Use AbortSignal.any([caller, AbortSignal.timeout(ms)]).",
|
|
47
|
+
"suggestedType": "project",
|
|
48
|
+
"confidence": 0.8,
|
|
49
|
+
"references": ["docs/for-agents/auth.md"]
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Schema: [MemoryCandidate v1](../schemas/memory-candidate-v1.md)
|
|
54
|
+
|
|
55
|
+
## Digest mental model
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
.agent-memory / .cursor/rules
|
|
59
|
+
│
|
|
60
|
+
▼
|
|
61
|
+
memory ingest → normalized candidates
|
|
62
|
+
│
|
|
63
|
+
▼
|
|
64
|
+
memory classify → agent | human | playbook | discard
|
|
65
|
+
│
|
|
66
|
+
▼
|
|
67
|
+
memory promote → draft markdown (+ optional draft PR)
|
|
68
|
+
│
|
|
69
|
+
▼
|
|
70
|
+
Human review / merge (never silent)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Safety guarantees
|
|
74
|
+
|
|
75
|
+
| Guarantee | Behavior |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| Draft-only | Promotion never writes the canonical corpus directly |
|
|
78
|
+
| Safety scan | Risky content is flagged before draft output |
|
|
79
|
+
| HITL | `--pr` opens a **draft** GitHub PR via `gh` |
|
|
80
|
+
| Deterministic | Same inputs → same classify/promote routing |
|
|
81
|
+
|
|
82
|
+
## MCP tools
|
|
83
|
+
|
|
84
|
+
When MCP is running (`ak-docs mcp`):
|
|
85
|
+
|
|
86
|
+
| Tool | Role |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| `memory.classify` | Classify candidates |
|
|
89
|
+
| `memory.promoteDraft` | Produce a draft promotion body |
|
|
90
|
+
|
|
91
|
+
See [MCP for agents](./mcp-agents.md).
|
|
92
|
+
|
|
93
|
+
## Playbook feedback
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
ak-docs playbook draft # payload from classified memory
|
|
97
|
+
ak-docs playbook pattern # published Doc Bridge pattern (OKF)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Related
|
|
101
|
+
|
|
102
|
+
- [CLI map](./cli-map.md) — every command
|
|
103
|
+
- [MemoryCandidate schema](../schemas/memory-candidate-v1.md)
|
|
104
|
+
- [Chat and RAG](../chat-and-rag.md) — optional Layer 1 after handoffs
|
|
105
|
+
- [Getting started](../getting-started.md)
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Documentation
|
|
3
|
+
description: Practical Doc Bridge paths for humans, agents, PR gates, and MCP — one repository, two audiences.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Documentation
|
|
7
|
+
|
|
8
|
+
Doc Bridge keeps **one repository** useful to people and coding agents. Pick the shortest path:
|
|
9
|
+
|
|
10
|
+
## Start
|
|
11
|
+
|
|
12
|
+
| Goal | Page |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| Install + 60s proof | [Getting started](./getting-started.md) |
|
|
15
|
+
| Guided install | [Install and run](./guides/install-and-run.md) |
|
|
16
|
+
| Machine-first entry | [For agents](./for-agents.md) · site route `/for-agents` |
|
|
17
|
+
| PR freshness gate | [Gate and CI](./guides/gate-ci.md) · [Marketplace](./MARKETPLACE.md) |
|
|
18
|
+
|
|
19
|
+
## Build workflows
|
|
20
|
+
|
|
21
|
+
| Goal | Page |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Index + resolve ownership | [Index and query](./guides/index-and-query.md) · [Query](./query.md) |
|
|
24
|
+
| MCP for Cursor / Claude | [MCP for agents](./guides/mcp-agents.md) · [MCP](./mcp.md) |
|
|
25
|
+
| Memory digest → draft docs | [Memory pipeline](./guides/memory-pipeline.md) |
|
|
26
|
+
| Every CLI command | [CLI map](./guides/cli-map.md) · [CLI reference](./spec/cli.md) |
|
|
27
|
+
| Config sketches | [Examples](./examples.md) |
|
|
28
|
+
| Optional chat / RAG | [Chat and RAG](./chat-and-rag.md) · [Ollama demo](./ollama-demo.md) |
|
|
29
|
+
|
|
30
|
+
## How it works
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
Repository docs
|
|
34
|
+
│
|
|
35
|
+
▼
|
|
36
|
+
ak-docs index ──► .doc-bridge/index.json + llms.txt
|
|
37
|
+
│
|
|
38
|
+
├─► Human guides (Fumadocs / Docusaurus / md)
|
|
39
|
+
├─► Agent handoff (CLI / MCP)
|
|
40
|
+
└─► PR gate (Marketplace Action)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
1. **Index** — map ownership from corpus + config
|
|
44
|
+
2. **Resolve** — deterministic handoffs (`startHere`, `editRoots`, `checks`)
|
|
45
|
+
3. **Gate** — fail stale context before agents run
|
|
46
|
+
4. **Promote** — optional memory → draft docs loop
|
|
47
|
+
|
|
48
|
+
## Product vs reference
|
|
49
|
+
|
|
50
|
+
- **Start / Guides** — get value in minutes
|
|
51
|
+
- **Product** — [Positioning](./POSITIONING.md), [Playbook pattern](./playbook/doc-bridge-pattern.md), [Recipes](./recipes/index-pipeline.md)
|
|
52
|
+
- **Reference** — [CLI](./spec/cli.md), [Config](./spec/config-v1.md), [Schemas](./schemas/agent-handoff-v1.md)
|
|
53
|
+
|
|
54
|
+
Machine surfaces: [llms.txt](/llms.txt) · [llms-full.txt](/llms-full.txt) · [raw Markdown](/raw/getting-started.md)
|
|
55
|
+
|
|
56
|
+
## Ecosystem
|
|
57
|
+
|
|
58
|
+
Part of AgentsKit — next to [AgentsKit](https://www.agentskit.io), [Registry](https://registry.agentskit.io), [Chat](https://chat.agentskit.io), [Playbook](https://playbook.agentskit.io), and [AKOS](https://akos.agentskit.io).
|
package/docs/landing/index.html
CHANGED
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
<div class="terminal-bar"><span class="dot dot-r"></span><span class="dot dot-y"></span><span class="dot dot-g"></span></div>
|
|
338
338
|
<div class="terminal-body">
|
|
339
339
|
<div class="t-dim"># .github/workflows/pr.yml</div>
|
|
340
|
-
<div>- uses: <span class="t-hi">AgentsKit-io/doc-bridge@v1.
|
|
340
|
+
<div>- uses: <span class="t-hi">AgentsKit-io/doc-bridge@v1.2.1</span></div>
|
|
341
341
|
<div> with:</div>
|
|
342
342
|
<div> config-path: doc-bridge.config.json</div>
|
|
343
343
|
</div>
|
package/docs/mcp.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MCP setup
|
|
3
|
+
description: Connect Doc Bridge deterministic handoffs to MCP-compatible coding agents.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# MCP setup
|
|
2
7
|
|
|
3
8
|
## One command (recommended)
|
|
@@ -57,3 +62,12 @@ Before editing a package:
|
|
|
57
62
|
2. Open `startHere`
|
|
58
63
|
3. Stay inside `editRoots`
|
|
59
64
|
4. Run `checks` before claiming done
|
|
65
|
+
|
|
66
|
+
## Related
|
|
67
|
+
|
|
68
|
+
- [MCP for agents guide](./guides/mcp-agents.md)
|
|
69
|
+
- [CLI map](./guides/cli-map.md)
|
|
70
|
+
- [Memory pipeline](./guides/memory-pipeline.md)
|
|
71
|
+
- [For agents](./for-agents.md)
|
|
72
|
+
- [Index and query](./guides/index-and-query.md)
|
|
73
|
+
- [Skill](./skills/doc-bridge.md)
|
package/docs/meta.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Doc Bridge",
|
|
3
|
+
"pages": [
|
|
4
|
+
"index",
|
|
5
|
+
"---Start---",
|
|
6
|
+
"getting-started",
|
|
7
|
+
"guides",
|
|
8
|
+
"for-agents",
|
|
9
|
+
"MARKETPLACE",
|
|
10
|
+
"---Build---",
|
|
11
|
+
"mcp",
|
|
12
|
+
"query",
|
|
13
|
+
"examples",
|
|
14
|
+
"chat-and-rag",
|
|
15
|
+
"ollama-demo",
|
|
16
|
+
"---Product---",
|
|
17
|
+
"POSITIONING",
|
|
18
|
+
"playbook",
|
|
19
|
+
"recipes",
|
|
20
|
+
"---Reference---",
|
|
21
|
+
"schemas",
|
|
22
|
+
"skills",
|
|
23
|
+
"spec",
|
|
24
|
+
"RELEASE"
|
|
25
|
+
]
|
|
26
|
+
}
|
package/docs/ollama-demo.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Ollama chat demo
|
|
3
|
+
description: Run the optional local chat layer with Ollama after deterministic routing.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Ollama chat demo (Layer 1)
|
|
2
7
|
|
|
3
8
|
Zero-cloud path for grounded `ak-docs chat` and `ak-docs ask --chat`.
|
|
@@ -61,4 +66,4 @@ Skips gracefully if Ollama is down or peers are missing (safe for CI as optional
|
|
|
61
66
|
| `Intelligence provider request failed` | `ollama serve` not running |
|
|
62
67
|
| `Optional peer "@agentskit/rag" is not installed` | Install Layer 1 peers (see above) |
|
|
63
68
|
| Empty chat response | Pull models: `ollama pull llama3.2` |
|
|
64
|
-
| Slow first `rag ingest` | Normal — embeds entire corpus locally |
|
|
69
|
+
| Slow first `rag ingest` | Normal — embeds entire corpus locally |
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: pattern
|
|
3
3
|
id: doc-bridge-pattern
|
|
4
|
+
title: Doc Bridge pattern
|
|
5
|
+
description: A reusable pattern for making documentation useful to humans and agents.
|
|
4
6
|
purpose: Route coding agents to the correct package, checks, and human docs in any monorepo.
|
|
5
7
|
owner: AgentsKit
|
|
6
8
|
license: CC-BY-4.0
|
|
@@ -75,7 +77,7 @@ Agents call `handoff.resolve` before editing `packages/*`:
|
|
|
75
77
|
## CI gate
|
|
76
78
|
|
|
77
79
|
```yaml
|
|
78
|
-
- uses: AgentsKit-io/doc-bridge@v1.
|
|
80
|
+
- uses: AgentsKit-io/doc-bridge@v1.2.1
|
|
79
81
|
```
|
|
80
82
|
|
|
81
83
|
Or: `ak-docs index && ak-docs gate run` — stale index fails the PR.
|
|
@@ -111,4 +113,4 @@ Teams track handoff % and human-bridge % daily.
|
|
|
111
113
|
- npm: https://www.npmjs.com/package/@agentskit/doc-bridge
|
|
112
114
|
- repo: https://github.com/AgentsKit-io/doc-bridge
|
|
113
115
|
- skill: [doc-bridge skill](../skills/doc-bridge.md)
|
|
114
|
-
- landing: https://
|
|
116
|
+
- landing: https://doc-bridge.agentskit.io/
|
package/docs/query.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Query
|
|
3
|
+
description: Deterministic ownership and documentation lookup — no model, no re-scan of the repo.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Query
|
|
7
|
+
|
|
8
|
+
The query layer reads `.doc-bridge/index.json` only. It does **not** re-scan the repository and does **not** call a model.
|
|
9
|
+
|
|
10
|
+
## Commands
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Machine-readable handoff (for agents / MCP)
|
|
14
|
+
ak-docs query package auth --agent
|
|
15
|
+
ak-docs query ownership auth --agent
|
|
16
|
+
|
|
17
|
+
# Human-readable
|
|
18
|
+
ak-docs query package auth --text
|
|
19
|
+
|
|
20
|
+
# Discovery
|
|
21
|
+
ak-docs list packages --text
|
|
22
|
+
ak-docs ask "where do I change billing?"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## What you get
|
|
26
|
+
|
|
27
|
+
An **AgentHandoff** (v1) with stable fields:
|
|
28
|
+
|
|
29
|
+
| Field | Use |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `startHere` | First file the agent should open |
|
|
32
|
+
| `editRoots` | Allowed write paths |
|
|
33
|
+
| `checks` | Verification commands |
|
|
34
|
+
| `humanDoc` | Parallel human documentation |
|
|
35
|
+
|
|
36
|
+
Schema: [AgentHandoff v1](./schemas/agent-handoff-v1.md) · Index: [DocBridgeIndex v1](./schemas/doc-bridge-index-v1.md)
|
|
37
|
+
|
|
38
|
+
## When to use which surface
|
|
39
|
+
|
|
40
|
+
| Need | Surface |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| Agent about to edit a module | `query … --agent` or MCP `handoff.resolve` |
|
|
43
|
+
| Human browsing ownership | `query … --text` / `list packages` |
|
|
44
|
+
| Free-form question with known docs | `ask "…"` (local first) |
|
|
45
|
+
| Unresolved semantic question | Optional [Chat and RAG](./chat-and-rag.md) backend |
|
|
46
|
+
|
|
47
|
+
## Guarantees
|
|
48
|
+
|
|
49
|
+
- Same inputs → same handoff JSON (deterministic)
|
|
50
|
+
- Breaking field meaning requires a **new schema version**, not silent reinterpretation of v1
|
|
51
|
+
- Gate/CI can require a fresh index so agents never see stale ownership
|
|
52
|
+
|
|
53
|
+
## Related
|
|
54
|
+
|
|
55
|
+
- [Guide: Index and query](./guides/index-and-query.md)
|
|
56
|
+
- [For agents](./for-agents.md)
|
|
57
|
+
- [CLI reference](./spec/cli.md)
|
|
58
|
+
- [MCP](./mcp.md)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Index pipeline recipes
|
|
3
|
+
description: Compose indexing, querying, gating, and CI into repeatable documentation workflows.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Index pipeline recipes
|
|
2
7
|
|
|
3
8
|
Keep `.doc-bridge/index.json` fresh during development and in CI.
|
|
@@ -66,7 +71,7 @@ Root `package.json`:
|
|
|
66
71
|
## CI (GitHub Action)
|
|
67
72
|
|
|
68
73
|
```yaml
|
|
69
|
-
- uses: AgentsKit-io/doc-bridge@v1.
|
|
74
|
+
- uses: AgentsKit-io/doc-bridge@v1.2.1
|
|
70
75
|
```
|
|
71
76
|
|
|
72
77
|
Or manual:
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Agent routing skill
|
|
3
|
+
description: Give coding agents a deterministic recipe for finding ownership and checks.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Doc Bridge — agent routing skill
|
|
2
7
|
|
|
3
8
|
Use this skill in Cursor, Claude Code, or Codex so agents resolve ownership **before** editing packages.
|
|
@@ -61,4 +66,4 @@ Before editing any file under packages/ or apps/:
|
|
|
61
66
|
```bash
|
|
62
67
|
ak-docs ask "auth is broken in staging"
|
|
63
68
|
ak-docs doctor --text
|
|
64
|
-
```
|
|
69
|
+
```
|
package/docs/spec/cli.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ak-docs CLI
|
|
3
|
+
description: Complete command reference for indexing, querying, gates, doctor, memory, and MCP.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# ak-docs CLI
|
|
2
7
|
|
|
3
8
|
Command-line interface for **`@agentskit/doc-bridge`**. The npm package is scoped; the **only published binary** is `ak-docs`.
|
package/docs/spec/config-v1.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration contract v1
|
|
3
|
+
description: Configure documentation corpora, ownership routing, conformance, and gates.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# doc-bridge config contract v1
|
|
2
7
|
|
|
3
8
|
`doc-bridge.config.ts` (or `.js`, `.mjs`, `.json`, or `package.json` → `docBridge`) is the alpha integration point for any project. Layer 0 fields are sufficient to run `index`, `query`, and MCP without an LLM.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Playbook feedback promotion
|
|
3
|
+
description: Promote durable implementation lessons into reviewed AgentsKit Playbook contributions.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Playbook Feedback Promotion
|
|
2
7
|
|
|
3
8
|
doc-bridge can feed durable documentation learnings back into public patterns, but promotion must be explicit and reviewable.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Registry agent topology
|
|
3
|
+
description: Connect registry agent definitions to Doc Bridge ownership and documentation handoffs.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Registry Agent Topology
|
|
2
7
|
|
|
3
8
|
doc-bridge exposes deterministic tools; Registry agents can compose them into maintenance flows.
|
package/ecosystem-claims.json
CHANGED