jpskill.com
🛠️ 開発・MCP コミュニティ

architectural-forensics

Master protocol for deconstructing agent frameworks to inform derivative system architecture. Use when (1) analyzing an agent framework's codebase comprehensively, (2) comparing multiple frameworks to select best practices, (3) designing a new agent system based on prior art, (4) documenting architectural decisions with evidence, or (5) conducting technical due diligence on AI agent implementations. This skill orchestrates sub-skills for data substrate, execution engine, cognitive architecture, and synthesis phases.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o architectural-forensics.zip https://jpskill.com/download/18849.zip && unzip -o architectural-forensics.zip && rm architectural-forensics.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18849.zip -OutFile "$d\architectural-forensics.zip"; Expand-Archive "$d\architectural-forensics.zip" -DestinationPath $d -Force; ri "$d\architectural-forensics.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して architectural-forensics.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → architectural-forensics フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
8

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] architectural-forensics

アーキテクチャフォレンジックプロトコル

エージェントフレームワークを分解し、派生システムのアーキテクチャに役立てます。

ミッション

ソフトウェアエンジニアリングの決定(どのように動作するか)と認知アーキテクチャの決定(どのように思考するか)を区別し、新しいシステムのための再利用可能なパターンを抽出します。

クイックスタート

# 1. コードベースをマッピングします(codebase-mapping スキルのスクリプトを使用)
python .claude/skills/codebase-mapping/scripts/map_codebase.py /path/to/framework --output codebase-map.json

# 2. コマンドで分析を実行します
/analyze-frameworks

プロトコルフェーズ

フェーズ 1: エンジニアリングシャーシ

ソフトウェア基盤を分析します。詳細なガイダンスについては、references/phase1-engineering.md を参照してください。

分析 注目ファイル 出力
データ基盤 types.py, schema.py, state.py 型付け戦略、ミューテーションパターン
実行エンジン runner.py, executor.py, agent.py 非同期モデル、制御フローのトポロジー
コンポーネントモデル base_*.py, interfaces.py 抽象化の深さ、DI パターン
弾力性 executor.py, try/except ブロック エラー伝播、サンドボックス化

フェーズ 2: 認知アーキテクチャ

エージェントの「ビジネスロジック」を抽出します。詳細なガイダンスについては、references/phase2-cognitive.md を参照してください。

分析 注目ファイル 出力
制御ループ agent.py, loop.py 推論パターン、ステップ関数
メモリ memory.py, context.py コンテキストアセンブリ、エビクションポリシー
ツールインターフェース tool.py, functions.py スキーマ生成、エラーフィードバック
ハーネス-モデルプロトコル llm.py, adapters/, stream.py ワイヤーフォーマット、ツール呼び出しエンコーディング、エージェントプリミティブ
マルチエージェント orchestrator.py, router.py 協調モデル、状態共有

フェーズ 3: 統合

実行可能な出力を生成します。

  1. ベストオブブリードマトリックス → フレームワーク比較表
  2. アンチパターンカタログ → 「繰り返さない」リスト
  3. 参照アーキテクチャ → 新しいフレームワーク仕様

実行ワークフロー

┌─────────────────────────────────────────────────────────┐
│                    For Each Framework                    │
├─────────────────────────────────────────────────────────┤
│  1. codebase-mapping                                    │
│       ↓                                                 │
│  2. Phase 1 Analysis (parallel)                         │
│     ├── data-substrate-analysis                         │
│     ├── execution-engine-analysis                       │
│     ├── component-model-analysis                        │
│     └── resilience-analysis                             │
│       ↓                                                 │
│  3. Phase 2 Analysis (parallel)                         │
│     ├── control-loop-extraction                         │
│     ├── memory-orchestration                            │
│     ├── tool-interface-analysis                         │
│     ├── harness-model-protocol                          │
│     └── multi-agent-analysis (if applicable)            │
└─────────────────────────────────────────────────────────┘
        ↓
┌─────────────────────────────────────────────────────────┐
│                      Synthesis                           │
├─────────────────────────────────────────────────────────┤
│  4. comparative-matrix                                   │
│  5. antipattern-catalog                                  │
│  6. architecture-synthesis                               │
└─────────────────────────────────────────────────────────┘

クイック分析(単一フレームワーク)

迅速な評価のために、最小限のパスを実行します。

codebase-mapping → execution-engine-analysis → control-loop-extraction → tool-interface-analysis

出力ディレクトリ構造

forensics-output/                    # 作業/中間ファイル
├── .state/
│   ├── manifest.json
│   └── {framework}.state.json
└── frameworks/
    └── {framework}/
        ├── codebase-map.json
        ├── phase1/*.md
        └── phase2/*.md

reports/                             # 最終成果物
├── frameworks/
│   └── {framework}.md               # フレームワークの概要
└── synthesis/
    ├── comparison-matrix.md
    ├── antipatterns.md
    ├── reference-architecture.md
    └── executive-summary.md

状態管理と再開

このプロトコルは、ステートフルで再開可能に設計されています。

  • 冪等性: Orchestrator は manifest.json で進捗を追跡し、completed とマークされたフレームワークはスキップします。
  • クリーンな状態での再開: 実行が中断された場合、in_progress とマークされたフレームワークは「古い」と見なされます。python scripts/state_manager.py reset-running を使用して、それらを pending に戻し、部分的な出力ディレクトリを削除することで、それらの項目についてクリーンな再開を保証します。

エージェントオーケストレーション

このスキルは、コンテキスト効率のために4層の階層を持つ特殊なエージェントを使用します。

Orchestrator
    │
    └── Framework Agents (並列、フレームワークごとに1つ)
            │
            └── Skill Agents (並列、スキルごとに1つ) [COORDINATORS]
                    │
                    └── Reader Agents (並列、ファイルクラスターごとに1つ) [EXTRACTORS]
                            │
                            └── Synthesis Agent (フレームワーク横断的な統合)

エージェントの役割

エージェント コンテキスト予算 読み取り 生成
Orchestrator ~10K 状態ファイル 調整の決定
Framework Agent ~50K スキル出力 フレームワーク概要レポート
Skill Agent ~25K クラスター抽出 スキル分析レポート
Reader Agent ~20K 1-5個のソースファイル JSON抽出 (~2K)
Synthesis Agent ~40K 全フレームワークレポート 比較マトリックス、アーキテクチャ仕様

主要なイノベーション: クラスターベースの読み取り

Reader Agent は、個々のファイルではなくファイルクラスター(1〜5個の関連ファイル)を読み取ります。

  • クラスターは、階層、モジュールコホート、型+使用法、インターフェース+実装などの関係によってグループ化されます。
  • ファイル間のパターン(継承、インポート、共有状態)が捕捉されます。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Architectural Forensics Protocol

Deconstruct agent frameworks to inform derivative system architecture.

Mission

Distinguish between software engineering decisions (how it runs) and cognitive architecture decisions (how it thinks) to extract reusable patterns for new systems.

Quick Start

# 1. Map the codebase (uses codebase-mapping skill's script)
python .claude/skills/codebase-mapping/scripts/map_codebase.py /path/to/framework --output codebase-map.json

# 2. Run analysis via the command
/analyze-frameworks

Protocol Phases

Phase 1: Engineering Chassis

Analyze the software substrate. See references/phase1-engineering.md for detailed guidance.

Analysis Focus Files Output
Data Substrate types.py, schema.py, state.py Typing strategy, mutation patterns
Execution Engine runner.py, executor.py, agent.py Async model, control flow topology
Component Model base_*.py, interfaces.py Abstraction depth, DI patterns
Resilience executor.py, try/except blocks Error propagation, sandboxing

Phase 2: Cognitive Architecture

Extract agent "business logic". See references/phase2-cognitive.md for detailed guidance.

Analysis Focus Files Output
Control Loop agent.py, loop.py Reasoning pattern, step function
Memory memory.py, context.py Context assembly, eviction policies
Tool Interface tool.py, functions.py Schema generation, error feedback
Harness-Model Protocol llm.py, adapters/, stream.py Wire format, tool call encoding, agentic primitives
Multi-Agent orchestrator.py, router.py Coordination model, state sharing

Phase 3: Synthesis

Generate actionable outputs:

  1. Best-of-Breed Matrix → Framework comparison table
  2. Anti-Pattern Catalog → "Do Not Repeat" list
  3. Reference Architecture → New framework specification

Execution Workflow

┌─────────────────────────────────────────────────────────┐
│                    For Each Framework                    │
├─────────────────────────────────────────────────────────┤
│  1. codebase-mapping                                    │
│       ↓                                                 │
│  2. Phase 1 Analysis (parallel)                         │
│     ├── data-substrate-analysis                         │
│     ├── execution-engine-analysis                       │
│     ├── component-model-analysis                        │
│     └── resilience-analysis                             │
│       ↓                                                 │
│  3. Phase 2 Analysis (parallel)                         │
│     ├── control-loop-extraction                         │
│     ├── memory-orchestration                            │
│     ├── tool-interface-analysis                         │
│     ├── harness-model-protocol                          │
│     └── multi-agent-analysis (if applicable)            │
└─────────────────────────────────────────────────────────┘
        ↓
┌─────────────────────────────────────────────────────────┐
│                      Synthesis                           │
├─────────────────────────────────────────────────────────┤
│  4. comparative-matrix                                   │
│  5. antipattern-catalog                                  │
│  6. architecture-synthesis                               │
└─────────────────────────────────────────────────────────┘

Quick Analysis (Single Framework)

For rapid assessment, run the minimal path:

codebase-mapping → execution-engine-analysis → control-loop-extraction → tool-interface-analysis

Output Directory Structure

forensics-output/                    # Working/intermediate files
├── .state/
│   ├── manifest.json
│   └── {framework}.state.json
└── frameworks/
    └── {framework}/
        ├── codebase-map.json
        ├── phase1/*.md
        └── phase2/*.md

reports/                             # Final deliverables
├── frameworks/
│   └── {framework}.md               # Framework summary
└── synthesis/
    ├── comparison-matrix.md
    ├── antipatterns.md
    ├── reference-architecture.md
    └── executive-summary.md

State Management & Resumption

The protocol is designed to be stateful and resumable.

  • Idempotency: The Orchestrator tracks progress in manifest.json and will skip frameworks marked as completed.
  • Clean Slate Resumption: If a run is interrupted, frameworks marked as in_progress are considered "stale". Use python scripts/state_manager.py reset-running to move them back to pending and delete their partial output directories, ensuring a clean restart for those items.

Agent Orchestration

This skill uses a 4-tier hierarchy of specialized agents for context efficiency:

Orchestrator
    │
    └── Framework Agents (parallel, one per framework)
            │
            └── Skill Agents (parallel, one per skill) [COORDINATORS]
                    │
                    └── Reader Agents (parallel, one per file cluster) [EXTRACTORS]
                            │
                            └── Synthesis Agent (cross-framework synthesis)

Agent Roles

Agent Context Budget Reads Produces
Orchestrator ~10K State files Coordination decisions
Framework Agent ~50K Skill outputs Framework summary report
Skill Agent ~25K Cluster extracts Skill analysis report
Reader Agent ~20K 1-5 source files JSON extract (~2K)
Synthesis Agent ~40K All framework reports Comparison matrix, architecture spec

Key Innovation: Cluster-Based Reading

Reader Agents read file clusters (1-5 related files) rather than individual files:

  • Clusters are grouped by relationship: hierarchy, module cohort, type+usage, interface+impl
  • Cross-file patterns (inheritance, imports, shared state) are captured in the extract
  • This enables understanding architectural patterns that span multiple files

See:

  • references/orchestrator-agent.md — Top-level coordination
  • references/framework-agent.md — Per-framework analysis coordination
  • references/skill-agent.md — Skill coordination and cluster assignment
  • references/reader-agent.md — File cluster extraction
  • references/synthesis-agent.md — Cross-framework synthesis

Sub-Skill Reference

Skill Purpose Key Outputs
codebase-mapping Repository structure File tree, dependencies, entry points
data-substrate-analysis Type system Typing strategy, serialization
execution-engine-analysis Control flow Async model, event architecture
component-model-analysis Extensibility Abstraction patterns, DI
resilience-analysis Error handling Error propagation, sandboxing
control-loop-extraction Reasoning loop Pattern classification, step function
memory-orchestration Context management Assembly, eviction, tiers
tool-interface-analysis Tool system Schema gen, error feedback
harness-model-protocol LLM interface layer Wire format, encoding, agentic primitives
multi-agent-analysis Coordination Handoffs, state sharing
comparative-matrix Comparison Decision tables
antipattern-catalog Tech debt Do-not-repeat list
architecture-synthesis New design Reference spec

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。