XMC Generate Release Notes
Generates structured, intelligent release notes segmented into out-of-the-box user-facing changes, behind-the-flag preview features, and operational/dev progress.
- License 许可
- Apache-2.0
- 所属仓库
- google/xmc
- 最近更新
- 2026-11-14
- Stars
- ★ 8
- Forks
- 0
01 前言 Front Matter
- name
- XMC Generate Release Notes
- description
- Generates structured, intelligent release notes segmented into out-of-the-box user-facing changes, behind-the-flag preview features, and operational/dev progress.
02 资源文件 1
- 参考文档references/release_notes_taxonomy.md8.4 KB
03 SKILL.md 正文
Intelligent Release Notes Generation Playbook
This skill provides step-by-step procedures for extracting release metadata, detecting feature flag transitions, and synthesizing high-impact, audience-segmented release notes for XMC releases.
[!IMPORTANT] All execution steps in this skill MUST strictly adhere to the policy rules defined in Core Engineering Standards and Skills & Automation Guidelines.
Guidelines for Using CLI Tools
When invoking helper tools under tools/ (e.g., extract_release_metadata.py):
- Do not read tool source code: Do not open or read the Python source code of helper tools. Refer to Skills & Automation Guidelines.
- Use
--help: Run tools with--helpto inspect parameters and usage. - Parse Structured Output & Handle Errors: All tools output structured JSON; check the exit code per Helper Tool Exit Codes.
- Shell & Payload Safety: Execute standalone
.pyscript files or pass arguments via script parameters. Avoid double-quoted inline commands (python3 -c "...").
1. Release Range & Git Reference Discovery
-
Fetch Remote Tags & Canonical References: Ensure local repository state has the latest tags and canonical commit history without switching branches:
git fetch origin main --tags -
Identify Base and Target References:
- Determine target version (e.g.,
0.6.0,origin/main, or a specific release commit SHA). Default toorigin/mainfor standard releases. - If not specified by the user, discover the latest previous semver release tag (e.g.
0.17.0) onorigin/main. The--matchglobs skip the dailynightly-YYYY-MM-DD.Ntags and--exclude '*-*'skips pre-release tags such as1.2.3-rc1;extract_release_metadata.pyapplies the same rule when--base-refis omitted:git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*' --match 'v[0-9]*.[0-9]*.[0-9]*' --exclude '*-*' origin/main^ 2>/dev/null || git rev-list --max-parents=0 origin/main
- Determine target version (e.g.,
-
Inspect Commit Range:
BASE_TAG="<base_tag>" TARGET_REF="${TARGET_REF:-origin/main}" git log --oneline "${BASE_TAG}".."${TARGET_REF}"
2. Deterministic Metadata Extraction & Approved Flags Discovery
-
Discover Gated Subsystems & Feature Flags: The release generator checks current disabled feature flags in
deploy/ctk_v2/xmanager-cloud-deployment.yamlanddeploy/helm/values.yaml. -
Interactive Check for Approved / Production-Ready Flags: Before or during metadata extraction, prompt the user in chat:
"Discovered disabled feature flags:
rod_deployment_enabled,health_service_deployment_enabled,dashboard_service_deployment_enabled." "Are any of these flags approved / production-ready for this release (safe to be enabled)?"[!TIP] When specifying
--approved-flags, provide both the CTK variable (e.g.health_service_deployment_enabled) and the Helm manifest path (e.g.healthServiceDeployment.enabled) to ensure commits across both deployment layers are recognized as approved preview features. -
Execute Release Metadata Extraction Tool: Run the extraction helper tool with
--approved-flagsand pin to the canonical--target-ref(origin/main):BASE_TAG="<base_tag>" TARGET_REF="${TARGET_REF:-origin/main}" METADATA_FILE="${ARTIFACT_DIR:-/tmp}/release_metadata.json" python3 ./tools/release/extract_release_metadata.py \ --base-ref "${BASE_TAG}" \ --target-ref "${TARGET_REF}" \ --approved-flags rod_deployment_enabled rodDeployment.enabled \ --output "${METADATA_FILE}" -
Inspect Structured Output: The output JSON provides:
metadata: Git commit, PR counts, andapproved_flagslist.recommended_version: Automated SemVer recommendation (current_version,recommended_version,recommended_bump,rationale, boolean bump triggers).flag_transitions: Flips (false->true,true->false) and configuration additions.gated_subsystems_status: Current status of each gated subsystem (Active vs Production-Ready vs Experimental).raw_commits: Full list of parsed git commits withcommit_hash,short_hash,commit_type,scope,description,pr_number, andfiles_changed.
3. Semantic Commit Classification & Section Routing (Agent Reasoning)
The agent reads raw_commits, flag_transitions, and gated_subsystems_status to synthesize and classify commits into the 4-section layout using semantic reasoning:
[!IMPORTANT] Subsystem Grounding & Anti-Embellishment Invariant: Ground subsystem headings and feature titles strictly in repository naming contracts (
deploy/,pkg/, andtools/release/feature_flags.py). Prohibit speculative extrapolation, marketing embellishments, or buzzword additions (e.g., use "Pluggable Components for XMC" or the clean derived name "Components", NOT "AI Components").
- Section 1: Public Changes (Available Out-of-the-Box):
- Highlights & Promoted Capabilities: Subsystems with
is_promotion_to_default == trueinflag_transitions, or major new out-of-the-box milestones. - New Features: Commits with
commit_type == "feat"that touch active, non-gated services (UI, Experiment State Server, Actuator, Reconciler, XID Service). - Bug Fixes: Commits with
commit_type == "fix"that resolve bugs in active services.
- Highlights & Promoted Capabilities: Subsystems with
- Section 2: Production-Ready Features Behind Feature Flags (Safe to Enable):
- Subsystems whose feature flags are listed in
approved_flagsor whose status isapproved_preview_toggleingated_subsystems_status. - Synthesize all commits (
feat,fix,docs) touching this subsystem into cohesive bullet points.
- Subsystems whose feature flags are listed in
- Section 3: In-Development / Experimental Features Behind Flags:
- Subsystems whose feature flags are default
falseand NOT approved (status == "experimental_preview_toggle"). - Clearly state that capabilities are under active ongoing development and may not yet be functional.
- Subsystems whose feature flags are default
- Section 4: Operational, Infrastructure & Engineering Velocity:
- Commits with
commit_typeinrefactor,chore,docs,test,build,ci, or developer tooling (tools/,.github/,.agents/).
- Commits with
4. Semantic Synthesis & Narrative Formatting
Using the classified commits and the Release Notes Taxonomy Reference, draft the release notes according to the 4-section layout:
# XMC Release <Recommended_Version> (e.g., 0.7.0)
> **Release Version Determination**: <recommended_bump> bump (`<current_base_version>` -> `<recommended_version>`).
> *Rationale*: <rationale>
---
## 🌟 1. Public Changes (Available Out-of-the-Box)
### 🚀 Major Highlights & Promoted Capabilities
* **[Promoted to Default] Feature Name**: Description of the capability newly enabled by default (`flag_name: true`), and why it matters to users (#PRs).
* **[Action Required / Breaking]**: Any Spanner migration, new GCP IAM permissions, or altered configuration requirements.
### ✨ New Features & Improvements
* **Topic Title**: Cohesive summary of user-facing enhancements across active services (#PRs).
### 🐛 User-Facing Bug Fixes & Stability
* Description of fixes affecting user workflows (#PRs).
---
## 🚀 2. Production-Ready Features Behind Feature Flags (Safe to Enable)
> The following capabilities are fully developed, verified, and safe to be enabled. Their default enablement is temporarily postponed solely to align with managed solution milestones.
### 🔹 [Flag: `<ctk_flag_name>`] <Subsystem Display Name>
* **How to enable**: Set `<ctk_flag_name>: true` in `deploy/ctk_v2/xmanager-cloud-deployment.yaml` (or the nested `<helm_flag_path>: true` in Helm `values.yaml`).
* **What's New**:
* Synthesized summary of ready endpoints, controllers, UI components, or APIs (#PRs).
---
## 🧪 3. In-Development / Experimental Features Behind Flags
> [!WARNING]
> The following capabilities are under active ongoing development, experimental, and may not yet be functional. They are available for early preview and evaluation by enabling their deployment flags in your Cluster Toolkit deployment YAML or Helm `values.yaml`.
### 🔹 [Flag: `<ctk_flag_name>`] <Subsystem Display Name>
* **How to enable**: Set `<ctk_flag_name>: true` in `deploy/ctk_v2/xmanager-cloud-deployment.yaml` (or the nested `<helm_flag_path>: true` in Helm `values.yaml`).
* **What's New**:
* Synthesized summary of experimental capabilities (#PRs).
---
## ⚙️ 4. Operational, Infrastructure & Engineering Velocity
> Changes relevant to cluster operators, CI/CD, and internal architecture that do not alter the end-user interface.
* **Cluster & Portability**: Infrastructure updates, Terraform/Helm changes, OIDC/auth enhancements (#PRs).
* **CI & Build Performance**: Bazel caching, ARC runner optimizations, test scoping (#PRs).
* **Refactoring & Code Quality**: Internal architectural cleanups, lifecycle migrations, linting rules (#PRs).
Narrative Synthesis Principles:
- Group Related PRs: Never output disjointed lists of PR titles. Combine multiple PRs under common feature headers.
- Clear Flag Activation Instructions: For every gated feature, explicitly mention the exact configuration flags (CTK YAML and Helm
values.yaml) where operators can enable it. - Explain User Value: Highlight what users or operators can accomplish with the changes.
5. Draft Generation & Interactive Review Gate
- Present Version Recommendation in Chat:
Report the proposed version increment and technical rationale clearly in the chat:
- Base Version:
<base_version> - Proposed Release Version:
<recommended_version>(<recommended_bump>bump) - Triggers: List the concrete commits, migrations, promotions, or OOTB features justifying the bump.
- Base Version:
- Generate Draft Markdown File:
Write the structured release notes to a dedicated markdown file:
- Recommended path:
"${ARTIFACT_DIR:-/tmp}/release_notes_v<version>.md" - Include the complete 4-section layout with flag instructions and narrative synthesis.
- Recommended path:
- Interactive Review:
Present the draft file path to the user for review. If the user requests adjustments (e.g. changing version number, tuning descriptions, or regrouping entries), use
replace_file_contentto update the markdown file. - Preflight Validation (
--dry-run): Run non-mutating preflight validation with--dry-runto verify tag format, commit resolution, tag availability on remote, and notes file readability prior to requesting user approval:VERSION="<version>" NOTES_FILE="${ARTIFACT_DIR:-/tmp}/release_notes_v${VERSION}.md" PYTHONPATH=. python3 ./tools/release/publish_release.py \ --tag "${VERSION}" \ --target-commit origin/main \ --notes-file "${NOTES_FILE}" \ --dry-run
6. Mandatory Confirmation Gate & Release Publishing
[!CAUTION] STRICT INVARIANTS:
- NEVER CREATE A GIT TAG OR GITHUB RELEASE WITHOUT EXPLICIT USER CONFIRMATION: The agent MUST NOT call
publish_release.py(without--dry-run), rungit tag,git push origin <tag>, orgh release createproactively or autonomously. The agent MUST stop and wait after running the--dry-runpreflight check and presenting the draft and recommended version. Only proceed to step 2 after the user provides an explicit affirmative instruction (e.g., "approve release", "create tag and release", "publish release").- NEVER USE
--forceTO OVERWRITE AN EXISTING TAG OR RELEASE AUTONOMOUSLY: If a tag or release already exists locally or on the remote, abort immediately and consult the user.
- Wait for Explicit User Approval: Confirm that the user has explicitly approved both the version number and the release notes content.
- Publish Release as GitHub Draft (Post-Approval Only):
Execute the release publishing tool with
--draftand explicitly pin--target-commit origin/mainto ensure the release tag points to the canonical verified main commit:VERSION="<version>" NOTES_FILE="${ARTIFACT_DIR:-/tmp}/release_notes_v${VERSION}.md" PYTHONPATH=. python3 ./tools/release/publish_release.py \ --tag "${VERSION}" \ --target-commit origin/main \ --notes-file "${NOTES_FILE}" \ --draft[!NOTE] Publishing as a draft gives the team a collaborative proofreading window (e.g. 1–2 hours) on GitHub Releases to review the changelog and propose adjustments before manually publishing it to the public. Omit
--draftonly if the user explicitly instructs to publish publicly immediately. - Confirm Publication: Provide the user with the generated GitHub Release URL and confirm that the git tag was successfully pushed.
- Draft to Public Promotion (Separate Post-Review Action):
Once the collaborative proofreading window is complete and the user explicitly requests making the release public, promote the draft release:
TAG="<version>" gh release edit "v${TAG#v}" --draft=false[!CAUTION] Promoting a draft release to public is an irreversible public action and MUST NOT be performed autonomously. It requires an explicit user confirmation gate (e.g., "promote release to public").
04 同仓库更多 Skills
XMC Upgrade Environment
Upgrades an existing XManager on Cloud (XMC) environment on GKE to the latest current branch state using the deployment configuration YAML.
XMC Trajectory Comparison
Validates proposed skill or rule changes by executing concurrent A/B benchmark subagents on clean baseline vs candidate worktrees, comparing trajectories, and tearing down test resources.
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.
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.
XMC PR Split Verification
Analyzes pull request diffs exceeding size thresholds (400 prod / 1000 total / 1000 docs) to enforce Single Responsibility Principle (SRP), evaluate vertical slice splitting feasibility, eliminate dead code, and plan gh-stack PR stacks.
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.