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 (v8.2.0): 8 specialized agents and 27 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, Docker container access, statusline, external AI delegation (Codex/Gemini), transcript retention guard, and optional Slack notifications."
"description": "Claude Code plugin (v8.3.0): 8 specialized agents and 27 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, Docker container access, statusline, external AI delegation (Codex/Gemini), transcript retention guard, and optional Slack notifications."
},
{
"name": "playwright-kit",
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -77,7 +77,7 @@ ai-plugins/

## NDFプラグインについて

**NDFプラグイン**は、このマーケットプレイスの主要プラグインです(v8.2.0)。plugin 名は全ランタイムで `ndf` を維持し、配布物は `plugins/ndf-claude` / `plugins/ndf-codex` / `plugins/ndf-kiro` に分離しています。
**NDFプラグイン**は、このマーケットプレイスの主要プラグインです(v8.3.0)。plugin 名は全ランタイムで `ndf` を維持し、配布物は `plugins/ndf-claude` / `plugins/ndf-codex` / `plugins/ndf-kiro` に分離しています。
- 共通編集元は `plugins/ndf-shared/`
- Claude Code版は 8個の専門サブエージェント、公開Skills、SessionStart/Stopフックを提供
- Codex版は Codex向け公開Skillsと任意Slack通知hookを提供
Expand Down
7 changes: 5 additions & 2 deletions CLAUDE.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,7 @@ skills/ → 実行可能なワークフロー

詳細は `docs/specifications/ndf-knowledge-and-kiro.md` を参照。

## NDF v8.2.0 の Skill 構成
## NDF v8.3.0 の Skill 構成

Skill は 31 個で、配布は `plugins/ndf-shared/manifests/` が唯一の基準(Claude Code 27 / Codex 25 / Kiro 26)。ブラウザ自動テストの 4 個は `playwright-kit` プラグインへ分離した(`plugins/playwright-kit-shared/`)。frontmatter の書き方は `plugins/ndf-shared/skills/README.md` の規約に従い、`python3 scripts/check-skill-frontmatter.py` で検査する。利用実績と維持・統合・削除の判定は `docs/specifications/ndf-skill-inventory.md` に記録する。

Expand All@@ -43,6 +43,8 @@ v8.1.0 で `cross-refactoring` を追加した。あわせて収束ループの

v8.2.0 で `cross-refactoring` の実機検証(PR #118)で見つかった 9 件の不具合を直した。`cross-review` と共通層は変更していない。詳細は `issues/issue-113-cross-refactoring-defect-fixes.md`。

v8.3.0 で `cross-refactoring` の公開の責務を進行側へ一本化した(**破壊的**)。実装担当は push せず、進行側が検証を通してから push する。あわせて `--sync-command` を新設し、適用で失敗した項目を対象外へ記録するようにした。詳細は `issues/issue-113-cross-refactoring-push-ownership.md`。

v6.0.0 の対応表(`review` → `pr-review`)は予告どおり削除済み。v6.0.0 以前から移行する場合は v6.1.0 の `ndf-policies` を参照する。

## cross-refactoring
Expand All@@ -58,7 +60,8 @@ v6.0.0 の対応表(`review` → `pr-review`)は予告どおり削除済み
- ホストと同じランタイムが適用担当になる場合も、サブエージェントではなく **CLI プロセス**として起動する
- モデルを比べるなら `--model kiro=<name>` を必ず指定する(既定 `auto` は実際に動いたモデルを取得できない)
- 収束しない改善項目は **項目単位で取り消す**。合意済みの項目は PR に残る。ただし同一ファイルの隣接行を触る項目どうしは git だけでは分離できないため、そのラウンドは全件取り消しへ退避する
- 生成物・配布物の同期は **進行側の責務**。実装担当にはさせない(範囲外の変更になる)
- 生成物・配布物の同期は **進行側の責務**。実装担当にはさせない(範囲外の変更になる)。同期の手順は `--sync-command "bash scripts/build-runtime-plugins.sh"` のように渡す
- 公開するのは **進行側だけ**。実装担当は push しない。進行側が検証を通した後に push するので、未検証の変更が公開されない
- `init` が参加 CLI の認証状態を確認する。誤検知するときは `NDF_SKIP_AUTH_CHECK=1`

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

このマーケットプレイスは、チーム全体でAI開発ツール(Claude Code / Codex / Kiro CLI)の導入を加速するための事前設定されたプラグインを提供します。

**NDFプラグイン v8.2.0** は、同じ `ndf@ai-plugins` という名前で Claude Code / Codex / Kiro CLI へ配布されるランタイム別プラグインです。共通ソースは `plugins/ndf-shared/` に集約し、利用者が install する配布物は `plugins/ndf-claude/` / `plugins/ndf-codex/` / `plugins/ndf-kiro/` に分かれています。
**NDFプラグイン v8.3.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 27個、Kiro向け core 26個、Codex向け core 25個に分離。
- **元Skills(30個)**:
Expand DownExpand Up@@ -102,9 +102,31 @@ kiro-cli chat --agent ndf

| プラグイン名 | バージョン | 説明 | 詳細 |
|------------|----------|------|------|
| **ndf** | 8.2.0 | Claude Code / Codex / Kiro CLI 向けに runtime 別配布物を提供する NDF プラグイン。8個の専門エージェント(Claude版)、公開Skills(Claude Code向け core 27個、Kiro向け core 26個、Codex向け core 25個)、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** | 8.3.0 | Claude Code / Codex / Kiro CLI 向けに runtime 別配布物を提供する NDF プラグイン。8個の専門エージェント(Claude版)、公開Skills(Claude Code向け core 27個、Kiro向け core 26個、Codex向け core 25個)、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) |
| **playwright-kit** | 1.0.0 | Playwright による E2E テストの計画・実装・証跡管理を提供するプラグイン。ページ役割からのテスト計画、動画 / trace 付きスクリプト実装、レポート生成と Drive 保管、playwright_kit ランタイム(init、a11y / CWV スキャン)の 4 Skill。NDF v7.0.0 で分離。 | [Claude](./plugins/playwright-kit-claude/README.md) |

### NDF v8.3.0 の主な変更

**`/ndf:cross-refactoring` の公開(push)の責務を進行側へ一本化しました。**
生成物の同期を pre-push で検査するリポジトリでは、「実装担当は編集元だけを触る」という
範囲ルールと衝突して、あらゆる push が落ちる状態でした。

| 直したこと | 変更 |
| --- | --- |
| 実装担当の push が範囲ルールと衝突する | **実装担当は push しない**。公開するのは進行側だけで、検証を通した後に行う |
| 生成物の同期を進行側が実行する手段がない | **`--sync-command` を新設**。push の直前に進行側が実行し、差分はどの改善項目にも属さないコミットとして積む |
| 適用に失敗した項目が次ラウンドで再採用される | 項目別の失敗とラウンド全体の取り消しの両方から対象外(`deferred_items`)へ記録する |

```bash
/ndf:cross-refactoring 130 --scope src/services \
--sync-command "bash scripts/build-runtime-plugins.sh" \
--baseline-test "pytest -q"
```

**互換性(破壊的)**: 適用・修正のプロンプトから push の指示が外れました。`merge-apply` /
`merge-fix` が成功・失敗のどちらでも検証後に push します。生成物を持つリポジトリでは
`--sync-command` を指定してください。

### NDF v8.2.0 の主な変更

**`/ndf:cross-refactoring` を実機検証で見つかった 9 件の不具合について修正しました。**
Expand Down
126 changes: 126 additions & 0 deletions issues/issue-113-cross-refactoring-re-retrial-handoff.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
# cross-refactoring 再々検証の引継ぎ

`/ndf:cross-refactoring` の**未到達 2 項目**を通すための作業メモ。
ここには**次に何をどの順で行うか**だけを書く。経緯と実測値は次の 2 つにある。

- [issue-113-cross-refactoring-trial-report.md](issue-113-cross-refactoring-trial-report.md) — 1 回目の実機検証(不具合 1〜9 を発見)
- [issue-113-cross-refactoring-retrial.md](issue-113-cross-refactoring-retrial.md) — 2 回目(再検証。不具合 10・11 を発見)

## 現在地

| 回 | PR | 到達点 | 見つけた不具合 |
| --- | --- | --- | --- |
| 1 回目 | #118 | 適用結果の検証で破綻 | 9 件 |
| 2 回目 | #120(CLOSED) | レビュー・判定・輪番・集計まで到達 | 2 件 |
| **3 回目** | **未着手** | **指摘の修正と再レビューを通す** | — |

修正はすべて main に入っている(#119 / #121)。

```
6fce71f Docs: cross-refactoring 修正後の再検証レポートを残す (#122)
a415242 Fix: 公開の責務を進行側へ一本化し、適用失敗の項目を対象外へ記録する (#121)
26eb4eb Fix: cross-refactoring の実機検証で見つかった不具合 9 件を修正(v8.2.0) (#119)
```

## 通したい 2 項目

これだけが**一度も実行されていない**。

- **指摘の修正と再レビューの繰り返し**(`merge-fix` → 再 `review` → 再 `judge-review`)
- **上限到達時の項目単位の見送り**(`should-abandon` → `abandon-items`)

どちらも**レビューで指摘が出ること**が前提である。2 回目はラウンド 1 で
両レビュー担当とも指摘 0 件だったため到達できなかった。

## 先に決めること

指摘が出る確率をどう上げるか。**何もしないと 3 回目も到達しない可能性がある。**

| 案 | 内容 | 見込み |
| --- | --- | --- |
| A | 前回と同条件で素直に回す | 自然な結果が得られるが、また 0 件の可能性がある |
| B | `--max-fix-rounds 1` にする | 指摘が出れば**見送りへ早く到達**する。修正の繰り返しは 1 回しか見られない |
| C | `--max-items-per-round` を上げる | 採用件数が増え、指摘が出る確率が上がる。1 ラウンドが長くなる |
| D | 範囲を広げて質の粗い箇所を含める | 指摘は出やすいが、検証の趣旨から外れる |

B と C は併用できる。**D は最後の手段**とする。

## 実行手順

### 1. 対象の Draft PR を作る

`/ndf:cross-refactoring` は**既存の Draft PR** を対象に動く。main から新しい
ブランチを切り、種となるコミットを 1 つ置いて Draft PR を作る(2 回目は
実行条件を書いた md を置いた)。

**2 回目の PR(#120)は再利用しない。** 不具合 10 に起因する失敗ラウンドが
履歴に残っているため。

### 2. 実行

```bash
# 配布物はリポジトリ内のものを使う。**プラグインキャッシュは古い**
export PLUGIN_ROOT=/work/ai-plugins/plugins/ndf-claude

/ndf:cross-refactoring <PR番号> \
--scope plugins/ndf-shared/skills/cross-refactoring/scripts \
plugins/ndf-shared/skills/cross-refactoring/tests \
plugins/ndf-shared/skills/cross-review/scripts/lib \
plugins/ndf-shared/skills/cross-review/tests \
--sync-command "bash scripts/build-runtime-plugins.sh" \
--baseline-test "uv run --with pytest python -m pytest \
plugins/ndf-shared/skills/cross-refactoring/tests \
plugins/ndf-shared/skills/cross-review/tests -q" \
--max-outer-rounds 3
```

## 実行上の落とし穴(実測で踏んだもの)

| 落とし穴 | 対処 |
| --- | --- |
| **プラグインキャッシュが古い** | `~/.claude/plugins/cache/.../ndf/8.1.0` には修正が入っていない。`PLUGIN_ROOT` をリポジトリ内の `plugins/ndf-claude` へ向ける |
| **`--sync-command` を省くと push が全て落ちる** | このリポジトリは `.githooks/pre-push` で生成物の同期を検査する。必ず指定する |
| **`--scope` にテストの置き場所を含め忘れる** | 範囲内の各ソースに対応するテスト置き場を**すべて**入れる。2 回目は `cross-review/tests` を忘れて 1 項目落とした |
| **Bash ツールの上限は 10 分** | 適用フェーズは 15〜30 分かかる。監視は**背景実行**にする(`run_in_background`) |
| **`monitor.py` に実行権限がない** | `uv run --script "$LIB/monitor.py" ...` で起動する |
| **進行を駆動する作業ディレクトリが対象ブランチを掴んでいると失敗する** | 同じブランチを 2 か所へ展開できない。PR を作ったら `git checkout main` してから実行する |
| **`monitor.py` の `elapsed` は監視開始からの秒数** | CLI の実起動時間ではない。実所要は結果ファイルの `elapsed_seconds` を見る |

## 所要時間の目安(2 回目の実測)

| フェーズ | 実測 |
| --- | --- |
| 初期化(認証確認 + 着手前テスト) | 約 40 秒 |
| 提案(3 CLI 並列) | 135〜195 秒 |
| 適用(codex / 11 コミット) | 約 12 分 |
| 適用(kiro / 12 コミット) | 約 12 分(監視は 30 分待った) |
| 適用結果の検証 | コミット数 × 約 30 秒(テストを実走するため) |
| レビュー(2 CLI 並列) | 約 3.5 分 |

**1 ラウンドで 30〜45 分**を見込む。

## 確認すること

未到達の 2 項目に加えて、#121 で入れた経路を実機で見る。

| 対象 | 何が観測できれば通ったと言えるか |
| --- | --- |
| 指摘の修正と再レビュー | `merge-fix` が修正コミットを取り込み、再レビューで判定が変わる |
| 項目単位の見送り | `should-abandon` が上限到達を返し、`abandon-items` が未解決の項目だけ取り消す |
| 公開の責務(不具合 10) | 実装担当が push せず、`merge-apply` の後に進行側が push する |
| 生成物の同期 | `Chore: 生成物を同期する(cross-refactoring 進行側)` が push の直前に積まれる |
| 対象外への記録(不具合 11) | 適用で失敗した項目が次ラウンドの提案で**再採用されない** |

## 別件で残っているタスク

再々検証とは独立に、次の 1 つが未対応である。
(バージョンは **v8.3.0** へ更新済み。#121 の破壊的変更を反映した)

### cross-review が投稿の成否を突き合わせていない

`cross-review` は「AI 自身が `gh api` で投稿する」設計だが、**投稿が失敗しても
結果ファイルの申告だけで判定が進む**。#121 のラウンド 3 で実際に起きた
(`comments_count=2` の申告に対し、GitHub 上にスレッドが 1 つも作られなかった)。
今回は payload ファイルから内容を拾えたが、気付かなければ指摘を取りこぼす。

`state.py read-result` が GitHub 側のスレッド数と突き合わせるべきである。
4 changes: 2 additions & 2 deletions plugins/ndf-claude/.claude-plugin/plugin.json
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
{
"name": "ndf",
"version": "8.2.0",
"description": "Claude Code plugin (v8.2.0): 8 specialized agents and 27 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, Docker container access, statusline, external AI delegation (Codex/Gemini), transcript retention guard, and optional Slack notifications.",
"version": "8.3.0",
"description": "Claude Code plugin (v8.3.0): 8 specialized agents and 27 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, 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 Down
4 changes: 2 additions & 2 deletions plugins/ndf-codex/.codex-plugin/plugin.json
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
{
"name": "ndf",
"version": "8.2.0",
"description": "Codex plugin (v8.2.0): 25 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, Docker container access, external AI delegation (Codex/Gemini), and optional Slack completion notifications.",
"version": "8.3.0",
"description": "Codex plugin (v8.3.0): 25 focused NDF skills for PR/review workflows, cross-review, implementation planning, plan-to-spec, Docker container access, external AI delegation (Codex/Gemini), and optional Slack completion notifications.",
"skills": "./skills/",
"hooks": "./hooks/hooks.json"
}
6 changes: 3 additions & 3 deletions plugins/ndf-codex/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ Claude Code 専用の agents、statusline 自動設定、transcript retention

```text
# 動く: 実体パスを示して読ませる
~/.codex/plugins/cache/ai-plugins/ndf/8.2.0/skills/deploy/SKILL.md を読んで、その手順どおりに qa/staging へ deploy PR を作成してください。
~/.codex/plugins/cache/ai-plugins/ndf/8.3.0/skills/deploy/SKILL.md を読んで、その手順どおりに qa/staging へ deploy PR を作成してください。

# 動かない: 明示起動 ($ は展開されない)
$deploy qa/staging
Expand All@@ -69,14 +69,14 @@ marketplace 経由でインストールした場合、Skill の実体は **ワ
```text
$CODEX_HOME/plugins/cache/<marketplace>/<plugin>/<version>/skills/<skill>/SKILL.md
# 既定 ($CODEX_HOME=~/.codex) の例:
# ~/.codex/plugins/cache/ai-plugins/ndf/8.2.0/skills/deploy/SKILL.md
# ~/.codex/plugins/cache/ai-plugins/ndf/8.3.0/skills/deploy/SKILL.md
```

そのため「`deploy` の SKILL.md を探して読んで」のような曖昧な依頼は、Codex のファイル探索がワークスペース内に限られる状況では失敗しえます。**抑止した Skill は `$<skill 名>` が展開されない**ので、`codex plugin list` で実体パスを確認し、絶対パスを渡してください。

```bash
codex plugin list | grep 'ndf@ai-plugins'
# => ndf@ai-plugins installed, enabled 8.2.0 <path>
# => ndf@ai-plugins installed, enabled 8.3.0 <path>
```

抑止していない Skill(`markdown-writing` など)はキャッシュ配下でも `$<skill 名>` で解決するため、そちらは `$` 起動が使えます。
Expand Down
2 changes: 1 addition & 1 deletion plugins/ndf-kiro/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@ cat plugins/ndf-kiro/VERSION

# 導入済みプロジェクトの版数
python3 -c "import json;print(json.load(open('.kiro/agents/ndf.json'))['description'])"
# => NDF統合開発エージェント(Kiro CLI用 / v8.2.0)
# => NDF統合開発エージェント(Kiro CLI用 / v8.3.0)
```

`install.sh` は実行時にも `NDF バージョン: <版数>` を表示する。
Expand Down
2 changes: 1 addition & 1 deletion plugins/ndf-kiro/VERSION
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
8.2.0
8.3.0
Loading