Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "ndf",
"source": {
"source": "local",
"path": "./plugins/ndf"
"path": "./plugins/ndf-codex"
},
"policy": {
"installation": "AVAILABLE",
Expand Down
4 changes: 2 additions & 2 deletions plugins/ndf-claude/skills/review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ GitHub は **自分の PR には `REQUEST_CHANGES` で投稿できない**(`HT

### `codex` 指定時

呼び出し手順の詳細は `/ndf:codex` skill(`plugins/ndf/skills/codex/SKILL.md`)に従う。要点:
呼び出し手順の詳細は、利用 runtime に `/ndf:codex` skill が同梱されている場合はその skill に従う。要点:

- プロンプトを `/tmp/codex-review-pr<番号>-prompt.md` に書き出し
- 出力先ファイルを `/tmp/codex-output-review-pr<番号>.md` として **プロンプト内で `apply_patch` 書き出しを必須化**
Expand All @@ -283,7 +283,7 @@ GitHub は **自分の PR には `REQUEST_CHANGES` で投稿できない**(`HT

### `gemini` 指定時

呼び出し手順の詳細は `/ndf:gemini` skill(`plugins/ndf/skills/gemini/SKILL.md`)に従う。要点:
呼び出し手順の詳細は、利用 runtime に `/ndf:gemini` skill が同梱されている場合はその skill に従う。要点:

- プロンプトを `/tmp/gemini-review-pr<番号>-prompt.md` に書き出し
- **AI 直接投稿フローでは `--yolo` 必須**(`gh api -X POST` がシェル実行のため、`plan` / `auto_edit` だとブロックされる)
Expand Down
7 changes: 7 additions & 0 deletions plugins/ndf-codex/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "ndf",
"version": "4.19.0",
"description": "Codex plugin with focused NDF skills for PR/review workflows, cross-review, implementation planning, Playwright testing, Docker container access, GitHub operations, and optional Slack completion notifications.",
"skills": "./skills/",
"hooks": "./hooks/hooks.json"
}
58 changes: 58 additions & 0 deletions plugins/ndf-codex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# NDF Codex Plugin

Codex CLI 向けの NDF プラグインです。PR 運用、レビュー、cross-review、実装計画、仕様書化、Playwright テスト運用、Docker container access、GitHub 操作補助などの Codex 用 skills と、Codex 終了時の任意 Slack 通知 hook を提供します。

## インストール

Codex で marketplace を追加し、`ndf` をインストールします。

```bash
codex plugin marketplace add https://github.com/devbasex/ai-plugins
codex plugin add ndf@ai-plugins
```

## 同梱内容

- `.codex-plugin/plugin.json`: Codex plugin manifest
- `skills/`: Codex 向けに公開する NDF skills
- `hooks/hooks.json`: Codex Stop hook
- `scripts/`: hook と skill から利用する同梱スクリプト

Claude Code 専用の agents、statusline 自動設定、transcript retention 自動設定は含めません。Codex runtime が読むファイルはこの `plugins/ndf-codex` 配下だけで完結します。

## Slack 通知

Codex 版の Stop hook は `NDF_CODEX_SLACK_NOTIFY=true` が設定されている場合だけ Slack 通知を送ります。通知を使う場合は、利用プロジェクト側で以下の環境変数を設定します。

```bash
NDF_CODEX_SLACK_NOTIFY=true
SLACK_BOT_TOKEN=xoxb-...
SLACK_CHANNEL_ID=C0123456789
SLACK_USER_MENTION=<@U0123456789>
```

`SLACK_USER_MENTION` は任意です。機密値は `.env` などで管理し、リポジトリへコミットしないでください。

Codex の hook は初回実行前に Codex 側の hooks trust 設定が必要になる場合があります。`/hooks` で対象 hook を確認し、利用するプロジェクトで明示的に有効化してください。

## 検証

Codex plugin schema を検証できる CLI が利用できる場合は、Codex 側の validate / install smoke を実行してください。CLI に検証コマンドが無い環境では、manifest JSON と参照パスの存在を確認します。

```bash
python3 -m json.tool plugins/ndf-codex/.codex-plugin/plugin.json >/dev/null
python3 -m json.tool plugins/ndf-codex/hooks/hooks.json >/dev/null
test -d plugins/ndf-codex/skills
test -d plugins/ndf-codex/scripts
```

install smoke を行う場合は、別の一時プロジェクトで marketplace から `ndf@ai-plugins` を追加し、代表 skill が読み込まれることと Stop hook が trust 対象として表示されることを確認します。

## 開発者向け

`skills/` と `scripts/` は `plugins/ndf-shared` から生成される commit 対象の生成物です。Skill や共通スクリプトを変更する場合は `plugins/ndf-shared` を編集し、build を実行します。

```bash
bash scripts/build-runtime-plugins.sh
bash scripts/build-runtime-plugins.sh --check
```
16 changes: 16 additions & 0 deletions plugins/ndf-codex/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "sh -c 'if [ -n \"$PLUGIN_ROOT\" ]; then node \"$PLUGIN_ROOT/scripts/codex-slack-notify.js\"; fi; exit 0'",
"timeout": 15,
"statusMessage": "Sending Codex completion notification"
}
]
}
]
}
}
Loading