Skip to content

Fix: ndfプラグインをCodex対応 - #38

Merged
takemi-ohama merged 10 commits into
mainfrom
fix/issue-36-codex-plugin-compat
Jun 28, 2026
Merged

Fix: ndfプラグインをCodex対応#38
takemi-ohama merged 10 commits into
mainfrom
fix/issue-36-codex-plugin-compat

Conversation

@takemi-ohama

@takemi-ohamatakemi-ohama commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Closesndf: Codex plugin hooks parse error and oversized skill descriptions #36
  • ndfプラグインにCodex向け .codex-plugin/plugin.json.agents/plugins/marketplace.json を追加
  • Codexのhooks schemaに合わせて hooks/hooks.json のトップレベル description を削除し、plugin root参照をCodex/Claude Code両対応に変更
  • 48個のSkill frontmatter description を英語の短いトリガー文へ更新し、Codexのskills context budget警告を抑制しつつ呼び出しやすさを改善
  • Codex向けSlack終了通知hookを追加し、NDF_CODEX_SLACK_NOTIFY=true の明示opt-in時のみ既存Slack環境変数で通知
  • Claude Code/Kiro向け公開Skillを skills-claude/ core 26個、Codex向け公開Skillを skills-codex/ core 27個に分離
  • ランタイム別の除外候補を skills-optional/README.md に整理し、通常利用時のSkill context budgetを圧迫しない構成に変更
  • Kiroインストーラーが skills-claude 参照を拾えるよう更新
  • README / project overviewにCodexでのインストール手順とSkill分離構成を追加

Test plan

  • git diff --check
  • git diff --cached --check
  • node --check plugins/ndf/scripts/codex-slack-notify.js
  • bash -n scripts/install-kiro.sh
  • JSON parse: .agents/plugins/marketplace.json, plugins/ndf/.codex-plugin/plugin.json, plugins/ndf/.claude-plugin/plugin.json, plugins/ndf/hooks/codex-hooks.json, plugins/ndf/hooks/hooks.json
  • claude plugin validate plugins/ndf
  • 一時 CODEX_HOMEcodex plugin marketplace add ./codex plugin add ndf@ai-plugins
  • Codex install cache内で skills-codexSKILL.md が27件、skills-claudeSKILL.md が26件解決できることを確認
  • Kiroインストーラーの抽出条件で .claude-plugin/plugin.json から26件の skills-claude 参照を取得できることを確認
  • NDF_CODEX_SLACK_NOTIFY 未設定 / Slack token未設定時にCodex Slack notify scriptがno-opで終了することを確認
  • Skill description集計: count=48 description_chars=2165 max_description_chars=62

Notes

  • Codex docsではSkill一覧がcontext windowの2%または8,000文字に制限されるため、詳細手順はSkill本文に残し、frontmatter descriptionは短い英語トリガー文にしています。
  • Codex向けSlack通知はClaude CLIを呼ばず、Codexのsession JSONLから通知文を組み立てます。
  • Codexのplugin packagingではsymlinkディレクトリ配下のSkillがキャッシュ内で空になったため、公開対象の skills-claude/skills-codex/ は実ディレクトリとして同梱しています。

@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

Claude と Codex の Skill 構成を分離するという方針自体は、各ランタイムで不要な Skill を隠蔽できるため非常に良いアプローチです。
しかし、現在の実装では skills-claude/skills-codex/ の配下に実体ファイルをそのままコピーしているため、元となる skills/ 配下と完全に二重管理(DRY違反)になってしまっています。

今後の保守性を考慮し、単一のソース (skills/) を維持しつつ表示を制御する形への修正をリクエストします。詳細は各インラインコメントをご確認ください。

Comment threadplugins/ndf/.claude-plugin/plugin.json Outdated
Comment threadplugins/ndf/.codex-plugin/plugin.json
Comment threadscripts/install-kiro.sh 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 | codex | REQUEST_CHANGES

修正提案はインライン1件と本文1件です。

[major / 保守性] plugins/ndf/skills-codex/playwright-test-planning/docs/checklists/checklist-list.md に実 NUL バイトが混入しており、GitHub diff でも binary として扱われます。LST7 の例は実 NUL ではなく <NUL> などの文字列表現に置き換え、Markdown を通常のテキスト差分として扱える状態にしてください。

Comment threadscripts/install-kiro.sh Outdated
@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

/ndf:fix 対応サマリ

対応コミット: 591d79f

対応内容

  • [major / 構成] Claude Code 側 manifest を ./skills/... 直接参照に戻し、skills-claude/ の物理コピーを削除しました。
  • [major / 構成] Codex 側の公開 Skill セットを維持しつつ、skills-codex/ 配下を ../skills/<skill-name> へのシンボリックリンクに置き換えました。
  • [minor / 保守性] Kiro インストーラの Skill 抽出正規表現を ./skills/ 直接参照前提へ戻しました。
  • [major / 正確性] --with-codex から旧 codex mcp-servermcpServers 生成を削除し、Codex CLI 直接実行用 prompt 生成へ変更しました。
  • [major / 保守性] checklist-list.md の実 NUL バイトを <NUL> 表記に置換しました。

検証

  • python3 -m json.tool plugins/ndf/.claude-plugin/plugin.json
  • python3 -m json.tool plugins/ndf/.codex-plugin/plugin.json
  • bash -n scripts/install-kiro.sh
  • git diff --cached --check
  • find -L plugins/ndf/skills-codex -mindepth 1 -maxdepth 1 -type l -print(壊れた symlink なし)
  • claude plugin validate plugins/ndf

Deferred: 0 / Rejected: 0
CI: checks 未登録(gh pr checks は 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 2 | codex | REQUEST_CHANGES

Codex install後に公開対象の skill ディレクトリが空になるため、このままだと Codex 版 ndf の Skill が読み込まれません。

Comment threadplugins/ndf/.codex-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 2 | gemini | REQUEST_CHANGES

  • 設計レベルの指摘: README.mddocs/ndf-plugin-reference.md に記載されている skills-claude/ ディレクトリが存在せず、実装とドキュメントが乖離しています。利用者の混乱を招くため、ドキュメントを修正するか、ディレクトリ構成を統一してください。

Comment threadREADME.md Outdated
Comment threaddocs/ndf-plugin-reference.md Outdated
@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

/ndf:fix round 2 対応サマリ

対応コミット: befe8c0

対応内容

  • [major / 正確性] Codex 0.142.3 の marketplace cache で skills-codex/ が空になる問題に対応し、Codex 公開 27 skill を symlink から実ディレクトリへ戻しました。
  • [major / 正確性] README.md のツリー図から存在しない skills-claude/ を削除し、Claude Code / Kiro は .claude-plugin/plugin.jsonskills 配列で公開対象を指定する説明へ修正しました。
  • [major / 正確性] docs/ndf-plugin-reference.mdplugins/ndf/CHANGELOG.md の v4.17.0 説明を、実装実態に合わせて更新しました。

検証

  • find plugins/ndf/skills-codex -xtype l -print(壊れた symlink なし)
  • find plugins/ndf/skills-codex -name SKILL.md | wc -l → 27
  • git diff --cached --check
  • claude plugin validate plugins/ndf
  • 実 NUL バイト検査(検出なし)

Deferred: 0 / Rejected: 0
CI: checks 未登録(gh pr checks 38 --json name,state は 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 3 | codex | REQUEST_CHANGES

plugins/ndf/AGENTS.md と docs/project-overview.md に、実在しない skills-claude/ と古い version 表記が残っています。v4.17.0 の実装(Claude Code/Kiro は manifest 配列で ./skills/... を参照し、Codex のみ skills-codex/ 実ディレクトリを使う構成)に揃えてください。

Comment threadplugins/ndf/AGENTS.md Outdated
Comment threadplugins/ndf/AGENTS.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 | REQUEST_CHANGES

Codex向けにスキル群を実ディレクトリ化(skills-codex/)した際のパス指定漏れやハードコードについて修正を提案します。

Comment threadplugins/ndf/skills-codex/fix/SKILL.md Outdated
Comment threadplugins/ndf/skills-codex/review-pr-comments/SKILL.md Outdated
@takemi-ohama

takemi-ohama commented Jun 28, 2026

Copy link
Copy Markdown
ContributorAuthor

/ndf:fix round 3 対応サマリ

対応コミット: 9ad4003

対応内容

  • [minor / 正確性] plugins/ndf/AGENTS.md の現在バージョンを v4.17.0 に更新しました。
  • [major / 正確性] plugins/ndf/AGENTS.mddocs/project-overview.md から存在しない skills-claude/ 前提を削除し、Claude Code/Kiro は .claude-plugin/plugin.json./skills/... 配列指定、Codex は skills-codex/ 実ディレクトリで公開する説明へ更新しました。
  • [minor / 冗長性] Codex コピー内の fix / review-pr-commentsFETCH_SCRIPT 例を skills-codex/fix/scripts/fetch-pr-comments.sh 参照へ更新しました。
  • [minor / 正確性] Codex コピー内の Playwright 手順から .claude/plugins/ndf/... のハードコードを外し、Claude Code/Kiro と Codex の plugin root を前提にした説明へ更新しました。元の skills/ 側ドキュメントも同期しています。

検証

  • claude plugin validate plugins/ndf
  • find plugins/ndf/skills-codex -name SKILL.md | wc -l → 27
  • rg '4\\.16\\.1|skills-claude|\\.claude/plugins/ndf|skills/fix/scripts/fetch-pr-comments' plugins/ndf/AGENTS.md docs/project-overview.md plugins/ndf/skills-codex plugins/ndf/skills/playwright-test-planning/docs/06-pytest-playwright.md → 該当なし
  • git diff --check

Deferred: 0 / Rejected: 0
CI: checks 未登録(gh pr checks 38 --json name,state は 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 | 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 4 | gemini | REQUEST_CHANGES

Codex向けの案内として追加された skills-codex/playwright-kit-ops の実体が存在しません。ディレクトリをコピーするか、案内するパスを修正してください。

@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

🔧 /ndf:fix サマリ (round 4)

対応件数: major=2 (合計 2 件)
deferred: 0 件 / rejected: 0 件
commit: c3dc262
CI: NONE (checks 未登録)

詳細

  • Codex 公開対象に playwright-kit-ops を実ディレクトリとして追加し、skills-codex/playwright-kit-ops の案内パスを実在させました。
  • Codex core skill 数の README / docs / AGENTS / CHANGELOG 表記を 28 個へ更新しました。

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

修正必須の指摘が2件あります。Codex公開セットでのDrive連携到達性と、Windows初期化スクリプトのユーザー入力展開を直してください。

Comment threadplugins/ndf/skills-codex/playwright-kit-ops/scripts/init_project.bat Outdated
Comment threadplugins/ndf/skills-codex/playwright-kit-ops/scripts/_drive_auth.py 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 5 | gemini | COMMENT

[minor / 堅牢性]
PR横断の修正提案です。fix/SKILL.md 等で PLUGIN_ROOT フォールバック対応(${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}})が行われましたが、skills/cross-review/SKILL.mdskills/statusline/SKILL.md などの一部オプションスキルには CLAUDE_PLUGIN_ROOT の直書きが残っています。将来的なランタイム仕様変更に備え、これらも同様のフォールバック形式に統一しておくことを推奨します。

Comment threadplugins/ndf/skills-optional/README.md Outdated
@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

🔧 /ndf:fix サマリ (round 5)

対応件数: major=2 / minor=2 / nit=0 (合計 4 件)
deferred: 0 件 / rejected: 0 件
commit: 88279de
CI: NONE (checks 未登録)

対応内容

  • [major / セキュリティ] init_project.batPROJECT_ROOT に cmd メタ文字拒否を追加し、表示・dry-run 出力を引用付きに統一しました。元の skills/ 側にも同期しています。
  • [major / 正確性] Codex 公開セットで Drive 連携を optional dependency として明示し、GOOGLE_AUTH_SCRIPTS 設定例と未設定時のエラーを _drive_auth.py / upload_evidence.py / uploader / docs に追加しました。
  • [minor / 正確性] playwright-kit-opsskills-optional/README.md の Codex 除外候補から Claude/Kiro 除外へ移動しました。
  • [minor / 堅牢性] cross-review / statuslineCLAUDE_PLUGIN_ROOT 直書きを PLUGIN_ROOT フォールバック形式へ揃えました。

検証

  • claude plugin validate plugins/ndf
  • find plugins/ndf/skills-codex -name SKILL.md | wc -l → 28
  • python3 -m py_compile (Drive 認証関連 6 ファイル)
  • git diff --check
  • rg による batch の %PROJECT_ROOT% / %RUNTIME_DIR% 表示確認 (引用済みのみ)

CI エラー対応: なし (checks 未登録)
flaky テスト対応: なし

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

Codex Stop hook と optional skill 運用ドキュメントに修正提案があります。

Comment threadplugins/ndf/scripts/codex-slack-notify.js Outdated
Comment threadplugins/ndf/skills-optional/README.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 6 | gemini | APPROVE

設定ファイルの分離・参照パスの整理は適切に行われており、特筆すべき修正点はありません。

@takemi-ohama

Copy link
Copy Markdown
ContributorAuthor

cross-review final sweep

  • fixed: 2 minor review comments
  • resolved review threads: 2
  • deferred: 0
  • rejected: 0
  • commit: 92dab3d

Validation:

  • claude plugin validate plugins/ndf: passed
  • find plugins/ndf/skills-codex -name SKILL.md | wc -l: 28
  • node --check plugins/ndf/scripts/codex-slack-notify.js: passed

CI snapshot: no checks reported / no failing checks at sweep time.

@takemi-ohama
takemi-ohama merged commit 8d86741 into mainJun 28, 2026
@takemi-ohama
takemi-ohama deleted the fix/issue-36-codex-plugin-compat branch August 14, 2026 04:01
takemi-ohama added a commit that referenced this pull request Aug 15, 2026
分岐・反復・定数をどう持つかの判断材料を、独立 Skill ではなく構造改善の
観点として統合する(issue #38)。
独立 Skill では発動条件を「コードを書くとき」以外に書けず、常に該当する
トリガは発動判定として働かない。既存のコードスメル 14 件のうち 4 件とも
重複しており、棚卸台帳の「重複は統合」の基準に該当する。統合により発動点が
「リファクタリングを始めるとき」に定まる。
- safe-refactoring → refactoring(公開コマンドの非互換変更)
- コードスメル 3 件追加(業務ルールの埋め込み / 一件ずつの反復 /
検証のない外部化)と、対応する手法 2 件
- references/data-representation.md に判定表・外部化の条件・判断の記録
- references/language-notes.md を移設
- Skill 31 → 30 個(Claude 26 / Codex 24 / Kiro 25)
- 移行対応表を ndf-policies へ追加(v9.0.0 で削除)。v7.0.0 の対応表は
予告どおり削除
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cpg1uksLKy4W7GxFZwQELG
takemi-ohama added a commit that referenced this pull request Aug 15, 2026
分岐・反復・定数を何にどう置き換えるかの判断材料を、構造改善の Skill へ統合する(issue #38)。
あわせて safe-refactoring を refactoring へ改名する。公開コマンドの非互換変更のため v8.0.0。
- Skill 30 個(Claude 26 / Codex 24 / Kiro 25)。追加ではなく統合
- コードスメルに 3 件追加(業務ルールの埋め込み / 一件ずつの反復 / 検証のない外部化)と
対応する手法 2 件
- references/data-representation.md に判定表・外部化の条件・判断の記録
- 言語ごとの手段は 1 言語 1 ファイル(lang-python / javascript / typescript / php)
- 構造改善を必須工程にし、対象範囲を呼び出し元・呼び出し先・同一モジュールまで広げる
- 移行対応表を ndf-policies へ追加(v9.0.0 で削除)。v7.0.0 の対応表は予告どおり削除
- validate-runtime-plugins.sh に manifest 実数と description の突き合わせ検査を追加
cross-review: codex / gemini とも APPROVE(12 ラウンド、指摘 24 件対応、deferred 0)
Closes#38
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.

ndf: Codex plugin hooks parse error and oversized skill descriptions

1 participant

@takemi-ohama