بنقرة واحدة
precheck
PR 作成前の lint + format + test 一括実行。引数で scope (python/rust/cs/go/js/cpp/all) を指定可能。未指定なら git diff から自動判定。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
PR 作成前の lint + format + test 一括実行。引数で scope (python/rust/cs/go/js/cpp/all) を指定可能。未指定なら git diff から自動判定。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Python canonical (`src/python_run/piper_plus/`, `src/python/piper_train/`, `src/python/g2p/piper_plus_g2p/`) を変更した PR で、 ONNX I/O 以外の追随漏れ (phonemizer / config schema / CLI flag / data 形式 / API 変更) を 7 ランタイム + 2 docker image 範囲で fail-fast 検出する。PR
ZH-EN code-switching loanword の同期と forward-compat を 1 コマンドで検査。zh_en_loanword.json を編集したり 5 ランタイムのいずれかに新規エントリを追加する前後に呼ぶ。Python source を canonical とし、Rust×2 / Go / C# / WASM / C++ の 6 mirror + Python runtime mirror = 計 7 copy + 6 fixture mirror が byte-for-byte 一致しているかを確認。
PR 作成前の最終チェックリスト (lint/test/docs/CHANGELOG/未コミット確認)。/precheck の拡張版で、ドキュメント整合性も検証します。
推論パスの canonical Python (`export_onnx.py` / `vits/models.py:VitsModel.infer`) を変更した PR で、6 ランタイム (Python runtime / Rust / Go / C# / C++ / WASM) の inference path が追随しているかを git diff で確認。PR
piper-plus のコミットルール (CLAUDE.md 準拠) でステージ済みファイルをコミットします。--no-verify 禁止、HEREDOC、適切な prefix を強制。
コミット前にエージェントチームで全ドキュメント (CLAUDE.md / README / CHANGELOG / docs/) を監査し、コード変更に応じて自動更新します。大規模変更時の documentation drift を予防。
استنادا إلى تصنيف SOC المهني
| name | precheck |
| description | PR 作成前の lint + format + test 一括実行。引数で scope (python/rust/cs/go/js/cpp/all) を指定可能。未指定なら git diff から自動判定。 |
| argument-hint | [python|rust|cs|go|js|cpp|all] |
| disable-model-invocation | true |
| allowed-tools | Bash(uv run *) Bash(cargo *) Bash(dotnet *) Bash(go test *) Bash(go vet *) Bash(node *) Bash(npm *) Bash(cmake *) Bash(ctest *) Bash(git diff *) Bash(git status *) |
$ARGUMENTS で指定されたスコープに対して、CI が実行するチェックと同等の検査をローカルで実行します。
!git diff --name-only HEAD 2>/dev/null | head -30
引数 $ARGUMENTS:
python → src/python/ + src/python_run/ のみrust → src/rust/ のみcs → src/csharp/ のみgo → src/go/ のみjs → src/wasm/openjtalk-web/ のみcpp → src/cpp/ のみall → 全ランタイムgit diff の結果からスコープを推定 (複数該当ならそれら全て)# Lint
uv run ruff check src/python_run/ src/python/
# Format check
uv run ruff format --check src/python_run/ src/python/
# Unit tests (runtime + g2p)
cd src/python_run && uv run pytest tests/ -o addopts="" --tb=short -q && cd ../..
cd src/rust
cargo fmt --all -- --check
cargo clippy --workspace --all-features -- -D warnings
cargo test -p piper-plus --no-fail-fast
cd ../..
dotnet build src/csharp/PiperPlus.sln -c Release --nologo
dotnet format src/csharp/PiperPlus.sln --verify-no-changes --no-restore
dotnet test src/csharp/PiperPlus.sln -c Release --no-build --nologo --verbosity minimal
cd src/go
go vet ./... ./phonemize/...
go test -race -count=1 ./... ./phonemize/...
cd ../..
cd src/wasm/openjtalk-web
npm run test:npm-package:all
cd ../../..
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure
各ステップ完了後、以下の形式で結果を報告:
## Precheck 結果
| ステップ | 結果 | 詳細 |
|---------|------|------|
| Python ruff check | ✅ / ❌ | (失敗時はエラー要約) |
| Python ruff format | ✅ / ❌ | |
| Python pytest | ✅ / ❌ | (passed/failed/skipped カウント) |
| ... | ... | ... |
uv run ruff format src/python_run/ src/python/ で自動修正uv run ruff check --fix src/python_run/ src/python/ で自動修正dotnet format src/csharp/PiperPlus.sln で自動修正--cov が含まれていて pytest-cov が無い環境では -o addopts="" で上書きする (CLAUDE.md memory)set -e 相当)