@agentskit/doc-bridge 1.0.0 → 1.0.2

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.
@@ -0,0 +1,84 @@
1
+ # Dogfood validation — `@agentskit/doc-bridge@1.0.0`
2
+
3
+ **Date:** 2026-07-09
4
+ **Install:** `1.0.0` from npm (`alpha` dist-tag; `latest` still points at older alpha.1)
5
+
6
+ ## Scoreboard
7
+
8
+ | Repo | Install | Ver | K/H | Gate | Doctor | Ranking | Ask handoff preview | MCP install |
9
+ |------|---------|-----|-----|------|--------|---------|---------------------|-------------|
10
+ | **agentskit** | pnpm -Dw ✅ | **1.0.0** | 25/24 | ✅ 24 human | **100/100 A** | core #1 | ✅ core + bridge | ✅ wrote `.cursor/mcp.json` |
11
+ | **playbook** | pnpm -D ✅ | **1.0.0** | 127/81 | ✅ | **100/100 A** | OKF pattern #1 | ✅ | ✅ |
12
+ | **registry** | npm --legacy-peer-deps ✅ | **1.0.0** | 36/36 | ✅ | **100/100 A** | docs-chat #1 | ✅ | ✅ |
13
+ | **agentskit-os** | npx ✅ | **1.0.0** | 170/92 | ✅ | **81/100 B** | os-core #1 | ✅ + “human guide missing” | (not run write) |
14
+
15
+ ## 1.0.0 features exercised
16
+
17
+ | Feature | Result |
18
+ |---------|--------|
19
+ | `doctor --text` | Score A on 3 repos; B on AKOS with **actionable missing humanDoc list** |
20
+ | `doctor --badge` | Shields markdown for handoff/bridge/score |
21
+ | `demo --text` | Before/after handoff + gate red→green + MCP snippet |
22
+ | `mcp install --cursor` | Creates `.cursor/mcp.json` with nextSteps |
23
+ | `ask` handoff preview | start / edit / checks / Bridge lines |
24
+ | Ranking exact-id | core, os-core, docs-chat, open-knowledge-format-pattern all #1 |
25
+ | Soft federation retrieve | exit 0, local chunks |
26
+
27
+ ## Highlights (impressive)
28
+
29
+ ### agentskit — perfect monorepo story
30
+
31
+ ```
32
+ Score: 100/100 (A)
33
+ Agent docs: 24/24 · Human guides: 24/24 · Badge: handoff 100% · bridge 100%
34
+ ```
35
+
36
+ ```
37
+ ask "where do I change the core package?"
38
+ Handoff preview
39
+ start: .../for-agents/core.mdx
40
+ edit: packages/core
41
+ checks: pnpm --filter @agentskit/core test · lint
42
+ Bridge: /docs/reference/packages/core
43
+ ```
44
+
45
+ ### playbook — OKF corpus
46
+
47
+ ```
48
+ Score: 100/100 (A) · 81/81 handoff · 81/81 bridge
49
+ checks: pnpm run check:okf-type
50
+ ```
51
+
52
+ ### registry — agent-id ownership
53
+
54
+ ```
55
+ Score: 100/100 (A) · 36/36
56
+ docs-chat → registry/docs-chat + npm run validate
57
+ ```
58
+
59
+ ### AKOS — honest B (bridge gap is the product)
60
+
61
+ ```
62
+ Score: 81/100 (B)
63
+ Agent docs: 86/92 (93%) · Human guides: 15/92 (16%)
64
+ Missing humanDoc: admin, os-*, desktop-*, …
65
+ notes: "Human guide missing for os-core. Run: ak-docs bootstrap agent-docs"
66
+ ask Bridge: human guide missing → ak-docs bootstrap agent-docs
67
+ ```
68
+
69
+ This is the right UX: **not fake 100%** when product docs are thin.
70
+
71
+ ## Remaining friction (not blockers for 1.0)
72
+
73
+ 1. **npm `latest` still 0.1.0-alpha.1** — users should install `@1.0.0` or `@alpha` until latest is retagged.
74
+ 2. **registry** still prefers `--legacy-peer-deps` on some npm versions.
75
+ 3. **AKOS** `pnpm add` store mismatch — `npx @agentskit/doc-bridge@1.0.0` works.
76
+ 4. **AKOS bridge 16%** — content/map work; doctor already drives it.
77
+ 5. **notes** may still show HTML entities (`<`) from source MDX.
78
+ 6. **mcp install** writes into repo (`.cursor/mcp.json`) — commit or gitignore intentionally.
79
+ 7. **CI** still not wired on all four consumers for `doctor`/`gate` on every PR.
80
+
81
+ ## Verdict
82
+
83
+ **1.0.0 is validated on the four ecosystem repos.**
84
+ Doctor + ask handoff preview + mcp install + demo deliver the “wow” layer that alpha.3 still lacked in product surface. AKOS correctly surfaces bridge debt instead of hiding it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentskit/doc-bridge",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Human↔agent documentation bridge — deterministic handoffs, doc-site links, memory→docs, optional AgentsKit RAG/chat.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,6 +36,7 @@
36
36
  "src"
37
37
  ],
38
38
  "scripts": {
39
+ "prebuild": "node scripts/sync-version.mjs",
39
40
  "build": "tsup",
40
41
  "test": "vitest run",
41
42
  "test:watch": "vitest",
@@ -48,10 +49,11 @@
48
49
  "coverage:badge": "node scripts/update-coverage-badge.mjs",
49
50
  "changeset": "changeset",
50
51
  "version-packages": "changeset version",
51
- "release": "pnpm build && pnpm test && changeset publish",
52
- "prepublishOnly": "pnpm build && pnpm test",
52
+ "release": "npm run build && npm test && changeset publish",
53
+ "version": "node scripts/sync-version.mjs && git add package.json src/version.ts",
54
+ "prepublishOnly": "npm run build && npm test",
53
55
  "prepare": "node scripts/prepare.mjs",
54
- "prepack": "pnpm build"
56
+ "prepack": "npm run build"
55
57
  },
56
58
  "keywords": [
57
59
  "agentskit",
@@ -63,7 +63,7 @@ Core (no API key):
63
63
  ak-docs demo [--fixture example|monorepo] [--text] [--in-project]
64
64
  ak-docs doctor [--text] [--badge] [--write-badge]
65
65
  ak-docs index [--watch]
66
- ak-docs query <package|ownership|intent|change> <id> [--agent] [--text]
66
+ ak-docs query [package|ownership|intent|change] <id> [--agent] [--text]
67
67
  ak-docs search <term> [--agent] [--text]
68
68
  ak-docs list <packages|intents|changes|knowledge> [--text]
69
69
  ak-docs ask [question] local consult (no LLM)
@@ -901,14 +901,15 @@ export const runCli = (argv: readonly string[]): number | undefined | Promise<nu
901
901
  }
902
902
 
903
903
  if (command === 'query') {
904
- const kind = positional[1] as QueryKind | undefined
905
- const id = positional[2]
906
- if (!kind || !QUERY_KINDS.has(kind) || kind === 'search') {
907
- process.stderr.write('Usage: ak-docs query <package|ownership|intent|change> <id> [--agent]\n')
904
+ const maybeKind = positional[1] as QueryKind | undefined
905
+ if (maybeKind === 'search') {
906
+ process.stderr.write('Usage: ak-docs query [package|ownership|intent|change] <id> [--agent]\n')
908
907
  return 1
909
908
  }
909
+ const kind = maybeKind && QUERY_KINDS.has(maybeKind) ? maybeKind : 'package'
910
+ const id = kind === maybeKind ? positional[2] : positional[1]
910
911
  if (!id) {
911
- process.stderr.write(`Missing id for query kind "${kind}".\n`)
912
+ process.stderr.write('Usage: ak-docs query [package|ownership|intent|change] <id> [--agent]\n')
912
913
  return 1
913
914
  }
914
915
  try {
@@ -9,6 +9,19 @@ const readEnv = (name: string | undefined): string | undefined => {
9
9
  return value && value.length > 0 ? value : undefined
10
10
  }
11
11
 
12
+ const providerDefaultApiKeyEnv = (provider: string): string | undefined => {
13
+ switch (provider) {
14
+ case 'openai':
15
+ return 'OPENAI_API_KEY'
16
+ case 'anthropic':
17
+ return 'ANTHROPIC_API_KEY'
18
+ case 'openrouter':
19
+ return 'OPENROUTER_API_KEY'
20
+ default:
21
+ return undefined
22
+ }
23
+ }
24
+
12
25
  export type ResolvedIntelligence = {
13
26
  readonly adapter: unknown
14
27
  readonly embed: unknown
@@ -30,7 +43,7 @@ export const resolveIntelligenceRuntime = async (
30
43
  const adapters = await importPeer<typeof import('@agentskit/adapters')>('@agentskit/adapters')
31
44
  const provider = adapterCfg.provider
32
45
  const model = adapterCfg.model
33
- const apiKey = readEnv(adapterCfg.apiKeyEnv) ?? readEnv('OPENAI_API_KEY') ?? readEnv('ANTHROPIC_API_KEY')
46
+ const apiKey = readEnv(adapterCfg.apiKeyEnv) ?? readEnv(providerDefaultApiKeyEnv(provider))
34
47
  const baseUrl = adapterCfg.baseUrl
35
48
 
36
49
  let adapter: unknown
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '1.0.0'
1
+ export const PACKAGE_VERSION = '1.0.2'