Git Intelligence
basemind precomputes a per-repo git-history index backed by gix, resolving blame and diffs
at symbol resolution. History queries return commits, authors, and paths as structured
data in tens of microseconds — a pure accelerator that rebuilds automatically when history
changes.
Core tools
Section titled “Core tools”All of the following are modes of the git MCP tool (basemind git <mode> on the CLI).
git recent
Section titled “git recent”Recent commits with their affected files and summary lines.
{ "mode": "recent", "limit": 10}Returns the newest commits first, paths modified in each, and author/message. Useful for “what happened in the last few hours?”
git touching
Section titled “git touching”All commits that modified a given path, newest-first.
{ "mode": "touching", "path": "src/scanner.rs"}Backed by a posting-list index, resolves in ~37 microseconds on a warm repo with thousands of commits.
git by-path
Section titled “git by-path”Commits matching a path pattern, like glob or prefix matching. The MCP mode is by_path;
the CLI subcommand is by-path.
{ "mode": "by_path", "pattern": "src/extract/**"}git blame
Section titled “git blame”Per-line blame: who last changed each line and in which commit.
{ "mode": "blame", "path": "src/scanner.rs"}Returns author, commit hash, and timestamp for every line.
git blame-symbol
Section titled “git blame-symbol”Blame at symbol resolution: who last changed a specific function, type, or definition, and
when its body last changed structurally. The MCP mode is blame_symbol; the CLI subcommand
is blame-symbol.
{ "mode": "blame_symbol", "path": "src/scanner.rs", "name": "process_file"}git diff
Section titled “git diff”File contents diff across revisions.
{ "mode": "diff", "path": "src/scanner.rs", "old": "HEAD~5", "new": "HEAD"}git diff-outline
Section titled “git diff-outline”Structural diff: which symbols were added, removed, or modified between revisions. The MCP
mode is diff_outline; the CLI subcommand is diff-outline.
{ "mode": "diff_outline", "path": "src/scanner.rs", "old": "HEAD~10", "new": "HEAD"}Shows + function_name, - removed_type, etc., without diffing implementation details.
git symbol-history
Section titled “git symbol-history”When a symbol’s body changed over time. Uses structural hashing to track modifications
across commits. The MCP mode is symbol_history; the CLI subcommand is symbol-history.
{ "mode": "symbol_history", "path": "src/scanner.rs", "name": "process_file"}Returns commits where this symbol’s implementation changed, useful for “when was this function last refactored?”
git churn
Section titled “git churn”Files ranked by churn frequency. What changes the most?
{ "mode": "churn", "limit": 20}git search
Section titled “git search”Full-text search over commit authors and messages across all branches.
{ "mode": "search", "pattern": "fix.*index", "field": "message"}Search "author", "message", or "all" (default). Useful for “find commits mentioning
the schema bump” or “what did Alice commit?”
git status
Section titled “git status”What’s staged and unstaged right now — the structured equivalent of git status.
{ "mode": "status"}Performance
Section titled “Performance”On a typical repo with 2,000–4,000 commits:
| Query | Latency | Notes |
|---|---|---|
git touching |
~37 µs | Indexed posting-list lookup |
git recent |
~13 µs | Newest-first list scan |
| Index build | 0.5–3.2 s | Depends on commit depth |
| Index size | 6–22 % of .git |
Space–time trade-off |
The index is a pure accelerator: it rebuilds automatically when history is rewritten (rebase, force-push, filter-repo) and the tools fall back to live history walks if the index is stale.
Discipline
Section titled “Discipline”- Prefer
gitmodes over shelling out togit log,git blame,git diff. Structured results cost fewer tokens to parse. - Use
git recentinstead of parsinggit logoutput. Get commit hashes, paths, and timestamps directly. - Use
git blame/git blame-symbolinstead of shelling out togit blame. Symbol-level blame is more precise than line-level. - Use
git diff-outlinefor structural diffs. Skip implementation details and focus on what symbols changed. - Use
git searchfor commit message mining. Full-text search over message and author is cheaper than parsing the log.