Added
--budget=<tokens> — fit any context window
Trims the least-imported exports until the snapshot fits a token ceiling. Usage ranking only counts imports that actually resolve to the scanned files (with /index fallback) or name a workspace package — import { format } from 'date-fns' can never inflate a local export's rank. --budget also lifts the scan cap from 300 to 5,000 files, since large repos are exactly who needs it. Config key: "budget".
--dupes — find duplication before your AI adds more
Flags likely duplicate exports: identical names in different files (parseISO ≈ parse_iso) and same-words-different-order names (formatDate ≈ dateFormat), each with file:line locations. Exits 1 when any are found — slots into CI next to --check.
Monorepo awareness
npm/yarn/pnpm workspaces are auto-detected (package.json workspaces, pnpm-workspace.yaml). Import hints for files in another workspace package now say @acme/ui instead of ../../packages/ui/src/button — in markdown, JSON, and MCP output.
Fixed
- MCP
rootparameter on all tools: Claude Desktop starts MCP servers in/or the home directory, so cwd-based scans silently found nothing there. Pass your project path once and the tools work from any host. - Version-stamped snapshots: the header now carries
contextsnap@<version>(JSON gets a"version"field).--checkdetects a generator/checker version mismatch and tells you to pin the version in CI, instead of reporting a misleading "stale". - Prompt-injection hardening: JSDoc is capped at 600 chars and the snapshot preamble instructs the AI to treat comment text as reference material, never as instructions.
- README no longer claims
--budget"guarantees" a ceiling — token counts are ~4 chars/token estimates.
🤖 Generated with Claude Code