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”recent_changes
Section titled “recent_changes”Recent commits with their affected files and summary lines.
{ "limit": 10}Returns the newest commits first, paths modified in each, and author/message. Useful for “what happened in the last few hours?”
commits_touching
Section titled “commits_touching”All commits that modified a given path, newest-first.
{ "path": "src/scanner.rs"}Backed by a posting-list index, resolves in ~37 microseconds on a warm repo with thousands of commits.
find_commits_by_path
Section titled “find_commits_by_path”Commits matching a path pattern, like glob or prefix matching.
{ "pattern": "src/extract/**"}blame_file
Section titled “blame_file”Per-line blame: who last changed each line and in which commit.
{ "path": "src/scanner.rs"}Returns author, commit hash, and timestamp for every line.
blame_symbol
Section titled “blame_symbol”Blame at symbol resolution: who last changed a specific function, type, or definition, and when its body last changed structurally.
{ "path": "src/scanner.rs", "name": "process_file"}diff_file
Section titled “diff_file”File contents diff across revisions.
{ "path": "src/scanner.rs", "old": "HEAD~5", "new": "HEAD"}diff_outline
Section titled “diff_outline”Structural diff: which symbols were added, removed, or modified between revisions.
{ "path": "src/scanner.rs", "old": "HEAD~10", "new": "HEAD"}Shows + function_name, - removed_type, etc., without diffing implementation details.
symbol_history
Section titled “symbol_history”When a symbol’s body changed over time. Uses structural hashing to track modifications across commits.
{ "path": "src/scanner.rs", "name": "process_file"}Returns commits where this symbol’s implementation changed, useful for “when was this function last refactored?”
hot_files
Section titled “hot_files”Files ranked by churn frequency. What changes the most?
{ "limit": 20}search_git_history
Section titled “search_git_history”Full-text search over commit authors and messages across all branches.
{ "pattern": "fix.*index", "field": "message"}Search "author", "message", or "all" (default). Useful for “find commits mentioning
the schema bump” or “what did Alice commit?”
working_tree_status
Section titled “working_tree_status”What’s staged and unstaged right now — the structured equivalent of git status.
{}Performance
Section titled “Performance”On a typical repo with 2,000–4,000 commits:
| Query | Latency | Notes |
|---|---|---|
commits_touching |
~37 µs | Indexed posting-list lookup |
recent_changes |
~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 these tools over shelling out to
git log,git blame,git diff. Structured results cost fewer tokens to parse. - Use
recent_changesinstead of parsinggit logoutput. Get commit hashes, paths, and timestamps directly. - Use
blame_file/blame_symbolinstead ofgit blame. Symbol-level blame is more precise than line-level. - Use
diff_outlinefor structural diffs. Skip implementation details and focus on what symbols changed. - Use
search_git_historyfor commit message mining. Full-text search over message and author is cheaper than parsing the log.