diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json new file mode 100644 index 0000000..5a91f1c --- /dev/null +++ b/.agents/plugins/marketplace.json @@ -0,0 +1,44 @@ +{ + "name": "9uile-plugins", + "interface": { + "displayName": "9uiLe Plugins" + }, + "plugins": [ + { + "name": "tech-docs", + "source": { + "source": "local", + "path": "./plugins/tech-docs" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Developer Tools" + }, + { + "name": "quality-architect", + "source": { + "source": "local", + "path": "./plugins/quality-architect" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Developer Tools" + }, + { + "name": "model-strategy", + "source": { + "source": "local", + "path": "./plugins/model-strategy" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Developer Tools" + } + ] +} diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 04524f5..ddabc0d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -9,6 +9,7 @@ ## 対象プラグイン - [ ] tech-docs - [ ] quality-architect +- [ ] model-strategy - [ ] marketplace / リポジトリ全体 - [ ] その他: @@ -20,12 +21,13 @@ - [ ] 破壊的変更を含む ## 変更内容 - + - ## 動作確認 - [ ] ローカルの Marketplace 登録 (`/plugin marketplace add /path/to/repo`) で読み込めることを確認した +- [ ] Codex のローカル Marketplace 登録 (`codex plugin marketplace add /path/to/repo`) で読み込めることを確認した - [ ] 対象の Skill / コマンドを実行し、期待どおり動作することを確認した - [ ] `marketplace.json` / `plugin.json` の JSON 構文が壊れていないことを確認した @@ -34,7 +36,7 @@ ## チェックリスト - [ ] 既存の挙動を壊していない(または破壊的変更を上に明記した) -- [ ] バージョン更新が必要な場合、`plugin.json` / `marketplace.json` を更新した +- [ ] バージョン更新が必要な場合、Claude/Codex `plugin.json` / `marketplace.json` を更新した - [ ] README など関連ドキュメントを更新した(必要な場合) ## 補足 diff --git a/.github/workflows/verify-versions.yml b/.github/workflows/verify-versions.yml index c6ad530..125caed 100644 --- a/.github/workflows/verify-versions.yml +++ b/.github/workflows/verify-versions.yml @@ -4,7 +4,9 @@ on: pull_request: paths: - ".claude-plugin/marketplace.json" + - ".agents/plugins/marketplace.json" - "plugins/**/.claude-plugin/plugin.json" + - "plugins/**/.codex-plugin/plugin.json" - "scripts/**" - ".github/workflows/verify-versions.yml" push: diff --git a/.gitignore b/.gitignore index 15da698..e617fb0 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ yarn-error.log* # Claude / Local .claude/local/ +.tokensave/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad189b6..3ceae2e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ # コントリビューションガイド `9uiLe/plugins` をご利用いただきありがとうございます。 -このリポジトリは [Claude Code](https://claude.com/claude-code) 用プラグインの Marketplace です。 +このリポジトリは [Claude Code](https://claude.com/claude-code) / Codex 用プラグインの Marketplace です。 不具合の報告・改善提案・Pull Request はいつでも歓迎します。 - [不具合 / 改善を報告する(Issue の起票)](#不具合--改善を報告するissue-の起票) @@ -27,7 +27,7 @@ ## 報告前のチェックリスト - [ ] [既存の Issue](https://github.com/9uiLe/plugins/issues?q=is%3Aissue) を検索し、重複がないか確認した。 -- [ ] プラグイン / Claude Code を最新版に更新しても再現するか確認した。 +- [ ] プラグイン / Claude Code / Codex を最新版に更新しても再現するか確認した。 - [ ] 機微な情報(APIキー・社内コード・個人情報など)がログやスクリーンショットに含まれていないか確認した。 ## 良い報告の書き方 @@ -37,10 +37,10 @@ | 項目 | ポイント | | --- | --- | -| 対象プラグイン / Skill | `tech-docs` / `quality-architect` のどちらか、`create-adr` などどの Skill かを明記する。 | -| 再現手順 | 「どのコマンドを実行し、Claude に何を指示したか」を番号付きで。第三者が同じ操作をたどれること。 | +| 対象プラグイン / Skill | `tech-docs` / `quality-architect` / `model-strategy` のどれか、`create-adr` などどの Skill かを明記する。 | +| 再現手順 | 「どのコマンドを実行し、Claude Code / Codex に何を指示したか」を番号付きで。第三者が同じ操作をたどれること。 | | 期待 / 実際の挙動 | 「こうなるはず」と「実際はこうなった」を分けて書く。 | -| 環境情報 | Claude Code のバージョン(`/status` または `claude --version`)、OS、実行環境(CLI / VS Code / Web)、インストール方法。 | +| 環境情報 | Claude Code のバージョン(`/status` または `claude --version`)または Codex のバージョン、OS、実行環境、インストール方法。 | | ログ・成果物 | エラーメッセージや、生成された HTML / レビュー結果の該当箇所を貼る。スクリーンショットも有効。 | 機能要望の場合は、**「解決したい課題」と「提案する解決策」を分けて**書くと、議論や設計判断がしやすくなります。 @@ -62,15 +62,20 @@ ``` . ├── .claude-plugin/ -│ └── marketplace.json ← Marketplace マニフェスト(収録プラグイン一覧) +│ └── marketplace.json ← Claude Code Marketplace マニフェスト +├── .agents/ +│ └── plugins/ +│ └── marketplace.json ← Codex Marketplace マニフェスト ├── plugins/ │ ├── tech-docs/ │ │ ├── .claude-plugin/plugin.json +│ │ ├── .codex-plugin/plugin.json │ │ ├── skills//SKILL.md ← 各 Skill の本体(プロンプト/手順) │ │ ├── shared-assets/ ← デザインシステム + HTML テンプレート │ │ └── README.md │ └── quality-architect/ │ ├── .claude-plugin/plugin.json +│ ├── .codex-plugin/plugin.json │ ├── skills//SKILL.md │ ├── references/ ← ISO/IEC 25010 各特性のリファレンス │ ├── scripts/ ← 品質ゲート用スクリプト @@ -85,8 +90,8 @@ - **Skill の挙動を変える** → 対象プラグインの `skills//SKILL.md` を編集します。Skill の説明や手順はここに記述されています。 - **生成物の見た目(tech-docs)** → `plugins/tech-docs/shared-assets/`(`tokens.css` / `components/` / `templates/`)を編集します。 - **品質モデルの基準(quality-architect)** → `plugins/quality-architect/references/` の各 Markdown を編集します。 -- **新しいプラグインを追加する** → `plugins//` を作成し、`.claude-plugin/plugin.json` を用意したうえで、ルートの `.claude-plugin/marketplace.json` の `plugins` 配列にエントリを追加します。`README.md` の収録プラグイン表も更新してください。 -- **バージョンを上げる** → 該当 `plugin.json` と `marketplace.json` の `version` を揃えて更新します。**リリース作業全体の手順は [`RELEASING.md`](./RELEASING.md) を参照** してください(`scripts/release-prepare.sh` で自動化されています)。 +- **新しいプラグインを追加する** → `plugins//` を作成し、Claude Code 用の `.claude-plugin/plugin.json`、Codex 用の `.codex-plugin/plugin.json`、ルートの `.claude-plugin/marketplace.json` / `.agents/plugins/marketplace.json` にエントリを追加します。`README.md` の収録プラグイン表も更新してください。 +- **バージョンを上げる** → 該当 `.claude-plugin/plugin.json`、`.codex-plugin/plugin.json`、Claude Code 側 `marketplace.json` の `version` を揃えて更新します。**リリース作業全体の手順は [`RELEASING.md`](./RELEASING.md) を参照** してください(`scripts/release-prepare.sh` で自動化されています)。 - **リリース手順を変える** → `RELEASING.md` / `scripts/**` / `.github/workflows/verify-versions.yml` は同一 PR で更新します(仕様ドリフト防止)。 ### ローカルでの動作確認 @@ -98,7 +103,12 @@ /plugin install @9uile-plugins ``` -JSON(`plugin.json` / `marketplace.json`)を編集した場合は、構文エラーがないことを確認してください。 +```bash +codex plugin marketplace add /path/to/this/repo +codex plugin add @9uile-plugins +``` + +JSON(`plugin.json` / `marketplace.json`)を編集した場合は、構文エラーがないことと `scripts/verify-versions.sh` が通ることを確認してください。 ## セキュリティ上の問題の報告 diff --git a/README.md b/README.md index 8be4833..ae3d63e 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,15 @@ [![Open issues](https://img.shields.io/github/issues/9uiLe/plugins)](https://github.com/9uiLe/plugins/issues) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md) [![Claude Code](https://img.shields.io/badge/Claude%20Code-Marketplace-8A6FE8)](https://claude.com/claude-code) +[![Codex](https://img.shields.io/badge/Codex-Plugin-111827)](https://openai.com/codex) -[Claude Code](https://claude.com/claude-code) 用プラグインを集めた Marketplace リポジトリです。 +[Claude Code](https://claude.com/claude-code) / Codex 用プラグインを集めた Marketplace リポジトリです。 ## インストール -Claude Code 上で次を実行してください: +### Claude Code + +Claude Code 上で次を実行してください。 ``` /plugin marketplace add 9uiLe/plugins @@ -22,6 +25,15 @@ Claude Code 上で次を実行してください: /plugin install @9uile-plugins ``` +### Codex + +Codex では、このリポジトリを Marketplace として登録してからプラグインを追加します。 + +```bash +codex plugin marketplace add 9uiLe/plugins +codex plugin add @9uile-plugins +``` + ## 収録プラグイン | Name | Description | @@ -35,10 +47,14 @@ Claude Code 上で次を実行してください: ``` . ├── .claude-plugin/ -│ └── marketplace.json ← Marketplace マニフェスト +│ └── marketplace.json ← Claude Code Marketplace マニフェスト +├── .agents/ +│ └── plugins/ +│ └── marketplace.json ← Codex Marketplace マニフェスト ├── plugins/ │ └── tech-docs/ │ ├── .claude-plugin/plugin.json +│ ├── .codex-plugin/plugin.json │ ├── skills/ │ │ ├── create-adr/SKILL.md │ │ ├── create-spec/SKILL.md @@ -49,16 +65,20 @@ Claude Code 上で次を実行してください: └── README.md ``` -新規プラグインを追加するときは `plugins//` を作り、`.claude-plugin/marketplace.json` の `plugins` 配列にエントリを追加します。 +新規プラグインを追加するときは `plugins//` を作り、Claude Code 用の `.claude-plugin/plugin.json`、Codex 用の `.codex-plugin/plugin.json`、ルートの `.claude-plugin/marketplace.json` / `.agents/plugins/marketplace.json` を更新します。 ## 開発 -ローカルで動作確認するときは、リポジトリをローカルパスとして Marketplace に登録できます: +ローカルで動作確認するときは、リポジトリをローカルパスとして Marketplace に登録できます。 ``` /plugin marketplace add /path/to/this/repo ``` +```bash +codex plugin marketplace add /path/to/this/repo +``` + ## 不具合報告・改善提案 バグや改善のアイデアは GitHub Issue で受け付けています。リポジトリの **Issues → New issue** から、目的に合ったテンプレート(🐞 バグ報告 / ✨ 改善・機能要望)を選んで起票してください。 diff --git a/RELEASING.md b/RELEASING.md index 70726f0..03a054a 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -21,7 +21,7 @@ | 軸 | どこに書かれるか | 何を表すか | | --- | --- | --- | -| **プラグイン版** | `plugins//.claude-plugin/plugin.json`
`.claude-plugin/marketplace.json` の `plugins[].version` | 個別プラグインの互換性追跡 | +| **プラグイン版** | `plugins//.claude-plugin/plugin.json`
`plugins//.codex-plugin/plugin.json`
`.claude-plugin/marketplace.json` の `plugins[].version` | 個別プラグインの互換性追跡 | | **リリース版** | `.claude-plugin/marketplace.json` の `metadata.version`
git tag `vX.Y.Z` / `releases/vX.Y.Z.md` / `CHANGELOG.md` の `[X.Y.Z]` 見出し | リポジトリ全体のスナップショット番号 | 整合性ゲート: **リリース版 ≥ max(プラグイン版)**(`verify-versions.sh` が CI で検査)。 @@ -43,7 +43,7 @@ scripts/release-prepare.sh --plugin quality-architect --bump patch --release-bump patch --dry-run ``` -ファイルは書き換えず、CHANGELOG・plugin.json・marketplace.json・releases/*.md の差分プレビューが流れます。 +ファイルは書き換えず、CHANGELOG・Claude/Codex plugin.json・marketplace.json・releases/*.md の差分プレビューが流れます。 ### 3. 本番実行(PR 作成まで) @@ -55,7 +55,7 @@ scripts/release-prepare.sh --plugin quality-architect --bump patch --release-bum 1. 前提チェック(`gh`/`jq`/`git`、clean、`master`、tag 重複なし) 2. `release/vX.Y.Z` ブランチを作成 -3. `plugin.json` と `marketplace.json` の version を bump +3. Claude/Codex `plugin.json` と Claude Code 側 `marketplace.json` の version を bump 4. `CHANGELOG.md` の `[Unreleased]` を `[X.Y.Z] - YYYY-MM-DD` に繰り上げ+ compare リンク差し替え 5. `releases/vX.Y.Z.md` 雛形を生成 6. `verify-versions.sh` で事後検証 @@ -76,6 +76,11 @@ scripts/release-prepare.sh --plugin quality-architect --bump patch --release-bum /plugin install @9uile-plugins ``` +```bash +codex plugin marketplace add /Users//workspace/plugins +codex plugin add @9uile-plugins +``` + 対象 Skill を 1 回実行し、回帰がないか確認します。 ### 6. PR レビュー & マージ @@ -121,7 +126,7 @@ scripts/release-publish.sh --version X.Y.Z - `shellcheck -x scripts/**/*.sh` - `bash scripts/verify-versions.sh` - - 各プラグインの `plugin.json.version` と `marketplace.json.plugins[].version` の一致 + - 各プラグインの `.claude-plugin/plugin.json.version`、`.codex-plugin/plugin.json.version`、`marketplace.json.plugins[].version` の一致 - `marketplace.json.metadata.version` が最大プラグイン版以上であること ローカルでも手動実行できます: @@ -163,7 +168,7 @@ bash scripts/verify-versions.sh scripts/ ├── lib/ │ ├── common.sh # ログ・前提チェック・確認プロンプト・rollback -│ ├── version.sh # plugin.json / marketplace.json の version 読み書き +│ ├── version.sh # Claude/Codex plugin.json / marketplace.json の version 読み書き │ ├── changelog.sh # CHANGELOG セクション繰り上げ + compare リンク │ └── release-notes.sh # releases/vX.Y.Z.md 雛形生成 ├── release-prepare.sh # ブランチ → 編集 → コミット → PR diff --git a/plugins/model-strategy/.codex-plugin/plugin.json b/plugins/model-strategy/.codex-plugin/plugin.json new file mode 100644 index 0000000..788ebb3 --- /dev/null +++ b/plugins/model-strategy/.codex-plugin/plugin.json @@ -0,0 +1,39 @@ +{ + "name": "model-strategy", + "version": "0.1.0", + "description": "Cost-effective model and effort selection for Claude Code workflows.", + "author": { + "name": "9uiLe", + "url": "https://github.com/9uiLe" + }, + "homepage": "https://github.com/9uiLe/plugins/tree/master/plugins/model-strategy", + "repository": "https://github.com/9uiLe/plugins", + "license": "MIT", + "keywords": [ + "model-selection", + "effort", + "cost-optimization", + "subagents", + "pricing", + "token-economy" + ], + "skills": "./skills/", + "interface": { + "displayName": "Model Strategy", + "shortDescription": "Choose Claude model and effort levels", + "longDescription": "Classify tasks and recommend cost-effective Claude model, effort, and delegation choices using a reference-backed decision matrix.", + "developerName": "9uiLe", + "category": "Developer Tools", + "capabilities": [ + "Read", + "Write" + ], + "websiteURL": "https://github.com/9uiLe/plugins/tree/master/plugins/model-strategy", + "defaultPrompt": [ + "Choose the most cost-effective model for this task", + "Decide whether to delegate this implementation", + "Explain the model and effort trade-off" + ], + "brandColor": "#7C3AED" + } +} diff --git a/plugins/model-strategy/README.md b/plugins/model-strategy/README.md index e2f6fcb..79ba6ef 100644 --- a/plugins/model-strategy/README.md +++ b/plugins/model-strategy/README.md @@ -1,6 +1,6 @@ # model-strategy -Claude Code を従量課金前提でコスパよく運用するための、モデル・effort 使い分けプラグインです。 +Claude Code を従量課金前提でコスパよく運用するための、Claude Code / Codex 対応モデル・effort 使い分けプラグインです。 **原則: 高価なモデルは「判断」に、安価なモデルは「作業量」に使う。** @@ -47,8 +47,14 @@ Fable 5 は新トークナイザにより実効コストが Opus 4.8 の約 2.6 ## インストール -``` +```bash +# Claude Code +/plugin marketplace add 9uiLe/plugins /plugin install model-strategy@9uile-plugins + +# Codex +codex plugin marketplace add 9uiLe/plugins +codex plugin add model-strategy@9uile-plugins ``` ## 典拠 diff --git a/plugins/model-strategy/references/06-context-monitor.md b/plugins/model-strategy/references/06-context-monitor.md index f9e1180..cd2a2f1 100644 --- a/plugins/model-strategy/references/06-context-monitor.md +++ b/plugins/model-strategy/references/06-context-monitor.md @@ -32,6 +32,7 @@ Claude Opus 4.8 ⊙ ctx 78% ▓▓▓▓▓▓▓░░░ 156k/200k $1.92 ⚠ ``` `${CLAUDE_PLUGIN_ROOT}` は model-strategy プラグインのルートに展開される。プラグイン外から使う場合はスクリプトの絶対パスを直接指定する。 +Codex でこのファイルを参照する場合は、この `references/` ディレクトリの 1 階層上をプラグインルートとして読み替える。 ## §3 依存と設定 diff --git a/plugins/model-strategy/skills/model-effort-guide/SKILL.md b/plugins/model-strategy/skills/model-effort-guide/SKILL.md index 7da331b..a8f624e 100644 --- a/plugins/model-strategy/skills/model-effort-guide/SKILL.md +++ b/plugins/model-strategy/skills/model-effort-guide/SKILL.md @@ -14,7 +14,7 @@ description: "Recommend the cost-optimal Claude model (Fable/Opus/Sonnet/Haiku) ## 1. 判定フロー 1. タスクを分類する: 設計判断 / 実装 / レビュー / 探索・調査 / 定型作業 / 大量一括処理 -2. `${CLAUDE_PLUGIN_ROOT}/references/02-decision-matrix.md` のマトリックスで担当と effort を決定する +2. プラグインルート相対の `references/02-decision-matrix.md` のマトリックスで担当と effort を決定する 3. 委譲判定基準(同ファイル §2)を確認する: - 仕様が文章で書き切れる実装 → **sonnet-implementer** に委譲 - 結論だけ欲しい探索・定型 → **haiku-scout** に委譲 diff --git a/plugins/quality-architect/.codex-plugin/plugin.json b/plugins/quality-architect/.codex-plugin/plugin.json new file mode 100644 index 0000000..640f468 --- /dev/null +++ b/plugins/quality-architect/.codex-plugin/plugin.json @@ -0,0 +1,39 @@ +{ + "name": "quality-architect", + "version": "0.1.3", + "description": "Design and review software architecture against the ISO/IEC 25010:2023 product quality model.", + "author": { + "name": "9uiLe", + "url": "https://github.com/9uiLe" + }, + "homepage": "https://github.com/9uiLe/plugins/tree/master/plugins/quality-architect", + "repository": "https://github.com/9uiLe/plugins", + "license": "MIT", + "keywords": [ + "iso-25010", + "software-quality", + "architecture", + "code-review", + "quality-attributes", + "non-functional-requirements" + ], + "skills": "./skills/", + "interface": { + "displayName": "Quality Architect", + "shortDescription": "Design and review with ISO/IEC 25010", + "longDescription": "Use the ISO/IEC 25010:2023 product quality model to design proposed architectures, review existing systems, and produce severity-rated findings backed by references.", + "developerName": "9uiLe", + "category": "Developer Tools", + "capabilities": [ + "Read", + "Write" + ], + "websiteURL": "https://github.com/9uiLe/plugins/tree/master/plugins/quality-architect", + "defaultPrompt": [ + "Review this codebase using ISO/IEC 25010", + "Design architecture trade-offs for this feature", + "Assess whether this design is valid" + ], + "brandColor": "#0F766E" + } +} diff --git a/plugins/quality-architect/README.md b/plugins/quality-architect/README.md index 19e39b0..4529d73 100644 --- a/plugins/quality-architect/README.md +++ b/plugins/quality-architect/README.md @@ -1,7 +1,7 @@ # quality-architect **ISO/IEC 25010:2023 製品品質モデル**(9 特性・40 副特性)を共通言語として、 -ソフトウェア/システムの**アーキテクチャ設計**と**コードレビュー**を行う Claude Code プラグインです。 +ソフトウェア/システムの**アーキテクチャ設計**と**コードレビュー**を行う Claude Code / Codex プラグインです。 各特性ごとに、定義・調査観点・設計タクティクス・レビューチェックリスト・計測指標・ **実在確認済みの学術論文/公式文書リファレンス**をまとめたライブラリを内蔵しています。 @@ -24,6 +24,18 @@ スキルは要求に応じて自動的に起動します。 +## インストール + +```bash +# Claude Code +/plugin marketplace add 9uiLe/plugins +/plugin install quality-architect@9uile-plugins + +# Codex +codex plugin marketplace add 9uiLe/plugins +codex plugin add quality-architect@9uile-plugins +``` + ## リファレンス・ライブラリ `references/` 配下に、ISO/IEC 25010:2023 の 9 特性を 1 ファイルずつ収録: diff --git a/plugins/quality-architect/references/00-overview.md b/plugins/quality-architect/references/00-overview.md index 068b8c3..d10ffbd 100644 --- a/plugins/quality-architect/references/00-overview.md +++ b/plugins/quality-architect/references/00-overview.md @@ -79,10 +79,10 @@ SQuaRE シリーズの主な構成(本プラグインで参照する範囲): 本プラグインのどのスキルから入っても、以下は **スキル非依存の絶対要件** である。両 SKILL.md の §0 はここを反映しており、矛盾があれば本節を優先する。 1. **ルーティング**: 対象として既存コード/差分/PR/実装が与えられた依頼の唯一の正当な入口は `quality-review` である。`quality-architecture` を起動してしまった場合は、最初の応答でハンドオフ提案を行う(黙って続行しない)。 -2. **決定論ファースト**: 既存コードに対する品質判断(数値・指摘)を出力する前に、必ず次の順で試す。(a) `quality-gate-result.json` を Read、(b) `${CLAUDE_PLUGIN_ROOT}/scripts/quality-gate-.sh` を Bash で実行、(c) `quality-gates.yml` の `run` を個別実行、(d) いずれも不可なら全項目 `skipped` を明記し総合 `inconclusive` と報告。**いずれも実行せずに LLM 単独で数値を出すことは禁止**。 +2. **決定論ファースト**: 既存コードに対する品質判断(数値・指摘)を出力する前に、必ず次の順で試す。(a) `quality-gate-result.json` を Read、(b) `$PLUGIN_ROOT/scripts/quality-gate-.sh` を Bash で実行、(c) `quality-gates.yml` の `run` を個別実行、(d) いずれも不可なら全項目 `skipped` を明記し総合 `inconclusive` と報告。**いずれも実行せずに LLM 単独で数値を出すことは禁止**。 3. **資産検出**: いずれのスキルでも、対象リポジトリ内の `quality-gate-result.json` / `.swiftlint.yml` / `.periphery.yml` / `Mintfile` / `scripts/quality-gate-*.sh` / `.github/workflows/*quality*.y*ml` の存在を確認し、結果をレポート冒頭に転記する。 4. **数値しきい値**: 対象コードに対する判定文脈で数値しきい値(V(G), カバレッジ, CBO 等)を本文に書く場合、必ず `measured: <実測値>` または `measured: 未実行(skipped: <理由>)` をペアで併記する。設計時(`quality-architecture`)で文献値を引用するときは `(参考値: ...)` ラベル必須で、対象コードへの判定として書かない。 -5. **副作用付きツールの事前同意**: `swift test`, `trivy fs` などビルド/テスト/ネットワークが走るコマンドは AskUserQuestion で実行可否を確認してから実行する(既に同意済みの場合を除く)。 +5. **副作用付きツールの事前同意**: `swift test`, `trivy fs` などビルド/テスト/ネットワークが走るコマンドはユーザー確認で実行可否を確認してから実行する(既に同意済みの場合を除く)。 上記 1〜5 のいずれかが満たせない場合は、応答冒頭で「どの規律が、どの理由でブロックされているか」を明示し、ユーザの判断を仰ぐ。サイレントに省略してはならない。 diff --git a/plugins/quality-architect/references/static-evaluation.md b/plugins/quality-architect/references/static-evaluation.md index 8880aa6..6c81ad7 100644 --- a/plugins/quality-architect/references/static-evaluation.md +++ b/plugins/quality-architect/references/static-evaluation.md @@ -1,7 +1,7 @@ # 静的評価レイヤー — AI の揺らぎを抑える方法論 > ISO/IEC 25010 のレビューを、できる範囲で **決定論的(再現可能)** にするための仕組み。 -> 設定は `${CLAUDE_PLUGIN_ROOT}/quality-gates.yml`、適用は `quality-review` スキルが行う。 +> 設定は `$PLUGIN_ROOT/quality-gates.yml`、適用は `quality-review` スキルが行う。 --- @@ -41,7 +41,7 @@ LLM によるレビューは同じ入力でも出力が揺らぐ。揺らぎが LLM が `run` コマンドを組み立て、出力をパースする工程にはまだ揺らぎが残る (対象ファイルの選び方・JSON の読み方など)。これを排除するには: -- **ラッパースクリプト**: `${CLAUDE_PLUGIN_ROOT}/scripts/quality-gate-swift.sh` が +- **ラッパースクリプト**: `$PLUGIN_ROOT/scripts/quality-gate-swift.sh` が ツール実行 → パース → しきい値判定 → `quality-gate-result.json` 出力までを担う。 スキルはこの JSON を読むだけなので、解釈の揺れが入らない。未導入ツールは `skipped`、 全件 skipped なら `inconclusive`(pass と誤認しない)。 diff --git a/plugins/quality-architect/skills/quality-architecture/SKILL.md b/plugins/quality-architect/skills/quality-architecture/SKILL.md index e2e5d2a..5752f53 100644 --- a/plugins/quality-architect/skills/quality-architecture/SKILL.md +++ b/plugins/quality-architect/skills/quality-architecture/SKILL.md @@ -9,9 +9,11 @@ description: "Design NEW or PROPOSED architecture using the ISO/IEC 25010:2023 p 要件から品質特性を優先付けし、各特性の設計タクティクスでアーキテクチャを構築・評価する。 **すべての設計判断・推奨には、リファレンス・ライブラリ中の学術論文/公式文書を引用する。** -リファレンス・ライブラリ: `${CLAUDE_PLUGIN_ROOT}/references/` +リファレンス・ライブラリ: プラグインルート相対の `references/` (索引は `00-overview.md`、各特性は `01`〜`09`、静的評価方法論は `static-evaluation.md`) +この文書で `PLUGIN_ROOT` と書く場合は、Claude Code では `${CLAUDE_PLUGIN_ROOT}`、Codex ではこの `SKILL.md` の 2 階層上にある `quality-architect` プラグインルートを指す。 + **スキル選択と決定論ファースト原則は `00-overview.md §5.1(プラグイン共通の絶対規律)` がカノン。本ファイルの §0 と §3.5 はその反映であり、矛盾があれば §5.1 を優先する。** --- @@ -59,9 +61,9 @@ description: "Design NEW or PROPOSED architecture using the ISO/IEC 25010:2023 p - 代表的トレードオフ: セキュリティ⇄使用性、性能効率性⇄保守性、可用性⇄一貫性(CAP)、移植性⇄性能最適化。 3. **特性ごとのタクティクス導出** - - 優先した各特性について、対応する `${CLAUDE_PLUGIN_ROOT}/references/0N-*.md` を**実際に Read し**、「設計タクティクス/パターン」節から候補を選ぶ。 + - 優先した各特性について、対応する `$PLUGIN_ROOT/references/0N-*.md` を**実際に Read し**、「設計タクティクス/パターン」節から候補を選ぶ。 - 副特性レベルまで降りる(例: 信頼性 → 障害許容性なら Circuit Breaker / Bulkhead / リトライ+バックオフ)。 - - **モジュール/サービス境界を新規に定義する設計の場合は、`${CLAUDE_PLUGIN_ROOT}/references/07a-coupling-deep-dive.md` §11(設計時の結合検討)を Read し**、境界をまたぐ依存ごとに結合バランスを **定性的に** 評価する(§11.1 ヒューリスティクス → §11.2 チェックリスト)。設計時なので実測値は書かず、結合 3 次元(Integration Strength × Distance × Volatility)への言及は `(参考値: Khononov 2024, Ch.)` ラベルで扱う(§3.5)。SIGNAL ベースの §6.5 hint table は **レビュー時専用** なので設計時には使わない(07a §11.3)。 + - **モジュール/サービス境界を新規に定義する設計の場合は、`$PLUGIN_ROOT/references/07a-coupling-deep-dive.md` §11(設計時の結合検討)を Read し**、境界をまたぐ依存ごとに結合バランスを **定性的に** 評価する(§11.1 ヒューリスティクス → §11.2 チェックリスト)。設計時なので実測値は書かず、結合 3 次元(Integration Strength × Distance × Volatility)への言及は `(参考値: Khononov 2024, Ch.)` ラベルで扱う(§3.5)。SIGNAL ベースの §6.5 hint table は **レビュー時専用** なので設計時には使わない(07a §11.3)。 4. **トレードオフ分析(ATAM 的に)** - 候補アーキテクチャを 1〜複数案出し、各案を重点特性の軸で評価する。 diff --git a/plugins/quality-architect/skills/quality-review/SKILL.md b/plugins/quality-architect/skills/quality-review/SKILL.md index daf13fc..8badc5d 100644 --- a/plugins/quality-architect/skills/quality-review/SKILL.md +++ b/plugins/quality-architect/skills/quality-review/SKILL.md @@ -1,6 +1,6 @@ --- name: quality-review -description: Review EXISTING code, a diff, a PR, or a repository against the ISO/IEC 25010:2023 product quality model, producing severity-rated findings and a quality scorecard. Always runs deterministic static analysis before any LLM judgement. Reviewing whether the EXISTING design itself is sound (design review / design-validity assessment of existing code) is part of THIS skill — see §1 step 2.5 — not `quality-architecture`. Japanese triggers: 「品質観点でレビューして」「25010 でレビュー」「実装をレビューして」「PR を品質特性で見て」「指摘して」「この設計は妥当か」. For designing a NEW/replacement architecture (not yet existing code), use `quality-architecture` instead. +description: "Review EXISTING code, a diff, a PR, or a repository against the ISO/IEC 25010:2023 product quality model, producing severity-rated findings and a quality scorecard. Always runs deterministic static analysis before any LLM judgement. Reviewing whether the EXISTING design itself is sound (design review / design-validity assessment of existing code) is part of THIS skill — see §1 step 2.5 — not `quality-architecture`. Japanese triggers: 「品質観点でレビューして」「25010 でレビュー」「実装をレビューして」「PR を品質特性で見て」「指摘して」「この設計は妥当か」. For designing a NEW/replacement architecture (not yet existing code), use `quality-architecture` instead." --- # quality-review — ISO/IEC 25010 でコード/差分を網羅レビューする @@ -10,12 +10,14 @@ description: Review EXISTING code, a diff, a PR, or a repository against the ISO AI の揺らぎを抑えるため、**測れる指標は静的解析ツールに委譲し(決定論パート)**、 LLM の判断は数値化できない残余(考察パート)に閉じ込める。詳しくは -`${CLAUDE_PLUGIN_ROOT}/references/static-evaluation.md`、設定は -`${CLAUDE_PLUGIN_ROOT}/quality-gates.yml` を参照する。 +`$PLUGIN_ROOT/references/static-evaluation.md`、設定は +`$PLUGIN_ROOT/quality-gates.yml` を参照する。 -リファレンス・ライブラリ: `${CLAUDE_PLUGIN_ROOT}/references/` +リファレンス・ライブラリ: プラグインルート相対の `references/` (索引は `00-overview.md`、各特性は `01`〜`09`、静的評価方法論は `static-evaluation.md`。各特性ファイルに「コードレビュー チェックリスト」がある) +この文書で `PLUGIN_ROOT` と書く場合は、Claude Code では `${CLAUDE_PLUGIN_ROOT}`、Codex ではこの `SKILL.md` の 2 階層上にある `quality-architect` プラグインルートを指す。 + **スキル選択と決定論ファースト原則は `00-overview.md §5.1(プラグイン共通の絶対規律)` がカノン。本ファイルの §0 と §1 step 3 はその反映であり、矛盾があれば §5.1 を優先する。** --- @@ -65,27 +67,27 @@ LLM の判断は数値化できない残余(考察パート)に閉じ込め - **前方ハンドオフ(review → architecture)**: 設計そのものを作り直す提案(置換アーキの新規設計)が主目的になったら、それは `quality-architecture` の領域。「現状コードの設計レビューはこのまま継続する/置換アーキを“設計”したいなら quality-architecture へ」と 1 行で提示する。これは §0.1 がブロックする後方向(既存コードのレビューを architecture で受ける)とは別物の、正当な前方遷移(00-overview §5.2)。 3. **静的評価レイヤー(決定論パート)を先に実行** - - **【必須チェックポイント】このステップに入る前に、§0.2 のインベントリ結果を踏まえ、AskUserQuestion を 1 回発行する**(**二重質問禁止 — 1 ゲート / 1 セッション**)。文面テンプレ: + - **【必須チェックポイント】このステップに入る前に、§0.2 のインベントリ結果を踏まえ、ユーザー確認を 1 回行う**(Claude Code では AskUserQuestion、Codex では通常の確認応答を使う。**二重質問禁止 — 1 ゲート / 1 セッション**)。文面テンプレ: > 「決定論パートの実行方針を確認します。検出した資産: <0.2 の転記内容>。 > 1. 既存 `quality-gate-result.json` (+ あれば `coupling-gate-result.json`) を採用(再実行なし・最速) - > 2. `${CLAUDE_PLUGIN_ROOT}/scripts/quality-gate-swift.sh` を実行(`swift test --enable-code-coverage`, `trivy fs` 等を走らせる。数分かかる) + > 2. `$PLUGIN_ROOT/scripts/quality-gate-swift.sh` を実行(`swift test --enable-code-coverage`, `trivy fs` 等を走らせる。数分かかる) > 3. 個別 `run` コマンドを実行(部分的に skipped になり得る) > 4. 静的解析をスキップして LLM 考察のみで進める(決定論パートは「未実施」と明記される) > > **追加オプション(保守性 / モジュール性の深掘りが必要な場合のみ)**: 上記に加えて結合の深掘り (07a 補論) シグナルも計測する。 - > - 2a / 3a. 上記 2 / 3 と同時に `${CLAUDE_PLUGIN_ROOT}/scripts/coupling-gate-swift.sh` も実行(`git log --since`, `jscpd`, `semgrep` 等を走らせる)。出力 `coupling-gate-result.json` を考察パートで参照。 + > - 2a / 3a. 上記 2 / 3 と同時に `$PLUGIN_ROOT/scripts/coupling-gate-swift.sh` も実行(`git log --since`, `jscpd`, `semgrep` 等を走らせる)。出力 `coupling-gate-result.json` を考察パートで参照。 > - 既定はオフ。`07-maintainability.md` の検出 finding に対する severity 下方修正候補がある場合のみ提案する」 - **auto-mode(質問を省略してよい唯一の条件)**: 0.2 で `HAS quality-gate-result.json` が出ており、かつそのファイルの mtime が 24 時間以内、かつユーザが事前に「CI 結果でよい/最速で」を明言している場合のみ、選択肢 1 を採用して質問を省く。それ以外は **必ず質問する**。`coupling-gate-result.json` の存在は auto-mode を発火させない(追加判断材料は§3 で考慮)。 - **CI の結果があればそれを最優先**: 選択肢 1 が選ばれたら `quality-gate-result.json` を Read して数値をそのまま採用する(最も再現性が高い)。`HAS coupling-gate-result.json` も検出されていれば、それも Read して merge contract (§2) に従い 07-maintainability 指摘に attach する。 - - **無ければ/選択肢 2 ならラッパースクリプトを実行**: Swift なら `bash ${CLAUDE_PLUGIN_ROOT}/scripts/quality-gate-swift.sh <対象>` を Bash で実行し、出力 JSON を採用する。スクリプトがツール実行・パース・しきい値判定まで行うため、LLM の解釈揺れが入らない。 - - **2a / 3a が選択された場合**: 続けて `bash ${CLAUDE_PLUGIN_ROOT}/scripts/coupling-gate-swift.sh --since=` を実行し、`coupling-gate-result.json` を取得。**シグナル数値は `推測` ラベル付きで採用**(07a §5 / §9 H5)。観測ウィンドウ `--since=` を本文に必ず併記(H5)。 + - **無ければ/選択肢 2 ならラッパースクリプトを実行**: Swift なら `bash "$PLUGIN_ROOT/scripts/quality-gate-swift.sh" <対象>` を Bash で実行し、出力 JSON を採用する。スクリプトがツール実行・パース・しきい値判定まで行うため、LLM の解釈揺れが入らない。 + - **2a / 3a が選択された場合**: 続けて `bash "$PLUGIN_ROOT/scripts/coupling-gate-swift.sh" --since=` を実行し、`coupling-gate-result.json` を取得。**シグナル数値は `推測` ラベル付きで採用**(07a §5 / §9 H5)。観測ウィンドウ `--since=` を本文に必ず併記(H5)。 - 選択肢 3 ならスクリプトを使わず `quality-gates.yml` の `run` コマンドを個別に実行する。 - **ツールが未インストール/実行不可なら、その項目を「未実行(skipped)」と明記する。数値を推測・捏造しない。** 全項目 skipped のとき、または選択肢 4 が選ばれたときは結果を `inconclusive` とし、決定論パートは「未実施」と報告する(**「未実施」を `pass` と誤読させない**)。 - 取得した数値を `threshold` と機械的に突き合わせ、超過を決定論的な指摘とする(同じコードなら毎回同じ結果)。 4. **特性ごとのチェック(9 特性を網羅・考察パート)** - **4-0. 関連度トリアージ(リファレンス Read の前に必ず実行)**: 9 特性それぞれについて、step 2 で把握した差分の内容と `00-overview.md` の特性一覧だけを根拠に、**「精査対象」か「該当薄(低リスク)」かを判定**する。この時点では各特性ファイル(`0N-*.md`)本体を**まだ読まない**。判定結果を 2 群に分けて明示する(例: 精査対象=保守性・セキュリティ / 該当薄=移植性・互換性…)。差分が広範囲・判断に迷う特性は精査対象に寄せる(取りこぼし防止を優先)。 - - **4-1. 精査対象のみ Read**: 「精査対象」と判定した特性に**限って** `${CLAUDE_PLUGIN_ROOT}/references/0N-*.md` を**実際に Read し**、「コードレビュー チェックリスト」を適用する。該当薄の特性のリファレンス本体は読み込まない(コンテキスト節約)。 + - **4-1. 精査対象のみ Read**: 「精査対象」と判定した特性に**限って** `$PLUGIN_ROOT/references/0N-*.md` を**実際に Read し**、「コードレビュー チェックリスト」を適用する。該当薄の特性のリファレンス本体は読み込まない(コンテキスト節約)。 - **該当薄の特性も省略しない**: スコアカードには 9 特性すべてを載せ、該当薄は「該当なし/低リスク(1 行で根拠)」と明記して網羅を示す。リファレンスを読んでいないこと自体は問題ない(差分に当該観点の表面が無いという判定の表明)。 - **決定論パートで既に確定した項目は再判断しない**(数値をそのまま採用)。ここでは静的化できない観点のみを評価し、**「推測」であることを明示**する(profile の `judgment` を参照)。 - 副特性レベルで具体的に見る(例: セキュリティ → 機密性なら機微データの暗号化/ログ出力、真正性なら認証実装)。 @@ -203,7 +205,7 @@ LLM の判断は数値化できない残余(考察パート)に閉じ込め - ❌ **ツールを実行せずに複雑度・カバレッジ・脆弱性件数などの数値を“推測”で書く**。未実行なら「未実行」と明記する。 - ❌ 決定論パートで確定した数値を、考察パートで主観的に上書きする。 - ❌ §0.2 のプロジェクト資産インベントリを実行・転記せずに §1 以降に進む。 -- ❌ §1 step 3 の AskUserQuestion(決定論パート実行方針の確認)を発行せずに静的解析ツールを実行する/LLM 単独レビューを書く。 +- ❌ §1 step 3 のユーザー確認(決定論パート実行方針の確認)を行わずに静的解析ツールを実行する/LLM 単独レビューを書く。 - ❌ 本文や指摘で数値しきい値(V(G) ≤ 10, カバレッジ ≥ 0.70 等)を引用したのに、§2 決定論パート表に対応行(measured 値または skipped)が存在しない。 - ❌ 全行 skipped の決定論パート表を出しながら、サマリで `inconclusive` を宣言せずに重大度付き指摘を断定的に書く。 - ⚠️ **Khononov の `Pain = Strength × Distance × Volatility` を「精密メトリクス」として本文に書く**。同式は書籍本文 verbatim(Ch.10 §10.2.1, 邦訳 p.182「メンテナンスの労力 = 強度 * 距離 * 変動性」)だが、書籍自身が 2 値スケール前提(高=1/低=0)+「正確な科学ではない」警告(§10.3, p.184)を付している。引用時はこの 2 留保を必ず併記し、連続値の精密指標として提示しない。canonical 第一表現は `references/07a-coupling-deep-dive.md` §6.1 の `BALANCE = (STRENGTH XOR DISTANCE) OR NOT VOLATILITY`(こちらも書籍 verbatim)(07a §9 H2 規律)。 diff --git a/plugins/tech-docs/.codex-plugin/plugin.json b/plugins/tech-docs/.codex-plugin/plugin.json new file mode 100644 index 0000000..8c81026 --- /dev/null +++ b/plugins/tech-docs/.codex-plugin/plugin.json @@ -0,0 +1,38 @@ +{ + "name": "tech-docs", + "version": "0.1.1", + "description": "Generate ADRs, technical specifications, and general engineering documents as single-file HTML pages using a consistent design system.", + "author": { + "name": "9uiLe", + "url": "https://github.com/9uiLe" + }, + "homepage": "https://github.com/9uiLe/plugins/tree/master/plugins/tech-docs", + "repository": "https://github.com/9uiLe/plugins", + "license": "MIT", + "keywords": [ + "documentation", + "adr", + "spec", + "design-system", + "html" + ], + "skills": "./skills/", + "interface": { + "displayName": "Tech Docs", + "shortDescription": "Generate ADRs, specs, and technical docs", + "longDescription": "Create ADRs, technical specifications, and general engineering documentation as single-file HTML pages using the bundled design system.", + "developerName": "9uiLe", + "category": "Developer Tools", + "capabilities": [ + "Read", + "Write" + ], + "websiteURL": "https://github.com/9uiLe/plugins/tree/master/plugins/tech-docs", + "defaultPrompt": [ + "Create an ADR for this architectural decision", + "Draft a technical specification for this feature", + "Write a polished HTML runbook" + ], + "brandColor": "#2563EB" + } +} diff --git a/plugins/tech-docs/README.md b/plugins/tech-docs/README.md index a2f8257..713c5fd 100644 --- a/plugins/tech-docs/README.md +++ b/plugins/tech-docs/README.md @@ -1,10 +1,10 @@ # tech-docs -Claude Code 用プラグイン。ADR / 技術仕様書 / 汎用ドキュメントを、共通デザインシステム付きの **1 枚 HTML** として生成する 3 つの Skill を提供します。 +Claude Code / Codex 用プラグイン。ADR / 技術仕様書 / 汎用ドキュメントを、共通デザインシステム付きの **1 枚 HTML** として生成する 3 つの Skill を提供します。 ## 何ができるか -このプラグインを有効にすると、Claude Code 上で次の作業が自然言語で依頼できるようになります: +このプラグインを有効にすると、Claude Code / Codex 上で次の作業が自然言語で依頼できるようになります: | Skill | いつ呼ばれるか | 章立て | | --- | --- | --- | @@ -17,16 +17,20 @@ Claude Code 用プラグイン。ADR / 技術仕様書 / 汎用ドキュメン ## インストール ```bash -# Marketplace 経由 (推奨) +# Claude Code /plugin marketplace add 9uiLe/plugins /plugin install tech-docs@9uile-plugins + +# Codex +codex plugin marketplace add 9uiLe/plugins +codex plugin add tech-docs@9uile-plugins ``` ローカル開発時はリポジトリを clone してから `~/.claude/settings.json` の `plugins.installed` に直接パスを指定する方法もあります。詳しくは Claude Code の plugin ドキュメントを参照してください。 ## 使い方 -Claude Code 上で次のように依頼します: +Claude Code / Codex 上で次のように依頼します: ``` /create-adr で「event-driven vs request-driven の選択」をまとめて diff --git a/scripts/lib/version.sh b/scripts/lib/version.sh index 92ba80a..0bd1c4f 100644 --- a/scripts/lib/version.sh +++ b/scripts/lib/version.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# version.sh — read/write version fields in plugin.json and marketplace.json +# version.sh — read/write version fields in Claude/Codex plugin manifests and marketplace.json # shellcheck source=common.sh . "$(dirname "${BASH_SOURCE[0]}")/common.sh" @@ -19,18 +19,30 @@ plugin_path() { printf '%s/%s' "$REPO_ROOT" "${rel#./}" } -# plugin_json — print absolute path to plugin.json +# plugin_json — print absolute path to the Claude plugin.json plugin_json() { local name="$1" printf '%s/.claude-plugin/plugin.json' "$(plugin_path "$name")" } +# codex_plugin_json — print absolute path to the Codex plugin.json +codex_plugin_json() { + local name="$1" + printf '%s/.codex-plugin/plugin.json' "$(plugin_path "$name")" +} + # read_plugin_version read_plugin_version() { local name="$1" jq -r '.version' "$(plugin_json "$name")" } +# read_codex_plugin_version +read_codex_plugin_version() { + local name="$1" + jq -r '.version' "$(codex_plugin_json "$name")" +} + # read_marketplace_plugin_version read_marketplace_plugin_version() { local name="$1" @@ -42,25 +54,29 @@ read_marketplace_metadata_version() { jq -r '.metadata.version' "$MARKETPLACE_JSON" } -# write_plugin_version -write_plugin_version() { - local name="$1" new="$2" - is_semver "$new" || die "invalid semver: $new" - local file - file="$(plugin_json "$name")" +write_json_version() { + local file="$1" new="$2" label="$3" local tmp tmp="$(mktemp)" jq --arg v "$new" '.version = $v' "$file" >"$tmp" if [[ "$DRY_RUN" == "1" ]]; then - log info "[dry-run] would update $file:" + log info "[dry-run] would update $label:" diff -u "$file" "$tmp" || true rm -f "$tmp" else mv "$tmp" "$file" - log ok "updated $file -> $new" + log ok "updated $label -> $new" fi } +# write_plugin_version +write_plugin_version() { + local name="$1" new="$2" + is_semver "$new" || die "invalid semver: $new" + write_json_version "$(plugin_json "$name")" "$new" "$(plugin_json "$name")" + write_json_version "$(codex_plugin_json "$name")" "$new" "$(codex_plugin_json "$name")" +} + # write_marketplace_plugin_version write_marketplace_plugin_version() { local name="$1" new="$2" diff --git a/scripts/release-prepare.sh b/scripts/release-prepare.sh index 2245586..5327e54 100755 --- a/scripts/release-prepare.sh +++ b/scripts/release-prepare.sh @@ -7,7 +7,7 @@ # [--dry-run] [--yes] [--no-pr] # # Two version axes: -# - plugin version (plugin.json, marketplace.json plugins[].version) +# - plugin version (Claude/Codex plugin.json, marketplace.json plugins[].version) # - release version (marketplace metadata.version, branch, CHANGELOG, tag) # --release-bump defaults to patch. CHANGELOG/branch/tag use the release version. # @@ -147,6 +147,7 @@ confirm_typed "v${RELEASE_VERSION}" "About to commit & push branch ${BRANCH}." git add \ ".claude-plugin/marketplace.json" \ "$(plugin_json "$PLUGIN")" \ + "$(codex_plugin_json "$PLUGIN")" \ "CHANGELOG.md" \ "releases/v${RELEASE_VERSION}.md" diff --git a/scripts/verify-versions.sh b/scripts/verify-versions.sh index e4f06a0..b29a2ad 100755 --- a/scripts/verify-versions.sh +++ b/scripts/verify-versions.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# verify-versions.sh — assert plugin.json and marketplace.json versions agree +# verify-versions.sh — assert Claude/Codex plugin.json and marketplace.json versions agree # Used both as a release post-condition and as a CI gate on every PR. # shellcheck shell=bash source=./lib/version.sh @@ -17,10 +17,16 @@ while IFS= read -r name; do [[ -n "$name" ]] || continue checked=$((checked + 1)) plugin_ver="$(read_plugin_version "$name")" + codex_plugin_ver="$(read_codex_plugin_version "$name")" marketplace_ver="$(read_marketplace_plugin_version "$name")" if ! is_semver "$plugin_ver"; then - log error "$name: plugin.json version is not valid semver: '$plugin_ver'" + log error "$name: .claude-plugin/plugin.json version is not valid semver: '$plugin_ver'" + fail=1 + continue + fi + if ! is_semver "$codex_plugin_ver"; then + log error "$name: .codex-plugin/plugin.json version is not valid semver: '$codex_plugin_ver'" fail=1 continue fi @@ -30,7 +36,10 @@ while IFS= read -r name; do continue fi if [[ "$plugin_ver" != "$marketplace_ver" ]]; then - log error "$name: version mismatch (plugin.json=$plugin_ver, marketplace.json=$marketplace_ver)" + log error "$name: version mismatch (.claude-plugin/plugin.json=$plugin_ver, marketplace.json=$marketplace_ver)" + fail=1 + elif [[ "$codex_plugin_ver" != "$plugin_ver" ]]; then + log error "$name: version mismatch (.codex-plugin/plugin.json=$codex_plugin_ver, .claude-plugin/plugin.json=$plugin_ver)" fail=1 else log ok "$name: $plugin_ver"