← ClaudeAtlas

plan-to-speclisted

Rewrite a finished implementation plan into a permanent specification under docs/. Use when implementation is complete(planを仕様書にして・確定仕様書に移動).
devbasex/ai-plugins · ★ 1 · Testing & QA · score 68
Install: claude install-skill devbasex/ai-plugins
# Plan to Spec 実装完了後の plan を、開発履歴ではなく **現在のコードと一致する確定仕様書**として保存する。plan は作業中の意思決定記録であり、完了後は読者が実装経緯を追わなくても仕様を理解できる形に変換する。 ## 基本方針 - plan の内容をそのまま移動せず、最終実装の as-is 仕様として書き直す - 開発中の履歴、TODO、PR 分割、作業チェックリスト、途中変更、未採用案は削除する - 仕様書の置き場は既存 docs 構造に合わせ、なければ `docs/specifications/` を作成する - 仕様書はコードと照合し、実装と矛盾する記述を残さない - 完了報告は本 skill のテンプレートに従う ## 入力 `$ARGUMENTS` 引数は plan ファイルパス、issue 番号、PR 番号、または関連キーワードを受け付ける。引数がない場合は、現在ブランチの差分、`issues/`、`docs/`、`git log` から直近の plan を特定する。 ## 手順 ### 1. 対象 plan と実装範囲を特定する 1. 引数がファイルパスならその plan を読む 2. 引数が PR / issue 番号なら `gh pr view` / `gh issue view` とローカルファイル検索で関連 plan を探す 3. 引数がない場合は以下を確認する: - `git status --short` - `git branch --show-current` - `git log --oneline --decorate -20` - `find issues docs -maxdepth 3 -type f \( -iname '*plan*' -o -iname '*PLAN*' \)` 4. plan が複数候補ある場合は、現在ブランチ・PR・変更ファイルと最も関連が強いものを選ぶ。不明ならユーザーに確認する 5. 実装範囲を特定する: - PR がある場合: `gh pr diff` / `gh pr view --json files,title,body` - ローカル変更の場合: `git diff --stat` / `git diff` - merge 済みの場合: 関連コミット範囲の `git show` / `git diff` ### 2. 仕様書の配置先を決める 既存 docs の分類に合わせて配置する。優先順位: 1. 同種の仕様書がある既存ディレクトリ (`docs/specifications/`, `docs/specs/`, `docs/features/`, `docs/architecture/`, `docs/modules/` など) 2. 対象機能に対応する既存 docs 配下 3. 適切な場所がなければ `docs/specifications/` を作成 ファイル名は英数字・ハイフン中心にし、内容が分かる名前にする。例: ```text docs/specifications/auth-session-management.md docs/features/review-workflow.md docs/architecture/plugin-skill-loading.md ``` 移動は履歴が追えるように、可能なら `git mv <plan> <spec>` を