Skip to content

refactor: レビューと PR コメント対応の Skill を統合 (0-2) - #68

Merged
takemi-ohama merged 6 commits into
release/skill-inventoryfrom
feature/inventory-merge-review
Aug 8, 2026
Merged

refactor: レビューと PR コメント対応の Skill を統合 (0-2)#68
takemi-ohama merged 6 commits into
release/skill-inventoryfrom
feature/inventory-merge-review

Conversation

@takemi-ohama

@takemi-ohamatakemi-ohama commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

対象が違うだけでレビュー観点が同一だった 2 個と、分類・修正・返信で 3 分割されていた PR コメント対応を、それぞれ 1 個へ統合する。

reviewreview-branch

--branch を付けるとローカルブランチの差分をレビューする 2 モード構成にした。

観点PR モード(既定)--branch モード
対象GitHub 上の PR 差分git diff <既定ブランチ> の差分
出力先PR 上にインラインコメント + 総評を投稿セッション上の報告のみ
判定APPROVE / REQUEST_CHANGES判定を出さず改善提案を返す

統合にあたり、review-branch 側にしかなかったセキュリティ(SQL インジェクション / XSS / CSRF / 認証認可 / 機密情報)とエラーハンドリングの観点を共通の「観点」へ取り込み、両者に重複していた品質観点(重複排除、関数長、N+1)を 1 本化した。--focusreview-branch の第一引数を PR モードでも使えるようにしたもの。

fixreview-pr-comments + resolve-pr-comments

分類 → 修正 → 返信 → Resolve を 1 本の流れにし、--classify-only で分類のみの読み取り専用モードを提供する。

  • review-pr-comments の 5 分類テーブル(🔴 重大 / 🟡 改善推奨 / 🟢 軽微 / ⚪ 参考 / 🔵 別 PR 対応)と出力形式を --classify-only の出力として取り込んだ
  • 「PR 本文の『やらないこと』『別 PR 対応』を確認する」ルールを維持した
  • resolve-pr-comments の返信テンプレートを「返信の書き分け」表に統合し、コメント ID から thread node_id を引く手順(gh api "repos/.../pulls/comments/<id>" --jq '.node_id')を残した
  • 3 Skill に分散していたコメント取得(3 ソース)・重要度の独自再判定・Resolve 手順の重複記述を削除した

cross-review がループ内で fix を呼ぶ規約(--defer-nit、戻り値 fix-pr<PR>-result.json のスキーマ)は変更していない。

統合前後の行数

統合後統合前の合計統合後増減
review337 + 129 = 466329-137
fix303 + 110 + 146 = 559324-235
合計1,025653-372

いずれも 500 行上限内。

併せて更新した箇所

  • plugins/ndf-shared/manifests/{claude,codex,kiro}-skills.txt — 統合元 3 個を削除(29→26 / 30→27 / 28→25)
  • plugins/ndf-claude/.claude-plugin/plugin.jsonskills 配列 — 存在しないパスを指さないよう 29→26 件へ
  • scripts/build-runtime-plugins.shrewrite_codex_skill_paths / rewrite_kiro_skill_paths のパス書き換え対象から review-pr-comments/SKILL.md を除去
  • issue-plan-strategy / browser-test / cross-review / README.md / docs/ndf-plugin-reference.md の参照を新コマンド名へ

既知の残課題(Task 0-7 の担当範囲)

reviewdisable-model-invocation: true を持つため、統合で引き継いだ when_to_use のトリガ(セルフレビュー 等)は現時点では発動しない。review から disable-model-invocation を外すのは Task 0-7 の担当範囲のため、この PR ではトリガ語を frontmatter に残すにとどめている。0-7 で外した時点で review-branch 相当の自動発動が復活する。

Test plan

  • 統合元の手順が統合先に残っている(機能が減っていない)
  • 統合前後の行数が減っている(1,025 → 653)
  • SKILL.md が 500 行を超えていない
  • cross-review から fix を呼ぶ規約(引数・戻り値スキーマ)が変わっていない
  • grep -rn で旧 Skill 名の参照が issues/ の履歴を除いて残っていない
  • manifest 3 種と plugin.json に反映されている
  • bash scripts/build-runtime-plugins.sh --check が差異を検出しない
  • python3 scripts/check-markdown-links.py --root . が成功する
  • bash scripts/validate-runtime-plugins.sh が成功する

release PR: #66
plan: issues/ndf-development-skills/07-tasks.md

@takemi-ohamatakemi-ohama mentioned this pull request Aug 8, 2026
21 tasks
review + review-branch → review (466 → 329 行)
- --branch でローカル差分のセルフレビューへ切り替える 2 モード構成にする
- review-branch 側にしかなかったセキュリティ・エラーハンドリングの観点を
共通の「観点」へ取り込み、review 側と重複していた品質観点を 1 本化する
review-pr-comments + fix + resolve-pr-comments → fix (559 → 324 行)
- --classify-only で分類のみの読み取り専用モードを提供する
- 返信の書き分けと Resolve 手順を fix の手順に統合し、3 Skill に分散していた
コメント取得・重要度判定・Resolve の記述を 1 本化する
- コメント ID から thread node_id を引く手順を残す
あわせて manifest 3 種、plugin.json の skills 配列、build-runtime-plugins.sh の
パス書き換え対象、および他 Skill・文書からの参照を更新した。

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 1 | codex | REQUEST_CHANGES

外部 AI 委譲の統合後手順で存在しない Skill を参照しているため、codex / gemini 指定レビューの実行手順が途切れます。あわせて削除後の Skill 数を README の公開値と総数へ反映してください。

Comment threadplugins/ndf-shared/skills/review/SKILL.md Outdated
Comment threadREADME.md Outdated

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 1 | gemini | REQUEST_CHANGES

統合の網羅性と、manifest・関連スクリプト群への波及も漏れなく対応されています。
しかし、review からの外部 AI 呼び出し手順の委譲先として、まだ存在しない /ndf:external-ai が指定されているため、Task 0-3(次 PR)での統合前にエラーとなる問題があります。該当箇所を既存の codex / gemini 参照に戻すよう修正をお願いします。

Comment threadplugins/ndf-shared/skills/review/SKILL.md Outdated
Comment threadplugins/ndf-shared/skills/review/SKILL.md Outdated
- review Skill が参照していた `/ndf:external-ai` は Task 0-3 で統合予定であり
本 PR 時点では存在しないため、`/ndf:codex` / `/ndf:gemini` 参照に戻した
- README の公開 Skill 数(Claude 26 / Kiro 25 / Codex 27)と元 Skill 数(46)を
本 PR 後の実態に合わせて更新した
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGejnYyYFuSkQjBhW2KQNy
@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

🔧 cross-review round 1 — 指摘対応サマリ

修正コミット: fb988cf

分類件数
修正済み4 (major 3 / minor 1)
deferred0
rejected0

修正内容

  1. [major] review Skill が存在しない /ndf:external-ai を参照していた (codex / gemini から重複指摘、plugins/ndf-shared/skills/review/SKILL.md:227)
    external-ai Skill は Task 0-3 で統合予定のため、本 PR 時点では manifest にも配布物にも存在しません。既存の /ndf:codex / /ndf:gemini 参照に戻しました。
  2. [major] 「関連」セクションの /ndf:external-ai リンク (plugins/ndf-shared/skills/review/SKILL.md:328)
    /ndf:codex/ndf:gemini の 2 行に置き換えました。
  3. [minor] README の Skill 数が旧値のまま
    公開 Skills を Claude 26 / Kiro 25 / Codex 27(manifest の実数)、元 Skills を 46 個(plugins/ndf-shared/skills/ の実数)に更新しました。

配布物 3 種は scripts/build-runtime-plugins.sh で再生成済みです。

本 PR で意図的に対応していない事項

  • reviewdisable-model-invocation: true の解除 → Task 0-7 の担当範囲
  • バージョン番号の引き上げ → Task 0-10 の担当範囲

検証結果

  • bash scripts/build-runtime-plugins.sh && bash scripts/build-runtime-plugins.sh --check → up to date
  • python3 scripts/check-markdown-links.py --root . → Markdown local links are valid
  • bash scripts/validate-runtime-plugins.sh → runtime plugin validation passed

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 2 | gemini | APPROVE

Skill の統廃合(review-branch, review-pr-comments, resolve-pr-comments の削除と機能統合)について網羅的に確認しました。
各ランタイム(Claude Code / Codex / Kiro)の manifest や設定ファイル、および build-runtime-plugins.sh による生成プロセスへの反映に漏れがないことを確認しています。
コードの複雑性も適切に削減されており、既存の参照も正しく更新されています。対応に問題ありません。

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 2 | codex | REQUEST_CHANGES

Codex/Kiro 配布物の review が、そのランタイムに同梱されていない外部 AI Skill を参照しているため、配布物ごとの手順か manifest を揃える修正が必要です。

Comment threadplugins/ndf-codex/skills/review/SKILL.md Outdated
codex / kiro runtime の manifest には `codex` / `gemini` Skill が含まれない
ため、`/ndf:codex` / `/ndf:gemini` への無条件参照ではインストール後に
呼び出し手順を解決できなかった。ベースブランチと同じく「同梱されている
場合はその skill に従う」条件付き記述に戻し、非同梱 runtime 向けの要点
(起動コマンド・完了検知・成果物回収・サンドボックスに関する警告)を
インラインで復元した。「関連」節のリンクにも同梱 runtime 限定である旨を
注記した。
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGejnYyYFuSkQjBhW2KQNy
@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

🔧 cross-review round 2 — 指摘対応サマリ

修正コミット: 160b5f9

分類件数
修正済み1 (major 1)
deferred0
rejected0

gemini (round 2) は APPROVE・指摘なしでした。codex (round 2) の major 1 件に対応しています。

修正内容

[major / 整合性] Codex / Kiro 配布物の review が同梱されていない外部 AI Skill を参照していた (plugins/ndf-codex/skills/review/SKILL.md:227)

manifest の実態を確認したところ、codex runtime には codex / gemini Skill がいずれも無く、kiro runtime には gemini Skill がありません。ベースブランチの review Skill は「同梱されている場合はその skill に従う」という条件付き記述+インラインの要点を持ち非同梱 runtime でも自己完結していましたが、本 PR の統合でこれを無条件参照に縮約してしまっていました(self-containment の退行)。

plugins/ndf-shared/skills/review/SKILL.md の「外部 AI への委譲」節を以下のとおり修正しました。

  • 条件付き記述に復帰し、「同梱されていない runtime では以下の要点に従う」を追加
  • codex / gemini 各指定時の要点をインライン復元(プロンプト書き出し先、起動コマンド、完了検知、成果物の三段フォールバック回収)
  • --dangerously-bypass-approvals-and-sandbox / --yolo のサンドボックス警告も併せて復元
  • 「関連」節の 2 リンクに「(同梱 runtime のみ)」を注記

配布物 3 種は scripts/build-runtime-plugins.sh で再生成済みです。統合による review の削減幅は 466 → 329 行から 466 → 356 行 に縮みますが、非同梱 runtime での実行可能性を優先しました。

本 PR で意図的に対応していない事項

  • reviewdisable-model-invocation: true の解除 → Task 0-7 の担当範囲
  • バージョン番号の引き上げ → Task 0-10 の担当範囲
  • review/ndf:external-ai ではなく /ndf:codex / /ndf:gemini を参照している点 → external-ai への統合は並行 PR refactor: 外部 AI 委譲の Skill を external-ai へ統合 (0-3) #69 の担当。両者を release ブランチへ merge した時点で /ndf:external-ai へ切り替える(結合時に解消する既知事項)

検証結果

  • bash scripts/build-runtime-plugins.sh && bash scripts/build-runtime-plugins.sh --check → up to date
  • python3 scripts/check-markdown-links.py --root . → Markdown local links are valid
  • bash scripts/validate-runtime-plugins.sh → runtime plugin validation passed
  • gh pr checks 68 (push 前スナップショット) → 全 6 チェック SUCCESS

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 3 | codex | REQUEST_CHANGES

fix Skill の統合後手順に、フラグ付き実行時の PR 番号解釈と Resolve Conversation の ID 取得方法で修正が必要な箇所があります。

Comment threadplugins/ndf-shared/skills/fix/SKILL.md Outdated
Comment threadplugins/ndf-shared/skills/fix/SKILL.md Outdated

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 3 | gemini | APPROVE

統合された reviewfix の内容、削除された Skill の網羅的な削除状況(各マニフェスト、plugin.jsonbuild-runtime-plugins.sh の変更)、および 3 ランタイムへの影響を確認しました。

既存の責務(分類・返信・Resolve 等)が欠落なく統合先に吸収されており、孤立した参照も残っていません。また、外部 AI 委譲の自己完結手順が意図通り復元されていることも確認しました。設計と正確性に問題ないため Approve とします。

- PR 番号とオプションを分離して解釈する手順に修正(`--classify-only` /
`--defer-nit` / `--severity-min` 付き実行で PR 番号が壊れていた)
- Resolve Conversation で使う ID を review thread ID (PRRT_) と明記し、
レビューコメントの node_id (PRRC_) を引くショートカットを削除
- reviewThreads query に databaseId を追加し、コメント ID と thread の
対応付けができるようにした
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGejnYyYFuSkQjBhW2KQNy
@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

🔧 cross-review round 3 — 指摘対応サマリ

修正コミット: bda7dea

分類件数
修正済み2 (major 2)
deferred0
rejected0

gemini (round 3) は APPROVE・指摘なし でした。codex (round 3) の major 2 件に対応しています。いずれも統合元 Skill (review-pr-comments / resolve-pr-comments) から fix へ持ち込まれた記述の誤りで、独自に再判定した結果も major 相当(手順どおり実行すると失敗する)と判断しました。

修正内容

1. [major / 正確性] $ARGUMENTS 全体を PR 番号として扱っていた (plugins/ndf-shared/skills/fix/SKILL.md:70)

統合元は引数が PR 番号のみだったため成立していましたが、統合後の fix--classify-only / --defer-nit / --severity-min を受け取るため、/ndf:fix 9352 --classify-only9352 --classify-only が PR 番号として渡っていました。PR 番号(最初の数値トークン)とオプションを分離して解釈する手順に修正し、--severity-min major / --severity-min=critical の両表記に対応させました。5 パターンで期待どおり分解されることを確認済みです。

2. [major / 正確性] Resolve 用の ID 取得にコメントの node_id を使っていた (plugins/ndf-shared/skills/fix/SKILL.md:239)

pulls/comments/<comment_id> が返す node_idPullRequestReviewCommentPRRC_...)で、resolveReviewThread が要求する PullRequestReviewThreadPRRT_...)ではありません。このショートカットを削除し、reviewThreads query の commentsdatabaseId を追加して、コメント ID / 本文と突き合わせて nodes[].id を特定する手順へ変更しました。query に --jq を付け、未 Resolve スレッドから {thread_id, path, line, comment_id} を直接取り出せる形にしています。

配布物 3 種 (plugins/ndf-claude / ndf-codex / ndf-kiro) は scripts/build-runtime-plugins.sh で再生成済みです。

本 PR で意図的に対応していない事項

  • reviewdisable-model-invocation: true の解除 → Task 0-7 の担当範囲
  • バージョン番号と旧名→新名の移行案内 → Task 0-10 の担当範囲
  • review/ndf:external-ai ではなく /ndf:codex / /ndf:gemini を参照している点 → external-ai への統合は並行 PR refactor: 外部 AI 委譲の Skill を external-ai へ統合 (0-3) #69 の担当。両者を release ブランチへ merge した時点で切り替える(結合時に解消する既知事項)
  • README / docs/ndf-plugin-reference.md の Skill 数 → release ブランチ側で他 PR のマージにより変動するため、最終値は Task 0-10 で揃える

検証結果

  • bash scripts/build-runtime-plugins.sh && bash scripts/build-runtime-plugins.sh --check → up to date
  • python3 scripts/check-markdown-links.py --root . → Markdown local links are valid
  • bash scripts/validate-runtime-plugins.sh → runtime plugin validation passed
  • gh pr checks 68 (push 前スナップショット) → no checks reported(この時点で登録済みチェックなし)

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 4 | gemini | APPROVE

Skill の統廃合と各ランタイムの manifest や設定ファイル等への反映状況について網羅的に確認し、参照漏れ等修正が必要な箇所がないことを確認しました。

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 4 | codex | APPROVE

指摘事項はありません。

@takemi-ohama
takemi-ohama marked this pull request as ready for review August 8, 2026 03:58
release ブランチ側の削除 (PR #71 ブラウザ自動テスト集約 / PR #72 Skill 削除) と
本ブランチ側の統合 (review / fix) の双方を反映した。
- manifest 3 種と plugin.json は両者の削除を反映した積集合にした
(claude 24 / codex 24 / kiro 23、shared 33)
- browser-test は playwright-authoring へ統合済みのため削除し、
同 Skill に残っていた /ndf:review-branch 参照を /ndf:review --branch へ更新
- README の Skill 一覧と個数を実体に一致させた

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 5 | gemini | APPROVE

Skill の統廃合および各ランタイムのマニフェスト・ビルドスクリプトへの反映が網羅的に行われていることを確認しました。追加の修正提案はありません。

@takemi-ohamatakemi-ohama left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 5 | codex | APPROVE

修正が必要な新規指摘はありません。

@takemi-ohama
takemi-ohama merged commit 2f4c449 into release/skill-inventoryAug 8, 2026
6 checks passed
@takemi-ohama
takemi-ohama deleted the feature/inventory-merge-review branch August 8, 2026 04:02
takemi-ohama added a commit that referenced this pull request Aug 8, 2026
release ブランチ側の統合・削除 (PR #68 review/fix 系、#71 ブラウザ自動テスト、
#72 Skill 削除) と本ブランチ側の git 系統合の双方を反映した。
- manifest 3 種と plugin.json は両者の削除を反映した積集合にした
(claude 21 / codex 21 / kiro 20、shared 30)
- README と docs/ndf-plugin-reference.md の Skill 一覧を実体に一致させた
- issue-plan-strategy の関連 Skill を、両ブランチの更新をあわせた形にした
takemi-ohama added a commit that referenced this pull request Aug 8, 2026
並行 PR (#68 review/fix 系統合、#71 ブラウザ自動テスト集約、#72 Skill 削除) が
先に release へ入ったため、本ブランチの external-ai 統合と競合していた。
競合解消方針:
- manifest / plugin.json の skills は両ブランチの削除を両方反映 (積集合)。
release が消した review-branch / review-pr-comments / resolve-pr-comments /
browser-test と、本ブランチが消した codex / gemini をいずれも除去し、
release が追加した playwright-authoring と本ブランチの external-ai を残した。
- review / cross-review SKILL.md は release 側の再構成をベースに採用し、
本ブランチの /ndf:codex /ndf:gemini → /ndf:external-ai 参照差し替えを再適用。
- README.md の Skill 一覧と個数は plugins/ndf-shared/skills/ と manifest の
実数から数え直した (元Skills 32個 / Claude 23・Kiro 23・Codex 25)。
- plugins/ndf-{claude,codex,kiro}/skills/ は共有側を直したうえで
scripts/build-runtime-plugins.sh で再生成。
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@takemi-ohama