Track the downstream fate of every commit. Post-merge feedback for AI coding agents.
Project description
git-aftermerge
Track the downstream fate of every commit. Feed structured post-merge feedback to AI coding agents.
What This Is
git-aftermerge is a Python CLI + MCP server that analyzes what happens to code after it gets merged — tracking survival, reverts, churn, and bug-fix correlations — then feeds structured feedback back to coding agents so they learn from their own history.
Installation
pip install git-aftermerge
Quick Start
# Initialize in your repo
cd /path/to/your/repo
git-aftermerge init
# Check fate of a specific commit
git-aftermerge fate abc1234
# View aggregate patterns
git-aftermerge report
# Generate agent context file
git-aftermerge context --output .aftermerge/CONTEXT.md
Then in CLAUDE.md:
## Post-Merge Context
See .aftermerge/CONTEXT.md for code survival data and risky areas.
How It Works
- Scan — parses git history, runs
git blameto track line-level survival - Score — computes a 0–100 survival score per commit with penalties (reverts, bug-fixes) and bonuses (longevity, extensions)
- Detect — finds reverts (standard + manual), bug-fix correlations, and churn spikes
- Aggregate — rolls up patterns by path, author, commit type, size, and language
- Serve — exposes everything via CLI, JSON, markdown context, or MCP tools
MCP Server
Add to your MCP config (claude_desktop_config.json or equivalent):
{
"mcpServers": {
"aftermerge": {
"command": "git-aftermerge",
"args": ["mcp-serve"],
"cwd": "/path/to/your/repo"
}
}
}
Available MCP tools:
aftermerge_get_fate— fate of a specific commitaftermerge_get_patterns— aggregate survival patternsaftermerge_get_risky_areas— directories with lowest survival scoresaftermerge_get_recent_failures— recent reverts and bug-fix correlationsaftermerge_get_context— markdown summary for agent injection
CLI Reference
git-aftermerge init Initialize tracking in current repo
git-aftermerge scan Update commit fate data
git-aftermerge fate <sha> Show fate of a specific commit
git-aftermerge report Show aggregate patterns
git-aftermerge context Generate agent-consumable context file
git-aftermerge watch Watch for new commits and auto-scan
git-aftermerge mcp-serve Start MCP server (stdio)
Contributing
git clone https://github.com/inthepond/git-aftermerge.git
cd git-aftermerge
pip install -e ".[dev]"
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_aftermerge-0.1.0.tar.gz.
File metadata
- Download URL: git_aftermerge-0.1.0.tar.gz
- Upload date:
- Size: 50.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90f816f6f685dd8d34274994639eef14840a2fc804eb45f6838601560b6d5beb
|
|
| MD5 |
eadc72c4f117a3bb6645e7e8167c7198
|
|
| BLAKE2b-256 |
171d3b8efcc2fe0a2acee6cf46efa020340a2643937a5cd81ddc6aef2e80119f
|
Provenance
The following attestation bundles were made for git_aftermerge-0.1.0.tar.gz:
Publisher:
publish.yml on inthepond/git-aftermerge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_aftermerge-0.1.0.tar.gz -
Subject digest:
90f816f6f685dd8d34274994639eef14840a2fc804eb45f6838601560b6d5beb - Sigstore transparency entry: 1292064749
- Sigstore integration time:
-
Permalink:
inthepond/git-aftermerge@d44353a9728b2cfbecd9d344eb313184d3285eb9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/inthepond
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d44353a9728b2cfbecd9d344eb313184d3285eb9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file git_aftermerge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: git_aftermerge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef3b1ca2028b8c3803ce6895b4e0d89f4feb8bf7f395fe2ae17f0df429c13f42
|
|
| MD5 |
ed8e67f4d9b3e15d6cee6b25f733ccc9
|
|
| BLAKE2b-256 |
8ba482558b8170b45ec8a9ec40ba98ded37a89b860ff74dfc23be8e88fb80890
|
Provenance
The following attestation bundles were made for git_aftermerge-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on inthepond/git-aftermerge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_aftermerge-0.1.0-py3-none-any.whl -
Subject digest:
ef3b1ca2028b8c3803ce6895b4e0d89f4feb8bf7f395fe2ae17f0df429c13f42 - Sigstore transparency entry: 1292064847
- Sigstore integration time:
-
Permalink:
inthepond/git-aftermerge@d44353a9728b2cfbecd9d344eb313184d3285eb9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/inthepond
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d44353a9728b2cfbecd9d344eb313184d3285eb9 -
Trigger Event:
push
-
Statement type: