Skip to content

refactor: 外部 AI 委譲の Skill を external-ai へ統合 (0-3) - #69

Merged
takemi-ohama merged 9 commits into
release/skill-inventoryfrom
feature/inventory-merge-external-ai
Aug 8, 2026
Merged

refactor: 外部 AI 委譲の Skill を external-ai へ統合 (0-3)#69
takemi-ohama merged 9 commits into
release/skill-inventoryfrom
feature/inventory-merge-external-ai

Conversation

@takemi-ohama

@takemi-ohamatakemi-ohama commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

概要

Task 0-3。codexgemini の 2 Skill を external-ai 1 個へ統合した。

外部 AI へ委譲する判断基準・プロンプト設計・バックグラウンド実行・成果物回収といった両者に共通する手順SKILL.md に集約し、起動フラグ・完了検知・既知の落とし穴などツール固有の差分references/ へ分離した。

  • plugins/ndf-shared/skills/external-ai/SKILL.md
  • plugins/ndf-shared/skills/external-ai/references/cli-codex.md
  • plugins/ndf-shared/skills/external-ai/references/cli-gemini.md

統合前後の行数

単純連結ではなく、重複記述(プロンプト設計、待機間隔のチューニング、レビュー/コード生成テンプレート、共通のトラブルシューティング、機密情報とコストの注意)を落として再構成した。

ファイル行数
統合前skills/codex/SKILL.md473
統合前skills/gemini/SKILL.md444
合計917
統合後skills/external-ai/SKILL.md285
統合後references/cli-codex.md210
統合後references/cli-gemini.md201
合計696

-221 行(-24%)SKILL.md 単体は 285 行で 500 行上限に収まる。

manifest への追加理由

統合前の配布状況は codex が claude / kiro、gemini が claude のみだった。統合後の external-ai は claude / codex / kiro の 3 つすべてに載せている。

  • 1 Skill に統合したため、codex だけを配って gemini を落とすといった分割ができない
  • 本文はどちらの CLI も導入されていない環境で読んでも害がなく、CLI 未インストール時の判定手順(which codex / which gemini)を含む
  • Codex ランタイム自身も /ndf:cross-review から gemini を起動するため、Codex 向け配布にも外部 AI 委譲手順が要る

結果として公開 Skill 数は Claude 29 → 28、Kiro 28 → 28、Codex 30 → 31 となる。

並び順は各 manifest の規則に従った(claude / kiro は用途順で旧 codex の位置、codex はアルファベット順で docker-container-accessfix の間)。

更新した参照箇所

grep -rn 'ndf:codex\|ndf:gemini\|skills/codex\|skills/gemini' で洗い出し、次を更新した。

ファイル内容
plugins/ndf-shared/skills/cross-review/SKILL.md関連 Skill 2 行を /ndf:external-ai 1 行へ集約し、CLI 別 reference を併記
plugins/ndf-shared/skills/review/SKILL.mdcodex / gemini 指定時の委譲先を references/cli-codex.md / references/cli-gemini.md へ変更(4 箇所)
plugins/ndf-shared/skills/qa-security-scan/03-report-template.mdCodex CLI 連携節の参照先を変更(2 箇所)
plugins/ndf-shared/manifests/{claude,codex,kiro}-skills.txtcodex / gemini を削除し external-ai を追加
plugins/ndf-claude/.claude-plugin/plugin.jsonskills 配列を ./skills/external-ai へ差し替え
plugins/ndf-claude/agents/{corder,director,qa,debugger,devops-engineer,researcher}.md委譲先 Skill 名を変更(計 11 箇所)
AGENTS.md / KIRO.md / README.md外部 AI 委譲の説明と公開 Skill 数を更新
docs/ndf-plugin-reference.md / docs/specifications/ndf-knowledge-and-kiro.md外部 AI 委譲の標準方式の記述を更新
plugins/ndf-claude/README.md前提条件節の Skill 名を更新

plugins/ndf-{claude,codex,kiro}/skills/ 配下は scripts/build-runtime-plugins.sh の生成物のため直接編集せず、ビルドで同期した。一方 agents/README.md.claude-plugin/plugin.json はビルド対象外の編集元のため直接更新している。

issues/ 配下と docs/superpowers/plans/ の過去プラン文書は履歴のため書き換えていない。

Test plan

  • bash scripts/build-runtime-plugins.sh — 生成物を同期
  • bash scripts/build-runtime-plugins.sh --checkruntime plugin generated files are up to date
  • python3 scripts/check-markdown-links.py --root .Markdown local links are valid
  • bash scripts/validate-runtime-plugins.shruntime plugin validation passedclaude plugin validate 2 件も Validation passed)
  • grep -rn 'ndf:codex\|ndf:gemini\|skills/codex\|skills/gemini' の残存が履歴文書(issues/docs/superpowers/plans/)のみであること
  • SKILL.md が 500 行以内(285 行)
  • 統合後合計行数が統合前合計 917 行を下回ること(696 行)

release PR: #66

@takemi-ohamatakemi-ohama mentioned this pull request Aug 8, 2026
21 tasks
- `plugins/ndf-shared/skills/external-ai/` を新設し、外部 AI 委譲の共通手順を集約
- CLI 固有の差分を `references/cli-codex.md` / `references/cli-gemini.md` へ分離
- `plugins/ndf-shared/skills/codex/` と `plugins/ndf-shared/skills/gemini/` を削除
- manifest 3 種から codex / gemini を除き external-ai を追加(claude / codex / kiro すべて)
- cross-review / review / qa-security-scan / 各エージェント定義 / 文書の参照を更新
- 生成物を build-runtime-plugins.sh で同期
統合前 917 行(codex 473 + gemini 444)→ 統合後 696 行(SKILL 285 + references 411)で -221 行。
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGejnYyYFuSkQjBhW2KQNy

@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

Kiro の --with-codex 導線に削除済み Skill 名への参照が残っているため、移行漏れとして修正が必要です。

Comment threadKIRO.md

@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 | COMMENT

Skill 統合と各ランタイム (Claude / Codex / Kiro) 向け manifest への反映、既存手順の references/ への整理が適切に行われていることを確認しました。

1 点、既存の直接呼び出しに対する後方互換性の課題についてインラインコメントで修正を提案します。

Comment threadREADME.md Outdated
plugins/ndf-kiro/skills/codex/ 削除に伴い、--with-codex で配置される
prompts/codex.md が存在しない Skill 名を案内していた問題を修正。
external-ai スキルと references/cli-codex.md を参照するよう変更。
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

🔧 /ndf:fix round 1 対応サマリ

修正コミット: e1376a0

区分件数
修正済み1 (major 1)
rejected1
deferred (nit)0

修正済み

  • [major / 互換性] plugins/ndf-kiro/prompts/codex.md の Skill 参照切れ (codex 指摘) — plugins/ndf-kiro/skills/codex/ 削除に伴い、--with-codex で配置されるプロンプトが存在しない Skill 名を案内していました。external-ai スキルと references/cli-codex.md を参照する内容へ更新。他の prompts/*.md 6 件も同種の漏れがないことを確認済みです。

rejected

  • [major / 後方互換性] README への Breaking Changes 記載 / deprecation stub (gemini 指摘) — 旧 Skill 名 → 新 Skill 名の対応表は issues/ndf-development-skills/07-tasks.mdTask 0-10「棚卸の仕上げ」 に割り当て済みです(ndf-policies への対応表記載 + v5.0.0 へのメジャーバージョン更新)。0-4〜0-6 でさらに Skill 名が変わるため、本 PR で先行記載すると後続 PR ごとに書き換えが発生し Task 0-10 と競合します。deprecation stub は Skill 数削減と重複排除という棚卸の意図に反するため不採用です。

検証結果

チェック結果
bash scripts/build-runtime-plugins.sh --check✅ up to date
python3 scripts/check-markdown-links.py --root .✅ all links valid
bash scripts/validate-runtime-plugins.sh✅ passed
CI (6 checks)✅ 全て SUCCESS(push 前時点)

再レビューをお願いします。

@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 | APPROVE

修正必須の新規指摘はありません。

@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 | REQUEST_CHANGES

統合自体は丁寧に行われており、各種ドキュメントやスクリプト内の参照も漏れなく更新されています。
ただし前回ラウンドで指摘した利用者向けの後方互換性(移行アナウンスまたは stub 追加)のみが未対応です。修正をお願いします。

Comment threadREADME.md Outdated
@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

🔧 /ndf:fix round 2 対応サマリ

修正コミット: なし(コード変更を要する指摘がなかったため。HEAD は round 1 と同じ e1376a0

区分件数
修正済み0
rejected1(round 1 の再指摘。今回 Resolve)
deferred (nit)0

レビュー結果

  • codex (round 2): APPROVE — 修正必須の新規指摘なし
  • gemini (round 2): REQUEST_CHANGES — 指摘は 1 件で、round 1 の指摘(README への Breaking Changes 記載、または旧ディレクトリへの deprecation stub 追加)の再提出

rejected

[major / 後方互換性] README への Breaking Changes 記載 / deprecation stub(gemini 指摘、round 1 から継続)

旧 Skill 名から新 Skill 名への移行案内は issues/ndf-development-skills/07-tasks.mdTask 0-10「棚卸の仕上げ」 に割り当て済みです。同タスクは対象ファイルに README.md(冒頭、プラグイン一覧表、変更点の見出し)を含み、変更内容として旧名と新名の対応表の記載と v5.0.0 へのメジャーバージョン更新を定めています。

Task 0-4 から 0-6 でさらに Skill 名が変わるため、本 PR で先行記載すると後続 PR ごとに書き換えが発生し Task 0-10 と競合します。deprecation stub は Skill 数削減と重複排除という棚卸の意図に反するため不採用です。

round 1 と同一の判断であり、同じ指摘の反復となったため、理由を reply したうえで両スレッドを Resolve しました。方針そのものへのご異論は Task 0-10 の設計として扱います。

独自検証: 旧 Skill 名の残存参照

指摘の前提である「既存スクリプトやエージェントからの呼び出しが壊れる」点について、追跡対象ファイルを再検索しました。生きた参照は残っていません。ヒットしたのは次の 2 件のみで、いずれも修正不要と判断しています。

ヒット箇所判断
docs/superpowers/plans/2026-05-25-playwright-skill-restructure.md当時のプラグイン説明文を引用した過去の実装プランの記録
plugins/ndf-claude/.claude-plugin/plugin.jsonkeywordscodexSkill 名ではなく CLI 名に由来する検索キーワード

round 1 で修正した Kiro のプロンプト以外に、実行時に「skill not found」を引き起こす参照は存在しません。

検証結果

チェック結果
bash scripts/build-runtime-plugins.sh✅ 生成物に差分なし
bash scripts/build-runtime-plugins.sh --check✅ up to date
python3 scripts/check-markdown-links.py --root .✅ all links valid
bash scripts/validate-runtime-plugins.sh✅ passed
CI (6 checks)✅ 全て 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

公開済み Skill 名の削除に対する後方互換性または利用者向け移行手順が不足しています。

Comment threadplugins/ndf-claude/.claude-plugin/plugin.json

@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

Skill 統合・削除の網羅性(統合元の手順、参照漏れ、各ランタイム配布物への反映)を重点的に確認しました。

  • codex / geminiexternal-ai への統合と各ランタイムの manifest 更新が正しく行われています。
  • ドキュメントやスクリプト内の古い Skill 参照も適切に書き換えられており、懸念点はありません。

全体として、変更範囲が一貫しており重複や参照漏れは見当たりませんでした。このままマージして問題ありません。

@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

🔧 /ndf:fix round 3 対応サマリ

修正コミット: なし(コード変更を要する指摘がなかったため。HEAD は round 1 と同じ e1376a0

区分件数
修正済み0
rejected1(round 1・2 の再指摘。前提に事実誤認あり)
deferred (nit)0

レビュー結果

  • gemini (round 3): APPROVE — 指摘なし。「Skill 統合・削除の網羅性(統合元の手順、参照漏れ、各ランタイム配布物への反映)を重点的に確認」したうえで「変更範囲が一貫しており重複や参照漏れは見当たりませんでした。このままマージして問題ありません」との評価。round 2 で REQUEST_CHANGES だった後方互換性の指摘は取り下げられました。
  • codex (round 3): REQUEST_CHANGES — 指摘は 1 件で、round 1・2 で gemini から出た指摘(version bump / README への移行手順 / deprecation stub)の再提出

rejected

[major / 後方互換性] plugins/ndf-claude/.claude-plugin/plugin.json:55 — manifest からの Skill 削除と version 据え置き(codex 指摘)

指摘の前提「既存利用者の /ndf:codex / /ndf:gemini 呼び出しが同じ 4.20.1 のまま失敗します」が、本 PR のブランチ構成では成立しません。

1. 本 PR の base は main ではなく release/skill-inventory です。 棚卸 (Release 0) は 0-1 〜 0-10 の 10 本の PR を release branch 上に積み、Task 0-10 で v5.0.0 へ上げてから main へマージする構成です。issues/ndf-development-skills/06-release-plan.md「バージョンの扱い」に「4.20.15.0.0 とし、旧名から新名への対応表を ndf-policies に 1 リリース分だけ残す」と明記されています。「Skill が削除された 4.20.1」が利用者に配布されることはありません。

2. version bump は Task 0-10 に明示的に割り当て済みです。issues/ndf-development-skills/07-tasks.md の Task 0-10「棚卸の仕上げ」は、まさに plugins/ndf-claude/.claude-plugin/plugin.jsonversion を対象ファイルとして列挙しています。版数は 7 箇所に散在しており、Task 0-10 は grep -rn '<旧版数>' による更新漏れ検査もセットで行う設計のため、本 PR で一部だけ先行して上げるとこの一括検査が機能しなくなります。また 0-4〜0-6 でさらに Skill 名が変わるため、移行表の先行記載は後続 PR ごとの書き換えと Task 0-10 との競合を招きます。

3. deprecation stub は不採用です。 stub も manifest への登録が必要でコンテキストを占有し、Skill 数の削減と重複排除という棚卸そのものの目的を打ち消します。移行案内は release plan のとおり ndf-policies の対応表 1 箇所へ集約します。

前提の誤認に基づく指摘のため、本スレッドは Resolve せず判断の記録として残しました。

独自検証: 旧 Skill 名の残存参照(再実施)

追跡対象ファイルを再検索し、生きた参照が残っていないことを確認しました。

ヒット箇所判断
docs/superpowers/plans/2026-05-25-playwright-skill-restructure.md:729当時のプラグイン説明文を引用した過去の実装プランの記録。修正不要
plugins/ndf-claude/.claude-plugin/plugin.jsonkeywordscodexSkill 名ではなく CLI 名に由来する検索キーワード。意図的に据え置き

round 1 で修正した plugins/ndf-kiro/prompts/codex.md 以外に、実行時に「skill not found」を引き起こす参照は存在しません。

検証結果

チェック結果
bash scripts/build-runtime-plugins.sh✅ 生成物に差分なし
bash scripts/build-runtime-plugins.sh --check✅ up to date
python3 scripts/check-markdown-links.py --root .✅ all links valid
bash scripts/validate-runtime-plugins.sh✅ passed
CI (6 checks)✅ 全て SUCCESS

コード変更がないため push はありません(origin/feature/inventory-merge-external-aie1376a0 で同期済み)。再レビューをお願いします。

@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 | REQUEST_CHANGES

corder 側の Codex CLI 実行例が、統合後の external-ai 手順と矛盾しているため修正してください。

Comment threadplugins/ndf-claude/agents/corder.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 4 | gemini | REQUEST_CHANGES

  • skills/codexskills/gemini を公開 manifest から削除したため、既存利用者の /ndf:codex/ndf:gemini 呼び出しが「skill not found」エラーになる破壊的変更となります。README.md の「主な変更」節等へ移行手順を明記するか、旧ディレクトリに軽量な deprecation stub を残して誘導してください。

`corder` エージェントの Codex CLI 実行例が `ps -p <PID>` による終了確認を案内していたが、
Codex は zombie (defunct) 化して `ps -p` が 0 を返し続けるため完了判定を誤る。
`skills/external-ai/references/cli-codex.md` と同じ運用へ揃える。
- 完了検知を stderr 末尾の `^tokens used$` sentinel 待機へ変更
- プロンプトに最終出力ファイル (`apply_patch` 書き出し) を明示する例を追加
- 成果物回収をファイル → stdout → stderr の三段フォールバックへ変更
- `--config reasoning.effort=medium` を起動例に追加
- `ps -p` を使わない旨を注意書きとして明記
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

🔧 /ndf:fix round 4 対応サマリ

修正コミット: 9ac6a8e

区分件数
修正済み1 (minor 1)
rejected1 (major 1 / 4 回目の再指摘。今回 Resolve)
deferred (nit)0

レビュー結果

  • codex (round 4): REQUEST_CHANGEScorder の Codex CLI 実行例が統合後の external-ai 手順と矛盾している(新規指摘、妥当)
  • gemini (round 4): REQUEST_CHANGES — round 1・2 で提出済みの後方互換性の指摘の再提出

修正済み

[minor / 正確性] plugins/ndf-claude/agents/corder.md の Codex 実行例(codex 指摘)

corder.md/ndf:external-ai skill を参照するよう更新した一方で、コード例の完了確認だけが ps -p <PID> のまま残っていました。references/cli-codex.md「完了検知」節が「ps -p $PID は zombie (defunct) にも 0 を返すため、PID watch は永久ループになりうる」と明示的に禁じている書き方であり、統合後の手順と矛盾していました。

例を references/cli-codex.md「実例: レビュー依頼の完全フロー」と同じ形へ差し替えています。

項目変更前変更後
完了検知ps -p <PID>until grep -q '^tokens used$' /tmp/codex-err.log; do sleep 30; done
出力保証なしプロンプトに「最終結果を $FINALapply_patch で書き出す」指示例を追加
回収なしファイル → stdout → stderr の三段フォールバック
起動オプション-C "$PWD" のみ--config reasoning.effort=medium を追加

あわせてリポジトリ全体で ps -p を再検索し、残存ヒットが SKILL.md / references/cli-codex.md のアンチパターン警告(「使ってはいけない」側の記述)だけであることを確認しました。実際に ps -p を推奨していたのは本ファイルが最後の 1 件です。

rejected(Resolve 済み)

[major / 後方互換性] plugins/ndf-claude/.claude-plugin/plugin.json:55 — manifest からの Skill 削除と version 据え置き

round 1〜4 で計 4 回いただいた同趣旨の指摘です。判断は変わらないため、根拠を reply に記載したうえで Resolve しました。

  1. 「4.20.1 のまま利用者に届く」ことはない — 本 PR の base は main ではなく release/skill-inventory。棚卸は Task 0-1〜0-10 を release ブランチに積み、Task 0-10 で v5.0.0 へ上げてから main へマージする構成(issues/ndf-development-skills/06-release-plan.md「バージョンの扱い」)
  2. 版数の先行更新は Task 0-10 の一括漏れ検査を壊す — 版数は 7 箇所に散在し、Task 0-10 が grep -rn '<旧版数>' の漏れ検査とセットで更新する設計。一部だけ先行更新するとこの検査が機能しない
  3. 旧名→新名の対応表は Task 0-10 で ndf-policies に 1 リリース分記載する — 0-4〜0-6 でさらに Skill 名が変わるため、先行記載は後続 PR ごとの書き換えと Task 0-10 との競合を招く。deprecation stub は Skill 数削減と重複排除という棚卸の目的を打ち消すため不採用
  4. 利用者向けの非互換アナウンスは release PR release: Skill 棚卸 (v5.0.0) #66 の本文「非互換な変更」に記載済み — 消えるコマンド一覧と移行方針を個別 PR ではなく release 単位でアナウンスする方針

方針そのものへのご異論は、本 PR ではなく Task 0-10 の設計として扱わせてください。

その他の意図的な非対応

項目理由
frontmatter の一括見直しTask 0-7 の担当範囲
cross-review/scripts/launch-codex.sh / launch-gemini.sh のファイル名Skill 名ではなく CLI 名に由来する識別子
plugin.jsonkeywordscodex同上(検索キーワードとして意図的に据え置き)

検証結果

チェック結果
bash scripts/build-runtime-plugins.sh✅ synchronized(生成物に差分なし)
bash scripts/build-runtime-plugins.sh --check✅ up to date
python3 scripts/check-markdown-links.py --root .✅ all links valid
bash scripts/validate-runtime-plugins.sh✅ passed
CI (6 checks)✅ 全て SUCCESS(push 前時点。9ac6a8e の再実行結果は待機せず)

未 Resolve スレッドは 0 件です。再レビューをお願いします。

@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-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 | REQUEST_CHANGES

総評:旧スキル(codex / gemini)の manifest からの削除に伴う後方互換性への対処が漏れています。詳細はインラインコメントを参照してください。

Comment threadREADME.md Outdated
@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

cross-review round 5 まとめ(収束)

レビュアー判定指摘
codexAPPROVE指摘なし
geminiREQUEST_CHANGES1 件(README.md:103 / major / 後方互換性)

未 Resolve スレッドは 0 件になりました。コード修正はありません。

決着した論点

gemini の指摘は「/ndf:codex/ndf:gemini が消えるのは破壊的変更なので、README の『主な変更』へ移行手順を書くか deprecation stub を残せ」というもので、round 1〜5 まで 5 ラウンド連続の同趣旨の再提出でした(round 1・2 が gemini、round 3・4 が codex、round 5 が gemini)。

懸念そのものは正しいものの、対応主体が本 PR ではないと判断し、Task 0-10 への引き継ぎをもって決着としました。

  1. 本 PR の base は main ではなく release/skill-inventory。Release 0 は Task 0-1〜0-10 を release ブランチへ積み、Task 0-10 で v5.0.0 へ上げてから main へマージする(issues/ndf-development-skills/06-release-plan.md「バージョンの扱い」)。4.20.1 のまま利用者へ届くことはない
  2. 版数は 7 箇所に散在し、Task 0-10 が grep -rn '<旧版数>' の一括漏れ検査とセットで更新する設計。一部だけ先行更新するとこの検査が機能しなくなる
  3. 旧名→新名の対応表は Task 0-10 で ndf-policies に 1 リリース分記載する。受け皿となる PR chore: 棚卸結果を manifest と文書へ反映し v5.0.0 へ (0-10) #76(0-10)は既に Draft で存在
  4. deprecation stub は manifest 登録とコンテキスト占有を伴い、Skill 数削減・重複排除という棚卸の目的と相反するため不採用
  5. 利用者向けの非互換アナウンスは release PR release: Skill 棚卸 (v5.0.0) #66 の本文「非互換な変更」に記載済み(消えるコマンド一覧・自動発動の変化・Kiro 再インストールの必要性)。個別 PR ではなく release 単位でアナウンスする方針
  6. 同一 release へ Task 0-1〜0-9 の PR が並行しており、各 PR が README の同じ節へ追記するとコンフリクトし、移行情報も断片化する

引き継ぎ先

方針そのものへのご異論は、本 PR ではなく Task 0-10 の設計としてお願いします。

@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 6 | codex | APPROVE

修正必須の新規指摘はありません。

@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 6 | gemini | REQUEST_CHANGES

  • plugins/ndf-shared/skills/qa-security-scan/03-report-template.md のコード例を最新の Codex CLI 連携ルール(ファイル書き出し必須・reasoning.effort=medium)に同期してください。

なお、旧コマンド名削除による破壊的変更の懸念については、Task 0-10(PR #76)の担当範囲として理解・了承しました。

`plugins/ndf-shared/skills/qa-security-scan/03-report-template.md` の
Codex CLI 呼び出し例が `external-ai/references/cli-codex.md` の規約と
矛盾していたため、corder.md と同じ形へ揃えた。
- プロンプトに `apply_patch` での出力ファイル書き出し指示を追加
- 起動時に `--config reasoning.effort=medium` を指定
- 完了検知を `^tokens used$` sentinel 待機に変更
- 回収をファイル → stdout → stderr の三段フォールバックに変更
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 6 対応サマリ

commit: bdd4c3b Fix: qa-security-scan の Codex 実行例を external-ai 規約へ同期

レビュー結果

ReviewerVerdict指摘
codexAPPROVE指摘なし
geminiREQUEST_CHANGES1 件(minor / 一貫性)

対応した指摘(1/1)

plugins/ndf-shared/skills/qa-security-scan/03-report-template.md [minor / 一貫性]

Codex CLI 実行例が、本 PR で整理した external-ai/references/cli-codex.md「実例」節の規約と矛盾していた。corder.md(9ac6a8e)と同じ方針で以下へ揃えた。

  • プロンプトに apply_patch での出力ファイル書き出し指示を必須化(最終 message 欠落時の回収保証)
  • 起動時に --config reasoning.effort=medium を指定
  • 完了検知を ^tokens used$ sentinel 待機に変更(元の例には待機処理自体が無かった)
  • 回収をファイル → stdout → stderr の三段フォールバックに変更
  • ps -p は使用せず、zombie 誤判定の注意をコメントで併記

横展開確認(追加調査)

  • grep -rn 'ps -p' plugins/ndf-shared/ → 該当は external-ai/SKILL.md / references/cli-codex.md のアンチパターン記述のみ。修正不要。
  • grep -rn 'codex exec' plugins/ndf-shared/ --include=*.mdskills/external-ai/ 以外の残りは skills/review/SKILL.md:275 のみで、既に正しい形式。

検証結果(すべて green)

bash scripts/build-runtime-plugins.sh → runtime plugin generated files synchronized
bash scripts/build-runtime-plugins.sh --check → runtime plugin generated files are 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

qa-security-scan は非公開 Skill のため runtime 配布物への差分は発生していない(差分は shared 1 ファイル / +31 -6)。

deferred

--defer-nit 指定だが、今回 nit 相当の見送り項目は無し。未 Resolve スレッドは 0 件。

@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 7 | gemini | APPROVE

統合の網羅性と各ランタイムへの配布設定の反映は非常によくできており、問題ありません。1 点だけ README.md の記載で数字の不整合がありましたので指摘します。

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 7 | codex | REQUEST_CHANGES

Gemini CLI の headless 実行例に trusted directory 対策の反映漏れがあります。統合後の外部 AI 手順として、既存 launcher と同じ前提を明示してください。

並行 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 で再生成。
- cli-gemini.md の headless 起動例をすべて
`GEMINI_CLI_TRUST_WORKSPACE=true` + `--skip-trust` 併用へ揃えた。
未登録パス (worktree 等) は untrusted 判定で `--yolo` が `default` へ降格し、
非対話では承認待ちのままハングするため、環境変数とフラグの両方が要る。
実装根拠は cross-review の scripts/launch-gemini.sh の起動行。
- 承認モード節・Q1 / Q3 / Q4 のトラブルシューティングも同じ前提へ更新。
- external-ai/SKILL.md の CLI 比較表から「Gemini は追加フラグ不要」の記述を外した。
- README.md の元Skills 個数を plugins/ndf-shared/skills/ の実体 32 個、
runtime 別 core 個数を manifest の実数 (Claude 23 / Kiro 23 / Codex 25) に合わせた。
@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

🤖 cross-review round 7 対応 + release ブランチ取り込み

指摘対応 (2 件)

指摘対応
references/cli-gemini.md:47 [major / 実行信頼性] headless で trusted directory 判定により停止する起動例 5 箇所すべてを GEMINI_CLI_TRUST_WORKSPACE=true + --skip-trust へ統一。根拠は scripts/launch-gemini.sh の起動行。理由(untrusted 判定で --yolodefault へ降格しハングする / 片方だけでは防げない)を「起動コマンド」「承認モード」節と Q1・Q3・Q4 に明記
README.md:12 [minor / 正確性] 元Skills(48個) と内訳合計 45 が不一致release 取り込み後の実体から数え直し、32 個(内訳合計も 32)へ修正。runtime 別 core 個数も manifest 実数(Claude 23 / Kiro 23 / Codex 25)へ更新

external-ai/SKILL.md に gemini の具体的な起動コマンド例はなかったため、CLI 比較表の「Gemini は追加フラグ不要」の記述のみ実態に合わせて訂正しました。

release/skill-inventory の取り込み

先行マージ済みの #68(review / fix 系統合)・#71(ブラウザ自動テスト集約)・#72(Skill 削除)と競合したため、両ブランチの削除を両方反映する(積集合) 方針で解消しました。

  • manifest / plugin.json の skills: release が消した review-branch / review-pr-comments / resolve-pr-comments / browser-test と、本ブランチが消した codex / gemini をいずれも除去。release 追加の playwright-authoring と本ブランチの external-ai を残置。各 manifest の並び順規則(claude / kiro は用途順、codex はアルファベット順)を維持し、plugin.jsonskills は claude manifest と完全一致(順序含む)。
  • review/SKILL.mdcross-review/SKILL.md: release 側の再構成(外部 AI 委譲節の圧縮・並べ替え)をベースに採用したうえで、本ブランチの /ndf:codex/ndf:gemini/ndf:external-ai 参照差し替えを再適用。どちらの変更も落としていません。
  • README.md: Skill 一覧と個数を実体から再計算。
  • plugins/ndf-{claude,codex,kiro}/skills/: 生成物のため共有側を直したうえで scripts/build-runtime-plugins.sh で再生成。

マージ後の Skill 実数

対象個数
plugins/ndf-shared/skills/32
claude manifest / plugin.json skills23 / 23(完全一致)
kiro manifest23
codex manifest25

残存参照の確認

/ndf:codex/ndf:gemini への参照は plugins/ndf-shared/ を含めリポジトリ全体で 0 件
削除済み Skill の参照も review-branch / review-pr-comments / resolve-pr-comments / git-gh-operations / python-execution / browser-test / clean はすべて 0 件です。

ndf:sync-main(12 件)と ndf:branch-fix-strategy(44 件)は残っていますが、これらの Skill は release 上でまだ存在しており、統合は未マージの #70(0-4 git 系統合)の担当範囲のため本 PR では対象外です。

検証

bash scripts/build-runtime-plugins.sh → synchronized
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

コミット: dc51957(マージ解消)/ 9e7e9e9(指摘対応)

@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 8 | codex | APPROVE

修正が必要な指摘はありません。Skill 統合後の参照更新、3 ランタイムの manifest / 生成物同期、Markdown link / runtime plugin validation を確認済みです。

@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 8 | gemini | REQUEST_CHANGES

統合漏れはありませんが、既存の利用者が躓く「後方互換性」への対応と、Kiro CLI 固有のパス解決に関する課題が見つかりました。

利用者が混乱せず安全に external-ai に移行できるよう対応をお願いします。

Comment threadREADME.md
Comment threadplugins/ndf-kiro/prompts/codex.md Outdated

codexスキルの手順に従って実行してください。引数があればそのまま使用します。
external-aiスキルの手順に従って実行してください。Codex CLI 固有の呼び出し方法は
`skills/external-ai/references/cli-codex.md` を参照します。引数があればそのまま使用します。

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.

[minor / 正確性]
Kiro 環境では Skill はワークスペース直下ではなく .kiro/skills/ に配置されます。単に skills/external-ai/references/cli-codex.md と書くと、AI がワークスペース直下の skills ディレクトリを探して参照に失敗する恐れがあります。
.kiro/skills/external-ai/references/cli-codex.md のように Kiro での実際の配置パスを明記するか、単に「external-ai スキルの references/cli-codex.md」と記述することをお勧めします。

Kiro では Skill はワークスペース直下ではなく .kiro/skills/ に配置されるため、
skills/external-ai/... と書くと参照に失敗しうる。Skill 名からの相対参照と
Kiro での実配置パスの両方を示す形へ改めた。

@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 9 | codex | APPROVE

修正必須の指摘はありません。

@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 9 | gemini | APPROVE

Skill の統合・削除の網羅性、および各ランタイム (Claude Code, Codex, Kiro) の manifest (*-skills.txt) やビルドスクリプトへの反映漏れがないことを確認しました。リンク整合性チェッカも通過しており、変更は完全かつ一貫しています。

追加の修正を要する箇所はありません。

@takemi-ohama
takemi-ohama marked this pull request as ready for review August 8, 2026 04:57
release ブランチ側の git 系統合 (PR #70) と本ブランチ側の external-ai 統合の
双方を反映した。README の Skill 一覧と個数を実体へ一致させ (shared 29 /
claude 20 / codex 22 / kiro 20)、プラグイン一覧表の外部 AI 委譲の記述は
/ndf:external-ai を指す形にした。

@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 10 | codex | APPROVE

新規の修正指摘はありません。参照漏れ、生成物同期、Markdown リンク、runtime plugin validation を確認済みです。

@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 10 | gemini | APPROVE

PR の目的(Skill の統合と廃止)が 3 つのランタイム(Claude Code / Codex / Kiro)すべてにおいて一貫して実装されています。マニフェスト(plugin.json, *-skills.txt)、Kiro の install.sh やプロンプト群、各種 Agent の定義から削除・統合対象への参照が適切に置換・除去されていることを確認しました。

1 点のみ、新設されたバックグラウンドプロセスの完了待機ループにおいて、プロセス異常終了時の無限ループを避けるためのフェイルセーフに関する改善提案をインラインに残しました。

until ! ps -p $PID; do sleep 30; done

# ✅ zombie 安全
until grep -q '^tokens used$' /tmp/codex-err.log 2>/dev/null; do

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.

[major / 信頼性] Codex プロセスがメモリ不足等で異常終了し ^tokens used$ が出力されなかった場合、この until grep は無限ループになります。タイムアウト用のカウンタ(例: i=0; while [ $i -lt 120 ]; do ... i=$((i+1)); done)を併用してフェイルセーフを設けることを推奨します。

@takemi-ohama
takemi-ohama merged commit 4b1b95c into release/skill-inventoryAug 8, 2026
6 checks passed
@takemi-ohama
takemi-ohama deleted the feature/inventory-merge-external-ai branch August 14, 2026 03:59
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