SuperAPI AI Directory

sourcebook

sourcebook is a code change completeness detection tool for AI coding agents, with the core goal of discovering related files that AI agents "forget to change" when modifying code, acting as a safety layer for code changes. By analyzing git diff, combined with the repository's real structure and git history, it flags files that should have been modified together but were not, such as test files not synchronized after source file changes, sibling modules that import or depend on the file, "buddy files" that have historically often changed together, and the scope of impact involving hub files with many dependents. The tool uses a two-layer mechanism: Layer A is rule-based, does not call large models, and runs in under one second, including co-change analysis, test file detection, import graph construction, and hub detection; Layer B uses AI for semantic analysis, which can catch deep issues such as field renames requiring migration, outdated validation logic, and cross-module dependencies without import relationships. All AI suggestions must provide dependency references, and hallucinated paths are filtered, ensuring zero false positives on clean diffs. In terms of usage, it can be run directly on any diff without configuration; it supports integration into Claude Code's pre-commit hook with a single command; it has been published to the official MCP registry, allowing agents to query repository structure, impact scope, conventions, and co-change data on demand; the GitHub App is in a coming soon state with a waitlist open. The project is built on real benchmarks, which include 19 tasks, 10 repositories, and 4 languages. It uses the BSL-1.1 source-available license, can be used for free but cannot be offered as a hosted service, and converts to the MIT license on March 25, 2030.

Open website

About this tool

sourcebook is a code change completeness checking tool, positioned as a safety layer for AI coding agents when they modify code. The problem it solves is: an agent changes a handler but may forget to update the corresponding tests, sibling modules, or configuration that references old values. By analyzing the git diff and comparing it against the repository's actual file structure and historical commit data, sourcebook flags files that should have been modified but were not.

The main capabilities are divided into two layers. The first layer is rule-based detection, which does not call a large language model and runs in under one second, including: co-change analysis, which mines git history to find files that often change together, for example auth.ts and session.ts appearing together in 88% of commits, so if only the former is changed, the latter is flagged; test file detection, which maps source files to test files through naming conventions and co-change history; import graph construction, which generates a dependency graph and checks whether importers or imported modules need synchronized updates; and hub detection, which flags the blast radius of a modified file when it has a large number of dependents (such as 50 or more). The second layer is AI-driven semantic analysis, costing about $0.012 per run, which sends the diff and dependency context to Claude Sonnet and can catch semantic relationships that the rule layer cannot see, such as field renames that require migration, validation logic that assumes an old schema, and cross-module dependencies without import links. All AI suggestions must include dependency references, and hallucinated file paths are filtered out; a completeness gate ensures zero false positives, and if the diff itself is complete, Layer B will not provide any suggestions.

In terms of usage, the tool can run on any diff without setup. It provides a Claude Code hook, allowing integration into a pre-commit hook with a single command; after an agent edits files, sourcebook checks the diff so the agent can see omissions before the commit lands. It has been published in the official MCP registry, allowing agents to query repository structure, impact scope, conventions, and co-change data on demand. There is also a GitHub App that can automatically run completeness checks on every pull request, currently in a coming soon state with a waitlist open. The tool directly reads the repository's git history and file structure, with no other configuration required.

The applicable scenarios are mainly repositories where AI coding agents participate in modifying code, especially engineering teams that need to ensure associated files are updated in sync. The tool is built on a real benchmark, which includes 19 tasks, 10 repositories, and 4 languages. Licenseuses BSL-1.1, with source code available and free to use, but it cannot be offered as a hosted service, and will convert to the MIT license on March 25, 2030.