Files
Arcrun/system-dev/docs/3-specs
Claude 343572bf5d feat(mcp): library-map M4 — kbdb_get_map tool + instructions 注入全館地圖
library-map SDD M4(design §4,源頭 #39)。兩件:

1. kbdb_get_map(tools/kbdb_map.ts,與 #68 kbdb_graph_neighbors 同族薄殼):
   - 無參數=全館地圖(每庫一行:library+narrative+top 3 entities+triplet_count)
   - 帶 library=該庫詳圖;top_entities/relation_profile/bridges 若為 JSON 字串形
     容錯 parse 成物件(parse 失敗當空陣列,不 crash)
   - 404/空庫誠實回報+POST /map/recompute backfill 指引
   - 走既有 KBDB service binding(kbdbFetch),不碰 D1、不新增 binding

2. instructions 注入(lib/library-map.ts+mcp-handler.ts):
   - 連線時拉 GET /map,渲染成緊湊文字({library}:{narrative}|核心:{top3}|{n} triplets)
     嵌 server instructions(design §6:session 啟動 push 零查詢)
   - 快取選型:isolate 內 TTL 快取(成功 5min/失敗 1min)——stateless StreamableHTTP
     每個 HTTP request 重建 McpServer,「每次現拉」實際是每個 tool call 都多打一次 /map
   - timeout 1.5s;任何失敗(超時/HTTP錯/空庫/壞JSON)回 null 靜默略過,絕不擋 MCP 連線(鐵律)

測試:假 KBDB binding(比照 kbdb-graph.test.ts)17 新測,pnpm vitest run 76/76 過、tsc --noEmit 乾淨。
merge 後需 gated redeploy arcrun-mcp(leo 閘)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUmjwkHLVBHM3ydhT1WSW3
2026-07-19 09:11:46 +00:00
..

3. Specs — 需求 + SDD + 進度

各子系統的設計文檔 + 任務清單。

進行中(必讀)

目錄 Phase 狀態
arcrun/credential-primitives-wasm/ Phase 0-1 進行中(0.6-1
arcrun/kbdb-base/ Phase 7 上線完成 + 待處理(§8

主線

目錄 內容 狀態
arcrun-core-mvp/ MVP 整體架構 基礎完成
arcrun/auth-recipe.md Auth recipe 系統 穩定
arcrun/landing-page.md Landing page 設計中
arcrun/sdk-and-website/ SDK + MCP + 文檔 進行中
arcrun-platform-evolution/ 長期演化規劃 路線圖

安全 & 基礎設施

目錄 用途
component-gatekeeping/ 零件投稿 gatekeepingPR + CI
component-registry-canon/ registry 規範化(dead storage cleanup
data-exfil-warning/ 資料外流警示 API 層實作

未來

目錄 用途
llm-interface/ AI 操盤手體驗改進(mira dogfood 痛點)
recipe-system/ recipe 長期規範(§5 onwards
resumable-workflow/ workflow 暫停恢復(Phase 6
user-cc-harness/ CC harness 安裝 + 配置(Phase 7

讀 SDD 的順序

新任務開始:

  1. docs/3-specs/arcrun/arcrun.md(全景進度)
  2. 對應子系統的 design.md(設計背景)
  3. 同目錄的 tasks.md(細節任務 + 依賴)

更新時間:2026-06-08