SuperAPI AI Directory

context engineering framework

General & other

View repository

Updated 10-16 08:08

About this skill

Generic Information Structuring Framework

This framework defines a generic design philosophy and specification for autonomously converting and organizing unstructured information in various formats, such as websites, documents, and text data, into a format that AI can interpret and utilize.

I. Generic Autonomous Agent Specification

This is a design template for an agent that processes any information source and generates structured data.

agent_specification:
  name: "汎用コンテキストエンジニアリング・エージェント"
  version: "1.0.0"
  description: |
    様々な形式の入力ソースから、階層的かつ構造化されたコンテキスト情報を抽出し、
    指定された形式(YAML, JSON等)のドキュメントとして自動的に整理・永続化する自律型エージェント。
    情報収集、テキスト解析、構造化、永続化を統合的に実行する。

core_capabilities: - "Processing diverse input sources (URLs, text, files)" - "Analysis and hierarchization of the logical structure of content" - "Grouping and summarizing information based on relevance" - "Autonomous discovery and tracking (crawling) of new related information sources" - "Persistence of structured data in a specified format"

input_schema: type: object properties: source_specification: type: object description: "Definition of the information source to be processed" properties: source_type: type: string enum: ["url_list", "raw_text", "file_path", "mixed"] sources: type: array description: "List of sources to process (URLs, text, file paths, etc.)"

  processing_options:
    type: object
    description: "処理方法に関する設定"
    properties:
      output_base_directory:
        type: string
        description: "生成ファイルの保存先ディレクトリ"
      crawling_config:
        type: object
        description: "ウェブクロールに関する設定(最大深度、対象ドメインなど)"
      content_extraction_config:
        type: object
        description: "コンテンツ抽出に関する設定(階層深度、要約レベルなど)"
      output_format_config:
        type: object
        description: "出力形式に関する設定(ファイル形式、インデックス生成の有無など)"

autonomous_workflow: - "1. Initialization: Input validation and environment setup" - "2. Main loop: Repeat the following processing until information sources are exhausted" - " a. Content acquisition: Acquire information from the source" - " b. Structure extraction: Analyze the content and extract the hierarchical structure" - " c. New source discovery: Discover new related information sources from within the content and add them to the processing queue" - "3. Finalization: Organize all collected data and save it to the file system in the specified format"

tool_definitions: # Virtual toolset used by the agent - web_content_fetcher: "Fetch web content from a URL" - llm_structure_extractor: "Extract hierarchical structure from text" - url_discovery_engine: "Discover related URLs from content" - file_system_manager: "Manage files and directories"

error_handling_strategy: # Strategy for retrying, continuing processing, and logging when errors occur - retry_mechanisms: "Retry strategy for temporary errors" - graceful_degradation: "Retain successful processing results even in the event of partial failure"

success_criteria: # Criteria defining agent success - functional_requirements: "Input is processed as specified and output is consistent" - performance_requirements: "Processing completes within the specified time and resources"


### II. 情報ソース分析テンプレート (Information Source Analysis Template)

エージェントによる自動処理の前に、対象となる情報ソース(特にウェブサイト)の構造を手動で分析・理解するためのテンプレートです。

---

**件名: [対象サイト名] 構造分析レポート**

1.  **概要 (Overview)**
    *   **対象サイト名:**
    *   **URL:**
    *   **目的:** (例: 製品ドキュメント、企業ブログ、サポートポータル)

2.  **ナビゲーション構造 (Navigation Structure)**
    *   **主要カテゴリ:** (トップレベルのメニュー項目をリストアップ)
    *   **階層:** (例: カテゴリ → サブカテゴリ → 記事)

3.  **コンテンツ組織の特徴 (Content Organization Features)**
    *   **主要セクション:** (例: ガイド、チュートリアル、APIリファレンス、更新履歴)
    *   **情報アーキテクチャ:** (階層型、トピックベース、時系列など)

4.  **URL構造 (URL Structure)**
    *   **ベースURL:**
    *   **カテゴリページのパターン:**
    *   **個別記事のパターン:**

5.  **メタデータ (Metadata Organization)**
    *   各ページや記事に含まれるメタデータ (例: 更新日、作成者、タグ)

6.  **コンテンツ抽出のための推奨事項 (Recommendations for Content Extraction)**
    *   処理を開始すべきエントリーポイントURL
    *   クロール対象とすべきURLパターン
    *   抽出の際に注意すべき点

---

### III. 専門家プロファイル・テンプレート (Expert Profile Template)

特定のドメイン知識を持つ担当者や専門家の能力、アプローチ、利用ツールを定義するためのテンプレートです。これにより、情報構造化の背後にあるコンテキストを明確にします。

---

**件名: [専門家名/チーム名] プロファイル**

1.  **目的と背景 (Purpose & Context)**
    *   専門分野、ミッション、および活動の全体像を記述します。

2.  **現在の状況 (Current State)**
    *   現在注力しているプロジェクトやタスク、開発中のシステムについて記述します。

3.  **主要な学びと原則 (Key Learnings & Principles)**
    *   活動を通じて得られた核心的な知見や、常に従うべき基本原則をリストアップします。
    *   (例: 「構造化されたコンテキストがAIの精度を向上させる」「自動化には明確な成功基準が必要」)

4.  **アプローチとパターン (Approach & Patterns)**
    *   問題解決やタスク遂行における一貫した方法論や思考パターンを記述します。
    *   (例: 情報収集 → 体系的な分析 → 詳細な実装計画の策定)

5.  **ツールとリソース (Tools & Resources)**
    *   使用する主要な技術スタック、ソフトウェア、データソースなどをリストアップします。

---

### IV. 実行例:汎用テンプレートの適用 (Implementation Example)

上記フレームワークを使用して、特定のタスクを実行する際の具体的な設定例です。

```yaml
# 実行例: [対象サイト]のドキュメントを構造化する

example_usage:
  task_definition:
    source_specification:
      source_type: "url_list"
      sources:
        - "[対象サイトのトップページのURL]"
        - "[対象サイトの主要カテゴリページのURL]"
    
    processing_options:
      output_base_directory: "[出力先ディレクトリ名]"
      crawling_config:
        max_crawl_depth: 2
        target_domain_patterns:
          - "[クロールを許可するドメインの正規表現]"
        max_pages_per_domain: 50
      
      content_extraction_config:
        context_granularity: "L1_L2" # 見出しレベル1と2までを抽出
        content_summarization: "detailed"
      
      output_format_config:
        file_format: "yaml_frontmatter" # Markdown形式(メタデータ付き)
        generate_index: true

  expected_output_structure:
    # 期待される出力のディレクトリ構造とファイル内容のサンプル
    directory_tree: |
      [出力先ディレクトリ名]/
      ├── index.md
      ├── [カテゴリ1]/
      │   ├── [記事A].md
      │   └── [記事B].md
      └── [カテゴリ2]/
          ├── [記事C].md
          └── ...
    
    file_content_sample: |
      ---
      title: "[記事のタイトル]"
      source_url: "[元の記事のURL]"
      last_updated: "[最終更新日時]"
      ---
      
      # コンテンツの要約
      
      ここに、AIによって生成された記事の要約が記述されます。
      
      ## [サブタイトル]
      
      - サブタイトルに対応するコンテンツの要点