Git Contribution Analyzer (GCA)
# Git Contribution Analyzer
[](https://pypi.org/project/git-contribution-analyzer/)
[](https://pypi.org/project/git-contribution-analyzer/)
[](https://github.com/PANZERLEADER/git-contribution-analyzer/actions/workflows/ci.yml)
[](LICENSE)
[](https://glama.ai/mcp/servers/PANZERLEADER/git-contribution-analyzer)
[简体中文](README.zh-CN.md) | [Live Interactive HTML Demo](https://panzerleader.github.io/git-contribution-analyzer/) | [Installation](doc/guides/installation.md) | [MCP 2.0 Guide](doc/guides/mcp-guide.md) | [Release Spotlight Action](doc/guides/github-actions-spotlight.md) | [Releases](https://github.com/PANZERLEADER/git-contribution-analyzer/releases)

**Developer-owned, local-first Git memory engine and read-only anti-hallucination MCP server** —
never a manager surveillance dashboard or commit/LOC leaderboard. GCA separates verifiable Git
repository facts (`LANDED` / `RELEASED` vs `AUTHORED_ONLY` / `REVERTED`) from optional LLM phrasing
so your weekly updates, shareable Engineering Wrapped cards, Brag Documents, resumes, and
open-source release notes stay 100% evidence-backed.
The **0.9.0** release adds **shareable anti-vanity public artifacts** on top of the zero-friction
developer memory loop and MCP 2.0 stack:
- **10-Second Zero-Friction Recaps (`gca recap --open`)**: Run in any Git repo with zero setup —
auto-detects local `git config user.email`, auto-indexes `.gca/`, separates `LANDED+RELEASED`
from `AUTHORED_ONLY`, and opens a zero-CDN interactive HTML report.
- **Anti-Vanity Engineering Wrapped (`gca wrapped` & `gca portfolio wrapped`)**: Generate shareable
`1200×630` SVG cards (`--theme dark|light`), offline interactive HTML, and Markdown showing
monthly delivery rhythm and engineering difficulty while explicitly excluding unmerged & reverted
noise — with `--privacy strict` anonymization so private-repo engineers can share safely.
- **Turnkey Open-Source Release Spotlight (`gca spotlight` + `action.yml`)**: Drop-in GitHub
Composite Action that auto-detects the latest two release tags, summarizes evidence-backed
milestones (`EV-xxx`), and acknowledges contributors **alphabetically with zero rankings**.
- **Pure-Stdlib Read-Only MCP 2.0 & Claim Auditor (`gca audit`, `gca serve --mcp`, `gca outcome`, `gca brag`)**:
Audit existing resume/weekly drafts line-by-line (`gca audit --file resume.md --open`), expose
**8 workspace-sandboxed tools** (including `gca_audit_claims`), 4 built-in prompts, 2 sanitized
resources, and ready-to-install plugins for Claude Code (`integrations/claude-plugin/`), Cursor
(`integrations/cursor/`), and Agent Skills (`integrations/agent-skill/`) — zero extra runtime
dependencies, zero source diffs or emails leaked.

[Live Demo Gallery](https://panzerleader.github.io/git-contribution-analyzer/) |
[MCP 2.0 Guide](doc/guides/mcp-guide.md) |
[Open-Source Spotlight Action](doc/guides/github-actions-spotlight.md) |
[Anti-Hallucination Benchmark](scripts/benchmark_anti_hallucination.py) |
[Contributing](CONTRIBUTING.md) | [Security](SECURITY.md) |
[Code of Conduct](CODE_OF_CONDUCT.md)
## Why GCA vs. Asking an LLM Directly Over `git log`?
| Capability | Raw LLM over `git log` | GCA (`0.9.0`) |
|---|---|---|
| Delivered vs. unmerged branches | Often conflated | Strictly separates `LANDED+RELEASED` vs `AUTHORED_ONLY` |
| Reverted commits & merge noise | Counted as shipped work | `REVERTED` isolated into rework; patch-ID deduplication |
| Multi-email & multi-repo merging | Manual / double-counted | Deterministic identity normalization & `<repoKey>:EV-xxx` |
| Fabricated metrics / claims | Frequent hallucinations | Claim ceilings (pure Git never unlocks `LED`) + signed `outcomes.yml` |
| Privacy & public sharing | Sends raw diffs to cloud | Local-first SQLite, zero-CDN HTML/SVG, `--privacy strict` anonymization |

## 10-Second Quick Start
Works out of the box on macOS, Linux, and Windows (output language auto-detects your system locale; pass `--language en-US` or `--language zh-CN` to override):
```bash
# Run ephemerally in ANY local Git repo (auto-detects git user.email, auto-indexes .gca, opens HTML)
uvx --from git-contribution-analyzer gca recap --open
# Or install globally with pipx
pipx install git-contribution-analyzer
gca recap --window today
gca recap --window 7d --open
# Record a verified metric linked to Git evidence and export an annual Brag Document
gca outcome add --text "Cut checkout P95 latency from 420ms to 180ms" --source "benchmark-2026.md" --verified-by "tech-lead" --evidence EV-001
gca brag --year 2026 --open
# Export a shareable, anti-vanity Engineering Wrapped card (public or strict private-repo mode)
gca wrapped --year 2026 --format svg --output wrapped.svg
gca wrapped --year 2026 --privacy strict --format svg --output wrapped-private.svg
# Audit an existing resume or weekly update draft line-by-line (catches unmerged/reverted/LED/unbacked metrics)
gca audit . --file resume.md --open
# Generate an unranked Open-Source Release Spotlight across your latest two tags
gca spotlight . --open
# Preview or install read-only MCP 2.0 config for Antigravity / Codex / Claude / Cursor
gca install-agent --target antigravity --workspace .
gca install-agent --target antigravity --workspace . --apply
# Build the sanitized offline HTML & Markdown Live Demo Gallery locally
python scripts/build_public_demo.py --output dist/public-demo
```
## AI Coding Agent Plugins & MCP 2.0 Distribution
- **One-line MCP 2.0 install**: `gca install-agent --target <antigravity|claude|codex|cursor> --workspace . --apply`
- **Claude Code Plugin**: [`integrations/claude-plugin/`](integrations/claude-plugin/.claude-plugin/plugin.json) (includes `.mcp.json` + `gca-memory` skill)
- **Cursor Rule & MCP Template**: [`integrations/cursor/`](integrations/cursor/.cursor/rules/gca-anti-hallucination.mdc)
- **Cross-Platform Agent Skill**: [`integrations/agent-skill/SKILL.md`](integrations/agent-skill/SKILL.md)
- **Official MCP Registry Manifest**: [`packaging/mcp/server.json`](packaging/mcp/server.json) & [MCP Registry Guide](doc/guides/mcp-registry-listing.md)
- **Homebrew Formula Template**: [`packaging/homebrew/git-contribution-analyzer.rb`](packaging/homebrew/git-contribution-analyzer.rb)
## Development
```powershell
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\gca.exe --help
```
Install and run the optional desktop application:
```powershell
.\.venv\Scripts\python.exe -m pip install -e ".[dev,gui]"
.\.venv\Scripts\gca-gui.exe
```
For repository-local symbol search, impact analysis, and architecture visualization, see the
[CodeGraph and Understand-Anything guide](doc/guides/code-intelligence.md).
<details>
<summary><strong>Advanced CLI Reference (Indexing, Portfolio, Structural Observations, Team Assessment & Providers)</strong></summary>
## Current CLI
```powershell
# Initialize a repository-local workspace and build the first Git index.
gca init D:\path\to\repository
# Rebuild the deterministic Git index or synchronize new commits and changed refs.
gca index D:\path\to\repository --json
gca sync D:\path\to\repository --json
# Inspect normalized identities and confirm an alias mapping.
gca identities list D:\path\to\repository --json
gca identities map D:\path\to\repository `
--name "Old Name" `
--email "old@example.com" `
--person-name "Canonical Name" `
--person-email "canonical@example.com" `
--json
# Read workspace and index health as versioned JSON.
gca status D:\path\to\repository --json
gca doctor D:\path\to\repository --json
# Build and inspect an observation-only historical structural baseline.
gca structural rebuild D:\path\to\repository `
--cutoff 2026-07-01T00:00:00Z `
--time-strategy lifetime --json
gca structural status D:\path\to\repository --json
gca structural show D:\path\to\repository --baseline <baseline-id> --json
gca structural prune D:\path\to\repository --keep 8 --yes --json
# Generate deterministic contribution evidence without an LLM.
gca analyze D:\path\to\repository `
--person alice@example.com `
--since 2026-01-01 `
--until 2026-06-30 `
--no-llm `
--json
# Analyze every indexed Git identity, including identities not yet confirmed.
gca analyze D:\path\to\repository --all --no-llm --json
# Assess completed workload and deterministic engineering difficulty.
gca assess D:\path\to\repository `
--person alice@example.com `
--person bob@example.com `
--since 2026-01-01 `
--no-llm `
--json
gca assess D:\path\to\repository --all `
--exclude-person ci@example.com `
--no-llm --json
# Build calendar month trends; week and quarter are also supported.
gca assess D:\path\to\repository --all `
--since 2025-01-01 --until 2026-12-31 `
--period month --time-basis landed --no-llm --json
# Compare two historical work assessment runs.
gca runs compare <base-run-id> <target-run-id> D:\path\to\repository --json
# Generate evidence-backed resume candidates for one confirmed person.
gca resume D:\path\to\repository `
--person alice@example.com `
--target-role "Senior Backend Engineer" `
--language en-US `
--style concise `
--max-bullets 6 `
--no-llm `
--json
# Inspect the built-in providers and test the selected provider.
gca providers list D:\path\to\repository --json
gca providers test D:\path\to\repository --json
# Inspect and replay persisted analysis runs.
gca runs list D:\path\to\repository --json
gca runs show <run-id> D:\path\to\repository --json
# Rebuild reports from a persisted run.
gca report D:\path\to\repository --run latest --format markdown
gca report D:\path\to\repository --run latest --format json --output report.json
# Remove only the repository-local .gca workspace.
gca uninit D:\path\to\repository --yes
# Manage and analyze a multi-repository portfolio.
gca portfolio init D:\path\to\portfolio --scan-root D:\path\to\repos --group core --json
gca portfolio status D:\path\to\portfolio --json
gca portfolio sync D:\path\to\portfolio --concurrency 4 --verbose --json
gca portfolio assess D:\path\to\portfolio --person alice@example.com --no-llm --format html --output summary.html --json
gca portfolio resume D:\path\to\portfolio --person alice@example.com --target-role "Backend Engineer" --no-llm --format html --output resume.html --json
gca portfolio recap D:\path\to\portfolio --person alice@example.com --window 7d --format html --output recap.html --json
gca portfolio verify D:\path\to\portfolio --run latest --resume-file resume.md --json
# Serve read-only MCP tools over stdio (workspace allowlist required).
gca serve --mcp --workspace D:\path\to\portfolio
```
Phase 2 indexes refs, commits, parent relationships, file changes, identities, stable
patch IDs, target-branch reachability, release tags, cherry-picks, and reverts. The index
is stored under the analyzed repository's `.gca/` directory and is ignored locally through
`.git/info/exclude`; GCA does not modify source files or Git history.
Git facts and the deterministic contribution analysis do not depend on an LLM.
Analysis runs persist their parameters, Git baseline, rule version, Contribution Items,
capability assessments, Evidence, and versioned report JSON. Phase 4 adds pluggable Mock,
OpenAI-compatible, Anthropic, Ollama, Codex CLI, and Claude CLI providers for semantic
summaries, capability explanations, and resume candidates. Providers cannot replace or modify
deterministic facts.
## LLM Providers
LLM use is disabled by default. Enable it in the analyzed repository's `.gca/config.yml`:
```yaml
llm:
enabled: true
provider: openai-compatible
model: gpt-4.1-mini
baseUrl: https://api.openai.com/v1
apiKeyEnv: GCA_LLM_API_KEY
timeoutSeconds: 30.0
maxRetries: 2
allowFallbackToRules: true
```
Set the referenced environment variable outside the repository. Never put the key value in
`.gca/config.yml`. CLI flags are intentionally not provided for key values.
`gca analyze --no-llm` is always offline and deterministic. With LLM enabled, every invocation
records a request hash, Provider/model, Prompt/Schema versions, attempts, latency, status, error
code, and cache-hit state. Prompts, API keys, Authorization headers, and source bodies are not
stored. Provider failures produce a `PARTIAL` deterministic report when fallback is allowed;
otherwise `analyze` exits with code `6` and persists a failed run.
The same Provider configuration is used by `assess` and `resume`. Work assessment uses the
independent `assessment-explanation-v1` task; resume generation uses `resume-v1`. Provider
output cannot alter completion, size, difficulty, Evidence, or the deterministic claim-strength
ceiling. With fallback enabled, assessment retains its deterministic result and resume retains
its conservative template.
To reuse an authenticated coding CLI instead of an API key:
```yaml
llm:
enabled: true
provider: codex-cli # or claude-cli
model: configured-default
executable: null # auto-discover, or set an absolute wrapper/executable path
commandTimeoutSeconds: 300
allowFallbackToRules: true
```
Command Providers run in an isolated temporary directory. Repository source is not made
available to the agent: GCA passes only its minimized semantic task over stdin. Codex runs
ephemerally with a read-only sandbox and MCP disabled; Claude runs without tools, MCP, Chrome,
or session persistence. Existing CLI authentication and model-provider configuration are reused.
See [`doc/guides/provider-guide.md`](doc/guides/provider-guide.md) for all providers and
environment precedence.
## Index Semantics
- `AUTHORED_ONLY`: the commit is indexed but is not reachable from the configured target branch.
- `LANDED`: the commit is reachable from the target branch.
- `RELEASED`: the commit is reachable from the target branch and at least one release tag.
- `REVERTED`: a landed or released commit is linked to a landed revert commit.
- Matching stable patch IDs link an authored-only cherry-pick source to delivered work without
counting it as a second delivery.
Exact email and `.mailmap` mappings are deterministic. Fuzzy name matches are never merged
automatically; use `gca identities map` to confirm ambiguous aliases.
## Deterministic Analysis
`gca analyze` accepts either one confirmed Person through `--person` or every indexed Git
identity through `--all --no-llm`. Project analysis deliberately keeps unconfirmed identities
separate and emits identity warnings instead of silently merging or excluding them. Both modes
support inclusive date/time, branch, release tag, path scope, and delivery-status filters.
Person and project reports contain separate technical and business summaries. Technical
summaries cover modules, change types, and evidence-backed capability signals. Business domains
are deterministically inferred from conventional commit scopes, issue keys, and module fallback
clusters. They are labels for work areas, not claims about revenue, customer value, business
ownership, or individual performance.
Analysis reports also expose versioned structural signals derived from commit-level path sets.
Pairs require at least two repeated co-change commits; hotspots require at least two change
commits and are ordered by change concentration plus repeated coupling. Merge commits, generated
paths, binary-only changes, and duplicate patches are excluded. Structural signals are auditable
repository observations and do not alter workload, difficulty, ranking, or performance conclusions.
Every Contribution Item and capability claim references an Evidence ID. Reports explicitly
state that Git evidence does not prove business outcome, sole ownership, or employee value.
Optional ranking uses published workload, difficulty, and delivery rules; commit and raw line
counts do not directly determine the score.
Shared or system accounts require manual review. If one email is used by both a person and an
automation identity, do not use the combined Person for individual performance conclusions.
## Historical Structural Observations
`gca structural rebuild` materializes file-change frequencies and repeated file co-change
relationships from local indexed Git history strictly before an exclusive cutoff. Baseline IDs
include repository, branch, scope, cutoff and versioned rule configuration. Nonzero occurrences
are retained so a low-frequency edge can cross a candidate threshold after later syncs. Lifetime,
rolling-window and dual-window views are supported; coupling output includes conditional ratios,
Jaccard and a hub penalty rather than treating every shared utility file as a dependency.
This surface is observation-only. It does not modify `difficulty-rules-v1`, workload, delivery,
ranking, resume output or LLM context. New workspaces use the conservative
`community-baseline-v1` profile from `.gca/config.yml`; its automatic difficulty promotion switch is
fixed to `false`. The profile is ready for observation-only use without project-specific human
review. Empirical calibration and a repository-disjoint holdout are required only for a future rule
that automatically changes individual difficulty. The feature uses local Git and SQLite only, with
no Forge API or Hercules runtime dependency. The desktop Structure page exposes the same status,
rebuild, show and prune operations.
```yaml
structural:
profile: community-baseline-v1
timeStrategy: DUAL_WINDOW
minimumBaselineCommits: 50
hotspotPercentile: 0.95
minimumCoChangeCount: 3
minimumSubsetRatio: 0.8
minimumJaccard: 0.3
minimumHubPenalty: 0.5
maximumContextPaths: 100
rollingWindowDays: 365
automaticDifficultyPromotion: false
```
## Work Assessment
`gca assess` separates completed (`LANDED`/`RELEASED`), pending (`AUTHORED_ONLY`), rework, and
merge/integration activity. It reports `SMALL`, `MEDIUM`, `LARGE`, and `XLARGE` effective-change
bands separately from `ROUTINE`, `STANDARD`, `COMPLEX`, and `HIGH_RISK` engineering difficulty.
Merge diffs, matching patch IDs, generated/vendor/build output, lockfiles, and binary line counts
do not create duplicate workload. Difficulty is based on versioned data, distributed-system,
compatibility, impact, critical-domain, and delivery signals; raw line count cannot raise it.
`--time-basis` accepts `authored`, `committed`, `merged`, `landed`, and `released`. Landed time is
the target branch first-parent integration point, merged time includes only work introduced by a
merge commit, and released time is the tag creation time. `--period week|month|quarter` requires
both boundaries and emits persisted trends, period-over-period deltas, and year-over-year deltas
when the matching prior-year period is in range. Weeks start on Monday and partial boundary periods
are marked. Offset-free `--since` and `--until` values use the host system time zone; explicit `Z`
or numeric offsets remain authoritative, and calendar periods follow that local calendar. The Git
index and SQLite query bindings remain normalized to UTC. Run `gca index` once after upgrading so
old timestamps are rebuilt in UTC.
Assessment reports include technical and business summaries, Evidence IDs, rule versions,
confidence, and gaps. Repeatable `--rank-by` enables dense dimension rankings. An explicit
`--ranking-config` YAML can add a cohort-normalized weighted total; without it no total score is
generated. These values are review aids, not performance ratings, working-hours estimates,
compensation, or promotion recommendations. Persisted v2 runs can be exported with
`gca report --format csv`; email is omitted unless `--include-email` is supplied.
## Resume Generation
`gca resume` only accepts a confirmed Person and defaults to landed/released work. Every project
summary and experience bullet references Contribution Item and Evidence IDs. Claim strength is
limited to `CONTRIBUTED`, `IMPLEMENTED`, or `LED`; Git-only evidence never unlocks `LED`.
`--no-llm` generates a conservative template. Optional verified outcomes are loaded from a
strict UTF-8 YAML file:
```yaml
outcomes:
- id: OUT-001
text: API P95 latency reduced from 420ms to 180ms
source: benchmark-report-2026-04.md
verifiedBy: team-lead
verifiedAt: 2026-04-20
```
Percentages, revenue, user growth, online performance, and similar result numbers are rejected
unless the claim cites a verified outcome. Resume reports omit email addresses, other people,
team rankings, and internal difficulty comparisons. The legacy `semantic.resumeBullets` field
remains readable during 1.x but is deprecated; new integrations should use `gca resume`.
</details>
## Quality Checks
```powershell
.\.venv\Scripts\python.exe -m ruff check .
.\.venv\Scripts\python.exe -m mypy src
.\.venv\Scripts\python.exe -m pytest --cov=git_contribution_analyzer
.\.venv\Scripts\python.exe -m build
```
## Documentation
- [Simplified Chinese documentation](doc/zh-CN/README.md)
- [Architecture](doc/architecture/architecture.md)
- [Data model and migrations](doc/architecture/data-model.md)
- [CLI reference](doc/cli/cli-reference.md)
- [Installation, upgrade and removal](doc/guides/installation.md)
- [Read-only MCP server guide](doc/guides/mcp-guide.md)
- [CodeGraph and Understand-Anything](doc/guides/code-intelligence.md)
- [Assessment and resume methodology](doc/guides/methodology.md)
- [Privacy and provider data boundaries](doc/guides/privacy.md)
- [Golden dataset](doc/testing/golden-dataset.md)
- [Structural calibration protocol](doc/testing/structural-calibration.md)
- [Structural calibration decision](doc/reports/structural-calibration-report.md)
- [Open-source spotlight GitHub Action guide](doc/guides/github-actions-spotlight.md)
- [MCP Registry listing metadata](doc/guides/mcp-registry-listing.md)
- [0.9.1 release](doc/releases/0.9.1.md)
- [0.9.0 release](doc/releases/0.9.0.md)
- [0.8.1 release](doc/releases/0.8.1.md)
- [0.8.0 release](doc/releases/0.8.0.md)
- [0.7.0 release](doc/releases/0.7.0.md)
- [0.6.1 release](doc/releases/0.6.1.md)
- [0.6.0 release](doc/releases/0.6.0.md)
- [0.5.1 release](doc/releases/0.5.1.md)
- [0.5.0 release](doc/releases/0.5.0.md)
- [0.4.1 release](doc/releases/0.4.1.md)
- [0.4.0 release](doc/releases/0.4.0.md)
- [0.3.0 release](doc/releases/0.3.0.md)
- [0.2.0 release](doc/releases/0.2.0.md)
- [0.1.0 release](doc/releases/0.1.0.md)
- [Performance baseline](doc/reports/performance-baseline.md)
- [Security and privacy audit](doc/reports/security-privacy-audit.md)
Release CI builds wheel/sdist, CLI standalone and GUI standalone artifacts on Windows, Linux and
macOS. The ordinary CI matrix also performs isolated wheel and repository lifecycle smoke tests.
TDQS
Scored across 8 tools
Most tools target distinct artifacts: overview/status are inspection-oriented, summary/recap/resume generate different output types, and evidence/citation/claim checks operate at different verification levels. However, gca_workspace_overview and gca_portfolio_status both read-only inspect portfolio or repo state, and gca_verify_citations vs gca_audit_claims could be confused by an agent deciding which validation path to use.
All tools use a consistent gca_ prefix and snake_case, making the set easy to scan. Most names are verb-led, but a few are noun phrases (gca_workspace_overview, gca_portfolio_status, gca_portfolio_summary), creating a minor convention deviation.
Eight tools is well-scoped for a Git contribution analysis server, with each tool covering a meaningful operation rather than redundant variations. The set is neither thin nor bloated.
The surface covers inspection, summaries, recaps, resumes, evidence lookup, citation verification, and claim auditing, which is strong lifecycle coverage for this domain. Minor gaps include no explicit indexing/refresh/run-creation operation and no tool for listing or searching evidence beyond exact EV lookup.