Skip to content

v2.2.0 — MCP query tools, CLAUDE.md inject, CI drift check

Choose a tag to compare

@myothuko98 myothuko98 released this 05 Jul 07:28

Added

MCP query tools

  • search_exports — find an export by name, signature, or JSDoc substring. Returns file:line locations so your agent jumps straight to a definition instead of pulling the whole snapshot.
  • get_file_context — compact contract block (signatures, line numbers, JSDoc) for a single file. Much cheaper than get_context when the agent already knows the file.

--inject[=<file>]

Writes the snapshot between <!-- contextsnap:start/end --> markers in CLAUDE.md / AGENTS.md (auto-detected) or any file. Your content outside the markers is never touched; re-runs are idempotent. Every Claude Code / agent session picks the context up automatically — no clipboard, no MCP setup. Composes with --watch. Config key: "inject": true | "<file>".

--check

CI drift guard: regenerates the snapshot in memory and compares it (generation dates ignored) against the committed .ai-context.md — or the injected block when combined with --inject. Exits 1 on drift, like a lint step:

- run: npx contextsnap src --check

Fixed

  • MCP scans no longer crash with ENOENT when an auto-detect directory (e.g. src/lib) doesn't exist.
  • MCP server version now reads from package.json instead of a stale hardcoded string.

🤖 Generated with Claude Code