blueprint-derive-prd について
blueprint-derive-prdは、既存プロジェクトからPRDを作成するスキルで、プロジェクトをBlueprint Developmentに取り込むチーム向けです。READMEや文書、構成を分析し、不明点の確認、manifestの更新、次の作業を案内します。
主な機能
- 01READMEとプロジェクト文書を分析
- 02課題、ユーザー、機能を抽出
- 03文書ID付きのPRDを作成
- 04Blueprint manifestを更新
- 05不足情報の確認を案内
- 06後続タスクを提案
活用シーン
- 01既存プロジェクトのPRD作成
- 02既存資料からユーザー目標を抽出
- 03PRDをBlueprintに記録
- 04PRDにGitHub issueを関連付け
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ laurigates/ claude-plugins --skill blueprint-derive-prdインストール後、Claude Code で/blueprint-derive-prdを入力して読み込まれたか確認します。
詳細
README、ドキュメント、プロジェクト構成を分析して、既存プロジェクトの製品要件定義書(PRD)を生成します。
このスキルを使用するタイミング
| このスキルを使用する場合... | 代わりに blueprint-derive-adr を使用する場合... |
|---|---|
| 既存のプロジェクトへの参加にあたり、README/ドキュメントから PRD を作成する必要がある | 要件ではなく、アーキテクチャ上の決定を ADR として文書化したい |
| 既存の文章から問題提起、ステークホルダー、ペルソナを抽出する必要がある | PRD+ADR+PRP をまとめて導出するには、代わりに blueprint-derive-plans を使用する |
| 機能やユーザーの目標を遡って記録したい | まず blueprint をブートストラップする必要がある場合は、代わりに blueprint-init を使用する |
ユースケース:既存のプロジェクトを Blueprint Development システムに導入します。
前提条件:
- Blueprint Development が初期化されている(
docs/blueprint/が存在する) - プロジェクトに既存のドキュメントがある(README.md、docs/ など)
手順:
フェーズ 1:調査
1.1 前提条件を確認する
ls docs/blueprint/manifest.json
見つからない場合 → まず /blueprint:init の実行を提案します。
1.2 プロジェクトのドキュメントを収集する
既存のドキュメントを検索します:
fd -e md -d 3 . | head -20
確認する主なファイル:
README.md- プロジェクトの主な説明docs/- ドキュメントディレクトリCONTRIBUTING.md- 貢献ガイドラインARCHITECTURE.md- アーキテクチャの概要package.json/pyproject.toml/Cargo.toml- プロジェクトのメタデータ
1.3 主なドキュメントを読む
以下を読み、分析します:
- プロジェクトの目的、機能、使用方法については README.md
- 依存関係とスクリプトについてはパッケージマニフェスト
- 既存のアーキテクチャまたは設計ドキュメント
フェーズ 2:分析と抽出
2.1 プロジェクトのコンテキストを抽出する
ドキュメントから以下を特定します:
| 項目 | 情報源 | 不明な場合の質問 |
|---|---|---|
| プロジェクト名 | パッケージマニフェスト、README | ユーザーに尋ねる |
| 目的/問題 | README の概要 | 「このプロジェクトはどのような問題を解決しますか?」 |
| 対象ユーザー | README、ドキュメント | 「主なユーザーは誰ですか?」 |
| 主な機能 | README の機能セクション | 「主な機能は何ですか?」 |
| 技術スタック | 依存関係、ファイル拡張子 | ファイルから推測する |
2.2 確認の質問をする
不明な項目には AskUserQuestion を使用します:
question: "What is the primary problem this project solves?"
options:
- "[Inferred from docs]: {description}" → confirm inference
- "Let me describe it" → free text input
question: "Who are the target users?"
options:
- "Developers" → technical documentation focus
- "End users" → user experience focus
- "Both developers and end users" → balanced approach
- "Other" → custom description
question: "What is the current project phase?"
options:
- "Early development / MVP" → focus on core features
- "Active development" → feature expansion
- "Maintenance mode" → stability and bug fixes
- "Planning major changes" → architectural considerations
2.3 ステークホルダーを特定する
ステークホルダーについて尋ねます:
question: "Who are the key stakeholders for this project?"
options:
- "Solo project (just me)" → simplified RACI
- "Small team (2-5 people)" → team collaboration
- "Larger organization" → formal stakeholder matrix
- "Open source community" → contributor-focused
フェーズ 3:PRD の生成
3.1 ドキュメント ID を生成する
PRD を作成する前に、一意の ID を生成します:
# Get next PRD ID from manifest
next_prd_id() {
local manifest="docs/blueprint/manifest.json"
local last=$(jq -r '.id_registry.last_prd // 0' "$manifest" 2>/dev/null || echo "0")
local next=$((last + 1))
printf "PRD-%03d" "$next"
}
生成した ID は、ドキュメントとマニフェストの更新に使用するために保存します。
3.2 PRD ファイルを作成する
docs/prds/ に PRD を作成します:
docs/prds/project-overview.md
3.3 PRD テンプレート
以下の構成で PRD を生成します:
---
id: {PRD-NNN}
created: {YYYY-MM-DD}
modified: {YYYY-MM-DD}
status: Draft
version: "1.0"
relates-to: []
github-issues: []
name: blueprint-derive-prd
---
# {Project Name} - Product Requirements Document
## Executive Summary
### Problem Statement
{Extracted or confirmed problem description}
### Proposed Solution
{Project description and approach}
### Business Impact
{Value proposition and expected outcomes}
## Stakeholders & Personas
### Stakeholder Matrix
| Role | Name/Team | Responsibility | Contact |
|------|-----------|----------------|---------|
| {role} | {name} | {responsibility} | {contact} |
### User Personas
#### Primary: {Persona Name}
- **Description**: {who they are}
- **Needs**: {what they need}
- **Pain Points**: {current frustrations}
- **Goals**: {what success looks like}
## Functional Requirements
### Core Features
{List of main capabilities extracted from docs}
| ID | Feature | Description | Priority |
|----|---------|-------------|----------|
| FR-001 | {feature} | {description} | {P0/P1/P2} |
### User Stories
{User stories derived from features}
- As a {user type}, I want to {action} so that {benefit}
## Non-Functional Requirements
### Performance
- {Response time expectations}
- {Throughput requirements}
### Security
- {Authentication requirements}
- {Data protection needs}
### Accessibility
- {Accessibility standards to follow}
### Compatibility
- {Browser/platform/version support}
## Technical Considerations
### Architecture
{High-level architecture from docs or inferred}
### Dependencies
{Key dependencies from package manifest}
### Integration Points
{External services, APIs, databases}
## Success Metrics
| Metric | Current | Target | Measurement |
|--------|---------|--------|-------------|
| {metric} | {baseline} | {goal} | {how to measure} |
## Scope
### In Scope
- {Included features and capabilities}
### Out of Scope
- {Explicitly excluded items}
- {Future considerations}
## Timeline & Phases
### Current Phase: {phase name}
{Description of current work focus}
### Roadmap
| Phase | Focus | Status |
|-------|-------|--------|
| {phase} | {focus areas} | {status} |
---
*Generated from existing documentation via /blueprint:derive-prd*
*Review and update as project evolves*
フェーズ 4:検証とフォローアップ
4.1 概要を提示する
ユーザーに以下を表示します:
✅ PRD Generated: {Project Name}
**ID**: {PRD-NNN}
**Location**: `docs/prds/project-overview.md`
**Extracted from**:
- {list of source documents}
**Key sections**:
- Executive Summary: {status}
- Stakeholders: {count} identified
- Functional Requirements: {count} features
- Non-Functional Requirements: {status}
**Confidence**: {High/Medium/Low}
- {High confidence areas}
- {Areas needing review}
**Recommended next steps**:
1. Review and refine the generated PRD
2. Run `/blueprint:derive-adr` to document architecture decisions
3. Run `/blueprint:prp-create` for specific features
4. Run `/blueprint:generate-skills` to create project skills
4.2 フォローアップを提案する
生成内容に応じて:
- アーキテクチャが不明確な場合 →
/blueprint:derive-adrを提案する - 機能を特定した場合 → 主要機能向けに
/blueprint:prp-createを提案する - PRD が完成した場合 →
/blueprint:generate-skillsを提案する
フェーズ 5:マニフェストを更新する
docs/blueprint/manifest.json を更新します:
generated_artifactsに PRD を追加するhas_prdsを true に更新するupdated_atのタイムスタンプを更新する- ID レジストリを更新する:
{ "id_registry": { "last_prd": {new_number}, "documents": { "{PRD-NNN}": { "path": "docs/prds/{filename}.md", "title": "{Project Name}", "github_issues": [], "created": "{date}" } } } }
ヒント:
- 既存のドキュメントを十分に読み込みます。価値のあるコンテキストが含まれていることがよくあります
- 曖昧または不足している情報について、確認の質問をします
- ドキュメントが少ない場合は、コード構成から推測します
- 不確かなセクションには、ユーザーによる確認が必要であることを明記します
- PRD は「何を」「なぜ」に焦点を当て、「どのように」には焦点を当てないようにします
4.3 タスクレジストリを更新する
docs/blueprint/manifest.json のタスクレジストリ項目を更新します:
jq --arg now "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--argjson created "${PRDS_GENERATED:-1}" \
'.task_registry["derive-prd"].last_completed_at = $now |
.task_registry["derive-prd"].last_result = "success" |
.task_registry["derive-prd"].stats.runs_total = ((.task_registry["derive-prd"].stats.runs_total // 0) + 1) |
.task_registry["derive-prd"].stats.items_created = $created' \
docs/blueprint/manifest.json > tmp.json && mv tmp.json docs/blueprint/manifest.json
4.4 GitHub Issue の作成を確認する(AskUserQuestion を使用):
question: "Create a GitHub issue to track this PRD?"
options:
- label: "Yes, create issue (Recommended)"
description: "Creates issue with title '[PRD-NNN] {Project Name}'"
- label: "No, skip for now"
description: "Can link later by editing github-issues in frontmatter"
はいの場合、GitHub issue を作成します:
gh issue create \
--title "[{PRD-NNN}] {Project Name}" \
--body "## Product Requirements Document
**Document**: \`docs/prds/{filename}.md\`
**ID**: {PRD-NNN}
### Summary
{Executive summary from PRD}
### Key Features
{List of FR-* features}
name: blueprint-derive-prd
---
*Auto-generated from PRD. See linked document for full requirements.*" \
--label "prd,requirements"
issue 番号を取得して、以下を更新します:
- PRD のフロントマター:
github-issuesに issue 番号を追加する - マニフェスト:
id_registry.documents[PRD-NNN].github_issuesに issue を追加する - マニフェスト:
id_registry.github_issuesに対応関係を追加する
4.5 次のアクションのプロンプト(AskUserQuestion を使用):
question: "PRD generated. What would you like to do next?"
options:
- label: "Document architecture decisions (Recommended)"
description: "Run /blueprint:derive-adr to capture technical decisions"
- label: "Generate project skills"
description: "Extract skills from PRD for Claude context"
- label: "Create a PRP for a feature"
description: "Start implementing a specific feature"
- label: "Review and refine PRD"
description: "I want to edit the generated PRD first"
- label: "I'm done for now"
description: "Exit - PRD is saved"
選択に基づく処理:
- 「アーキテクチャの決定事項を文書化する」→
/blueprint:derive-adrを実行 - 「プロジェクトスキルを生成する」→
/blueprint:generate-skillsを実行 - 「PRP を作成する」→
/blueprint:prp-createを実行(機能名を尋ねる) - 「レビューして調整する」→ PRD ファイルの場所と、注意が必要な主要セクションを表示
- 「完了」→ 終了
エラー処理:
- README.md がない場合 → プロジェクトの説明をユーザーに尋ねる
- blueprint が初期化されていない場合 →
/blueprint:initを提案 - ドキュメントに矛盾する情報がある場合 → ユーザーに確認を求める