Release prep

From ayutaz/piper-plus · View interactive version

Release prep is an AI agent skill from the GitHub repository ayutaz/piper-plus. 7 ランタイム manifest の version 一覧表示、CHANGELOG `[Unreleased]` → `[X.Y.Z]` 移行支援、公開 registry の最新公開 version 確認を 1 コマンドで実行する read-mostly skill。`docs/spec/release-versions.toml` を canonical source として参照。

How to use this skill

Skill file

Release Preparation Helper

リリース作業の forensic check と CHANGELOG 移行支援 を 1 つにまとめた skill。手動でやると忘れがちな以下 4 段階を 1 コマンドで通す:

  1. 各 manifest の 現在の version を一覧化 (7 runtime × 9 manifest)
  2. release-versions.toml の expected_prefix との照合
  3. CHANGELOG.md [Unreleased] の内容と、リリース時に必要な 昇格作業 の提案
  4. 公開 registry (PyPI / crates.io / NuGet / npm / Maven Central) の 最新公開 version 取得

実装は read-mostly — 変更提案は markdown diff 形式でユーザに提示し、 適用は明示確認後 (memory feedback_merge_caution.md に従う)。

引数

現在の状態

フェーズ 1: Manifest version 一覧

以下の 9 manifest を並列で Read し、現在の version を抽出して表化:

| Runtime | Manifest | 抽出キー |

|---------|----------|---------|

| Python (PyPI) | VERSION | ファイル全体 |

| Rust (crates.io) | src/rust/Cargo.toml | [workspace.package].version |

| C# Core (NuGet) | src/csharp/PiperPlus.Core/PiperPlus.Core.csproj | <Version> |

| C# Cli (NuGet) | src/csharp/PiperPlus.Cli/PiperPlus.Cli.csproj | <Version> |

| npm synthesis | src/wasm/openjtalk-web/package.json | .version |

| npm g2p | src/wasm/g2p/package.json | .version |

| Swift synthesis | Package.swift | let version = 行 |

| Swift G2P | Package.swift | let g2pVersion = 行 |

| Kotlin Android | android/gradle.properties | VERSION_NAME= |

# 例: rust workspace version
grep -A1 "^\[workspace.package\]" src/rust/Cargo.toml | grep "^version" | head -1

フェーズ 2: Expected prefix との照合

docs/spec/release-versions.toml を tomllib で読み、各 manifest の expected_prefix を取得。フェーズ 1 の実 version が prefix で始まるかを照合:

| Runtime | Manifest version | expected_prefix | Status |
|---------|------------------|-----------------|--------|
| Python  | `<local>`        | `<expected_prefix>` | ✓      |
| Rust    | `<local>`        | `<expected_prefix>` | ✓      |
| C# Core | `<local>`        | `<expected_prefix>` | ✓ / 要確認 |
| ...     | ...              | ...             | ...    |

mode = "warn" でも、fail ステータスを report 上で強調表示。

フェーズ 3: CHANGELOG.md 状況

# [Unreleased] セクション抽出
awk '/^## \[Unreleased\]/{flag=1; next} /^## /{flag=0} flag' CHANGELOG.md | head -60

集計:

## [X.Y.Z] - YYYY-MM-DD

(Unreleased から移動した内容)

## [Unreleased]

(空または next-version の作業中項目)

ユーザに「これを CHANGELOG.md に適用していいか」明示確認 (memory feedback_merge_caution.md 準拠)。

フェーズ 4: 公開 registry の最新 version

オプションで以下を取得 (rate limit を考慮し並列実行):

# PyPI
curl -s https://pypi.org/pypi/piper-plus/json | jq -r '.info.version'

# crates.io
curl -s https://crates.io/api/v1/crates/piper-plus | jq -r '.crate.max_version'
curl -s https://crates.io/api/v1/crates/piper-plus-cli | jq -r '.crate.max_version'

# NuGet
curl -s "https://api.nuget.org/v3-flatcontainer/piperplus.core/index.json" | jq -r '.versions[-1]'
curl -s "https://api.nuget.org/v3-flatcontainer/piperplus.cli/index.json" | jq -r '.versions[-1]'

# npm
npm view piper-plus version
npm view @piper-plus/g2p version

# Maven Central (search.maven.org)
curl -s "https://search.maven.org/solrsearch/select?q=g:io.github.ayutaz+AND+a:piper-plus-g2p-android&rows=1&wt=json" | \
    jq -r '.response.docs[0].latestVersion'

各 registry で取得失敗 (404 / timeout) は <未公開> として表示し fail にしない。

フェーズ 5: ローカル vs 公開 vs canonical の 3-way 差分

## Release Status

| Runtime | Local | Published | Canonical (.toml) | Verdict |
|---------|-------|-----------|-------------------|---------|
| Python  | `<local>` | `<published>` | `<expected_prefix>` | Local ahead → publish required |
| Rust    | `<local>` | `<published>` | `<expected_prefix>` | In sync |
| C# Core | `<local>` | `<published>` | `<expected_prefix>` | 判定 |
| ...     | ...   | ...       | ...               | ...     |

Verdict 例:

フェーズ 6: 推奨アクション

verdict に応じて推奨 next action を表示:

| Verdict | 推奨 |

|---------|------|

| Local ahead → publish required | .github/workflows/release-*.yml の trigger を確認、 dispatch |

| Canonical drift | docs/spec/release-versions.toml の expected_prefix を更新、 CI gate flip 可否を判断 |

| Published ahead → local bump needed | 当該 manifest の version を bump、CHANGELOG に記録 |

注意事項

使用例

# 全 runtime の current / published / canonical を一覧
/release-prep

# Python だけに絞って詳細表示
/release-prep python

# 次回リリース予定での CHANGELOG 移行案を生成
/release-prep --target-version <target-version>

# Rust だけ + target version
/release-prep rust --target-version <target-version>

期待効果

/sync-docs Agent 7 (version drift 監査) と相補的: /sync-docs は drift 検出、/release-prep は drift 解消支援。

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.