
Sourcebook
io.github.maroondlabs由 GitHub 帳號 maroondlabs 發布v0.9.5更新於 Oct 24, 2026
Live codebase intelligence for AI agents: conventions, blast radius, import graphs, git insights.
概覽
本機 MCP 伺服器,為 AI 助理提供即時程式碼庫情報:儲存庫結構、匯入圖、影響範圍、慣例與 git 共同變更資料。
- 可以做什麼
- 查詢指定專案目錄的儲存庫結構、慣例與 Repo Truth Map
- 檢視匯入圖、樞紐檔案以及一次變更的影響範圍
- 查詢 git 共同變更夥伴,也就是歷史上總是一起改動的檔案
- 檢查 diff 完整性:缺少的測試檔案、同層模組與相關設定
- 設定 Anthropic API 金鑰後可對 diff 進行 AI 語意分析
- 適用情境
- 適合助理在 git 儲存庫中修改程式碼時使用,讓它知道一次變更可能還牽涉哪些檔案,或在提交前檢查 diff 是否漏掉測試與相依方。對 TypeScript/JavaScript、Python 與 Go 專案支援最完整。
- 執行需求
- 以 stdio 在本機執行,透過 npx sourcebook serve 啟動並指定專案目錄。需要 Node.js 與具提交歷史的本機 git 儲存庫。AI 語意分析需要環境變數 ANTHROPIC_API_KEY;規則層不需任何設定。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Sourcebook,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
sourcebook
Catches the files your AI agent forgot to change.
A safety layer for code changes. sourcebook analyzes git diffs for completeness — flags files that should've been modified but weren't. Rules-based structural detection plus AI-powered semantic analysis. Zero false positives on clean diffs.
What It Catches
Your AI agent changed the handler. Did it update the test? The sibling module? The config that references the old value?
sourcebook checks your diff against the repo's actual structure:
- Missing test files — source file changed, test file didn't
- Sibling modules — files that import or are imported by what you changed
- Co-change companions — files that historically change together in git commits
- Hub file blast radius — you touched something with 50+ dependents
With --ai: cross-module semantic relationships, field renames that need migrations, stale validation logic.
Key Stats
Four Surfaces
1. CLI
Run it on any diff. No setup required.
2. Claude Code Hooks
One command wires up pre-commit hooks. Agent edits a file, sourcebook checks the diff, agent sees what's missing — all before the commit lands.
3. MCP Server
Published on the official MCP registry. Agents can query repo structure, blast radius, conventions, and co-change data on demand.
Add to your MCP client:
4. GitHub App (coming soon)
Automated completeness checks on every pull request. Join the waitlist.
Commands
How It Works
Layer A — Rules-based (no LLM, <1 second)
- Co-change analysis — mines git history for files that change together. If you touched
auth.tsand it changes withsession.tsin 88% of commits, sourcebook flagssession.ts. - Test file detection — maps source files to test files via naming conventions and co-change history.
- Import graph — builds a dependency graph and checks whether files that import (or are imported by) your changed files also need updates.
- Hub detection — flags when you've modified a file with high fan-in (many dependents). These changes have blast radius.
Layer B — AI-powered (~$0.012/run)
Sends the diff plus dependency context to Claude Sonnet. Catches semantic relationships Layer A can't see — field renames that need migrations, validation logic that assumes old schemas, cross-module dependencies with no import link.
Every AI suggestion requires a dependency citation. Hallucinated file paths are filtered out. The completeness gate ensures zero false positives: if the diff is actually complete, Layer B stays silent.
Configuration
No other configuration needed. sourcebook reads your repo's git history and file structure directly.
Language Support
Research
Built on real benchmarks, not vibes:
- Check validation results — methodology and accuracy data
- Benchmark: 19 tasks, 10 repos, 4 languages — controlled agent performance testing
- Why auto-generated context makes agents worse — the ETH Zurich finding that shaped our approach
License
BSL-1.1 — source-available, free to use, cannot be offered as a hosted service. Converts to MIT on 2030-03-25. See LICENSE for details.
sourcebook.run · GitHub · npm · @maroond_
來源:README.md,提交 d289440
工具
0版本歷史
1- v0.9.5最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。