Skip to content

feat(agents): add pull request creation skill - #1079

Merged
miyoungc merged 9 commits into
mainfrom
nemo-platform-contributor-create-pr/miyoungc
Aug 5, 2026
Merged

feat(agents): add pull request creation skill#1079
miyoungc merged 9 commits into
mainfrom
nemo-platform-contributor-create-pr/miyoungc

Conversation

@miyoungc

@miyoungc miyoungc commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a repository-local pull request workflow and a trusted NeMo Platform pull request template. Together, they consolidate the repository's contribution requirements into a repeatable path from completed changes through validation, DCO auditing, PR creation, post-push description refresh, and review follow-up.

Changes

  • Add .agents/skills/contributor-create-pr/SKILL.md with branch and worktree checks, direct-repository and fork remote validation, targeted validation selection, shallow-history-safe DCO auditing, conventional title validation, safe pushes, CI and automated-review follow-up, and merge-conflict handling.
  • Refresh an existing PR description from the trusted template after every successful push so its scope, validation evidence, and limitations match the current head.
  • Use branch-only GitHub head selectors for same-repository PRs and owner-qualified selectors for forks.
  • Add .github/PULL_REQUEST_TEMPLATE.md, adapting NemoClaw's core summary, change classification, quality-gate, and verification structure to NeMo Platform's targeted validation, documentation, conventional-title, and DCO workflows.
  • Keep NemoClaw-specific documentation-review receipts, DGX Station evidence, PR-body sign-off, and JavaScript validation out of the NeMo Platform template.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with documentation updates
  • Documentation only
  • Contributor tooling or automation
  • CI, build, or test infrastructure

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification: this change adds Markdown-based contributor workflow assets and does not change runtime behavior.
  • Documentation updated for user-visible behavior
  • Documentation not applicable — justification: no product-facing behavior changes; the contributor workflow is documented directly by the new skill and template.

Verification

  • Pull request title follows the repository's Conventional Commit format
  • Every commit includes an appropriate Signed-off-by: trailer
  • uv run pre-commit run -a passes, or any blocked checks are identified below
  • Targeted tests pass, or tests are marked not applicable above
  • No secrets, API keys, or credentials are included

Targeted validation:

  • Skill Creator quick_validate.py .agents/skills/contributor-create-pr: passed.
  • pre-commit run --files .github/PULL_REQUEST_TEMPLATE.md .agents/skills/contributor-create-pr/SKILL.md: passed.
  • Scenario checks passed for canonical and fork remotes, shallow-history recovery, nested DCO variable handoff, trusted-template materialization, and post-push PR lookup.
  • git diff --check origin/main...HEAD: passed.
  • All contributor-authored commits contain matching Signed-off-by: trailers. GitHub-generated merge commit 290f3c643 has no trailer and is retained as an approved exception; GitHub's DCO check passes.
  • Full repository pre-commit validation was incomplete because the host has uv 0.10.2 while the repository requires <0.10.0, Docker access is unavailable, and the isolated worktree lacks the required Studio dependencies and Node 22.23.2 runtime. Ruff, Ruff format, ty, lock drift, plugin import, merge-conflict, and all applicable changed-file hooks passed.

Summary by CodeRabbit

  • Documentation

    • Added a standardized pull request template covering summaries, related issues, change types, testing, verification, and security considerations.
    • Added guidance for consistent pull request creation, review, validation, and maintenance.
  • Chores

    • Improved pull request readiness checks, documentation requirements, validation expectations, and status reporting.
    • Added safeguards for branch, commit, review, and submission practices.
    • Added checks to help prevent incomplete, duplicate, outdated, or improperly prepared pull requests.

Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
@github-actions github-actions Bot added the feat label Aug 4, 2026
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 30781/39277 78.4% 62.8%
Integration Tests 18078/37229 48.6% 21.1%

@miyoungc
miyoungc marked this pull request as ready for review August 4, 2026 18:10
@miyoungc
miyoungc requested review from a team as code owners August 4, 2026 18:10
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Changes

Contributor pull request workflow

Layer / File(s) Summary
Repository setup and policy loading
.agents/skills/contributor-create-pr/SKILL.md
The skill validates access, canonical remotes, default branches, branches, worktrees, the trusted base, and repository policy.
Validation and signed commit controls
.agents/skills/contributor-create-pr/SKILL.md
The skill adds targeted validation, staged-patch checks, signed commits, sign-off preservation, and complete DCO auditing.
Pull request metadata and publication
.agents/skills/contributor-create-pr/SKILL.md, .github/PULL_REQUEST_TEMPLATE.md
The skill validates titles and templates, pushes safely, detects existing pull requests, and creates or promotes pull requests. The template defines summary, quality-gate, verification, and targeted-validation sections.
CI, review, conflict, and final status handling
.agents/skills/contributor-create-pr/SKILL.md
The skill monitors CI and CodeRabbit findings, handles base drift and conflicts, applies signed fixes, and reports final pull request status and blockers.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a pull request creation skill.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nemo-platform-contributor-create-pr/miyoungc

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/contributor-create-pr/SKILL.md:
- Line 204: Update the single-template branch in the PR creation instructions to
assign the temporary file path to NMP_PR_BODY, then redirect the trusted git
show output into that file before gh pr create uses it. Ensure the existing gh
pr create invocation receives the populated NMP_PR_BODY path.
- Around line 31-35: Update the repository URL validation around gh repo view,
remote URL checks, and the fetch/push commands to reject plaintext http:// and
git:// transports; permit only authenticated encrypted HTTPS or SSH URLs before
using any URL. Apply this validation consistently to the referenced command
sections and abort when a URL violates the allowed schemes.
- Around line 31-35: Update the repository validation steps around NMP_REPO and
git remote get-url origin to compare every configured fetch and push URL for
origin against $NMP_REPO before any fetch or push occurs; fail validation on
mismatches rather than only displaying the remote URL, while preserving the
existing GitHub target and authentication checks.
- Around line 42-45: Update the setup flow around NMP_BASE_BRANCH to validate
the origin remote first by retrieving its URL with git remote get-url origin and
comparing it with NMP_REPO. Stop immediately on mismatch, before git fetch,
assigning NMP_BASE_REF, or reading repository policy via git show; preserve the
existing branch discovery and fetch behavior after validation succeeds.
- Around line 197-207: Update the template-resolution workflow in the
contributor PR creation instructions to detect when the trusted base has no pull
request template but the feature branch adds one, and use a controlled bootstrap
PR body for that first-template installation. Preserve the existing behavior for
an absent template without a newly added replacement, multiple templates, and
changes to an existing template; only bypass the stop condition for the explicit
first-template bootstrap case.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7bd54877-fd8e-467b-850e-571f47f46e4c

📥 Commits

Reviewing files that changed from the base of the PR and between 997172c and 6e37684.

📒 Files selected for processing (2)
  • .agents/skills/contributor-create-pr/SKILL.md
  • .github/PULL_REQUEST_TEMPLATE.md

Comment thread .agents/skills/contributor-create-pr/SKILL.md
Comment thread .agents/skills/contributor-create-pr/SKILL.md
Comment thread .agents/skills/contributor-create-pr/SKILL.md
Comment thread .agents/skills/contributor-create-pr/SKILL.md Outdated
Comment thread .agents/skills/contributor-create-pr/SKILL.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/contributor-create-pr/SKILL.md:
- Line 192: Export NMP_BASE_REF immediately after its assignment in the
surrounding contributor PR workflow so the nested bash DCO audit can access it;
keep the existing validation and audit behavior unchanged.
- Line 192: Update the DCO audit workflow around git rev-list to detect shallow
repository history and deepen or unshallow the repository before auditing
"$NMP_BASE_REF..HEAD". Keep the existing NMP_BASE_REF validation and ensure the
audit runs only after complete feature-branch ancestry is available.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7839366a-41f5-424a-a8ed-d82f66d9ac13

📥 Commits

Reviewing files that changed from the base of the PR and between 6e37684 and 555096e.

📒 Files selected for processing (1)
  • .agents/skills/contributor-create-pr/SKILL.md

Comment thread .agents/skills/contributor-create-pr/SKILL.md
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (3)
.agents/skills/contributor-create-pr/SKILL.md (3)

246-249: 🎯 Functional Correctness | 🔴 Critical

Populate NMP_PR_BODY before PR creation.

The template section describes a mktemp file but never assigns its path to NMP_PR_BODY or writes the trusted template into it. Line [329] therefore passes an unset or empty path to gh pr create. Assign the path, redirect git show into it, and use that populated file.

Also applies to: 324-330

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/contributor-create-pr/SKILL.md around lines 246 - 249,
Populate NMP_PR_BODY in the template-selection flow before invoking gh pr
create. Assign it to the mktemp file path and redirect the trusted-base git show
output into that file, ensuring both single-template and selected-template cases
use the populated path while preserving the missing-template stop behavior.

239-248: 🎯 Functional Correctness | 🟠 Major

Allow the first-template bootstrap case.

The lookup reads only $NMP_BASE_REF. When the base has no template, Line [248] stops even though this PR adds .github/PULL_REQUEST_TEMPLATE.md. Detect that exact first-template case and use a controlled bootstrap body. Preserve the stop for an absent replacement or ambiguous templates.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/contributor-create-pr/SKILL.md around lines 239 - 248, Update
the PR-template lookup in the contributor workflow to allow a controlled
bootstrap body when the trusted base lacks a template but the current PR change
adds .github/PULL_REQUEST_TEMPLATE.md. Continue using the trusted-base template
when available, and preserve the existing stop behavior when no replacement
template is added or when template selection is ambiguous; do not reuse
branch-modified or historical PR bodies.

191-193: 🎯 Functional Correctness | 🟠 Major

Export NMP_BASE_REF to the DCO audit shell.

NMP_BASE_REF is assigned before the here-document, but it is not exported. The child bash at Line [191] cannot see it, so Line [192] exits before auditing commits. Export the variable or pass it inline.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/contributor-create-pr/SKILL.md around lines 191 - 193, Export
NMP_BASE_REF before the bash here-document in the DCO audit flow so the child
shell can access the validated base reference. Update the assignment near the
DCO audit block, preserving the existing required-value validation and audit
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/contributor-create-pr/SKILL.md:
- Line 212: Update the commit-audit flow around git rev-list to detect whether
the repository is shallow and deepen or unshallow it before enumerating PR
commits. Ensure the existing audit still processes every commit in the
NMP_BASE_REF..HEAD range, including ancestors omitted by the initial
feature-clone fetch.
- Around line 358-362: Update the CodeRabbit comment filters in the issue and
pull-request gh api queries to match only the verified CodeRabbit bot or app
login, replacing the broad contains("coderabbit") predicate. Keep the existing
pagination and selected output fields unchanged, and use the exact approved
identity consistently in both queries.

---

Duplicate comments:
In @.agents/skills/contributor-create-pr/SKILL.md:
- Around line 246-249: Populate NMP_PR_BODY in the template-selection flow
before invoking gh pr create. Assign it to the mktemp file path and redirect the
trusted-base git show output into that file, ensuring both single-template and
selected-template cases use the populated path while preserving the
missing-template stop behavior.
- Around line 239-248: Update the PR-template lookup in the contributor workflow
to allow a controlled bootstrap body when the trusted base lacks a template but
the current PR change adds .github/PULL_REQUEST_TEMPLATE.md. Continue using the
trusted-base template when available, and preserve the existing stop behavior
when no replacement template is added or when template selection is ambiguous;
do not reuse branch-modified or historical PR bodies.
- Around line 191-193: Export NMP_BASE_REF before the bash here-document in the
DCO audit flow so the child shell can access the validated base reference.
Update the assignment near the DCO audit block, preserving the existing
required-value validation and audit behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 956b3f7d-8ee8-4903-bef8-3ac2328f3537

📥 Commits

Reviewing files that changed from the base of the PR and between 73670d7 and 290f3c6.

📒 Files selected for processing (2)
  • .agents/skills/contributor-create-pr/SKILL.md
  • .github/PULL_REQUEST_TEMPLATE.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/PULL_REQUEST_TEMPLATE.md

Comment thread .agents/skills/contributor-create-pr/SKILL.md
Comment thread .agents/skills/contributor-create-pr/SKILL.md Outdated
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
…-platform-contributor-create-pr/miyoungc

Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
….com:NVIDIA-NeMo/nemo-platform into nemo-platform-contributor-create-pr/miyoungc

Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>

@svvarom svvarom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miyoungc
miyoungc added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit f608ebe Aug 5, 2026
55 checks passed
@miyoungc
miyoungc deleted the nemo-platform-contributor-create-pr/miyoungc branch August 5, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants