Sourcebook banner
maroondlabs maroondlabs

Sourcebook

AI community

Description

Generate AI context files from your codebase's actual conventions. Not what agents already know — what they keep missing.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

sourcebook

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.

npx sourcebook init          # sets up Claude Code hooks + generates CLAUDE.md
npx sourcebook check         # check your current diff for missing files
npx sourcebook scan-history  # see what you've been missing

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

Metric Result
Completeness gate 100% accurate (30/30 diffs)
False positive rate 0% on clean diffs
Test file detection 73%
Sibling detection 71%
AI analysis cost ~$0.012/run

Four Surfaces

1. CLI

Run it on any diff. No setup required.

npx sourcebook check              # check staged/unstaged changes
npx sourcebook check --ai         # add AI semantic analysis (requires ANTHROPIC_API_KEY)
npx sourcebook check --quiet      # exit code only (for CI/scripts)
npx sourcebook check --branch main  # compare vs a branch

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 c