Overview
sourcebook check analyzes a git diff for completeness using structural signals: git co-change coupling, test file mappings, import graph siblings, and hub file blast radius.
- Layer A: Rules-based, no LLM, <1 second
- Layer B (
--ai): Sends diff + dependency context to Claude Sonnet, ~$0.012/run
This page documents the validation methodology and results for both layers.
Methodology
- 30 real diffs from open-source repositories
- Each diff manually classified: complete (all companion files changed) or incomplete (missing companions)
sourcebook checkrun on each diff- Measured: true positives (correctly flagged incomplete), true negatives (correctly passed clean diffs), false positives, false negatives
- Layer A and Layer B evaluated separately