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 .claude-plugin/marketplace.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@
{
"name": "ndf",
"source": "./plugins/ndf-claude",
"description": "Claude Code plugin (v5.0.0): 8 specialized agents and 22 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, browser automation, Docker container access, statusline, external AI delegation (Codex/Gemini), transcript retention guard, and optional Slack notifications."
"description": "Claude Code plugin (v5.0.0): 8 specialized agents and 25 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, browser automation, Docker container access, statusline, external AI delegation (Codex/Gemini), transcript retention guard, and optional Slack notifications."
},
{
"name": "mcp-playwright",
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@ skills/ → 実行可能なワークフロー

## NDF v5.0.0 の Skill 構成

Skill は 29 個で、配布は `plugins/ndf-shared/manifests/` が唯一の基準(Claude Code 22 / Codex 23 / Kiro 21)。frontmatter の書き方は `plugins/ndf-shared/skills/README.md` の規約に従い、`python3 scripts/check-skill-frontmatter.py` で検査する。利用実績と維持・統合・削除の判定は `docs/specifications/ndf-skill-inventory.md` に記録する。
Skill は 29 個で、配布は `plugins/ndf-shared/manifests/` が唯一の基準(Claude Code 25 / Codex 23 / Kiro 24)。frontmatter の書き方は `plugins/ndf-shared/skills/README.md` の規約に従い、`python3 scripts/check-skill-frontmatter.py` で検査する。利用実績と維持・統合・削除の判定は `docs/specifications/ndf-skill-inventory.md` に記録する。

v4.20.1 から統合・削除で消えたコマンド名の対応表は `ndf-policies` skill にある(v6.0.0 で削除)。

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ Claude Code / Codex / Kiro CLI向けのスキル・MCP設定を共有するた

**NDFプラグイン v5.0.0** は、同じ `ndf@ai-plugins` という名前で Claude Code / Codex / Kiro CLI へ配布されるランタイム別プラグインです。共通ソースは `plugins/ndf-shared/` に集約し、利用者が install する配布物は `plugins/ndf-claude/` / `plugins/ndf-codex/` / `plugins/ndf-kiro/` に分かれています。

- **公開Skills**: Claude Code向け core 22個、Kiro向け core 21個、Codex向け core 23個に分離。
- **公開Skills**: Claude Code向け core 25個、Kiro向け core 24個、Codex向け core 23個に分離。
- **元Skills(29個)**:
- PR/レビューワークフロー (7): pr, pr-tests, fix, review, cherry-pick-pr, deploy, merged
- 原則・ガイドライン (9): ndf-policies, implementation-plan, plan-to-spec, investigation-rules, problem-solving, logging-guidelines, markdown-writing, issue-plan-strategy, ml-model-structure
Expand DownExpand Up@@ -102,7 +102,7 @@ kiro-cli chat --agent ndf

| プラグイン名 | バージョン | 説明 | 詳細 |
|------------|----------|------|------|
| **ndf** | 5.0.0 | Claude Code / Codex / Kiro CLI 向けに runtime 別配布物を提供する NDF プラグイン。8個の専門エージェント(Claude版)、公開Skills(Claude Code向け core 22個、Kiro向け core 21個、Codex向け core 23個)、Claude SessionStart/Stopフック、Codex/Kiro向け通知・実行補助を提供。v4.0.0 で Codex MCP サーバを廃止し、`/ndf:external-ai` skill + `corder` エージェント経由の CLI 直接実行に一本化。 | [Claude](./plugins/ndf-claude/README.md) / [Codex](./plugins/ndf-codex/README.md) / [Kiro](./plugins/ndf-kiro/README.md) |
| **ndf** | 5.0.0 | Claude Code / Codex / Kiro CLI 向けに runtime 別配布物を提供する NDF プラグイン。8個の専門エージェント(Claude版)、公開Skills(Claude Code向け core 25個、Kiro向け core 24個、Codex向け core 23個)、Claude SessionStart/Stopフック、Codex/Kiro向け通知・実行補助を提供。v4.0.0 で Codex MCP サーバを廃止し、`/ndf:external-ai` skill + `corder` エージェント経由の CLI 直接実行に一本化。 | [Claude](./plugins/ndf-claude/README.md) / [Codex](./plugins/ndf-codex/README.md) / [Kiro](./plugins/ndf-kiro/README.md) |

### NDF v5.0.0 の主な変更(非互換)

Expand Down
14 changes: 7 additions & 7 deletions docs/presentations/2026-08-06-ai-plugins-intro.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/presentations/2026-08-06-ai-plugins-intro.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -73,7 +73,7 @@ NDFが何なのかは前回話したので、今日は「で、結局どのス
【0:35-1:25】
構成はシンプルです。スキルの本体は ndf-shared の1か所。ここを直すと、Claude用・Codex用・Kiro用の配布物がビルドで生成されます。
なので「Claudeでは直ってるけどCodexでは古い」が起きない。地味ですがこれが一番効いてます。
数が違うのは、ランタイムごとに意味のないスキルを外しているからです。Claudeは29、Codexは30、Kiroは28
数が違うのは、ランタイムごとに意味のないスキルを外しているからです。Claudeは25、Codexは23、Kiroは24
MCPプラグインが10個。今日は時間の都合で名前だけにします。
-->

Expand All@@ -93,7 +93,7 @@ MCPプラグインが10個。今日は時間の都合で名前だけにします

| | |
|---|---|
| **スキル 29個** | `/ndf:pr`, `/ndf:review` … スラッシュで直接呼べる |
| **スキル 25個** | `/ndf:pr`, `/ndf:review` … スラッシュで直接呼べる |
Comment thread
takemi-ohama marked this conversation as resolved.
| **エージェント 8個** | director / corder / qa / debugger / devops-engineer など |
| **フック 2種** | SessionStart(transcript保持を90日に維持)/ Stop(AI要約+Slack通知) |

Expand DownExpand Up@@ -498,11 +498,11 @@ codex plugin add ndf@ai-plugins
```

セッション内では `ndf:` 接頭辞で
**30個**のスキルが使えます。
**23個**のスキルが使えます。

<div class="small">

Claude版との差: エージェント8個とSessionStart/Stopフックは無し。代わりに Playwright 系スキル5個が入ります
Claude版との差: エージェント8個とSessionStart/Stopフックは無し。Playwright 系スキル4個は Claude 版にも入ります

</div>

Expand All@@ -518,7 +518,7 @@ bash plugins/ndf-kiro/install.sh
kiro-cli chat --agent ndf
```

`.kiro/skills/` に**20個**
`.kiro/skills/` に**23個**(配布 24 個のうち `ndf-policies` は steering へ)
`.kiro/agents/ndf.json` と
`.kiro/steering/ndf-policies.md` を生成。

Expand All@@ -534,7 +534,7 @@ kiro-cli chat --agent ndf
<!--
【12:50-13:40】
CodexとKiroです。ここは「同じものが使える」ということだけ持って帰ってください。
Codexはマーケットプレイス方式で、Claudeとほぼ同じ2コマンド。セッションに入るとndfコロン付きでスキルが並びます。実際に叩いて30個読み込まれているのを確認済みです
Codexはマーケットプレイス方式で、Claudeとほぼ同じ2コマンド。セッションに入るとndfコロン付きでスキルが並びます。実際に叩いて23個読み込まれているのを確認済みです
Kiroだけ方式が違って、リポジトリをcloneしてinstall.shを叩きます。.kiro/skills/ 以下にスキルが並んで、エージェント定義も一緒に作られます。何度実行しても壊れないので、更新したら叩き直せばいいです。
-->

Expand Down
Binary file modifieddocs/presentations/2026-08-06-ai-plugins-intro.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/presentations/diagrams/overview.mmd
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
flowchart TB
S["plugins/ndf-shared/<br/>skills 29 個<br/><i>ここだけを編集する</i>"]

S --> C["ndf-claude<br/>skills 29 + agents 8<br/>+ SessionStart/Stop hook"]
S --> X["ndf-codex<br/>skills 30 + hook"]
S --> K["ndf-kiro<br/>skills 28 + install.sh"]
S --> C["ndf-claude<br/>skills 25 + agents 8<br/>+ SessionStart/Stop hook"]
S --> X["ndf-codex<br/>skills 23 + hook"]
S --> K["ndf-kiro<br/>skills 24 + install.sh"]

C --> C2(["Claude Code"])
X --> X2(["Codex CLI"])
Expand Down
Binary file modifieddocs/presentations/images/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion plugins/ndf-claude/.claude-plugin/plugin.json
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
{
"name": "ndf",
"version": "5.0.0",
"description": "Claude Code plugin (v5.0.0): 8 specialized agents and 22 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, browser automation, Docker container access, statusline, external AI delegation (Codex/Gemini), transcript retention guard, and optional Slack notifications.",
"description": "Claude Code plugin (v5.0.0): 8 specialized agents and 25 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, browser automation, Docker container access, statusline, external AI delegation (Codex/Gemini), transcript retention guard, and optional Slack notifications.",
"author": {
"name": "takemi-ohama",
"url": "https://github.com/takemi-ohama"
Expand DownExpand Up@@ -43,7 +43,10 @@
"./skills/logging-guidelines",
"./skills/cherry-pick-pr",
"./skills/deploy",
"./skills/playwright-planning",
"./skills/playwright-authoring",
"./skills/playwright-evidence",
"./skills/playwright-kit-ops",
"./skills/external-ai",
"./skills/statusline",
"./skills/issue-plan-strategy",
Expand Down
4 changes: 2 additions & 2 deletions plugins/ndf-claude/skills/ndf-policies/SKILL.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,9 +32,9 @@ Skill の棚卸で 49 個を 29 個へ整理した。旧コマンドは存在し
| `/ndf:sync-main` | `/ndf:merged` |
| `/ndf:branch-fix-strategy` | `/ndf:cherry-pick-pr`(原則は本 Skill の「ブランチ運用の原則」) |
| `/ndf:codex` `/ndf:gemini` | `/ndf:external-ai` |
| `/ndf:playwright-test-planning` `/ndf:playwright-scenario-test` | `/ndf:playwright-planning`(Codex のみ配布) |
| `/ndf:playwright-test-planning` `/ndf:playwright-scenario-test` | `/ndf:playwright-planning` |
| `/ndf:playwright-script-creation` `/ndf:playwright-execution` `/ndf:browser-test` `/ndf:playwright-browser-connect` | `/ndf:playwright-authoring` |
| `/ndf:playwright-report` `/ndf:playwright-evidence-drive` | `/ndf:playwright-evidence`(Codex のみ配布) |
| `/ndf:playwright-report` `/ndf:playwright-evidence-drive` | `/ndf:playwright-evidence` |

移行先を用意せず削除したもの(いずれも起動実績がなく、現在のモデルの標準能力か
汎用コマンドで足りる):
Expand Down
6 changes: 3 additions & 3 deletions plugins/ndf-claude/skills/playwright-authoring/SKILL.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -245,6 +245,6 @@ Chrome DevTools MCP の利用可能な方を自動選択する。どちらも使
- `/ndf:review --branch` — 変更差分のコードレビュー
- `/ndf:pr-tests` — PR Test Plan の自動実行

> `playwright-planning` / `playwright-evidence` / `playwright-kit-ops` は Codex 公開セットにのみ同梱される。
> Claude Code / Kiro CLI のプラグインには含まれないため、必要な場合はリポジトリ
> [devbasex/ai-plugins](https://github.com/devbasex/ai-plugins) の `plugins/ndf-shared/skills/` を参照する
> `playwright-planning` / `playwright-evidence` / `playwright-kit-ops` は v5.0.0 から
> Claude Code / Codex / Kiro CLI の 3 ランタイムすべてに同梱される。工程の前段・後段が
> どのランタイムでも揃うため、上記の参照はそのまま使える
174 changes: 174 additions & 0 deletions plugins/ndf-claude/skills/playwright-evidence/SKILL.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
---
name: playwright-evidence
description: "Generate the Playwright test report and store its evidence on Google Drive. Use when producing report.md, sharing E2E results, or archiving video / trace / HAR evidence. Triggers: 'report.md', 'テスト報告書', 'エビデンスをDriveへ保管', 'trace viewer'"
allowed-tools:
- Read
- Bash(python *)
- Bash(uv *)
- Bash(pytest *)
---

# Playwright 証跡とレポート

テスト実行後に Markdown レポートを生成し、エビデンス一式を Google Drive に保管して共有可能にする。

## 前提条件

- テスト実行済みで `reports/<run-id>/` にエビデンスが存在すること (`/ndf:playwright-authoring`)
- Drive へ保管する場合のみ、`google-auth` skill で OAuth2 認証が完了していること (drive.file スコープ)。
同 skill は既定の配布セットに含まれないため、`plugins/ndf-shared/skills/google-auth/` を利用先へ
導入するか、`GOOGLE_AUTH_SCRIPTS` 環境変数で認証スクリプトの場所を指す

## レポート生成

`pytest_terminal_summary` hook で `reports/<run-id>/report.md` が自動生成される。特別な設定は不要。

```bash
./scenario-test/run.sh
# → reports/<run-id>/report.md が生成される
```

| セクション | 内容 |
|---|---|
| サマリ表 | nodeid, role, page_role, 結果, 実行時間, エラー数 |
| 失敗詳細 | FAIL/ERROR のテストごとの詳細情報 |
| body_check 違反 | PHP/SSR エラー検出の詳細 (URL, パターン, スニペット) |
| エビデンスリンク | video, trace, HAR, screenshot へのパス |

`scenario.config.yaml` の `report` セクションで表題等を制御する。

```yaml
report:
title: "シナリオ E2E テスト 実施報告書"
test_plan_link: "./test-plan.md"
phase_labels: {}
```

## アップロード対象とセキュリティ

| ファイル | 種別 | セキュリティ考慮 |
|---|---|---|
| `video.mp4` | テスト動画 | 画面に表示された情報が含まれる |
| `trace.zip` | Playwright Trace | DOM snapshot + 操作ログ + Cookie/localStorage |
| `request.har` | ネットワーク通信ログ | HTTP request/response body を含む場合あり |
| `report.md` | テスト結果サマリ | URL + テスト名程度 |
| `body_check.jsonl` | PHP/SSR エラー詳細 | ソースコード片を含む場合あり |
| `screenshot-*.png` | 失敗時スクリーンショット | 画面に表示された情報 |

**セキュリティ注意**: trace.zip / HAR には認証情報 (Cookie, localStorage, Basic Auth) や
入力内容が含まれる可能性がある。アップロード先は **private folder** + **信頼できる共有相手** に限定すること。

## 方法 1: テスト実行時の自動アップロード

`--pwk-drive-folder` を指定すると `pytest_sessionfinish` hook で自動アップロードされる。

```bash
./scenario-test/run.sh --pwk-drive-folder=<FOLDER_ID>
```

`report.md` と各テストの `trace.zip` / `*.har` / `*.mp4` / `body_check.jsonl` が、
すべて非公開 (private) でアップロードされる。

## 方法 2: 手動アップロード (scripts)

スクリプトは `playwright-kit-ops/scripts/` に配置されている。

```bash
cd scenario-test

# 単一ファイル
uv run python scripts/upload_evidence.py reports/<run-id>/test_login/trace.zip \
--kind trace --parent-folder-id <FOLDER_ID>

# ディレクトリ一括 (構造を保ったまま Drive にミラー。サブフォルダも再帰作成)
uv run python scripts/gdrive_upload_dir.py --local reports/<run-id>/ --parent <FOLDER_ID>

# report.md → Google Docs 変換 (表・リスト・見出しを Docs ネイティブ形式へ)
uv run python scripts/upload_md_as_gdoc.py --md reports/<run-id>/report.md \
--parent <FOLDER_ID> --name "E2E テスト報告書"

# Google Docs にエビデンスの Drive リンクを埋め込み
uv run python scripts/build_gdoc_with_drive_links.py --md reports/<run-id>/report.md \
--folder <DRIVE_FOLDER_ID> --run-id <run-id> --name "E2E テスト報告書"
```

`upload_evidence.py` の主なオプション:

- `--kind {trace|har|video|any}` — ファイル種別 (拡張子から自動判定も可)
- `--parent-folder-id <FOLDER_ID>` — Drive 上のアップロード先フォルダ ID
- `--public` — anyone/read 権限を付与 (trace viewer URL 生成に必要)

`build_gdoc_with_drive_links.py` は、Drive 上の `<run-id>` フォルダのファイル一覧を取得し、
`report.md` 内の相対パスリンク (`./TC-XX/trace.zip`) を Drive URL に書き換えてから Docs 化する。
チームメンバーは Docs 上で report を読みながらエビデンスへのリンクをクリックできる。

## 推奨ワークフロー

```
[テスト実行] ./scenario-test/run.sh --pwk-overlay
[ローカル確認] reports/<run-id>/report.md で結果確認
[Drive 一括保管] gdrive_upload_dir.py --local reports/<run-id>/ --parent <ID>
[Docs 化 + リンク埋め込み] build_gdoc_with_drive_links.py ...
[共有] Docs URL をチーム (Slack / Google Chat) に共有
```

ワンコマンドで済ませる場合: `./scenario-test/run.sh --pwk-drive-folder=<FOLDER_ID> --pwk-overlay`

### Drive フォルダ構成の推奨

```
E2E テスト証跡/ ← 共有ドライブ or チームフォルダ
├── <プロジェクト名>/
│ ├── 20260526-134500/ ← run-id (自動生成)
│ │ ├── report.md
│ │ └── test_login/
│ │ ├── video.mp4
│ │ ├── trace.zip
│ │ └── request.har
│ └── report (Google Docs) ← build_gdoc_with_drive_links で生成
```

## Trace Viewer 連携

`--public` でアップロードした trace.zip は Playwright Trace Viewer で直接開ける。

```bash
uv run python scripts/upload_evidence.py reports/.../trace.zip \
--kind trace --public --parent-folder-id <FOLDER_ID>
# → playwright_trace_viewer: https://trace.playwright.dev/?trace=...
```

この URL を共有すると、インストール不要でブラウザ上から trace を再生できる。

**注意**: `--public` は anyone/read を付与するため、trace 内の機密情報 (Cookie, 入力値) が
公開される。社内限定の場合は private のまま `playwright show-trace` をローカルで使うこと。

## 環境変数

| 変数 | 用途 | 例 |
|---|---|---|
| `GOOGLE_AUTH_SCRIPTS` | google-auth skill の scripts/ パス | `~/.claude/skills/google-auth/scripts` |
| `PWK_DRIVE_FOLDER` | デフォルトの Drive アップロード先 (将来対応予定) | `1ABCxyz...` |

## トラブルシュート

| 症状 | 原因 | 対策 |
|---|---|---|
| `Google Drive 連携には optional skill google-auth が必要です` | `google-auth` 未導入 | `GOOGLE_AUTH_SCRIPTS` を `google-auth/scripts` へ設定するか、同 skill を利用先へ導入する |
| `HttpError 403: insufficient permissions` | drive.file スコープ不足 | `google-auth` skill で再認証 (`drive.file` スコープ指定) |
| `HttpError 404: File not found` | FOLDER_ID が間違っている / アクセス権なし | Drive で共有フォルダ ID を確認 |
| `resumable upload failed` | ファイルサイズが大きい / ネットワーク不安定 | 再試行。動画は mp4 (H.264) で容量を抑える |
| pytest 後に自動アップロードされない | `--pwk-drive-folder` 未指定 | CLI 引数を確認 |

## 関連 Skill

- `/ndf:playwright-authoring` — スクリプト作成と実行 (前段)
- `/ndf:playwright-planning` — テスト計画
- `/ndf:playwright-kit-ops` — 実行環境の運用 (アップロードスクリプトの配置元)
- `google-auth` / `google-drive` — Google API の認証と Drive 操作。どちらも既定の配布セットには
含まれない(`plugins/ndf-shared/skills/` にはあるが manifest には載せていない)。Drive 連携を
使う場合だけ利用先へ導入する
11 changes: 11 additions & 0 deletions plugins/ndf-claude/skills/playwright-kit-ops/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
.venv/
__pycache__/
*.pyc
*.egg-info/

# pytest 実行時に生成される NDF report 出力 (run-id 別)
reports/
.pytest_cache/

# uv lock は共有可
!uv.lock
Loading
Loading