nvidia/nemoclaw-maintainer-pr-comparator
Compare open PRs that address the same issue and recommend one to merge. Apply eligibility, correctness, quality, and tie-break checks. Report the score and evidence. Use when an issue has two or more open PRs.
npx skills add https://github.com/NVIDIA/NemoClaw --skill nemoclaw-maintainer-pr-comparator
<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
Compare PRs for one issue. Tier 0 determines eligibility. Tiers 1 and 2 score correctness and quality.
Tier 3 resolves ties. If no PR passes Tier 0, rank eligible PRs for salvage.
gh CLI installed and authenticatedThe defaults use NemoClaw conventions for CODEOWNERS, DCO, CodeRabbit, and docs/.
Read the canonical superseded-PR attribution policy in
../nemoclaw-maintainer-policies/references/workflow-policy.md.
Edit repo-policy.md for another repository.
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 in the defined order
- [ ] Step 3: Detect supersession and classify transferred work
- [ ] 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
Read the issue body and all comments. Extract each acceptance criterion:
gh issue view <issue-number> --json title,body,comments
Comments can add requirements that are absent from the issue body.
scripts/find-candidates.sh <issue-number>
Applies a single default order with stop conditions.
scripts/parse-supersession.sh <pr-number-1> <pr-number-2> ...
Parse the case-insensitive statement families implemented by scripts/parse-supersession.sh:
supersed[a-z]* before #N: supersedes #N points from the current PR to #N; superseded by #N points from #N to the current PR.replac[a-z]* before #N: replaces #N points from the current PR to #N; replaced by #N points from #N to the current PR.clos[a-z]* in favor of before #N: closes in favor of #N and closed in favor of #N point from #N to the current PR.fold[a-z]* in before #N: folds in #N points from the current PR to #N; folded into #N points from #N to the current PR.The bracket expressions describe the parser grammar; they are not literal PR body text.
A follow-up to #N statement is a related-PR signal, not a supersession declaration, unless one of these phrases also appears.
These statements record a relationship.
They do not rank a candidate or prove that its diff contains another contributor's work.
For each declared or suspected replacement, compare the commits and diffs and classify the relationship:
independent: The PR implements the issue without carrying material code, tests, or documentation from another contributor.transferred: The PR carries material work from another contributor.unclear: The available evidence does not establish whether another contributor's work remains.For transferred, apply the canonical superseded-PR attribution policy before setting a winner or recommending that the source PR be closed.
For unclear, leave winner null and request maintainer judgment.
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>
All six gates are required.
Treat PR Review Advisor output as input for maintainer review. Do not treat it as merge authorization.
See checks/tier-0-gates.md.
Apply the six model checks in checks/tier-1-correctness.md.
Apply the four model checks in checks/tier-2-quality.md.
state_open, ci_green_sha, mergeable, contributor_compliance, branch_protection, and coderabbit_threads_resolved.true enter happy-path scoring.Compute the mode from the Tier 0 results. Do not accept a mode from the caller.
In happy mode, set winner only to an eligible PR and set closest_to_ready to null.
Leave winner null when the evidence does not support a merge recommendation.
Do not set winner for a replacement with transferred work until the required attribution is present and verified.
In degraded mode, set winner to null.
Set closest_to_ready only to an open PR that passes contributor requirements.
See tiebreakers.md.
Use templates/verdict.md and render the result with scripts/render-verdict.py.
Stop if the renderer exits with a nonzero status. Do not recommend a merge.
The renderer validates the gate schema, mode, winner eligibility, and salvage-candidate eligibility.
The reviewer remains responsible for the score, ranking, and evidence.
For each judgment, include evidence, the inference, and the score.
scripts/find-candidates.sh — PR discoveryscripts/collect-gates.sh — Tier 0 gate evaluationscripts/check-coderabbit-threads.sh — GraphQL thread-resolution checkscripts/parse-supersession.sh — body parsing for supersession refsscripts/render-verdict.py — verdict scorecard rendererRun nemoclaw-maintainer-cross-issue-sweep separately when you need related-issue evidence.
This skill does not:
Take nvidia/nemoclaw-maintainer-pr-comparator from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.