Git history analysis for AI agents - hotspots, coupling, ownership, bus factor, bugspots, area health, AI detection, and 13 more queries backed by a cached, incrementally-updatable Rust binary.
Part of the agentsys ecosystem.
Scan a repo's git history once, cache the result, then query it repeatedly. The heavy lifting runs in the agent-analyzer Rust binary - this plugin provides the JavaScript interface and skill layer that other plugins consume.
- Use this when you need to identify high-churn files before a refactor
- Use this when evaluating bus factor risk across your codebase
- Use this when finding files that always change together (coupling)
- Use this when checking if AI-generated code is concentrated in certain areas
- Use this when other plugins need repo intelligence (deslop, sync-docs, drift-detect, audit-project, next-task, onboard, can-i-help)
/git-map init # Scan git history (first time)
/git-map query hotspots # Most active files, recency-weighted
/git-map query ownership src/auth/ # Who owns a path
/git-map query bus-factor # Knowledge distribution risk
After init, the artifact is cached as repo-intel.json. Subsequent queries are instant. Run /git-map update to add new commits incrementally.
| Action |
What it does |
init |
Full git history scan, generates repo-intel.json |
update |
Incremental update (only new commits since last scan) |
status |
Check cache staleness - commits behind, last analyzed date |
query <type> |
Run a specific analysis query |
| Query |
Description |
hotspots |
Most-changed files, recency-weighted |
coldspots |
Least-changed files (unmaintained) |
file-history <file> |
Change timeline for a specific file |
| Query |
Description |
bugspots |
Files with highest bug-fix density (fix commits / total) |
test-gaps |
Hot source files without co-changing test files |
diff-risk |
Risk score for recently changed files |
| Query |
Description |
ownership <path> |
Who owns a path, with staleness flags |
contributors |
All contributors with commit counts and AI ratio |
bus-factor |
Knowledge concentration risk with at-risk areas |
| Query |
Description |
coupling <file> |
Files that always change together |
| Query |
Description |
norms |
Detected commit conventions (conventional, freeform, mixed) |
conventions |
Commit style prefixes and scopes |
| Query |
Description |
areas |
Directory-level health (healthy / needs-attention / at-risk) |
health |
Repo-wide health overview |
release-info |
Release cadence and tag history |
| Query |
Description |
ai-ratio |
AI vs human commit attribution |
recent-ai |
Recent AI-generated changes (useful for deslop targeting) |
| Query |
Description |
onboard |
Project orientation data (tech stack, key areas, pain points) |
can-i-help |
Good-first areas, test gaps, doc drift, bugspots for contributors |
| Query |
Description |
doc-drift |
Documentation files with low code coupling (likely stale) |
Hotspot score: (recent_changes * 2 + total_changes) / (total_changes + 1) - recent activity gets 2x weight.
Recency window: 90 days relative to the repo's lastCommitDate (snapshot-relative, not wall clock).
Staleness: A contributor is "stale" if their lastSeen is > 90 days before the repo's last commit.
Area health:
healthy - active non-stale owner + bug fix rate < 30%
needs-attention - stale owner OR high bug rate
at-risk - stale owner AND high bug rate
| Flag |
Applies to |
Description |
--min-changes N |
hotspots, coldspots, bugspots |
Minimum change threshold |
--path-filter <glob> |
most queries |
Filter to specific paths |
--adjust-for-ai |
hotspots |
Downweight AI-generated changes |
/git-map query hotspots
|
+-- lib/git-map/queries.js (thin JS wrapper)
| |
| +-- agent-analyzer repo-intel query hotspots <path>
| (Rust binary, all computation)
|
+-- repo-intel.json (cached in .claude/ or .opencode/)
The JavaScript layer is intentionally thin - it resolves paths and parses JSON. All analysis logic lives in the agent-analyzer Rust binary.
Other plugins use git-map data automatically when available:
| Plugin |
Queries used |
Purpose |
| deslop |
recent-ai, test-gaps |
Target AI code, escalate untested findings |
| sync-docs |
doc-drift |
Find stale documentation |
| drift-detect |
doc-drift, areas |
Plan vs reality comparison |
| audit-project |
test-gaps |
Prioritize review of untested code |
| next-task |
hotspots, bugspots, bus-factor, diff-risk |
Risk-aware planning and review |
| enhance |
doc-drift |
Prioritize documentation improvements |
| ship |
health, bugspots |
Pre-release health check |
| onboard |
onboard |
Project orientation data |
| can-i-help |
can-i-help |
Contributor guidance signals |
- Git repository with history
- agent-analyzer binary (auto-downloaded on first use)
MIT