Writing Plans について
Writing Plans は、プロジェクトの背景をほとんど知らないエンジニア向けに、実装計画を細かな作業単位で作成するスキルです。対象ファイルやコマンド、テスト、頻繁なコミットを明記します。
主な機能
- 01作業を 2〜5 分の単位に分割
- 02ファイル、テスト、コマンドを指定
- 03コードと期待結果を記載
- 04計画を docs/plans に保存
活用シーン
- 01不慣れなコードベースの機能計画
- 02テスト駆動の実装手順の準備
- 03後続作業向けの計画引き継ぎ
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ obra/ superpowers-skills --skill writing-plansインストール後、Claude Code で/writing-plansを入力して読み込まれたか確認します。
詳細
計画の作成
概要
コードベースについての予備知識がなく、好みも怪しいエンジニアを想定して、包括的な実装計画を作成します。各タスクで変更するファイル、コード、テスト、確認が必要なドキュメント、テスト方法など、必要な情報をすべて記載します。計画全体を細かなタスクに分けてください。DRY。YAGNI。TDD。こまめにコミットします。
エンジニアは熟練した開発者ですが、ツールセットや問題領域についてはほとんど知らず、優れたテスト設計にもあまり詳しくないものと想定してください。
最初に宣言する内容:「計画作成スキルを使用して、実装計画を作成します。」
コンテキスト: ブレインストーミングスキルで作成した専用のワークツリー内で実行してください。
計画の保存先: docs/plans/YYYY-MM-DD-<feature-name>.md
細かなタスクの粒度
各ステップは1つのアクション(2~5分)にします:
- 「失敗するテストを書く」 - ステップ
- 「失敗することを確認するために実行する」 - ステップ
- 「テストを通すために最小限のコードを実装する」 - ステップ
- 「テストを実行し、合格することを確認する」 - ステップ
- 「コミットする」 - ステップ
計画ドキュメントのヘッダー
すべての計画は、必ず次のヘッダーから始めてください:
# [Feature Name] Implementation Plan
> **For Claude:** Use `${SUPERPOWERS_SKILLS_ROOT}/skills/collaboration/executing-plans/SKILL.md` to implement this plan task-by-task.
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
---
タスクの構成
### Task N: [Component Name]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
**Step 1: Write the failing test**
```python
def test_specific_behavior():
result = function(input)
assert result == expected
ステップ2:テストを実行して失敗することを確認する
実行: pytest tests/path/test.py::test_name -v
期待結果: 「function not defined」というメッセージで失敗
ステップ3:最小限の実装を書く
def function(input):
return expected
ステップ4:テストを実行して合格することを確認する
実行: pytest tests/path/test.py::test_name -v
期待結果: 合格
ステップ5:コミットする
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
## Remember
- Exact file paths always
- Complete code in plan (not "add validation")
- Exact commands with expected output
- Reference relevant skills with @ syntax
- DRY, YAGNI, TDD, frequent commits
## Execution Handoff
After saving the plan, offer execution choice:
**"Plan complete and saved to `docs/plans/<filename>.md`. Two execution options:**
**1. Subagent-Driven (this session)** - I dispatch fresh subagent per task, review between tasks, fast iteration
**2. Parallel Session (separate)** - Open new session with executing-plans, batch execution with checkpoints
**Which approach?"**
**If Subagent-Driven chosen:**
- Use skills/collaboration/subagent-driven-development
- Stay in this session
- Fresh subagent per task + code review
**If Parallel Session chosen:**
- Guide them to open new session in worktree
- New session uses skills/collaboration/executing-plans