Evidence-backed lookup for big-repo PR contributions. Local-only, zero-runtime, stdlib-first. Renamed from `prgenius` to avoid PyPI name collision with an unrelated 2024 GPT-3 PR-description tool. Distribution renamed again in v0.7.8: `prgenius-kb` → `prgenius-core` (aligned with `misakanet-core` convention).
Project description
type: Schema Reference title: prgenius description: Evidence-backed lookup library for big-repo PR contributions — stdlib-first CLI + stdio MCP shell. version: 0.7.0 created: 2026-07-04 updated: 2026-07-05 author: zsxh1990
prgenius
Evidence-backed lookup for big-repo PR contributions. Local-only. Stdlib-first.
A pure-Python (zero hard deps) library + CLI that reads the markdown knowledge base in this repo and exposes it through structured tool calls.
Install
pip install prgenius-core
Or run from a checkout:
cd prgenius
PYTHONPATH=src python3 -m prgenius --version
Important: PyPI package is the interface, not the data
The PyPI wheel ships only the Python code (prgenius/ package).
The knowledge base (profile markdown, case studies, OKF schemas) lives
in the GitHub repo at https://github.com/zsxh1990/pr-genius and is
not bundled into the wheel. To use prgenius-core after pip install,
point it at a checkout of the knowledge base:
git clone https://github.com/zsxh1990/pr-genius
prgenius-core --repo-root ./pr-genius profile get astral-sh/uv
If you cloned a specific tag/commit, the package's __version__ should
match (e.g. v0.7.7 ↔ prgenius-core==0.7.7).
Optional: MCP server
The MCP entry point (prgenius-core mcp serve) requires the mcp package:
pip install "prgenius-core[mcp]"
Quick Start
# 1) Schema reference
PYTHONPATH=src python3 -m prgenius schema info
# 2) Look up one repo
PYTHONPATH=src python3 -m prgenius profile get astral-sh/uv
# 3) List currently-open case studies
PYTHONPATH=src python3 -m prgenius case list --status=open
# 4) NDJSON dump of every case study (for benchmarks / agent context)
PYTHONPATH=src python3 -m prgenius dump > cases.ndjson
# 5) Run as stdio MCP server (for Cursor/Cline/Claude Code)
PYTHONPATH=src python3 -m prgenius mcp serve
Programmatic use
from prgenius.parser import profile_get, iter_case_studies, schema_info
prof = profile_get("path/to/repo_root", "astral-sh/uv")
print(prof["frontmatter"]["title"])
for case in iter_case_studies("path/to/repo_root"):
fm = case["frontmatter"]
if fm.get("final_status") == "open":
print(fm.get("pr_number"), fm.get("repo"))
What's exposed
| Tool | Description |
|---|---|
prgenius profile get <org/name> |
One Repo Profile (frontmatter + first lines) |
prgenius case list [--status=...] |
All PR Case Study rows |
prgenius schema info |
Supported schema versions + enums |
prgenius dump |
NDJSON dump (one case per line) |
prgenius mcp serve |
Stdio MCP server (4 tools) |
MCP surface (when mcp is installed)
The MCP shell exposes 4 tools to local agents:
get_repo_profile(repo)— one Profile dictlist_open_prs()— currently-open PRsget_case_study(repo, pr_number)— one Case Studyschema_info()— schema versions + enums
No network, no auth, no rate-limiting. Agent calls go through stdio only.
--repo-root flag
The MCP server defaults to a path computed from its install location
(<package>/../.. × 3 to reach the knowledge base). When that path is
wrong (editable install, venv, worktree, fork), pass --repo-root:
python3 -m prgenius --repo-root /path/to/big-repo-pr-knowledge mcp serve
Wiring into Cursor / Claude Code / Cline
These editors all read MCP server config from JSON. Point command at
python3 -m prgenius and args at mcp serve (add --repo-root if the
auto-detected path doesn't match your checkout). No env keys, no auth.
Claude Code (~/.claude/mcp.json or project-local .mcp.json):
{
"mcpServers": {
"pr-genius": {
"command": "python3",
"args": ["-m", "prgenius", "--repo-root", "/abs/path/to/big-repo-pr-knowledge", "mcp", "serve"]
}
}
}
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"pr-genius": {
"command": "python3 -m prgenius",
"args": ["--repo-root", "/abs/path/to/big-repo-pr-knowledge", "mcp", "serve"]
}
}
}
Cline (VS Code cline_mcp_settings.json):
{
"mcpServers": {
"pr-genius": {
"command": "python3",
"args": ["-m", "prgenius", "--repo-root", "/abs/path/to/big-repo-pr-knowledge", "mcp", "serve"],
"disabled": false
}
}
}
Replace /abs/path/to/big-repo-pr-knowledge with the actual checkout.
Omit --repo-root only if you installed prgenius from this exact
checkout (then the default path resolves correctly).
Schema we honor
- rounds v0.5.0 —
actionenum +deltaobject + case-levelclose_decision - rounds v0.7.0 — adds optional
verified_at,evidence_urls,confidenceto round + case level (BC over v0.5.0)
See ../ROUNDS_SCHEMA.md for the canonical schema.
Why this exists
The repo is meant to be human-readable (<org>-<repo>/index.md) AND
machine-readable via this package. People get the narrative; agents get
structured tool calls. Both views share one source of truth.
License
MIT (same as parent repo).
Project details
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 prgenius_core-0.8.0.tar.gz.
File metadata
- Download URL: prgenius_core-0.8.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1539b04148817a106c0b982e67bfe71147f9c58d6abf40798f770b2490c5c3bb
|
|
| MD5 |
5ad528ea12f4b28109271b387a17c8e1
|
|
| BLAKE2b-256 |
561adac515ed05facb05ead99e1783d898753f1e3f39c3f4279f2616a908f56e
|
Provenance
The following attestation bundles were made for prgenius_core-0.8.0.tar.gz:
Publisher:
publish-pypi.yml on zsxh1990/pr-genius
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prgenius_core-0.8.0.tar.gz -
Subject digest:
1539b04148817a106c0b982e67bfe71147f9c58d6abf40798f770b2490c5c3bb - Sigstore transparency entry: 2124509843
- Sigstore integration time:
-
Permalink:
zsxh1990/pr-genius@ff487a20565b61359d9969568cc556e102e289e8 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/zsxh1990
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ff487a20565b61359d9969568cc556e102e289e8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file prgenius_core-0.8.0-py3-none-any.whl.
File metadata
- Download URL: prgenius_core-0.8.0-py3-none-any.whl
- Upload date:
- Size: 14.5 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 |
38d9122eb52202335df2ba555311108a663a6b322e5790068525ee8d4f97801c
|
|
| MD5 |
cfcd403a2106e1f791942b7e325b7205
|
|
| BLAKE2b-256 |
e9134a954bffc0ab925ac4f1ba9945e6fa072a8af4c0a32b2e271365739a28ac
|
Provenance
The following attestation bundles were made for prgenius_core-0.8.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on zsxh1990/pr-genius
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prgenius_core-0.8.0-py3-none-any.whl -
Subject digest:
38d9122eb52202335df2ba555311108a663a6b322e5790068525ee8d4f97801c - Sigstore transparency entry: 2124509860
- Sigstore integration time:
-
Permalink:
zsxh1990/pr-genius@ff487a20565b61359d9969568cc556e102e289e8 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/zsxh1990
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ff487a20565b61359d9969568cc556e102e289e8 -
Trigger Event:
push
-
Statement type: