sourcebook
Your codebase has conventions your AI agents keep missing.
Import Graph PageRank
Ranks every file by structural importance. Find the hubs that break everything when you touch them.
Hub: fixtures.ts (86 importers)
Hub: http.ts (72 importers)
Git Forensics
Reverted commits are "don't do this" signals. Co-change coupling reveals invisible dependencies.
CORRELATION: 88%
REVERTS: 2 found (anti-patterns)
Convention Detection
Naming patterns, export style, barrel exports, path aliases — the tribal knowledge no README captures.
IMPORTS: path alias @/ preferred
BARREL: 40 index.ts files
ANALYSIS_COMPARISON
RESEARCH_FOUNDATION
Auto-generated obvious context makes agents worse
LLM-generated context files reduced task success by 2-3% and increased inference costs by 20%+. Only non-discoverable information improves performance.
program.md is the #1 lever for agent effectiveness
Autoresearch ran 700 experiments in 2 days because the curated context file contained only what the agent couldn't figure out alone.
PageRank on import graphs for structural importance
Repo-map technique ranks files by how many other files depend on them. sourcebook uses this to identify architectural hubs.
LLMs lose 30%+ accuracy in the middle of long contexts
sourcebook places critical constraints at the top and bottom of output files — where LLMs pay the most attention.
READY_TO_INDEX?
No API keys. No LLM. Everything runs locally. MIT licensed.