[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X0MWHQAD2B2TRV10NK74C1":3,"skill-same:01M6X0MWHQAD2B2TRV10NK74C1":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6X0MWHQAD2B2TRV10NK74C1","XMC Create PR",null,"Automates creating and updating GitHub Pull Requests, running pre-commit hooks, formatting PR body templates, managing CI wait buffers, and enforcing strict confirmation gates for Draft PR conversion.","google\u002Fxmc","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M6X0MD62T1HTQNBX4VJ5AXWK",8,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxmc\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxmc_create_pr\u002FSKILL.md",[],[19,20,21,5,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"create pr","create","pr","gates","pre-commit","for","running","pull","formatting","wait","body","pr body","pull requests","conversion","commit","confirmation","ci","draft pr","hooks","2026-11-10 10:12:30",false,"---\nname: XMC Create PR\ndescription: Automates creating and updating GitHub Pull Requests, running pre-commit hooks, formatting PR body templates, managing CI wait buffers, and enforcing strict confirmation gates for Draft PR conversion.\n---\n\n# GitHub Pull Request Creation & Update Playbook\n\nThis skill provides step-by-step procedures for creating, updating, and managing GitHub Pull Requests in the XMC repository.\n\n> [!IMPORTANT]\n> All execution steps in this skill MUST strictly adhere to the policy rules defined in [GitHub Authoring & PR Creation Standards](..\u002F..\u002Frules\u002Fgithub_authoring_and_prs.md), [Skills & Automation Guidelines](..\u002F..\u002Frules\u002Fskills_and_automation.md), and [Core Engineering Standards](..\u002F..\u002Frules\u002Fcore_engineering.md).\n\n---\n\n## Guidelines for Using CLI Tools\n\nWhen invoking helper tools under `tools\u002F` (e.g., `update_pr_description.py`):\n1. **Do not read tool source code**: Do not open or read the Python source code of helper tools. Refer to [Skills & Automation Guidelines](..\u002F..\u002Frules\u002Fskills_and_automation.md#5-helper-tool-execution-policy--safety-constraints).\n2. **Use `--help`**: Run tools with `--help` to inspect parameters and usage.\n3. **Parse Structured Output & Handle Errors**: All tools output structured JSON; check the exit code per [Helper Tool Exit Codes](..\u002F..\u002FAGENTS.md#universal-architectural-principles).\n4. **Shell & Payload Safety**: Execute standalone `.py` script files or pass arguments via script parameters. Avoid double-quoted inline commands (`python3 -c \"...\"`).\n\n---\n\n## 1. Branch Check & Formatting Verification\n\nBefore making commits or opening a PR:\n\n1. **Check current branch**:\n   ```bash\n   git branch --show-current\n   ```\n2. **Validate branch format**:\n   Ensure the branch name strictly conforms to `\u003Cprefix>\u002F\u003Ckebab-case-description>` (e.g., `feat\u002Fenforce-pr-comment-integrity`, `fix\u002Fgke-rollout-timeout`).\n3. **Rename branch if non-compliant**:\n   If the branch name uses raw worktree directory names, underscores, or lacks a prefix:\n   ```bash\n   git branch -m \u003Cprefix>\u002F\u003Ckebab-case-description>\n   ```\n4. **Detached HEAD State**:\n   If `git branch --show-current` is empty, create and switch to a compliant branch:\n   ```bash\n   git checkout -b \u003Cprefix>\u002F\u003Ckebab-case-description>\n   ```\n\n---\n\n## 2. Pre-Commit Hooks & Commit Creation\n\nBefore creating any commit:\n\n1. **Stage, Then Run Pre-Commit Formatting & Affected Tests Protocol**:\n   ```bash\n   git add \u003Cchanged_paths>\n   .\u002F.githooks\u002Fpre-commit\n   ```\n   Stage first: the hook auto-restages formatter fixes only for fully staged files (opt out with `XMC_PRECOMMIT_NO_AUTOSTAGE=1`). It exits 1 on unfixed lint errors or on fixes to partially staged or unstaged files; review those (`git diff`), stage them, and re-run. Once linters pass it executes `python3 .\u002Ftools\u002Frun_affected_tests.py --skip-emulator-check`, skipped when every staged path is Markdown or under `docs\u002F`.\n2. **Format Conventional Commit Message**:\n   Format the commit message header using `\u003Ctype>(\u003Cscope>): \u003Csummary>` (e.g., `feat(auth): add OAuth2 token refresh support`).\n3. **Include Mandatory Context & Tags**:\n   Append technical rationale, bug references (e.g., `Fixes bug 12345`), and mandatory description tags at the bottom of the commit body:\n   ```markdown\n   TAG=agy\n   CONV=\u003Cconversation_id>\n   ```\n4. **Execute Git Commit via Message File**:\n   To avoid shell double-quoting syntax errors when dealing with multiline commit bodies, write the commit message to a temporary file and commit using `-F`:\n   ```bash\n   cat \u003C\u003C 'EOF' > commit_msg.txt\n   \u003Ctype>(\u003Cscope>): \u003Csummary>\n\n   \u003CDetailed commit body>\n\n   TAG=agy\n   CONV=\u003Cconversation_id>\n   EOF\n   git commit -F commit_msg.txt && rm commit_msg.txt\n   ```\n\n---\n\n## 3. Pull Request Creation & PR Body Population\n\nWhen creating a new PR or populating its description:\n\n1. **Diff Sizing Pre-Flight Check**:\n   Run the deterministic diff sizing tool before preparing the PR:\n   ```bash\n   .\u002Ftools\u002Fanalyze_diff_size.py --base-ref origin\u002Fmain...\n   ```\n   If `should_trigger_split_verifier` is `true` (Prod $\\ge 400$, Total Code $\\ge 1,000$, or Docs $\\ge 1,000$ lines), **STOP** and execute the [XMC PR Split Verification Skill](..\u002Fxmc_pr_split_verification\u002FSKILL.md) to audit SRP and construct a `gh-stack` plan before opening a PR.\n2. **Pre-Commit Verification**: Verify `.\u002F.githooks\u002Fpre-commit` (formatters, linters, and `run_affected_tests.py`) passes cleanly.\n3. **Conventional PR Title**: Match the PR title to Conventional Commits syntax (`\u003Ctype>(\u003Cscope>): \u003Csummary>`).\n4. **Check for Trajectory Benchmark Artifact**:\n   Check if `\u002Ftmp\u002Fbenchmark_report_\u003Cbranch_name>.md` exists (generated by [XMC Trajectory Comparison](..\u002Fxmc_trajectory_comparison\u002FSKILL.md)). If present, embed its content into the `## Verification & Testing` section.\n5. **Compile the Assumptions List & Verify Blueprint\u002FDownstream Claims**:\n   Sweep the session trajectory for decisions made in place of an explicit instruction or verified fact, resolve any that are still cheaply checkable, and disclose the remainder per [Mandatory Assumptions Disclosure](..\u002F..\u002Frules\u002Fgithub_authoring_and_prs.md#3-pull-request-creation--pr-sizing-standards):\n   - **Verify Blueprint & Downstream Component Settings Before Repeating Task Claims**: For changes under `deploy\u002F` or `test\u002Fhelm\u002F`, inspect the target blueprint\u002Fchart files (e.g., whether [`deploy\u002Fctk_v2\u002Fxmanager-cloud.yaml`](..\u002F..\u002F..\u002Fdeploy\u002Fctk_v2\u002Fxmanager-cloud.yaml) provisions GKE Standard vs. Autopilot, which components consume a `global.*` Helm setting, and which downstream modules actually opt into a dependency via `set_values`) before repeating symptom or impact statements from an issue\u002Ftask prompt in inline comments or `## Motivation & Context`.\n   - **Operational & Upgrade Assumptions on Deployment PRs**: Infrastructure, Helm chart, and blueprint changes carry operational and upgrade assumptions (target cluster policies\u002Fversions, upstream chart behavior, in-place `helm upgrade` rollout and orphaned resource semantics) that must be listed as `\u003Cassumption> — \u003Cwhy it was assumed> — \u003Cimpact if wrong>` rather than writing `None — requirements were fully specified.`.\n   - **Stacked \u002F Non-`main` Base Branch Disclosure**: When a PR targets a base branch other than `main`, state the stacked base branch and rationale explicitly in `## Motivation & Context`.\n6. **Format PR Body Template**: Write the PR body to a temporary markdown file (e.g., `pr_body.md`):\n   ```markdown\n   ## Summary\n   \u003CConcise 2-3 sentence overview of what this PR introduces or fixes.>\n\n   ## Motivation & Context\n   \u003CExplanation of the underlying problem, business\u002Ftechnical rationale, and design choices.>\n\n   ## Key Changes\n   - \u003CBulleted highlight of structural code adjustments>\n   - \u003CTargeted package, binary, or deployment modifications>\n\n   ## Assumptions\n   - \u003CAssumption made during development> — \u003Cwhy it was assumed> — \u003Cimpact if wrong>\n   - \u003CDeferred scope or unresolved open question, if any>\n   \u003CReplace the bullets above with `None — requirements were fully specified.` when no assumptions were made.>\n\n   ## Verification & Testing\n   - **Commands Executed**: `\u003Cbazel test \u002F go test \u002F .\u002Ftools\u002Frun_affected_tests.py>`\n   - **Coverage & Test Status**: \u003CSummary of unit\u002Fintegration test results and pass state.>\n\n   \u003C!-- Embed Trajectory Benchmark if available -->\n   \u003Cdetails open>\n   \u003Csummary>\u003Cb>🧪 Trajectory & Outcome Benchmark Results\u003C\u002Fb>\u003C\u002Fsummary>\n\n   [Benchmark Telemetry & Scorecard]\n   \u003C\u002Fdetails>\n\n   ## Related Issues \u002F Bugs\n   Fixes bug \u003Cbug_id> (or N\u002FA)\n\n   TAG=agy\n   CONV=\u003Cconversation_id>\n   ```\n\n7. **Mandatory User Confirmation Gate Before PR Creation**:\n   NEVER execute `gh pr create` (draft or non-draft) without explicit, affirmative user confirmation in the current conversation turn. Phrases like \"proceed with next phase\" authorize local work and verification, but DO NOT authorize opening a remote Pull Request. The agent MUST present `pr_body.md`, the planned PR title, body preview, and list of changes to the user for review and explicitly ask:\n   > *\"I have prepared the Pull Request.\"*\n   > **Title**: `\u003Ctype>(\u003Cscope>): \u003Csummary>`\n   > **List of Changes**:\n   > - *[List of changes]*\n   > **Description Preview** (from `pr_body.md`):\n   > \n   > *[Markdown Preview]*\n   > \n   > *Shall I proceed with creating the Draft Pull Request on GitHub? (Y\u002Fn)\"*\n\n8. **Create Draft PR via GitHub CLI**:\n   All new PRs must be created in Draft state:\n   ```bash\n   gh pr create --draft --title \"\u003Ctype>(\u003Cscope>): \u003Csummary>\" --body-file pr_body.md\n   ```\n\n---\n\n## 4. PR Description Updates via Helper Tool\n\nWhen updating an existing Pull Request description:\n\n1. **Format Updated Body**: Prepare the updated body markdown in a temporary file (e.g., `updated_pr_body.md`).\n2. **User Edit Gate**: Present the updated PR description preview to the user and pause for confirmation\u002Fedits.\n3. **Execute Update Tool**:\n   ```bash\n   .\u002Ftools\u002Fpr_review\u002Fupdate_pr_description.py \u003Cpr_number> --body-file updated_pr_body.md\n   ```\n   > [!IMPORTANT]\n   > Do NOT use `gh pr edit` directly to update descriptions, as classic project deprecations break description fields.\n\n---\n\n## 5. CI Wait Buffer Period\n\n1. After creating or updating a Pull Request, pause execution for approximately **2 minutes** (120 seconds).\n2. Allow GitHub CI status checks and automated PR review passes to run and produce initial status checks before proceeding to subsequent workflow steps.\n3. **Wait for CI Completion via Helper Tool**: After the buffer, block on CI with:\n   ```bash\n   .\u002Ftools\u002Fpr_review\u002Fwait_for_ci.py \u003Cpr_number> [--repo owner\u002Fname] [--timeout 1800] [--interval 30]\n   ```\n   The tool polls with backoff until every check completes, exits `0` when all pass, `1` on failure or timeout, and `2` on an unexpected internal error. It judges only the newest run of each check, so runs cancelled because a later push superseded them are not failures. On failure its error JSON lists `failed_checks`, each with its workflow `run_id`, `job_id`, and a bounded `log_tail` (up to 80 lines of the job log ending at its last `##[error]` line; tune with `--log-lines`).\n   > [!IMPORTANT]\n   > Do NOT poll with bare `gh pr checks` (it exits `8` while checks are pending, breaking `&&` chains), do NOT pass check\u002Fjob IDs to `gh run list --workflow` or use `gh pr checks --json` (unsupported by older `gh` releases), and do NOT rely on `gh run view --log-failed` (prints nothing on some `gh` releases). Use `wait_for_ci.py` output instead of dumping full CI logs.\n\n---\n\n## 6. Draft PR to Open Conversion Policy (Strict Confirmation Gate)\n\nPull Requests in XMC MUST always be created as Draft PRs by default.\n\n> [!CAUTION]\n> **Strict Prohibition Against Automatic Draft-to-Open PR Conversion**:\n> Agents MUST NEVER execute `gh pr ready \u003Cpr_number>` or convert a Draft Pull Request to Open (ready for review) without explicit, separate user confirmation in the current conversation turn.\n\n### Rules & Guardrails:\n1. **Draft State Default**: All newly created PRs remain in Draft state throughout development, testing, and automated review iterations.\n2. **Generic Authorizations Insufficient**: General instructions like \"proceed\", \"continue\", \"finish\", \"all done\", \"looks good\", or \"resolve comments\" authorize local fixes or test verification, but **DO NOT authorize converting a Draft PR to Open**.\n3. **Mandatory Confirmation Prompt**: Even after all CI checks pass (`.\u002Ftools\u002Fpr_review\u002Fwait_for_ci.py \u003Cpr_number>` exits `0`) and 100% of review comments are resolved, the agent MUST NOT run `gh pr ready`. Instead, the agent reports completion and explicitly asks:\n   > *\"All CI checks have passed and all review comments have been resolved for Draft PR #\u003Cpr_number>.\"*\n   > \n   > *\"Would you like me to convert Pull Request #\u003Cpr_number> from Draft to Open (ready for review)? (Y\u002Fn)\"*\n4. **Execution on Explicit Affirmation Only**:\n   - Run `gh pr ready \u003Cpr_number>` **ONLY IF** the user explicitly confirms (e.g., \"yes\", \"Y\", \"convert to open\", \"mark ready for review\").\n   - If the user declines (\"no\"), does not respond to the question, or provides any other instruction, the PR **MUST REMAIN in Draft state**.\n\n---\n\n## 7. Standard 5-Step End-to-End PR Lifecycle\n\nWhen creating and managing Pull Requests, follow this mandatory 5-step lifecycle:\n\n1. **Diff Sizing Check & Create Draft PR (Requires Confirmation Gate)**: Run `.\u002Ftools\u002Fanalyze_diff_size.py --base-ref origin\u002Fmain...`. If thresholds are exceeded, invoke [XMC PR Split Verification](..\u002Fxmc_pr_split_verification\u002FSKILL.md). Otherwise, obtain explicit user confirmation per Section 3, Step 7 (presenting Title, List of Changes, and Description Preview). Once confirmed, execute: `gh pr create --draft --title \"\u003Ctype>(\u003Cscope>): \u003Csummary>\" --body-file pr_body.md`\n2. **Wait for Automated Review Bot**:\n   Pause for 2–3 minutes to allow GitHub CI status checks and the automated Gemini review bot to inspect code diffs and post review comments.\n3. **Pull Review Comments**:\n   Fetch unresolved review comments and generate the review checklist artifact:\n   ```bash\n   .\u002Ftools\u002Fpr_review\u002Fgenerate_review_checklist.py \u003Cowner> \u003Crepo> \u003Cpr_number> -o pr_review_checklist.md\n   ```\n4. **Address Review Comments**:\n   Triage each comment's technical validity, rule alignment, and PR scope impact per [Comment Validity & Pushback Triage](..\u002Fxmc_address_pr_comment\u002FSKILL.md#25-comment-validity--pushback-triage-mandatory-before-planning-edits) (adopting valid fixes vs. posting technical pushback replies when a suggestion conflicts with repository rules or scope boundaries), commit and push adopted updates, post inline thread replies (`.\u002Ftools\u002Fpr_review\u002Freply_pr_comment.py`), and verify 1-to-1 resolution (`.\u002Ftools\u002Fpr_review\u002Fverify_pr_comment_resolution.py`).\n5. **Verify CI Checks & Draft Status Report (Requires Explicit Confirmation Gate to Convert)**:\n   Verify CI status with `.\u002Ftools\u002Fpr_review\u002Fwait_for_ci.py \u003Cpr_number>` (see [Section 5](#5-ci-wait-buffer-period)). When checks pass and all comments are resolved, report the final state to the user. Do NOT automatically convert the PR to open. Explicitly ask for user confirmation per Section 6 ('*Would you like me to convert Pull Request #\u003Cpr_number> from Draft to Open (ready for review)? (Y\u002Fn)*'). Only if explicitly confirmed by the user, execute: `gh pr ready \u003Cpr_number>`\n","# GitHub Pull Request Creation & Update Playbook\n\nThis skill provides step-by-step procedures for creating, updating, and managing GitHub Pull Requests in the XMC repository.\n\n> [!IMPORTANT]\n> All execution steps in this skill MUST strictly adhere to the policy rules defined in [GitHub Authoring & PR Creation Standards](..\u002F..\u002Frules\u002Fgithub_authoring_and_prs.md), [Skills & Automation Guidelines](..\u002F..\u002Frules\u002Fskills_and_automation.md), and [Core Engineering Standards](..\u002F..\u002Frules\u002Fcore_engineering.md).\n\n---\n\n## Guidelines for Using CLI Tools\n\nWhen invoking helper tools under `tools\u002F` (e.g., `update_pr_description.py`):\n1. **Do not read tool source code**: Do not open or read the Python source code of helper tools. Refer to [Skills & Automation Guidelines](..\u002F..\u002Frules\u002Fskills_and_automation.md#5-helper-tool-execution-policy--safety-constraints).\n2. **Use `--help`**: Run tools with `--help` to inspect parameters and usage.\n3. **Parse Structured Output & Handle Errors**: All tools output structured JSON; check the exit code per [Helper Tool Exit Codes](..\u002F..\u002FAGENTS.md#universal-architectural-principles).\n4. **Shell & Payload Safety**: Execute standalone `.py` script files or pass arguments via script parameters. Avoid double-quoted inline commands (`python3 -c \"...\"`).\n\n---\n\n## 1. Branch Check & Formatting Verification\n\nBefore making commits or opening a PR:\n\n1. **Check current branch**:\n   ```bash\n   git branch --show-current\n   ```\n2. **Validate branch format**:\n   Ensure the branch name strictly conforms to `\u003Cprefix>\u002F\u003Ckebab-case-description>` (e.g., `feat\u002Fenforce-pr-comment-integrity`, `fix\u002Fgke-rollout-timeout`).\n3. **Rename branch if non-compliant**:\n   If the branch name uses raw worktree directory names, underscores, or lacks a prefix:\n   ```bash\n   git branch -m \u003Cprefix>\u002F\u003Ckebab-case-description>\n   ```\n4. **Detached HEAD State**:\n   If `git branch --show-current` is empty, create and switch to a compliant branch:\n   ```bash\n   git checkout -b \u003Cprefix>\u002F\u003Ckebab-case-description>\n   ```\n\n---\n\n## 2. Pre-Commit Hooks & Commit Creation\n\nBefore creating any commit:\n\n1. **Stage, Then Run Pre-Commit Formatting & Affected Tests Protocol**:\n   ```bash\n   git add \u003Cchanged_paths>\n   .\u002F.githooks\u002Fpre-commit\n   ```\n   Stage first: the hook auto-restages formatter fixes only for fully staged files (opt out with `XMC_PRECOMMIT_NO_AUTOSTAGE=1`). It exits 1 on unfixed lint errors or on fixes to partially staged or unstaged files; review those (`git diff`), stage them, and re-run. Once linters pass it executes `python3 .\u002Ftools\u002Frun_affected_tests.py --skip-emulator-check`, skipped when every staged path is Markdown or under `docs\u002F`.\n2. **Format Conventional Commit Message**:\n   Format the commit message header using `\u003Ctype>(\u003Cscope>): \u003Csummary>` (e.g., `feat(auth): add OAuth2 token refresh support`).\n3. **Include Mandatory Context & Tags**:\n   Append technical rationale, bug references (e.g., `Fixes bug 12345`), and mandatory description tags at the bottom of the commit body:\n   ```markdown\n   TAG=agy\n   CONV=\u003Cconversation_id>\n   ```\n4. **Execute Git Commit via Message File**:\n   To avoid shell double-quoting syntax errors when dealing with multiline commit bodies, write the commit message to a temporary file and commit using `-F`:\n   ```bash\n   cat \u003C\u003C 'EOF' > commit_msg.txt\n   \u003Ctype>(\u003Cscope>): \u003Csummary>\n\n   \u003CDetailed commit body>\n\n   TAG=agy\n   CONV=\u003Cconversation_id>\n   EOF\n   git commit -F commit_msg.txt && rm commit_msg.txt\n   ```\n\n---\n\n## 3. Pull Request Creation & PR Body Population\n\nWhen creating a new PR or populating its description:\n\n1. **Diff Sizing Pre-Flight Check**:\n   Run the deterministic diff sizing tool before preparing the PR:\n   ```bash\n   .\u002Ftools\u002Fanalyze_diff_size.py --base-ref origin\u002Fmain...\n   ```\n   If `should_trigger_split_verifier` is `true` (Prod $\\ge 400$, Total Code $\\ge 1,000$, or Docs $\\ge 1,000$ lines), **STOP** and execute the [XMC PR Split Verification Skill](..\u002Fxmc_pr_split_verification\u002FSKILL.md) to audit SRP and construct a `gh-stack` plan before opening a PR.\n2. **Pre-Commit Verification**: Verify `.\u002F.githooks\u002Fpre-commit` (formatters, linters, and `run_affected_tests.py`) passes cleanly.\n3. **Conventional PR Title**: Match the PR title to Conventional Commits syntax (`\u003Ctype>(\u003Cscope>): \u003Csummary>`).\n4. **Check for Trajectory Benchmark Artifact**:\n   Check if `\u002Ftmp\u002Fbenchmark_report_\u003Cbranch_name>.md` exists (generated by [XMC Trajectory Comparison](..\u002Fxmc_trajectory_comparison\u002FSKILL.md)). If present, embed its content into the `## Verification & Testing` section.\n5. **Compile the Assumptions List & Verify Blueprint\u002FDownstream Claims**:\n   Sweep the session trajectory for decisions made in place of an explicit instruction or verified fact, resolve any that are still cheaply checkable, and disclose the remainder per [Mandatory Assumptions Disclosure](..\u002F..\u002Frules\u002Fgithub_authoring_and_prs.md#3-pull-request-creation--pr-sizing-standards):\n   - **Verify Blueprint & Downstream Component Settings Before Repeating Task Claims**: For changes under `deploy\u002F` or `test\u002Fhelm\u002F`, inspect the target blueprint\u002Fchart files (e.g., whether [`deploy\u002Fctk_v2\u002Fxmanager-cloud.yaml`](..\u002F..\u002F..\u002Fdeploy\u002Fctk_v2\u002Fxmanager-cloud.yaml) provisions GKE Standard vs. Autopilot, which components consume a `global.*` Helm setting, and which downstream modules actually opt into a dependency via `set_values`) before repeating symptom or impact statements from an issue\u002Ftask prompt in inline comments or `## Motivation & Context`.\n   - **Operational & Upgrade Assumptions on Deployment PRs**: Infrastructure, Helm chart, and blueprint changes carry operational and upgrade assumptions (target cluster policies\u002Fversions, upstream chart behavior, in-place `helm upgrade` rollout and orphaned resource semantics) that must be listed as `\u003Cassumption> — \u003Cwhy it was assumed> — \u003Cimpact if wrong>` rather than writing `None — requirements were fully specified.`.\n   - **Stacked \u002F Non-`main` Base Branch Disclosure**: When a PR targets a base branch other than `main`, state the stacked base branch and rationale explicitly in `## Motivation & Context`.\n6. **Format PR Body Template**: Write the PR body to a temporary markdown file (e.g., `pr_body.md`):\n   ```markdown\n   ## Summary\n   \u003CConcise 2-3 sentence overview of what this PR introduces or fixes.>\n\n   ## Motivation & Context\n   \u003CExplanation of the underlying problem, business\u002Ftechnical rationale, and design choices.>\n\n   ## Key Changes\n   - \u003CBulleted highlight of structural code adjustments>\n   - \u003CTargeted package, binary, or deployment modifications>\n\n   ## Assumptions\n   - \u003CAssumption made during development> — \u003Cwhy it was assumed> — \u003Cimpact if wrong>\n   - \u003CDeferred scope or unresolved open question, if any>\n   \u003CReplace the bullets above with `None — requirements were fully specified.` when no assumptions were made.>\n\n   ## Verification & Testing\n   - **Commands Executed**: `\u003Cbazel test \u002F go test \u002F .\u002Ftools\u002Frun_affected_tests.py>`\n   - **Coverage & Test Status**: \u003CSummary of unit\u002Fintegration test results and pass state.>\n\n   \u003C!-- Embed Trajectory Benchmark if available -->\n   \u003Cdetails open>\n   \u003Csummary>\u003Cb>🧪 Trajectory & Outcome Benchmark Results\u003C\u002Fb>\u003C\u002Fsummary>\n\n   [Benchmark Telemetry & Scorecard]\n   \u003C\u002Fdetails>\n\n   ## Related Issues \u002F Bugs\n   Fixes bug \u003Cbug_id> (or N\u002FA)\n\n   TAG=agy\n   CONV=\u003Cconversation_id>\n   ```\n\n7. **Mandatory User Confirmation Gate Before PR Creation**:\n   NEVER execute `gh pr create` (draft or non-draft) without explicit, affirmative user confirmation in the current conversation turn. Phrases like \"proceed with next phase\" authorize local work and verification, but DO NOT authorize opening a remote Pull Request. The agent MUST present `pr_body.md`, the planned PR title, body preview, and list of changes to the user for review and explicitly ask:\n   > *\"I have prepared the Pull Request.\"*\n   > **Title**: `\u003Ctype>(\u003Cscope>): \u003Csummary>`\n   > **List of Changes**:\n   > - *[List of changes]*\n   > **Description Preview** (from `pr_body.md`):\n   > \n   > *[Markdown Preview]*\n   > \n   > *Shall I proceed with creating the Draft Pull Request on GitHub? (Y\u002Fn)\"*\n\n8. **Create Draft PR via GitHub CLI**:\n   All new PRs must be created in Draft state:\n   ```bash\n   gh pr create --draft --title \"\u003Ctype>(\u003Cscope>): \u003Csummary>\" --body-file pr_body.md\n   ```\n\n---\n\n## 4. PR Description Updates via Helper Tool\n\nWhen updating an existing Pull Request description:\n\n1. **Format Updated Body**: Prepare the updated body markdown in a temporary file (e.g., `updated_pr_body.md`).\n2. **User Edit Gate**: Present the updated PR description preview to the user and pause for confirmation\u002Fedits.\n3. **Execute Update Tool**:\n   ```bash\n   .\u002Ftools\u002Fpr_review\u002Fupdate_pr_description.py \u003Cpr_number> --body-file updated_pr_body.md\n   ```\n   > [!IMPORTANT]\n   > Do NOT use `gh pr edit` directly to update descriptions, as classic project deprecations break description fields.\n\n---\n\n## 5. CI Wait Buffer Period\n\n1. After creating or updating a Pull Request, pause execution for approximately **2 minutes** (120 seconds).\n2. Allow GitHub CI status checks and automated PR review passes to run and produce initial status checks before proceeding to subsequent workflow steps.\n3. **Wait for CI Completion via Helper Tool**: After the buffer, block on CI with:\n   ```bash\n   .\u002Ftools\u002Fpr_review\u002Fwait_for_ci.py \u003Cpr_number> [--repo owner\u002Fname] [--timeout 1800] [--interval 30]\n   ```\n   The tool polls with backoff until every check completes, exits `0` when all pass, `1` on failure or timeout, and `2` on an unexpected internal error. It judges only the newest run of each check, so runs cancelled because a later push superseded them are not failures. On failure its error JSON lists `failed_checks`, each with its workflow `run_id`, `job_id`, and a bounded `log_tail` (up to 80 lines of the job log ending at its last `##[error]` line; tune with `--log-lines`).\n   > [!IMPORTANT]\n   > Do NOT poll with bare `gh pr checks` (it exits `8` while checks are pending, breaking `&&` chains), do NOT pass check\u002Fjob IDs to `gh run list --workflow` or use `gh pr checks --json` (unsupported by older `gh` releases), and do NOT rely on `gh run view --log-failed` (prints nothing on some `gh` releases). Use `wait_for_ci.py` output instead of dumping full CI logs.\n\n---\n\n## 6. Draft PR to Open Conversion Policy (Strict Confirmation Gate)\n\nPull Requests in XMC MUST always be created as Draft PRs by default.\n\n> [!CAUTION]\n> **Strict Prohibition Against Automatic Draft-to-Open PR Conversion**:\n> Agents MUST NEVER execute `gh pr ready \u003Cpr_number>` or convert a Draft Pull Request to Open (ready for review) without explicit, separate user confirmation in the current conversation turn.\n\n### Rules & Guardrails:\n1. **Draft State Default**: All newly created PRs remain in Draft state throughout development, testing, and automated review iterations.\n2. **Generic Authorizations Insufficient**: General instructions like \"proceed\", \"continue\", \"finish\", \"all done\", \"looks good\", or \"resolve comments\" authorize local fixes or test verification, but **DO NOT authorize converting a Draft PR to Open**.\n3. **Mandatory Confirmation Prompt**: Even after all CI checks pass (`.\u002Ftools\u002Fpr_review\u002Fwait_for_ci.py \u003Cpr_number>` exits `0`) and 100% of review comments are resolved, the agent MUST NOT run `gh pr ready`. Instead, the agent reports completion and explicitly asks:\n   > *\"All CI checks have passed and all review comments have been resolved for Draft PR #\u003Cpr_number>.\"*\n   > \n   > *\"Would you like me to convert Pull Request #\u003Cpr_number> from Draft to Open (ready for review)? (Y\u002Fn)\"*\n4. **Execution on Explicit Affirmation Only**:\n   - Run `gh pr ready \u003Cpr_number>` **ONLY IF** the user explicitly confirms (e.g., \"yes\", \"Y\", \"convert to open\", \"mark ready for review\").\n   - If the user declines (\"no\"), does not respond to the question, or provides any other instruction, the PR **MUST REMAIN in Draft state**.\n\n---\n\n## 7. Standard 5-Step End-to-End PR Lifecycle\n\nWhen creating and managing Pull Requests, follow this mandatory 5-step lifecycle:\n\n1. **Diff Sizing Check & Create Draft PR (Requires Confirmation Gate)**: Run `.\u002Ftools\u002Fanalyze_diff_size.py --base-ref origin\u002Fmain...`. If thresholds are exceeded, invoke [XMC PR Split Verification](..\u002Fxmc_pr_split_verification\u002FSKILL.md). Otherwise, obtain explicit user confirmation per Section 3, Step 7 (presenting Title, List of Changes, and Description Preview). Once confirmed, execute: `gh pr create --draft --title \"\u003Ctype>(\u003Cscope>): \u003Csummary>\" --body-file pr_body.md`\n2. **Wait for Automated Review Bot**:\n   Pause for 2–3 minutes to allow GitHub CI status checks and the automated Gemini review bot to inspect code diffs and post review comments.\n3. **Pull Review Comments**:\n   Fetch unresolved review comments and generate the review checklist artifact:\n   ```bash\n   .\u002Ftools\u002Fpr_review\u002Fgenerate_review_checklist.py \u003Cowner> \u003Crepo> \u003Cpr_number> -o pr_review_checklist.md\n   ```\n4. **Address Review Comments**:\n   Triage each comment's technical validity, rule alignment, and PR scope impact per [Comment Validity & Pushback Triage](..\u002Fxmc_address_pr_comment\u002FSKILL.md#25-comment-validity--pushback-triage-mandatory-before-planning-edits) (adopting valid fixes vs. posting technical pushback replies when a suggestion conflicts with repository rules or scope boundaries), commit and push adopted updates, post inline thread replies (`.\u002Ftools\u002Fpr_review\u002Freply_pr_comment.py`), and verify 1-to-1 resolution (`.\u002Ftools\u002Fpr_review\u002Fverify_pr_comment_resolution.py`).\n5. **Verify CI Checks & Draft Status Report (Requires Explicit Confirmation Gate to Convert)**:\n   Verify CI status with `.\u002Ftools\u002Fpr_review\u002Fwait_for_ci.py \u003Cpr_number>` (see [Section 5](#5-ci-wait-buffer-period)). When checks pass and all comments are resolved, report the final state to the user. Do NOT automatically convert the PR to open. Explicitly ask for user confirmation per Section 6 ('*Would you like me to convert Pull Request #\u003Cpr_number> from Draft to Open (ready for review)? (Y\u002Fn)*'). Only if explicitly confirmed by the user, execute: `gh pr ready \u003Cpr_number>`\n",{"name":5,"description":7},"main","718d8c957572cdaf73c5c6548f8d5e9421eaf0b3",".agents\u002Fskills\u002Fxmc_create_pr",0,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxmc","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-14 11:47:55",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add google\u002Fxmc --skill \"XMC Create PR\"",{"tool":58,"command":59},"bunx","bunx skills add google\u002Fxmc --skill \"XMC Create PR\"",{"tool":61,"command":62},"pnpm","pnpm dlx skills add google\u002Fxmc --skill \"XMC Create PR\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxmc\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxmc_create_pr\u002FSKILL.md",true,[],[67,86,108,131,153,175],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":38},"01M6X0PXHKB5KRZ6BESP7J4A3H","XMC Upgrade Environment","Upgrades an existing XManager on Cloud (XMC) environment on GKE to the latest current branch state using the deployment configuration YAML.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxmc\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxmc_upgrade\u002FSKILL.md",[],[74,69,75,76,77,78,79,80,81,82,83,84,85],"environment","upgrade","branch","deployment","upgrades","Existing","state","gke","yaml","latest","cloud","configuration",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":38},"01M6X0PQ36XYVZW78KRBR8MT9E","XMC Trajectory Comparison","Validates proposed skill or rule changes by executing concurrent A\u002FB benchmark subagents on clean baseline vs candidate worktrees, comparing trajectories, and tearing down test resources.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxmc\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxmc_trajectory_comparison\u002FSKILL.md",[],[88,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107],"comparison","trajectory","resources","down","clean","trajectories","candidate","test","changes","worktrees","baseline","benchmark","clean baseline","rule","subagents",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":38},"01M6X0PFP96RZXZNJ9V4T2ZJK5","XMC Review PR","Interactive multi-agent PR review workflow enforcing code rules, open direction discussions, explicit confirmation gates, inline comment deduplication, and follow-up re-review verification.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxmc\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxmc_review_pr\u002FSKILL.md",[],[110,115,21,116,117,118,119,120,34,121,122,123,124,125,126,127,128,129,130,22],"review","review pr","direction","re","up","open","deduplication","workflow","code","verification","inline","follow-up","multi-agent","pr review","Rules","interactive",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":38},"01M6X0P8K827HRQFZS32Y1KB2N","XMC Release","Orchestrates an end-to-end XMC release workflow — deploying the latest main to nightly, running and verifying e2e tests, capturing visual snapshot galleries, generating and iterating on structured release notes with the user, and publishing the release. Use when preparing, orchestrating, or publishing a formal XMC release from main.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxmc\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxmc_release\u002FSKILL.md",[],[133,138,25,139,140,141,43,142,143,144,145,122,146,147,148,149,83,150,151,152],"release","end","tests","publishing","e2e","release notes","use","when","visual","with","notes","e2e tests","snapshot","user","structured",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":38},"01M6X0P20VKAAEP4R43HJQ9957","XMC PR Split Verification","Analyzes pull request diffs exceeding size thresholds (400 prod \u002F 1000 total \u002F 1000 docs) to enforce Single Responsibility Principle (SRP), evaluate vertical slice splitting feasibility, eliminate dead code, and plan gh-stack PR stacks.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxmc\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxmc_pr_split_verification\u002FSKILL.md",[],[21,155,160,124,26,161,162,163,164,165,166,123,167,168,169,170,171,172,173,174],"split","thresholds","slice","enforce","diffs","single","gh","vertical slice","stack","plan","size","evaluate","pull request","request","dead code",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":38},"01M6X0NV5ZP3T8RPKRYGGJ613G","XMC Iterative Reflection","Audits active session trajectory, thought history, and PR review comments to identify friction points, rule gaps, missing helper tools, and token inefficiencies. Use when requested by the user, after major implementations, or following PR review comment resolutions.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fxmc\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxmc_iterative_reflection\u002FSKILL.md",[],[177,182,183,145,115,184,185,186,187,21,128,188,189,144,190,191,192,94,193,106],"reflection","pr review comments","active","token","Tools","history","session","missing","helper","comments","gaps","friction"]