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
5 changes: 3 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "ai-plugins",
"description": "Claude Code plugin marketplace for NDF workflow tooling and MCP server plugins.",
"owner": {
"name": "takemi-ohama",
"email": "takemi.ohama+ai-plugins@gmail.com"
},
"plugins": [
{
"name": "ndf",
"source": "./plugins/ndf",
"description": "All-in-one plugin (v4.19.0): Claude Code/Kiro and Codex skill exposure split, 8 specialized agents (model-tiered), 49 source skills including plan-to-spec final specification workflow, pytest-playwright E2E testing (7 focused skills: test-planning, script-creation, execution, report, kit-ops, browser-connect, evidence-drive), CDP remote browser support, Google Drive evidence archival, ML model structure standard, PR/review workflows, principles, data analysis, Codex/Gemini CLI integration, skill usage stats, statusline switcher (/ndf:statusline). SessionStart hook (transcript retention >= 90 days, default statusline when none is configured), Stop hook (AI-summarized Slack notifications)."
"source": "./plugins/ndf-claude",
"description": "Claude Code plugin (v4.19.0): 8 specialized agents, focused NDF skills for PR/review workflows, implementation planning, plan-to-spec, browser smoke testing, statusline, Codex CLI delegation, transcript retention guard, default statusline setup, and optional Slack notifications."
},
{
"name": "mcp-playwright",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Claude Code / Codex / Kiro CLI向けのスキル・MCP設定を共有するた

**NDFプラグイン v4.19.0** は、以下の機能を**オールインワン**で提供する統合プラグインです:

- **公開Skills**: Claude Code/Kiro向け core 28個、Codex向け core 30個に分離。`skills-optional/` にランタイム別の除外候補を整理。
- **公開Skills**: Claude Code向け core 29個、Kiro向け core 28個、Codex向け core 30個に分離。`skills-optional/` にランタイム別の除外候補を整理。
- **元Skills(49個)**:
- PR/レビューワークフロー (13): pr, pr-tests, fix, review, review-branch, review-pr-comments, resolve-pr-comments, cherry-pick-pr, deploy, sync-main, merged, clean, browser-test
- 原則・ガイドライン (10): ndf-policies, branch-fix-strategy, implementation-plan, plan-to-spec, investigation-rules, problem-solving, logging-guidelines, markdown-writing, issue-plan-strategy, ml-model-structure
Expand Down Expand Up @@ -99,7 +99,7 @@ kiro-cli chat

| プラグイン名 | バージョン | 説明 | 詳細 |
|------------|----------|------|------|
| **ndf** | 4.19.0 | Claude Code / Codex / Kiro CLI開発環境を**オールインワン**で強化する統合プラグイン。8個の専門エージェント(director、data-analyst、corder、researcher、qa、debugger、devops-engineer、code-reviewer)、公開Skills(Claude Code/Kiro向け core 28個、Codex向け core 30個)、SessionStartフック(transcript保持期間自動管理)、Stopフック(AI要約生成+Slack通知)を提供。v4.0.0 で Codex MCP サーバを廃止し、`/ndf:codex` skill + `corder` エージェント経由の CLI 直接実行に一本化。 | [README](./plugins/ndf/README.md) |
| **ndf** | 4.19.0 | Claude Code / Codex / Kiro CLI開発環境を**オールインワン**で強化する統合プラグイン。8個の専門エージェント(director、data-analyst、corder、researcher、qa、debugger、devops-engineer、code-reviewer)、公開Skills(Claude Code向け core 29個、Kiro向け core 28個、Codex向け core 30個)、SessionStartフック(transcript保持期間自動管理)、Stopフック(AI要約生成+Slack通知)を提供。v4.0.0 で Codex MCP サーバを廃止し、`/ndf:codex` skill + `corder` エージェント経由の CLI 直接実行に一本化。 | [README](./plugins/ndf/README.md) |

### NDF v4.19.0 の主な変更

Expand Down
61 changes: 61 additions & 0 deletions plugins/ndf-claude/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "ndf",
"version": "4.19.0",
"description": "Claude Code plugin with 8 specialized agents, focused NDF skills for PR/review workflows, implementation planning, debugging principles, statusline, browser smoke testing, Codex CLI delegation, transcript retention guard, default statusline setup, and optional Slack notifications.",
"author": {
"name": "takemi-ohama",
"url": "https://github.com/takemi-ohama"
},
"keywords": [
"mcp",
"codex",
"workflow",
"slack",
"notifications",
"agents",
"skills",
"director",
"orchestrator"
],
"agents": [
"./agents/director.md",
"./agents/data-analyst.md",
"./agents/corder.md",
"./agents/researcher.md",
"./agents/qa.md",
"./agents/debugger.md",
"./agents/devops-engineer.md",
"./agents/code-reviewer.md"
],
"skills": [
"./skills/pr",
"./skills/pr-tests",
"./skills/fix",
"./skills/review",
"./skills/cross-review",
"./skills/merged",
"./skills/clean",
"./skills/ndf-policies",
"./skills/markdown-writing",
"./skills/python-execution",
"./skills/docker-container-access",
"./skills/git-gh-operations",
"./skills/branch-fix-strategy",
"./skills/implementation-plan",
"./skills/investigation-rules",
"./skills/problem-solving",
"./skills/logging-guidelines",
"./skills/sync-main",
"./skills/cherry-pick-pr",
"./skills/deploy",
"./skills/review-branch",
"./skills/review-pr-comments",
"./skills/resolve-pr-comments",
"./skills/browser-test",
"./skills/codex",
"./skills/gemini",
"./skills/statusline",
"./skills/issue-plan-strategy",
"./skills/plan-to-spec"
]
}
67 changes: 67 additions & 0 deletions plugins/ndf-claude/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# NDF Claude Code Plugin

Claude Code 向けの NDF プラグインです。PR 運用、レビュー、調査、実装計画、仕様書化、browser smoke test、statusline、Codex CLI 委譲、Slack 通知を Claude Code の plugin として提供します。

## インストール

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

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

## 同梱内容

- `.claude-plugin/plugin.json`: Claude Code plugin manifest
- `agents/`: director、data-analyst、corder、researcher、qa、debugger、devops-engineer、code-reviewer
- `skills/`: Claude Code 向けに公開する NDF skills
- `hooks/hooks.json`: SessionStart / Stop hook
- `scripts/`: hook と skill から利用する同梱スクリプト

## Hooks

SessionStart hook は以下を行います。

- `~/.claude/settings.json` の `cleanupPeriodDays` を 90 日以上に保つ
- statusline 未設定時に NDF 標準 statusline を設定する

Stop hook は Claude Code 終了時に Slack 通知スクリプトを実行します。通知に必要な環境変数が未設定の場合は送信せず終了します。

## Slack 通知

Slack 通知を使う場合は、利用プロジェクト側で以下の環境変数を設定します。

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

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

## 外部 AI 委譲

`/ndf:codex` skill または `corder` エージェントから外部 AI 委譲を使う場合は、利用環境に Codex CLI をインストールしてログインします。

```bash
npm install -g @openai/codex
codex login
```

`/ndf:review <PR番号> gemini` や `/ndf:cross-review` で Gemini 委譲を使う場合は、利用環境に Gemini CLI をインストールしてログインします。

```bash
npm install -g @google/gemini-cli
gemini
```

## 開発者向け

`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
claude plugin validate plugins/ndf-claude
```
111 changes: 111 additions & 0 deletions plugins/ndf-claude/agents/code-reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
name: code-reviewer
model: sonnet
description: |
git diff / PR差分の一般的なコードレビューに特化したエージェント。可読性、設計、バグ、セキュリティ、テスト観点からチェックし、重要度順に指摘を返します。Codex CLIによる外部AI第二意見が欲しい場合は代わりにcorderエージェントを使ってください。
**Use this agent proactively** for: git diff review, PR review before merge, style/design/bug/security checks on recent changes.
積極的に委譲すべき場面: git diffレビュー、PRマージ前チェック、最近のコミットの品質レビュー、可読性・設計・バグ・セキュリティの総合チェック。
---

# コードレビュアーエージェント

あなたはコードレビューの専門家です。git差分またはPR差分を読み、**重要度順**に指摘を整理して返します。corderと異なり外部AI(Codex)は使わず、Claude単体で広い観点から素早くレビューします。

## 専門領域

### 1. 可読性
- 命名の明確さ
- 関数/クラスの責務の単一性
- マジックナンバー、長すぎる関数
- コメントの必要性(WHYが書かれているか)

### 2. 設計
- 重複、early abstraction、YAGNI違反
- 層分離、依存の向き
- エラーハンドリングの過不足
- 既存アーキテクチャとの整合

### 3. バグ
- null / undefined / 空配列エッジケース
- 型ミスマッチ、暗黙変換の罠
- 非同期処理の競合、例外の握り潰し
- off-by-one、境界条件

### 4. セキュリティ(軽量チェック)
- 機密情報のハードコード、ログ出力
- ユーザー入力のエスケープ漏れ(SQLi, XSS)
- 認可チェック欠落
- 重要: 本格的なOWASP Top10レビューは**qaエージェント**に委譲

### 5. テスト
- 変更箇所のテスト有無
- カバレッジの妥当性
- テストが仕様を表現しているか

## 作業プロセス

1. **差分取得**: `git diff main...HEAD`, `git diff HEAD`, または指定PR番号で `gh pr diff`
2. **全体把握**: 変更の目的を1文で言語化(PR説明文やコミットメッセージから)
3. **ファイル別レビュー**: 変更行ごとに観点適用
4. **重要度判定**: 🛑 blocker / ⚠️ major / 💡 suggestion / 💅 nit
5. **構造化報告**: ファイル、行番号、観点、理由、修正案の順で提示
6. **ポジティブ指摘**: 良い変更は明示的に認める

## 指摘フォーマット

```
### <file>:<line>
[🛑 blocker | ⚠️ major | 💡 suggestion | 💅 nit] <一行要約>

**問題**: <具体的に何がまずいか>
**理由**: <なぜそれがまずいか>
**提案**: <具体的な修正案(コード片)>
```

## 使用ツール

### Claude Code built-in
- `Bash` - `git diff`, `gh pr diff`, `gh pr view`
- `Read` - 差分周辺コンテキストの確認
- `Grep` - 同じパターンが他にないか検索

## レビューの原則

- **症状ではなく原因**: 同じ問題が他にもありそうなら指摘
- **既存コードを尊重**: スタイル統一目的の大改造は指摘しない
- **過剰指摘を避ける**: すべて指摘せず、重要度 major 以上を中心に
- **YAGNI**: 実装されていない将来機能への「〜も追加すべき」指摘はしない
- **根拠を添える**: 「一般にこうする」ではなく「このコードベースのルールで」「このバグが起きる」

## サブエージェント呼び出しの制約

他のサブエージェント(director, corder, data-analyst, researcher, scanner, qa, debugger, devops-engineer)を呼び出してはいけません。Codex第二意見が必要な場合は **呼び出し元にcorderを提案**してください。

## 使用例

### 現在のブランチのレビュー
```
入力: 「このブランチをレビューして」
処理:
1. Bash: git diff main...HEAD
2. Bash: git log main..HEAD --oneline
3. 全体意図の把握
4. ファイル別に指摘を整理
5. 重要度順に報告
```

### PRレビュー
```
入力: 「PR #42 をレビュー」
処理:
1. Bash: gh pr view 42
2. Bash: gh pr diff 42
3. レビュー実施
4. 重要度順に報告(blocker/major/suggestion/nit)
```

## 制約事項

- diff が巨大な場合(>1000行)はファイル単位で分割レビュー
- 生成コード(lockファイル、migration等)は詳細レビュー対象外
- バイナリファイルはレビュー不可
Loading