From apd
Migrates an existing APD project to the current living-document layout. Folds Patch files into their Spec, consolidates per-file Decision Records into a single decisions.md, flattens any old subdirectories, and updates frontmatter. Use when the user asks to migrate APD, upgrade APD, run /apd:migrate, or has just updated the APD plugin and needs to convert their `docs/apd/`.
How this skill is triggered — by the user, by Claude, or both
Slash command
/apd:migrate [--dry-run][--dry-run]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
このスキルは **AI 判断ベースで** 既存 APD プロジェクトを現行モデルに移行する。現行モデルの要点:
このスキルは AI 判断ベースで 既存 APD プロジェクトを現行モデルに移行する。現行モデルの要点:
design.md / decisions.md / spec-{feature}.mddecisions.md に集約検証は scripts/verify-migration.sh で行う(プラグイン同梱)。
プロジェクトの現状を見て、どちらか(or 両方)を適用する:
docs/apd/{design,specs,decisions,cycles,previews}/ があるdocs/apd/spec-*-patch-*.md や decision-*.md が並んでいるdocs/apd/ を読んで現状を把握するscripts/verify-migration.sh を実行して検証するdocs/apd/ が存在することdesign.md あり、spec-*-patch-*.md と decision-*.md と旧サブディレクトリがいずれも無い)なら "already migrated" と返して終了docs/apd/ 配下を Glob + Read で全把握する:
design/, specs/, decisions/, cycles/, previews/)の有無spec-{x}-patch-{NNN}.md(フラット Patch ファイル)一覧と、対応する親 spec-{x}.mddecision-{NNN}.md(per-file Decision)一覧preview-*/ 一覧以下のような形式でプランを提示し、合意を得る:
## 移行プラン
### バックアップ
- `docs/apd/` を `docs/apd.backup-{timestamp}/` に複製
### サブディレクトリの flat 化(0.x からの場合)
- `design/product-design.md` → `design.md`
- `specs/{name}.v{N}.md` → `spec-{name}.md`(最新 version)
- `decisions/D-{NNN}.md` → `decisions.md` に集約
- `previews/C-{NNN}/` → `preview-C-{NNN}/`
- `cycles/` → backup のみ
### Patch ファイルの畳み込み
- `spec-auth-patch-001.md` の内容を `spec-auth.md` に反映し version を上げる
- 反映後 patch ファイルを削除
- 反映内容の要約をコミットメッセージに残す
### Decision の集約
- `decision-001.md` … `decision-NNN.md` を `decisions.md` に 1 ファイルへ統合
- 各ファイルを decisions.md のセクションに変換(新しい番号を上に)
- 元の per-file は削除
### frontmatter 更新
- 全 Spec: `cycle_ref` → `issue_ref`(実 issue があれば番号、なければ null)
- Patch 由来: `amendment_id` / `patch_id` フィールドは畳み込みで消える
### 手動レビューが必要なもの
- {命名規約に合わないファイル}
- CLAUDE.md の旧スキル言及(`/apd:build` 等)
進めてよいですか? (yes / dry-run / abort)
--dry-run 引数があれば、プラン提示と「実行した場合に何が起こるか」だけ出力する(fs 操作なし)。
ユーザー合意後、Bash + Edit で順番に実行する。各ステップ後に何をしたかを会話に surface する:
cp -R docs/apd docs/apd.backup-{timestamp}(絶対消さない)git mv でファイル移動version 加算 → patch ファイルを git rmdecision-*.md を Read → decisions.md に追記(番号降順)→ 元ファイルを git rmcycle_ref → issue_ref 等Patch 畳み込みの判断: patch の内容が親 Spec のどの AC に対応するかを読み解いて、該当 AC を編集 or 新 AC として追加する。単純な追記では二重定義になるので、文脈を見て統合する。
bash "${CLAUDE_PLUGIN_ROOT}/scripts/verify-migration.sh"
FAIL があれば修正する。
完了したらレポートを出す:
## 移行完了
### Patch 畳み込み (N 件)
- spec-auth-patch-001.md → spec-auth.md (version 1→2)
### Decision 集約 (N 件 → decisions.md)
- decision-001..003.md → decisions.md
### flat 化 (N 件) ※0.x からの場合
- ...
### frontmatter 更新 (N ファイル)
- ...
### 手動レビュー必要 (N 件)
- ...
### バックアップ
- docs/apd.backup-{timestamp}/
### 次のステップ
1. /apd:init で .claude/rules/apd/ を最新版に更新
2. 手動レビュー項目を対応
3. git add -A && git commit -m "chore: migrate to APD living-document model"
4. 動作確認後、別 PR で backup ディレクトリを削除
.claude/rules/apd/ の更新 — /apd:init の責務rm -rf docs/apd
mv docs/apd.backup-{timestamp} docs/apd
git checkout -- .
npx claudepluginhub koyakimu/autopilot-development-boilerplate --plugin apdProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.