document-extraction について
Document Extraction Skill は、仕様書、議事録、規制資料などから要件を体系的に抽出するスキルです。要件パターンの検出に加え、分類、重複排除、段階的な人手レビューに対応します。
主な機能
- 01Markdown、テキスト、PDF、Word に対応
- 02明示的な要件表現と EARS パターンを検出
- 03抽出要件と出典箇所を記録
- 04要件を分類
- 05意味的に重複を除きレビュー対象を表示
活用シーン
- 01議事録から要件やアクション項目を抽出
- 02旧版文書を構造化された要件に変換
- 03規制資料からコンプライアンス要件を抽出
- 04競合文書から機能要件を分析
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ melodic-software/ claude-code-plugins --skill document-extractionインストール後、Claude Code で/document-extractionを入力して読み込まれたか確認します。
同梱ファイルreferences/document-types.mdreferences/extraction-prompts.md
詳細
ドキュメント抽出スキル
既存のドキュメントソースから要件を抽出し、体系的に要件を洗い出します。
このスキルを使用するタイミング
キーワード: 要件の抽出、ドキュメントのマイニング、PDF の要件、トランスクリプトの分析、ドキュメントの解析、既存ドキュメント、レガシー要件、競合分析
次の場合にこのスキルを呼び出します。
- 既存のドキュメントから要件を洗い出す
- 会議のトランスクリプトから要件を処理する
- 競合製品から要件を抽出する
- 規制関連ドキュメントを分析し、コンプライアンス要件を特定する
- レガシードキュメントを構造化された要件に変換する
対応するドキュメントの種類
| 種類 | 拡張子 | 抽出方法 |
|---|---|---|
| Markdown | .md | 直接読み取り |
| テキスト | .txt | 直接読み取り |
| Read ツール(PDF 対応) | ||
| Word | .docx | Read ツール |
| ウェブページ | URL | WebFetch ツール |
| 会議メモ | .md, .txt | トランスクリプトパターン |
| 仕様書 | .md, .docx | 要件パターン |
抽出ワークフロー
ステップ 1:ドキュメントの評価
抽出方針を決定するため、ドキュメントを分析します。
document_assessment:
path: "{file path or URL}"
type: "{detected document type}"
size: "{approximate size}"
structure:
has_sections: true|false
has_lists: true|false
has_tables: true|false
quality:
formal_language: true|false
clear_requirements: true|false
needs_interpretation: true|false
ステップ 2:パターンマッチング
要件の検出パターンを適用します。
明示的な要件を示すマーカー:
- "The system shall..."
- "The system must..."
- "Users should be able to..."
- "REQ-XXX:"
- Numbered requirements (1.1, 1.2, etc.)
EARS パターン:
- "When [trigger], the [system] shall [response]"
- "While [state], the [system] shall [behavior]"
- "Where [feature], the [system] shall [behavior]"
- "If [condition], then the [system] shall [response]"
暗黙的な要件を示す指標:
- "It is important that..."
- "We need..."
- "The goal is to..."
- "Users expect..."
- "Performance should..."
ステップ 3:要件の抽出
特定した各要件について、以下を行います。
extracted_requirement:
id: REQ-{sequence}
text: "{cleaned requirement statement}"
source: document
source_file: "{file path}"
source_location: "{section/page/line}"
original_text: "{exact text from document}"
type: functional|non-functional|constraint|assumption
confidence: high|medium|low
extraction_method: explicit|pattern|inferred
needs_review: true|false
review_notes: "{why review needed}"
ステップ 4:分類
抽出した要件を分類します。
categories:
functional:
- features
- behaviors
- interactions
non_functional:
- performance
- security
- usability
- reliability
- scalability
constraints:
- technical
- business
- regulatory
assumptions:
- environmental
- user_behavior
- dependencies
ステップ 5:重複排除
重複する要件を特定し、統合します。
deduplication:
strategy: semantic_similarity
threshold: 0.8
action: merge|flag_for_review
merged_requirements:
- id: REQ-merged-001
sources: [REQ-001, REQ-015]
text: "{consolidated requirement}"
ドキュメントの種類に応じた方針
会議のトランスクリプト
transcript_extraction:
focus_on:
- Action items
- Decisions made
- Requirements discussed
- Concerns raised
patterns:
- "We decided that..."
- "The requirement is..."
- "Action item:"
- "TODO:"
- "Need to..."
speaker_context:
- Note who said what
- Weight by speaker role
規制関連ドキュメント
regulatory_extraction:
focus_on:
- Mandatory requirements ("shall", "must")
- Prohibited actions ("shall not", "must not")
- Conditional requirements ("if...then")
compliance_mapping:
- Reference section numbers
- Note effective dates
- Track version/revision
競合分析
competitor_extraction:
focus_on:
- Feature descriptions
- User capabilities
- Unique selling points
output:
- Feature requirements
- Differentiation opportunities
- Gap identification
confidence: low # Based on external observation
レガシー仕様書
legacy_extraction:
focus_on:
- Existing requirements
- System behaviors
- Integration points
modernization:
- Update terminology
- Convert to EARS format
- Flag deprecated requirements
出力形式
ドキュメントごとの出力
extraction_result:
source:
file: "{path or URL}"
type: "{document type}"
extraction_date: "{ISO-8601}"
confidence: high|medium|low
statistics:
total_candidates: {number}
extracted: {number}
filtered: {number}
needs_review: {number}
requirements:
- id: REQ-{number}
text: "{requirement}"
type: functional|non-functional|constraint
source_location: "{section/page}"
confidence: high|medium|low
original_text: "{exact source text}"
review_items:
- requirement_id: REQ-{number}
reason: "{why review needed}"
suggestion: "{proposed action}"
metadata:
sections_processed: {number}
extraction_patterns_used: ["{pattern names}"]
自律性のレベル
ガイド付きモード
guided_behavior:
document_selection: Human selects
extraction_strategy: AI suggests, human approves
each_requirement: AI highlights, human confirms
categorization: AI suggests, human validates
半自律モード
semi_auto_behavior:
document_selection: AI suggests priority, human approves list
extraction_strategy: AI chooses autonomously
requirements: AI extracts all, human reviews in batches
categorization: AI categorizes, human spot-checks
完全自律モード
full_auto_behavior:
document_selection: AI processes all relevant
extraction_strategy: AI optimizes per document
requirements: AI extracts, deduplicates, categorizes
output: Full extraction report for final review
品質指標
信頼度の高い抽出
- 明示的な要件マーカー(「shall」、「must」)
- EARS パターンとの一致
- 番号付き要件リスト
- 明確な命令文
信頼度が中程度の抽出
- 暗黙的な指標(「should」、「needs to」)
- 文脈に応じた解釈
- 部分的なパターン一致
- ドメイン知識が必要
信頼度の低い抽出
- 説明からの推測
- 物語形式のテキストの解釈
- 競合分析
- 文脈に基づく仮定
委任
関連タスクは、以下に委任します。
- gap-analysis:抽出した要件の網羅性を確認する
- domain-research:なじみのない用語や概念を調査する
- elicitation-methodology:手法の選定に戻る
出力先
抽出結果を以下に保存します。
.requirements/{domain}/documents/DOC-{filename}-{timestamp}.yaml
関連項目
elicitation-methodology- 親ハブスキルgap-analysis- 抽出後の網羅性チェックinterview-conducting- ステークホルダーに抽出した要件を確認する
コメント
Markdown 対応