Replace Claude Code's Context-Stuffing with git-semantic for Team-Wide Semantic Search
A new tool called git-semantic allows teams to build and share a semantic search index of their codebase via Git, eliminating the need for manual context management in Claude Code.
Why it matters
git-semantic solves a key bottleneck in using Claude Code by enabling team-wide semantic search of the codebase, improving productivity and reducing wasted tokens.
Key Points
- 1git-semantic parses the codebase, generates embeddings for code chunks, and stores them in a dedicated Git branch
- 2This enables semantic search to find relevant code by meaning, not just keywords
- 3The shared index can be used by the entire team without needing API keys or redundant embedding costs
- 4Indexing can be automated with GitHub Actions
Details
git-semantic is a Rust CLI tool that parses the codebase using tree-sitter, generates embeddings for logical chunks of code, and stores them in a dedicated 'semantic' Git branch. This allows the embeddings to become a first-class Git artifact that can be shared, versioned, and diffed across the team. This approach is superior to the manual context management required in Claude Code, where users either mention files, copy-paste large chunks, or use fuzzy file search that doesn't understand semantics. With git-semantic, users can perform semantic searches to find relevant code, then feed those specific files to Claude Code. The indexing only needs to be done once by a team member with an OpenAI API key, after which the shared index can be used by the rest of the team without any API keys or redundant embedding costs. The index updates incrementally, re-embedding only changed files on subsequent runs. This workflow can be automated using GitHub Actions.
No comments yet
Be the first to comment