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.

16 stars

Best use case

architectural-forensics is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using architectural-forensics should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/architectural-forensics/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/architectural-forensics/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/architectural-forensics/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How architectural-forensics Compares

Feature / Agentarchitectural-forensicsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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

```bash
# 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 |

Related Skills

architectural-planning

16
from diegosouzapw/awesome-omni-skill

Create detailed technical plans and implementation roadmaps by analyzing project architecture and designing solutions that integrate seamlessly with existing patterns. Use when designing features, planning integrations, making architectural decisions. Triggers: 'plan', 'design', 'architecture', 'approach', 'how should I', 'best way', 'integrate', '계획', '설계', '아키텍처', '접근법', '어떻게 해야', '가장 좋은 방법', '통합', '마이그레이션', working with multi-module features, system boundaries, complex migrations.

architectural-patterns-large-react

16
from diegosouzapw/awesome-omni-skill

Establish scalable architecture using modular boundaries, domain-driven design, and consistent data access patterns.

architectural-pattern-discovery

16
from diegosouzapw/awesome-omni-skill

Discovers architectural and design patterns across all abstraction levels. Analyzes structural patterns, component relationships, recurring solution approaches, and design principles. Works with any technology stack without prior framework knowledge to provide comprehensive pattern understanding from code-level to system-level architecture.

architectural-analysis

16
from diegosouzapw/awesome-omni-skill

Deep architectural audit focused on finding dead code, duplicated functionality, architectural anti-patterns, type confusion, and code smells. Use when user asks for architectural analysis, find dead code, identify duplication, or assess codebase health.

architectural-amendment-protocol

16
from diegosouzapw/awesome-omni-skill

Amend architectural specifications through formal protocol.

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

azure-ai-anomalydetector-java

16
from diegosouzapw/awesome-omni-skill

Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate/multivariate anomaly detection, time-series analysis, or AI-powered monitoring.

axum-web-framework

16
from diegosouzapw/awesome-omni-skill

Complete guide for Axum web framework including routing, extractors, middleware, state management, error handling, and production deployment

axolotl-federation

16
from diegosouzapw/awesome-omni-skill

Axolotl micro-federation architecture - config, schema merging, mergeAxolotls, cross-module dependencies, best practices, and troubleshooting

axiom-swiftui-nav-diag

16
from diegosouzapw/awesome-omni-skill

Use when debugging navigation not responding, unexpected pops, deep links showing wrong screen, state lost on tab switch or background, crashes in navigationDestination, or any SwiftUI navigation failure - systematic diagnostics with production crisis defense

axiom-storekit-ref

16
from diegosouzapw/awesome-omni-skill

Reference — Complete StoreKit 2 API guide covering Product, Transaction, AppTransaction, RenewalInfo, SubscriptionStatus, StoreKit Views, purchase options, server APIs, and all iOS 18.4 enhancements with WWDC 2025 code examples

axiom-networking-diag

16
from diegosouzapw/awesome-omni-skill

Use when debugging connection timeouts, TLS handshake failures, data not arriving, connection drops, performance issues, or proxy/VPN interference - systematic Network.framework diagnostics with production crisis defense