@agentskit/doc-bridge 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/CODE_OF_CONDUCT.md +7 -0
- package/CONTRIBUTING.md +32 -0
- package/LICENSE +21 -0
- package/README.md +137 -0
- package/SECURITY.md +24 -0
- package/bin/ak-docs.js +6 -0
- package/dist/cli/program.d.ts +3 -0
- package/dist/cli/program.js +3155 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +361 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index-CD_zmKXf.d.ts +932 -0
- package/dist/index.d.ts +1608 -0
- package/dist/index.js +2566 -0
- package/dist/index.js.map +1 -0
- package/docs/POSITIONING.md +78 -0
- package/docs/RELEASE.md +75 -0
- package/docs/chat-and-rag.md +48 -0
- package/docs/examples.md +50 -0
- package/docs/getting-started.md +111 -0
- package/docs/mcp.md +50 -0
- package/docs/schemas/agent-handoff-v1.md +32 -0
- package/docs/schemas/doc-bridge-index-v1.md +71 -0
- package/docs/schemas/memory-candidate-v1.md +32 -0
- package/docs/spec/cli.md +137 -0
- package/docs/spec/config-v1.md +625 -0
- package/docs/spec/playbook-feedback.md +77 -0
- package/docs/spec/registry-agents.md +65 -0
- package/examples/docusaurus-only.config.ts +18 -0
- package/examples/docusaurus-with-memory.config.ts +37 -0
- package/examples/fumadocs-only.config.ts +18 -0
- package/examples/fumadocs-with-chat.config.ts +42 -0
- package/examples/minimal-plain-markdown.config.ts +13 -0
- package/examples/pnpm-monorepo.config.ts +19 -0
- package/package.json +105 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Registry Agent Topology
|
|
2
|
+
|
|
3
|
+
doc-bridge exposes deterministic tools; Registry agents can compose them into maintenance flows.
|
|
4
|
+
|
|
5
|
+
## `doc-curator`
|
|
6
|
+
|
|
7
|
+
Supervisor flow:
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
id: doc-curator
|
|
11
|
+
version: 1
|
|
12
|
+
description: Classify documentation changes, draft updates, and verify gates.
|
|
13
|
+
inputs:
|
|
14
|
+
diff:
|
|
15
|
+
type: string
|
|
16
|
+
projectRoot:
|
|
17
|
+
type: string
|
|
18
|
+
tools:
|
|
19
|
+
- doc-bridge.mcp.handoff.resolve
|
|
20
|
+
- doc-bridge.mcp.doc.search
|
|
21
|
+
- doc-bridge.mcp.doc.get
|
|
22
|
+
- doc-bridge.mcp.gate.status
|
|
23
|
+
delegates:
|
|
24
|
+
docsChat:
|
|
25
|
+
agent: docs-chat
|
|
26
|
+
purpose: Answer grounded questions using deterministic search first.
|
|
27
|
+
knowledgePromoter:
|
|
28
|
+
agent: knowledge-promoter
|
|
29
|
+
purpose: Convert accepted findings into draft documentation changes.
|
|
30
|
+
codeReview:
|
|
31
|
+
agent: code-review
|
|
32
|
+
purpose: Review doc-only diffs before human merge.
|
|
33
|
+
steps:
|
|
34
|
+
- id: classify
|
|
35
|
+
delegate: docsChat
|
|
36
|
+
input:
|
|
37
|
+
question: "Which docs and owners are affected by this diff?"
|
|
38
|
+
- id: draft
|
|
39
|
+
delegate: knowledgePromoter
|
|
40
|
+
input:
|
|
41
|
+
finding: "${classify.output}"
|
|
42
|
+
mode: draft-pr
|
|
43
|
+
- id: verify
|
|
44
|
+
tool: doc-bridge.mcp.gate.status
|
|
45
|
+
input:
|
|
46
|
+
gates:
|
|
47
|
+
- index-freshness
|
|
48
|
+
- human-guide-links
|
|
49
|
+
- okf-type
|
|
50
|
+
- id: review
|
|
51
|
+
delegate: codeReview
|
|
52
|
+
input:
|
|
53
|
+
diff: "${draft.diff}"
|
|
54
|
+
mergePolicy:
|
|
55
|
+
autoMerge: false
|
|
56
|
+
requiresHuman: true
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Runtime Notes
|
|
60
|
+
|
|
61
|
+
- The MCP server is local: `ak-docs mcp`.
|
|
62
|
+
- The flow must not require a private repository shape.
|
|
63
|
+
- `knowledge-promoter` may draft PR content, but must never merge.
|
|
64
|
+
- `code-review` runs after gates so reviewers see deterministic failures first.
|
|
65
|
+
- Future RAG mode should inject `createDocBridgeRetriever(index)` and keep exact handoff resolution ahead of semantic results.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig } from '@agentskit/doc-bridge'
|
|
2
|
+
|
|
3
|
+
/** Docusaurus bridge only: no chat, no memory, no provider key. */
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
schemaVersion: 1,
|
|
6
|
+
corpus: {
|
|
7
|
+
agent: { root: 'docs/for-agents' },
|
|
8
|
+
human: {
|
|
9
|
+
plugin: 'docusaurus',
|
|
10
|
+
options: {
|
|
11
|
+
docsDir: 'website/docs',
|
|
12
|
+
sidebarsFile: 'website/sidebars.js',
|
|
13
|
+
urlPrefix: '/docs',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
gates: { preset: 'standard' },
|
|
18
|
+
})
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineConfig } from '@agentskit/doc-bridge'
|
|
2
|
+
|
|
3
|
+
/** Assisted profile: Docusaurus + memory ingest + classification (opt-in, HITL) */
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
schemaVersion: 1,
|
|
6
|
+
corpus: {
|
|
7
|
+
agent: { root: '.agent-docs' },
|
|
8
|
+
human: {
|
|
9
|
+
plugin: 'docusaurus',
|
|
10
|
+
options: {
|
|
11
|
+
docsDir: 'website/docs',
|
|
12
|
+
sidebarsFile: 'website/sidebars.js',
|
|
13
|
+
urlPrefix: '/docs',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
intelligence: {
|
|
18
|
+
enabled: true,
|
|
19
|
+
adapter: {
|
|
20
|
+
provider: 'openrouter',
|
|
21
|
+
model: 'openai/gpt-4o-mini',
|
|
22
|
+
apiKeyEnv: 'OPENROUTER_API_KEY',
|
|
23
|
+
},
|
|
24
|
+
chat: { enabled: true, sources: ['agent', 'human'] },
|
|
25
|
+
memory: {
|
|
26
|
+
enabled: true,
|
|
27
|
+
adapters: ['cursor-rules', 'playbook-memory'],
|
|
28
|
+
classify: true,
|
|
29
|
+
promote: {
|
|
30
|
+
enabled: true,
|
|
31
|
+
targets: ['agent', 'human'],
|
|
32
|
+
requireApproval: true,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
runtime: 'agentskit',
|
|
36
|
+
},
|
|
37
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig } from '@agentskit/doc-bridge'
|
|
2
|
+
|
|
3
|
+
/** Fumadocs bridge only: no chat, no memory, no provider key. */
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
schemaVersion: 1,
|
|
6
|
+
corpus: {
|
|
7
|
+
agent: { root: 'docs/for-agents' },
|
|
8
|
+
human: {
|
|
9
|
+
plugin: 'fumadocs',
|
|
10
|
+
options: {
|
|
11
|
+
contentDir: 'apps/web/content/docs',
|
|
12
|
+
urlPrefix: '/docs',
|
|
13
|
+
metaFile: 'meta.json',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
gates: { preset: 'standard' },
|
|
18
|
+
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineConfig } from '@agentskit/doc-bridge'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Standard profile: monorepo + Fumadocs human bridge + Layer 1 chat/RAG.
|
|
5
|
+
* Requires optional peers:
|
|
6
|
+
* npm i -D @agentskit/rag @agentskit/ink @agentskit/adapters @agentskit/memory react
|
|
7
|
+
* Then: ak-docs index && ak-docs rag ingest && ak-docs chat
|
|
8
|
+
*/
|
|
9
|
+
export default defineConfig({
|
|
10
|
+
schemaVersion: 1,
|
|
11
|
+
corpus: {
|
|
12
|
+
agent: { root: 'docs/for-agents' },
|
|
13
|
+
human: {
|
|
14
|
+
plugin: 'fumadocs',
|
|
15
|
+
options: {
|
|
16
|
+
contentDir: 'apps/web/content/docs',
|
|
17
|
+
urlPrefix: '/docs',
|
|
18
|
+
metaFile: 'meta.json',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
routing: { plugin: 'pnpm-monorepo' },
|
|
23
|
+
gates: { preset: 'standard' },
|
|
24
|
+
intelligence: {
|
|
25
|
+
enabled: true,
|
|
26
|
+
adapter: {
|
|
27
|
+
provider: 'ollama',
|
|
28
|
+
model: 'llama3.2',
|
|
29
|
+
apiKeyEnv: '', // local — no cloud key
|
|
30
|
+
},
|
|
31
|
+
chat: {
|
|
32
|
+
enabled: true,
|
|
33
|
+
sources: ['agent', 'human'],
|
|
34
|
+
handoffFirst: true,
|
|
35
|
+
},
|
|
36
|
+
retriever: {
|
|
37
|
+
enabled: true,
|
|
38
|
+
mode: 'agentskit-rag',
|
|
39
|
+
},
|
|
40
|
+
runtime: 'agentskit',
|
|
41
|
+
},
|
|
42
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from '@agentskit/doc-bridge'
|
|
2
|
+
|
|
3
|
+
/** Solo project — Layer 0 only, no LLM, no monorepo plugin */
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
schemaVersion: 1,
|
|
6
|
+
corpus: {
|
|
7
|
+
agent: {
|
|
8
|
+
root: 'docs',
|
|
9
|
+
index: 'docs/INDEX.md',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
gates: { preset: 'minimal' },
|
|
13
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineConfig } from '@agentskit/doc-bridge'
|
|
2
|
+
|
|
3
|
+
/** Monorepo — ownership routing, standard gates, still no LLM */
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
schemaVersion: 1,
|
|
6
|
+
corpus: {
|
|
7
|
+
agent: { root: 'docs/for-agents' },
|
|
8
|
+
},
|
|
9
|
+
routing: {
|
|
10
|
+
plugin: 'pnpm-monorepo',
|
|
11
|
+
options: {
|
|
12
|
+
packages: ['packages/*', 'apps/*'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
gates: { preset: 'standard' },
|
|
16
|
+
surfaces: {
|
|
17
|
+
mcp: { enabled: true, tools: ['handoff.resolve', 'doc.search', 'doc.get'] },
|
|
18
|
+
},
|
|
19
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentskit/doc-bridge",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "Human↔agent documentation bridge — deterministic handoffs, doc-site links, memory→docs, optional AgentsKit RAG/chat.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"ak-docs": "bin/ak-docs.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./config": {
|
|
17
|
+
"types": "./dist/config/index.d.ts",
|
|
18
|
+
"import": "./dist/config/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"bin",
|
|
24
|
+
"docs",
|
|
25
|
+
"examples",
|
|
26
|
+
"README.md",
|
|
27
|
+
"CONTRIBUTING.md",
|
|
28
|
+
"SECURITY.md",
|
|
29
|
+
"CODE_OF_CONDUCT.md",
|
|
30
|
+
"CHANGELOG.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsup",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"test:watch": "vitest",
|
|
37
|
+
"coverage": "vitest run --coverage",
|
|
38
|
+
"typecheck": "tsc --noEmit",
|
|
39
|
+
"smoke:packaged": "node scripts/smoke-packaged.mjs",
|
|
40
|
+
"smoke:docsites": "node scripts/smoke-docsites.mjs",
|
|
41
|
+
"smoke:real-docsites": "node scripts/smoke-real-docsites.mjs",
|
|
42
|
+
"changeset": "changeset",
|
|
43
|
+
"version-packages": "changeset version",
|
|
44
|
+
"release": "pnpm build && pnpm test && changeset publish",
|
|
45
|
+
"prepublishOnly": "pnpm build && pnpm test"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"agentskit",
|
|
49
|
+
"documentation",
|
|
50
|
+
"mcp",
|
|
51
|
+
"for-agents",
|
|
52
|
+
"llms-txt",
|
|
53
|
+
"agent-handoff",
|
|
54
|
+
"rag",
|
|
55
|
+
"human-agent-bridge"
|
|
56
|
+
],
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "git+https://github.com/AgentsKit-io/doc-bridge.git"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=22"
|
|
64
|
+
},
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"zod": "^3.24.2"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"@agentskit/adapters": "^0.13.0",
|
|
73
|
+
"@agentskit/core": "^1.10.0",
|
|
74
|
+
"@agentskit/ink": "^0.9.0",
|
|
75
|
+
"@agentskit/memory": "^0.10.0",
|
|
76
|
+
"@agentskit/rag": "^0.4.0",
|
|
77
|
+
"react": ">=18.0.0"
|
|
78
|
+
},
|
|
79
|
+
"peerDependenciesMeta": {
|
|
80
|
+
"@agentskit/adapters": { "optional": true },
|
|
81
|
+
"@agentskit/core": { "optional": true },
|
|
82
|
+
"@agentskit/ink": { "optional": true },
|
|
83
|
+
"@agentskit/memory": { "optional": true },
|
|
84
|
+
"@agentskit/rag": { "optional": true },
|
|
85
|
+
"react": { "optional": true }
|
|
86
|
+
},
|
|
87
|
+
"devDependencies": {
|
|
88
|
+
"@changesets/cli": "^2.31.0",
|
|
89
|
+
"@types/node": "^22.15.3",
|
|
90
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
91
|
+
"tsup": "^8.5.0",
|
|
92
|
+
"typescript": "^6.0.3",
|
|
93
|
+
"vitest": "^4.1.9"
|
|
94
|
+
},
|
|
95
|
+
"directories": {
|
|
96
|
+
"doc": "docs",
|
|
97
|
+
"example": "examples",
|
|
98
|
+
"test": "tests"
|
|
99
|
+
},
|
|
100
|
+
"author": "AgentsKit",
|
|
101
|
+
"bugs": {
|
|
102
|
+
"url": "https://github.com/AgentsKit-io/doc-bridge/issues"
|
|
103
|
+
},
|
|
104
|
+
"homepage": "https://github.com/AgentsKit-io/doc-bridge#readme"
|
|
105
|
+
}
|