بنقرة واحدة
v3-ranking
Compute and publish v3 Bradley-Terry ranking to a GitHub issue for monitoring
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Compute and publish v3 Bradley-Terry ranking to a GitHub issue for monitoring
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Pick up an unclaimed GitHub issue from jarchain/jar, implement the fix/improvement, and submit a PR
Review open PRs in the jarchain/jar repository using the Genesis Proof-of-Intelligence scoring protocol
Generate a small, genuine improvement to the JAR codebase — because even AI slop can be useful
Keep GitHub issues up to date with current codebase situation — close resolved issues, update stale descriptions
| name | v3-ranking |
| description | Compute and publish v3 Bradley-Terry ranking to a GitHub issue for monitoring |
| user_invocable | true |
Compute the v3 (online BT) global ranking on the current commit history and update a GitHub issue with the results. This is for monitoring v3 before activation.
cd jar/spec && lake build genesis
Parse all Genesis-Commit and Genesis-Index trailers from merge commits on master:
cd jar
git fetch origin master
Use Python to extract the data:
import json, subprocess
result = subprocess.run(
['git', 'log', 'origin/master', '--reverse', '--grep=Genesis-Commit', '--format=%B'],
capture_output=True, text=True)
signed_commits = []
indices = []
for line in result.stdout.split('\n'):
line = line.strip()
if line.startswith('Genesis-Commit:'):
signed_commits.append(json.loads(line[len('Genesis-Commit:'):].strip()))
elif line.startswith('Genesis-Index:'):
indices.append(json.loads(line[len('Genesis-Index:'):].strip()))
Some early commits have 8-char short hashes or GitHub URLs in review rankings. Expand them:
all_full_hashes = set(sc['id'] for sc in signed_commits)
for sc in signed_commits:
for t in sc.get('comparisonTargets', []):
all_full_hashes.add(t)
def expand_hash(h):
if h.startswith('https://'):
h = h.split('/')[-1]
if len(h) < 40:
matches = [fh for fh in all_full_hashes if fh.startswith(h)]
if len(matches) == 1:
return matches[0]
return h
for sc in signed_commits:
for r in sc['reviews']:
for key in ['difficultyRanking', 'noveltyRanking', 'designQualityRanking']:
r[key] = [expand_hash(h) for h in r[key]]
Pipe the collected data to the genesis ranking CLI:
input_json = json.dumps({"signedCommits": signed_commits, "indices": indices})
result = subprocess.run(
['spec/.lake/build/bin/genesis', 'ranking', '--force-variant', 'v3'],
input=input_json, capture_output=True, text=True)
output = json.loads(result.stdout)
ranking = output['ranking']
scores = output['scores'] # [{commit, mu, sigma2}, ...]
For each commit in the ranking, look up the PR number (from signed commits) and fetch the title:
sc_by_id = {sc['id']: sc for sc in signed_commits}
idx_by_hash = {idx['commitHash']: idx for idx in indices}
pr_titles = {}
for sc in signed_commits:
pr_id = sc['prId']
if pr_id not in pr_titles:
r = subprocess.run(['gh', 'pr', 'view', str(pr_id), '--repo', 'jarchain/jar',
'--json', 'title', '--jq', '.title'],
capture_output=True, text=True, timeout=10)
if r.stdout.strip():
pr_titles[pr_id] = r.stdout.strip()
import math
BT_SCALE = 1000000
lines = []
lines.append("| Rank | Score (μ) | ±σ | Contributor | PR | Description |")
lines.append("|---:|---:|---:|---|---|---|")
for i, score_entry in enumerate(scores):
ch = score_entry['commit']
mu = score_entry['mu'] / BT_SCALE
sigma = math.sqrt(score_entry['sigma2'] / BT_SCALE)
sc = sc_by_id.get(ch, {})
idx = idx_by_hash.get(ch, {})
pr_id = sc.get('prId', 0)
title = pr_titles.get(pr_id, '?')
contrib = sc.get('author', '?')
lines.append(f"| {i+1} | {mu:.2f} | {sigma:.2f} | {contrib} | #{pr_id} | {title[:50]} |")
table = '\n'.join(lines)
Look for an existing issue titled "v3 Bradley-Terry Ranking Monitor":
ISSUE=$(gh issue list --repo jarchain/jar --state open --search "v3 Bradley-Terry Ranking Monitor" --json number --jq '.[0].number')
If it exists, update the body. If not, create it:
# Create
gh issue create --repo jarchain/jar \
--title "v3 Bradley-Terry Ranking Monitor" \
--body "$BODY"
# Or update
gh issue edit $ISSUE --repo jarchain/jar --body "$BODY"
The body should include:
Print the issue URL when done.
--force-variant v3 flag overrides the epoch-based variant selection, applying v3's online BT algorithm to all commits regardless of their actual epoch.