📋write-spec
- プラグイン
- Product Management
- 引数
- <feature or problem statement>
- ソース
- GitHub で見る ↗
説明
問題提起や機能アイデアをもとに、機能仕様書またはPRD(製品要求仕様書)を作成します。 次のような場合に使用: 漠然としたアイデアやユーザーリクエストを構造化されたドキュメントに落とし込みたいとき、目標と非目標を定めて機能のスコープを明確にしたいとき、成功指標や受け入れ基準を定義したいとき、または大きな要求をフェーズに分けた仕様書に分解したいとき。
原文を表示
Write a feature spec or PRD from a problem statement or feature idea. Use when turning a vague idea or user request into a structured document, scoping a feature with goals and non-goals, defining success metrics and acceptance criteria, or breaking a big ask into a phased spec.
ユースケース
- ✓漠然としたアイデアを構造化したい
- ✓目標と非目標のスコープを明確にしたい
- ✓成功指標や受け入れ基準を定義したい
- ✓大きな要求をフェーズに分解したい
本文(日本語訳)
スペックの作成
見慣れないプレースホルダーが含まれている場合、またはどのツールが接続されているか確認する必要がある場合は、CONNECTORS.md を参照してください。
機能仕様書またはプロダクト要件ドキュメント(PRD)を作成します。
使い方
/write-spec $ARGUMENTS
ワークフロー
1. 機能の把握
ユーザーがどの機能の仕様を作成したいかを確認します。以下のいずれでも受け付けます:
- 機能名(例:「SSOサポート」)
- 課題の記述(例:「エンタープライズ顧客が集中認証を求めている」)
- ユーザーのリクエスト(例:「データをCSVでエクスポートしたい」)
- 漠然としたアイデア(例:「オンボーディングの離脱率をなんとかしたい」)
2. コンテキストの収集
ユーザーに以下の情報を確認します。 会話形式で進めること — すべての質問を一度に投げかけないでください。 最も重要なものから聞き始め、会話の中で不足している情報を補っていきます:
- ユーザーの課題: 何の問題を解決するのか?誰が困っているのか?
- ターゲットユーザー: どのユーザーセグメントを対象とするのか?
- 成功指標: どうなったら成功と判断するのか?
- 制約事項: 技術的な制約、スケジュール、法規制上の要件、依存関係
- 先行事例: 過去に同様の試みはあったか?既存のソリューションはあるか?
3. 接続ツールからのコンテキスト取得
プロジェクトトラッカーが接続されている場合:
- 関連するチケット、エピック、機能を検索する
- 既存の要件や受け入れ基準を取得する
- 他の作業アイテムへの依存関係を洗い出す
ナレッジベースが接続されている場合:
- 関連するリサーチ文書、過去の仕様書、設計ドキュメントを検索する
- 関連するユーザーリサーチの知見を取得する
- 関連するミーティングメモや意思決定の記録を探す
デザインツールが接続されている場合:
- 関連するモックアップ、ワイヤーフレーム、デザイン検討資料を取得する
- 機能に関連するデザインシステムのコンポーネントを検索する
これらのツールが接続されていない場合は、ユーザーが提供する情報のみをもとに作業します。 ツールの接続をユーザーに求めないこと — 利用可能な情報で作業を進めてください。
4. PRDの生成
以下のセクションで構成された PRD を作成します。 各セクションの詳細な記載内容については、後述の PRD構造 を参照してください。
- 課題の記述: ユーザーの課題、影響を受けるユーザー、未解決の場合のインパクト(2〜3文)
- ゴール: ユーザー指標またはビジネス指標に紐づいた、具体的・測定可能なアウトカム 3〜5個
- 非ゴール: 明示的にスコープ外とする事項 3〜5個(それぞれ簡潔な理由を付記)
- ユーザーストーリー: 標準フォーマット(「[ユーザータイプ]として、[機能]がしたい。なぜなら[ベネフィット]だから」)でペルソナごとにグループ化
- 要件: Must-Have(P0)、Nice-to-Have(P1)、将来の検討事項(P2)に分類し、それぞれに受け入れ基準を付記
- 成功指標: 先行指標(早期に変化するもの)と遅行指標(時間をかけて変化するもの)を具体的な目標値とともに記載
- 未解決の質問: 回答が必要な部門(エンジニアリング、デザイン、法務、データ)をタグ付けした未解決事項
- スケジュール上の考慮事項: 厳格な期限、依存関係、フェーズ分けの方針
5. レビューと反復
PRDを生成した後:
- どのセクションかに調整が必要かユーザーに確認する
- 特定のセクションの詳細化を提案する
- 後続の成果物(デザインブリーフ、エンジニアリングチケットの分解、ステークホルダー向けのピッチ資料)の作成を提案する
PRDの構造
課題の記述
- ユーザーの課題を 2〜3 文で記述する
- 誰がどのくらいの頻度でこの問題を抱えているかを記述する
- 解決しない場合のコスト(ユーザーの痛み、ビジネスへの影響、競合リスク)を記述する
- ユーザーリサーチ、サポートデータ、指標、顧客フィードバックなどのエビデンスに基づいて記述する
ゴール
- この機能が達成すべき具体的・測定可能なアウトカムを 3〜5 個挙げる
- 各ゴールは「どうなれば成功と判断できるか?」に答えられるものにする
- ユーザーゴール(ユーザーが得るもの)とビジネスゴール(会社が得るもの)を区別する
- ゴールはアウトプットではなくアウトカムで表現する(「初回価値到達時間を50%短縮する」であり「オンボーディングウィザードを作る」ではない)
非ゴール
- この機能で明示的に「やらないこと」を 3〜5 個挙げる
- 今回のバージョンでスコープ外となる隣接機能を記載する
- 各非ゴールについて、スコープ外である理由を簡潔に説明する(インパクト不足、複雑すぎる、別の取り組みとして進める、時期尚早など)
- 非ゴールは実装中のスコープクリープを防ぎ、ステークホルダーの期待値を適切に設定するために機能する
ユーザーストーリー
ユーザーストーリーは標準フォーマットで記述します: 「[ユーザータイプ]として、[機能]がしたい。なぜなら[ベネフィット]だから」
ガイドライン:
- ユーザータイプは意味のある粒度で具体的に記述する(「ユーザー」ではなく「エンタープライズ管理者」など)
- 機能は「何を達成したいか」を記述し、「どうやるか」は記述しない
- ベネフィットは「なぜそれが重要か」 — どのような価値を提供するかを説明する
- エッジケースも含める: エラー状態、空の状態、境界条件
- 複数のペルソナを対象とする場合は、それぞれのユーザータイプを含める
- 優先度の高いストーリーから順に並べる
例:
- 「チーム管理者として、組織のSSOを設定したい。なぜならチームメンバーが会社のアカウントでログインできるようになるから」
- 「チームメンバーとして、会社のSSOログインに自動的にリダイレクトされたい。なぜなら別のパスワードを覚えなくて済むから」
- 「チーム管理者として、SSOでログインしたメンバーを確認したい。なぜならロールアウトが正常に機能しているか確認できるから」
要件
Must-Have(P0): これがなければ機能としてリリースできないもの。機能の最小限のバージョンを表します。判断基準:「これを削ったら、機能がコアの課題を解決できなくなるか?」—— そうであれば P0 です。
Nice-to-Have(P1): あるとユーザー体験が大きく向上するが、なくてもコアのユースケースは成立するもの。リリース後の早期フォローアップになることが多いです。
将来の検討事項(P2): v1 では明示的にスコープ外だが、将来のサポートを見越した設計を行いたいもの。これを文書化しておくことで、後から対応を困難にするような誤ったアーキテクチャ上の意思決定を防げます。
各要件について:
- 期待される動作を明確かつ曖昧さなく記述する
- 受け入れ基準を含める(後述参照)
- 技術的な考慮事項や制約事項を記載する
- 他チームやシステムへの依存関係をフラグを立てて明示する
未解決の質問
- 実装前または実装中に回答が必要な質問
- それぞれ回答すべき部門をタグ付けする(エンジニアリング、デザイン、法務、データ、ステークホルダー)
- ブロッキングな質問(着手前に回答必須)と非ブロッキングな質問(実装中に解決可能)を区別する
スケジュール上の考慮事項
- 厳格な期限(契約上のコミットメント、イベント、コンプライアンス対応の期日)
- 他チームの作業やリリースへの依存関係
- 機能が一度のリリースに収まらない場合のフェーズ分けの提案
ユーザーストーリーの書き方
優れたユーザーストーリーの条件:
- 独立性: 単独で開発・デリバリーできる
- 交渉可能性: 詳細は議論の余地があり、ストーリーは契約書ではない
- 価値がある: ユーザーに価値を届けるもの(チームへの価値だけでなく)
- 見積もり可能: チームがある程度の工数を見積もれる
- 小ささ: 1スプリント/イテレーション内で完了できる
- テスト可能: 動作を検証する明確な方法がある
ユーザーストーリーでよくある失敗
- 曖昧すぎる: 「ユーザーとして、製品を速くしたい」— 何を具体的に速くすべきか?
- 解決策が先行している: 「ユーザーとして、ドロップダウンメニューが欲しい」— UIウィジェットではなく、ニーズを記述する
- ベネフィットがない: 「ユーザーとして、ボタンをクリックしたい」— なぜ?何を達成するのか?
- 粒度が大きすぎる: 「ユーザーとして、チームを管理したい」— 具体的な機能に分解する
- 内部フォーカス: 「エンジニアリングチームとして、データベースをリファクタリングしたい」— これはタスクであり、ユーザーストーリーではない
要件の分類
MoSCoWフレームワーク
- Must have(必須): これがなければ機能は成立しない。譲れないもの。
- Should have(すべき): 重要だがリリースに必須ではない。優先度の高い早期フォローアップ。
- Could have(あるとよい): 時間が許せば実装したい。削っても遅延しないもの。
- Won't have(今回はやらない): 明示的なスコープ外。将来のバージョンで再検討の可能性あり。
分類のヒント
- P0 は厳しく絞り込むこと。Must-Have が少ないほど、早く学びを得られる。
- すべてが P0 であれば、P0 は存在しないのと同じ。「これなしでは本当にリリースしないか?」と各 Must-Have に問いかける。
- P1 はすぐに作ると確信できるものにする。願望リストではなく。
- P2 はアーキテクチャ上の保険 — 今は作らなくても、設計の意思決定を導く指針となる。
成功指標の定義
先行指標
リリース後すぐに(数日〜数週間で)変化する指標:
- 採用率: 対象ユーザーのうち、機能を試したユーザーの割合
- アクティベーション率: コアアクションを完了したユーザーの割合
- タスク完了率: 目的を達成できたユーザーの割合
- 完了までの時間: コアのワークフローにかかる時間
- エラー率: ユーザーがエラーや行き詰まりに遭遇する頻度
- 機能の利用頻度: ユーザーが機能を繰り返し使う頻度
遅行指標
時間をかけて(数週間〜数ヶ月で)変化する指標:
- **リテンションへの影響
原文(English)を表示
Write Spec
If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.
Write a feature specification or product requirements document (PRD).
Usage
/write-spec $ARGUMENTS
Workflow
1. Understand the Feature
Ask the user what they want to spec. Accept any of:
- A feature name ("SSO support")
- A problem statement ("Enterprise customers keep asking for centralized auth")
- A user request ("Users want to export their data as CSV")
- A vague idea ("We should do something about onboarding drop-off")
2. Gather Context
Ask the user for the following. Be conversational — do not dump all questions at once. Ask the most important ones first and fill in gaps as you go:
- User problem: What problem does this solve? Who experiences it?
- Target users: Which user segment(s) does this serve?
- Success metrics: How will we know this worked?
- Constraints: Technical constraints, timeline, regulatory requirements, dependencies
- Prior art: Has this been attempted before? Are there existing solutions?
3. Pull Context from Connected Tools
If ~~project tracker is connected:
- Search for related tickets, epics, or features
- Pull in any existing requirements or acceptance criteria
- Identify dependencies on other work items
If ~~knowledge base is connected:
- Search for related research documents, prior specs, or design docs
- Pull in relevant user research findings
- Find related meeting notes or decision records
If ~~design is connected:
- Pull related mockups, wireframes, or design explorations
- Search for design system components relevant to the feature
If these tools are not connected, work entirely from what the user provides. Do not ask the user to connect tools — just proceed with available information.
4. Generate the PRD
Produce a structured PRD with these sections. See PRD Structure below for detailed guidance on what each section should contain.
- Problem Statement: The user problem, who is affected, and impact of not solving it (2-3 sentences)
- Goals: 3-5 specific, measurable outcomes tied to user or business metrics
- Non-Goals: 3-5 things explicitly out of scope, with brief rationale for each
- User Stories: Standard format ("As a [user type], I want [capability] so that [benefit]"), grouped by persona
- Requirements: Categorized as Must-Have (P0), Nice-to-Have (P1), and Future Considerations (P2), each with acceptance criteria
- Success Metrics: Leading indicators (change quickly) and lagging indicators (change over time), with specific targets
- Open Questions: Unresolved questions tagged with who needs to answer (engineering, design, legal, data)
- Timeline Considerations: Hard deadlines, dependencies, and phasing
5. Review and Iterate
After generating the PRD:
- Ask the user if any sections need adjustment
- Offer to expand on specific sections
- Offer to create follow-up artifacts (design brief, engineering ticket breakdown, stakeholder pitch)
PRD Structure
Problem Statement
- Describe the user problem in 2-3 sentences
- Who experiences this problem and how often
- What is the cost of not solving it (user pain, business impact, competitive risk)
- Ground this in evidence: user research, support data, metrics, or customer feedback
Goals
- 3-5 specific, measurable outcomes this feature should achieve
- Each goal should answer: "How will we know this succeeded?"
- Distinguish between user goals (what users get) and business goals (what the company gets)
- Goals should be outcomes, not outputs ("reduce time to first value by 50%" not "build onboarding wizard")
Non-Goals
- 3-5 things this feature explicitly will NOT do
- Adjacent capabilities that are out of scope for this version
- For each non-goal, briefly explain why it is out of scope (not enough impact, too complex, separate initiative, premature)
- Non-goals prevent scope creep during implementation and set expectations with stakeholders
User Stories
Write user stories in standard format: "As a [user type], I want [capability] so that [benefit]"
Guidelines:
- The user type should be specific enough to be meaningful ("enterprise admin" not just "user")
- The capability should describe what they want to accomplish, not how
- The benefit should explain the "why" — what value does this deliver
- Include edge cases: error states, empty states, boundary conditions
- Include different user types if the feature serves multiple personas
- Order by priority — most important stories first
Example:
- "As a team admin, I want to configure SSO for my organization so that my team members can log in with their corporate credentials"
- "As a team member, I want to be automatically redirected to my company's SSO login so that I do not need to remember a separate password"
- "As a team admin, I want to see which members have logged in via SSO so that I can verify the rollout is working"
Requirements
Must-Have (P0): The feature cannot ship without these. These represent the minimum viable version of the feature. Ask: "If we cut this, does the feature still solve the core problem?" If no, it is P0.
Nice-to-Have (P1): Significantly improves the experience but the core use case works without them. These often become fast follow-ups after launch.
Future Considerations (P2): Explicitly out of scope for v1 but we want to design in a way that supports them later. Documenting these prevents accidental architectural decisions that make them hard later.
For each requirement:
- Write a clear, unambiguous description of the expected behavior
- Include acceptance criteria (see below)
- Note any technical considerations or constraints
- Flag dependencies on other teams or systems
Open Questions
- Questions that need answers before or during implementation
- Tag each with who should answer (engineering, design, legal, data, stakeholder)
- Distinguish between blocking questions (must answer before starting) and non-blocking (can resolve during implementation)
Timeline Considerations
- Hard deadlines (contractual commitments, events, compliance dates)
- Dependencies on other teams' work or releases
- Suggested phasing if the feature is too large for one release
User Story Writing
Good user stories are:
- Independent: Can be developed and delivered on their own
- Negotiable: Details can be discussed, the story is not a contract
- Valuable: Delivers value to the user (not just the team)
- Estimable: The team can roughly estimate the effort
- Small: Can be completed in one sprint/iteration
- Testable: There is a clear way to verify it works
Common Mistakes in User Stories
- Too vague: "As a user, I want the product to be faster" — what specifically should be faster?
- Solution-prescriptive: "As a user, I want a dropdown menu" — describe the need, not the UI widget
- No benefit: "As a user, I want to click a button" — why? What does it accomplish?
- Too large: "As a user, I want to manage my team" — break this into specific capabilities
- Internal focus: "As the engineering team, we want to refactor the database" — this is a task, not a user story
Requirements Categorization
MoSCoW Framework
- Must have: Without these, the feature is not viable. Non-negotiable.
- Should have: Important but not critical for launch. High-priority fast follows.
- Could have: Desirable if time permits. Will not delay delivery if cut.
- Won't have (this time): Explicitly out of scope. May revisit in future versions.
Tips for Categorization
- Be ruthless about P0s. The tighter the must-have list, the faster you ship and learn.
- If everything is P0, nothing is P0. Challenge every must-have: "Would we really not ship without this?"
- P1s should be things you are confident you will build soon, not a wish list.
- P2s are architectural insurance — they guide design decisions even though you are not building them now.
Success Metrics Definition
Leading Indicators
Metrics that change quickly after launch (days to weeks):
- Adoption rate: % of eligible users who try the feature
- Activation rate: % of users who complete the core action
- Task completion rate: % of users who successfully accomplish their goal
- Time to complete: How long the core workflow takes
- Error rate: How often users encounter errors or dead ends
- Feature usage frequency: How often users return to use the feature
Lagging Indicators
Metrics that take time to develop (weeks to months):
- Retention impact: Does this feature improve user retention?
- Revenue impact: Does this drive upgrades, expansion, or new revenue?
- NPS / satisfaction change: Does this improve how users feel about the product?
- Support ticket reduction: Does this reduce support load?
- Competitive win rate: Does this help win more deals?
Setting Targets
- Targets should be specific: "50% adoption within 30 days" not "high adoption"
- Base targets on comparable features, industry benchmarks, or explicit hypotheses
- Set a "success" threshold and a "stretch" target
- Define the measurement method: what tool, what query, what time window
- Specify when you will evaluate: 1 week, 1 month, 1 quarter post-launch
Acceptance Criteria
Write acceptance criteria in Given/When/Then format or as a checklist:
Given/When/Then:
- Given [precondition or context]
- When [action the user takes]
- Then [expected outcome]
Example:
- Given the admin has configured SSO for their organization
- When a team member visits the login page
- Then they are automatically redirected to the organization's SSO provider
Checklist format:
- [ ] Admin can enter SSO provider URL in organization settings
- [ ] Team members see "Log in with SSO" button on login page
- [ ] SSO login creates a new account if one does not exist
- [ ] SSO login links to existing account if email matches
- [ ] Failed SSO attempts show a clear error message
Tips for Acceptance Criteria
- Cover the happy path, error cases, and edge cases
- Be specific about the expected behavior, not the implementation
- Include what should NOT happen (negative test cases)
- Each criterion should be independently testable
- Avoid ambiguous words: "fast", "user-friendly", "intuitive" — define what these mean concretely
Scope Management
Recognizing Scope Creep
Scope creep happens when:
- Requirements keep getting added after the spec is approved
- "Small" additions accumulate into a significantly larger project
- The team is building features no user asked for ("while we're at it...")
- The launch date keeps moving without explicit re-scoping
- Stakeholders add requirements without removing anything
Preventing Scope Creep
- Write explicit non-goals in every spec
- Require that any scope addition comes with a scope removal or timeline extension
- Separate "v1" from "v2" clearly in the spec
- Review the spec against the original problem statement — does everything serve it?
- Time-box investigations: "If we cannot figure out X in 2 days, we cut it"
- Create a "parking lot" for good ideas that are not in scope
Output Format
Use markdown with clear headers. Keep the document scannable — busy stakeholders should be able to read just the headers and bold text to get the gist.
Tips
- Be opinionated about scope. It is better to have a tight, well-defined spec than an expansive vague one.
- If the user's idea is too big for one spec, suggest breaking it into phases and spec the first phase.
- Success metrics should be specific and measurable, not vague ("improve user experience").
- Non-goals are as important as goals. They prevent scope creep during implementation.
- Open questions should be genuinely open — do not include questions you can answer from context.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。