
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 分
请在仓库或注册中心条目中声明许可证。