一键导入
open-pr
// Open a pull request to openvinotoolkit/openvino.genai. Use when: submitting changes, creating PR, opening pull request, pushing work for review, finalizing a task with a PR.
// Open a pull request to openvinotoolkit/openvino.genai. Use when: submitting changes, creating PR, opening pull request, pushing work for review, finalizing a task with a PR.
| name | open-pr |
| description | Open a pull request to openvinotoolkit/openvino.genai. Use when: submitting changes, creating PR, opening pull request, pushing work for review, finalizing a task with a PR. |
| argument-hint | <branch_name> <pr_title> — e.g. fix/kv-cache-leak Fix KV-cache memory leak in continuous batching |
Creates a branch, commits only task-related changes, and opens a pull request against openvinotoolkit/openvino.genai with a description aligned to the repository PR template.
The user provides (or the agent infers from prior conversation):
fix/kv-cache-leak)Fix KV-cache memory leak in continuous batching)CVS-12345) or GitHub issue numberIf the user does not provide these, infer sensible values from the conversation context and confirm with the user before proceeding.
Determine the current branch and its relationship to master:
git branch --show-current
git log --oneline master..HEAD
git status
This reveals:
masterCompare the full delta from master to the current state (both committed and uncommitted):
git diff master --stat
git diff master
Examine every changed file in this diff. Determine which changes are in scope (directly related to the task) and which are out of scope (unrelated formatting, debug leftovers, scratch files, unrelated refactors, changes from prior unrelated commits).
If out-of-scope changes are detected, inform the user and ask whether to:
Do not silently include unrelated changes.
Based on the analysis from Steps 1–2, determine the scenario:
Scenario A — Already on a feature branch with only in-scope changes (committed and/or uncommitted):
Reuse the current branch as <branch_name>. No branch switching needed. Proceed to Step 4 to commit any remaining uncommitted changes.
Scenario B — On master with uncommitted in-scope changes only:
Create a new branch from master:
git checkout -b <branch_name>
Scenario C — Out-of-scope changes detected (any branch):
Create a new branch from master with only the in-scope changes:
git stash # if there are uncommitted in-scope changes
git checkout master
git checkout -b <branch_name>
# apply only in-scope changes (e.g. git stash pop, git add only in-scope files)
If the branch name already exists, ask the user whether to reuse it or pick a different name.
The goal is a branch where the full diff against master contains only in-scope changes.
Stage only the in-scope files identified in Step 2:
git add <file1> <file2> ...
Do not use git add . or git add -A unless every change is confirmed in-scope.
Write a clear, conventional commit message. Use a single-line summary (≤72 chars):
git commit -m "<summary>"
The branch must be pushed to the user's fork, never directly to openvinotoolkit/openvino.genai.
Identify the correct remote by inspecting remote URLs:
git remote -v
Look for a remote whose URL contains the user's GitHub username (not openvinotoolkit). Common setups:
| Remote name | URL contains | Use for push? |
|---|---|---|
origin | <username>/openvino.genai | Yes — this is the fork |
upstream | openvinotoolkit/openvino.genai | No — never push here |
origin | openvinotoolkit/openvino.genai | No — find the fork remote |
If no fork remote is found, ask the user which remote to use. Do not guess.
git push <fork_remote> <branch_name>
If the push is rejected (e.g. branch exists on remote), ask the user how to proceed.
Read the repository pull request template to get the latest structure:
.github/pull_request_template.md
Parse the template to identify all sections and checklist items. The PR description must follow this template exactly.
Fill in every section of the PR template:
[x] only for items that are genuinely satisfied.[ ] for items not yet addressed, and add a brief note explaining why.Do not fabricate information. If unsure whether tests cover the change, leave the test checkbox unchecked and note it.
Use the GitHub MCP tool to create the pull request as a draft:
openvinotoolkit/openvino.genai<fork_owner>:<branch_name> (cross-fork format, e.g. myuser:fix/kv-cache-leak)master<pr_title>trueAfter PR creation, report:
--force, --force-with-lease).git add . or git add -A without confirming all changes are in scope.openvinotoolkit/openvino.genai directly. Always push to the user's fork.Validate a newly supported optimum-intel model with OpenVINO GenAI. Use when: checking new model support, verifying model export to OpenVINO IR, running GenAI inference test with llm_bench, benchmarking model accuracy with who-what-benchmark.
Update OpenVINO GenAI site documentation for API or feature changes. Use when: new pipelines, models, or use-cases are introduced; site docs need to reflect new capabilities.