nemoclaw-maintainer-pr-comparator

작성자: nvidia

Compares competing PRs that target the same issue and recommends which one to merge. Runs gate, correctness, and quality checks; outputs a deterministic…

npx skills add https://github.com/nvidia/nemoclaw --skill nemoclaw-maintainer-pr-comparator

PR Comparator

Picks the merge winner among competing PRs for a single issue. Tier 0 gates eliminate plumbing failures; Tiers 1-2 score correctness and quality; Tier 3 applies deterministic tiebreakers. Degraded mode handles the case where no PR passes gates.

Prerequisites

  • gh CLI installed and authenticated
  • A target repository with an issue that has 2+ open PRs

Repo policy

Defaults assume NemoClaw conventions (security CODEOWNERS, DCO, CodeRabbit, docs/ directory). For other repos, edit repo-policy.md to override.

Workflow

Copy this checklist into your response and check off each step:

PR Comparison Progress:
- [ ] Step 1: Parse issue (body + comments) for acceptance criteria
- [ ] Step 2: Discover candidate PRs (default-order search with stop conditions)
- [ ] Step 3: Detect supersession (parse PR bodies)
- [ ] Step 4: Run Tier 0 gates per PR
- [ ] Step 5: Run Tier 1 correctness checks per PR
- [ ] Step 6: Run Tier 2 quality checks per PR
- [ ] Step 7: Compute weighted scores
- [ ] Step 8: Apply Tier 3 ranking (happy path or degraded mode)
- [ ] Step 9: Emit verdict using templates/verdict.md

Step 1: Parse issue

Extract acceptance criteria from issue body and all comments:

gh issue view <issue-number> --json title,body,comments

Read every comment — commenters often add asks the body doesn't capture.

Step 2: Discover candidate PRs

scripts/find-candidates.sh <issue-number>

Applies a single default order with stop conditions.

Step 3: Detect supersession

scripts/parse-supersession.sh <pr-number-1> <pr-number-2> ...

Parses each PR body for supersedes #N, replaces #N, closes in favor of #N, folds in #N. A PR that supersedes another wins ties immediately.

Step 4: Tier 0 gates

scripts/collect-gates.sh <pr-number>
scripts/check-coderabbit-threads.sh <pr-number>
node --experimental-strip-types --no-warnings ../nemoclaw-maintainer-day/scripts/check-gates.ts <pr-number>

Seven gates, all mandatory. Use the shared gate result's PR Advisor recommendation for the Advisor gate: it is true only when the trusted exact-head result both passes and reports merge_as_is; a missing recommendation is false. See checks/tier-0-gates.md for the full list and interpretation.

Step 5: Tier 1 correctness

Six checks, all LLM judgments. See checks/tier-1-correctness.md for evidence requirements per check.

Step 6: Tier 2 quality

Three checks, all LLM judgments. See checks/tier-2-quality.md.

Step 7: Weighted score

  • Build the Tier 0 eligibility set from exactly these seven boolean keys: state_open, ci_green_latest_sha, mergeable, contributor_compliance, branch_protection, pr_advisor_merge_as_is, and coderabbit_threads_resolved.
  • Stop if any candidate omits a key, adds an unknown key, or supplies a non-boolean value.
  • Only PRs for which all seven gates are true enter happy-path scoring.
  • Each pass = full points
  • Each yellow = half points
  • Each fail = zero
  • Tier 1 weight: 2.0× per check
  • Tier 2 weight: 1.0× per check

Step 8: Tier 3 ranking

Derive the mode from the Tier 0 eligibility set rather than accepting a caller-provided mode. In happy mode, set winner only to a PR in that set and leave closest_to_ready null. In degraded mode, leave winner null and use closest_to_ready only for an open, contributor-compliant salvage candidate. See tiebreakers.md for happy-path tiebreakers, degraded-mode distance-to-ready ranking, and the behavior-coverage matrix.

Step 9: Emit verdict

Use templates/verdict.md. Pass the generated spec through scripts/render-verdict.py; do not render or recommend a merge if it exits nonzero. The renderer independently validates the seven gates, recomputes eligibility and mode, and rejects a winner outside the eligible set. Every judgment must carry evidence (file:line refs, diff snippets), reasoning chain, and the score it contributed.

Reference files

  • repo-policy.md — configurable defaults per target repo
  • checks/tier-0-gates.md — plumbing gates
  • checks/tier-1-correctness.md — six correctness checks
  • checks/tier-2-quality.md — three quality checks
  • tiebreakers.md — Tier 3 ranking and degraded mode
  • templates/verdict.md — output template
  • validation/backtest.md — backtest the skill against historical cases

Scripts (execute, do not read)

  • scripts/find-candidates.sh — PR discovery
  • scripts/collect-gates.sh — Tier 0 gate evaluation
  • scripts/check-coderabbit-threads.sh — GraphQL thread resolution
  • ../nemoclaw-maintainer-day/scripts/check-gates.ts — trusted PR Review Advisor result
  • scripts/parse-supersession.sh — body parsing for supersession refs
  • scripts/render-verdict.py — verdict scorecard renderer

What this skill does NOT do

These require infrastructure beyond GitHub API + LLM and are deferred to v2 modules:

  • Running each PR's code against adversarial inputs (sandboxed execution)
  • Cross-issue regression sweep (separate skill)
  • Revert simulation against neighbor PRs
  • Static analyzer integration (CodeQL, Semgrep)

nvidia의 다른 스킬

compileiq-debug
nvidia
Use when something is wrong: Search() hangs, all evaluations return INVALID_SCORE, scores aren't improving, every config returns the same number, ptxas errors…
official
create-github-pr
nvidia
gh CLI를 사용하여 GitHub 풀 리퀘스트를 생성합니다. 사용자가 새 PR을 만들거나, 코드 리뷰를 제출하거나, 풀 리퀘스트를 열고자 할 때 사용합니다. 트리거 키워드 -…
official
diagnose-perf
nvidia
First-responder performance triage for Isaac Sim and Isaac Lab. Identifies bottleneck category (GPU-bound, CPU-bound, VRAM, loading) using nvidia-smi and…
official
eagle3-review-logs
nvidia
Review EAGLE3 pipeline experiment logs from the launcher's experiments/ directory. Summarizes pass/fail status for all 4 tasks, diagnoses failures with root…
official
nemoclaw-maintainer-cross-issue-sweep
nvidia
다른 열린 이슈들을 스캔하여 주어진 PR이 함께 수정하거나 실수로 망가뜨릴 수 있는 이슈를 찾습니다. 인접 수정 기회와 모순 위험을 file:line…과 함께 출력합니다.
official
karpathy-guidelines
nvidia
일반적인 LLM 코딩 실수를 줄이기 위한 행동 지침입니다. 코드 작성, 검토 또는 리팩토링 시 과도한 복잡성을 피하고 정밀한 변경을 위해 사용하세요.
official
fhir-basics
nvidia
에이전트에게 FHIR R4 API의 작동 방식, 사용 가능한 리소스, 검색 매개변수를 사용한 쿼리 방법, 모든 응답 형식을 올바르게 파싱하는 방법을 가르칩니다…
official
underdeclared-agent
nvidia
A helpful assistant agent
official