Description
Sourcebook is a tool designed to ensure the completeness of code changes made by AI agents. It identifies missing companion files such as test files, sibling components, and co-dependent configurations that an AI agent might overlook. By analyzing the diff for completeness, Sourcebook flags files that likely need changes but were not modified.
Read More
Under the hood, Sourcebook maps your repository using import graphs, git co-change history, test file mappings, and hub file detection. When you run the 'sourcebook check' command, it compares your changes against this structural map and flags any missing elements. This process does not require a large language model (LLM) and completes in under a second.
Sourcebook can be deployed as a command-line interface (CLI), a Claude Code hook, or an MCP server. For deeper semantic analysis, the '--ai' option sends the diff to Claude Sonnet for a small fee per run. The tool also features Import Graph PageRank, which ranks files by structural importance, helping identify critical files that could impact the entire project if altered.
The tool is particularly useful for developers and teams who rely on AI agents for code generation, as it provides an automated completeness review on every pull request. Sourcebook is free to use and open-source, licensed under BSL-1.1, making it accessible for a wide range of users.
- CategoryAI Code Review & Testing
- Pricing ModelFree
- DeploymentCLI, Claude Code hook, MCP server
- PlatformsWindows, macOS, Linux
sourcebook's Core Features
Diff completeness analysis
Co-change coupling detection
Import graph mapping
Test file detection
CLI deployment
Claude Code hooks
MCP server integration
Free and open-source
How to use sourcebook?
Configure: Set up Sourcebook in your environment
Use: Run 'sourcebook check' on your diffs
Optimize: Use flagged suggestions to complete changes
Integrate: Deploy as CLI, Claude Code hook, or MCP server
sourcebook's Use Cases
- Code completeness check
- Import graph analysis
- Co-change dependency detection
- Automated PR review
- Semantic analysis






