← ClaudeAtlas

cmate-verifylisted

リポジトリの検証ゲート(lint / typecheck / test / build 等)を .commandmate/verify.yaml に宣言し、worktree の cwd で逐次実行して exit code で合否を判定する。verify.yaml が無いリポジトリでは CI 定義から起案する。作業完了を主張する前の検証や、並列ワーカーの完了判定に使う。
Kewton/CommandMate · ★ 39 · Code & Development · score 79
Install: claude install-skill Kewton/CommandMate
# cmate-verify 「このリポジトリで何が通れば合格か」を `.commandmate/verify.yaml` に宣言し、 **実 exit code で** 判定するランナー。CommandMate の検証ゲート機能(Phase 1 以降)の 設定形式 v1 を、製品実装より先に実地検証するための先行 Skill である。 正準仕様は CommandMate リポジトリの [`docs/design/verification-config.md`](../../../docs/design/verification-config.md)。 Phase 1 の製品ローダは同じ仕様を一般的な YAML パーサで実装するので、この Skill で書いた verify.yaml はそのまま引き継げる。 > **なぜ exit code か**: `cmd | grep ...` は `$?` を grep に渡して非ゼロ終了を隠す。vitest は > 全テスト緑でも Unhandled Rejection で exit 1 を出しうるので、出力を grep した要約は > それを PASS と報告してしまう。ゲートは必ず `sh -c "$cmd" > log 2>&1` で走らせ `$?` を直接読む。 ## 構成 ``` cmate-verify/ ├── SKILL.md └── scripts/ ├── verify-run.sh # ゲート実行ランナー(bash 3.2 互換) └── tests/ ├── run-tests.sh # fixture ベーステスト(bash + git だけで動く) └── fixtures/*.yaml ``` `scripts/tests/run-tests.sh` は vitest に依存しない。Node ��無い導入先でも `bash scripts/tests/run-tests.sh` だけで検証できる(CommandMate 本体では `tests/unit/skills/cmate-verify/` の薄いラッパが `npm run test:unit` から同じ suite を回す)。 ## 手順 1: init(`.commandmate/verify.yaml` が無い場合) **コードを書かず、リポジトリをスキャンしてゲートを起案し、ユーザーの確認を得てから書き出す。** 検出優先順位は次のとおり。上位が見つかったら下位は補助として扱う。 1. **`.github/workflows/*.yml` の CI ジョブ** — そのリポジトリにおける「何が通れば合格か」の 既存の定義。`run:` の各ステップが第一候補。 2. **`package.json` の `scripts`** — `lint` / `test` / `test:unit` / `typecheck` / `build` 系。 3. **`Makefile` のターゲット** — `make lint` / `make test` 等。 4. **言語マニフェスト** — `Cargo.toml`(`cargo clippy` / `cargo test`)、`pyproject.toml` (`ruff` / `pytest` / `mypy`)、`go.mod`(`go vet` / `go