// Comprehensive architectural reference for AIDB core and MCP integration.
| name | aidb-architecture |
| description | Comprehensive architectural reference for AIDB core and MCP integration. Covers 6-layer architecture (MCP, API, Session, Adapter, DAP Client, Protocol), component organization, data flow patterns, and design decisions. Use when explaining overall system design or understanding how layers interact. |
| version | 1.0.0 |
| tags | ["architecture","session","api","dap","mcp","design-patterns","components","data-flow"] |
This skill provides a comprehensive architectural reference for understanding AIDB's multi-layered architecture, focusing on aidb core library and aidb_mcp MCP integration.
Purpose: Enable developers to navigate the codebase confidently, understand component responsibilities, trace data flows, and make correct architectural decisions.
Scope:
aidb/ (core debugging library), aidb_mcp/ (MCP server integration)aidb_common/, aidb_logging/ (supporting utilities)aidb_cli/ (covered by dev-cli-development skill)Use this skill when:
Do NOT use this skill for:
adapter-development skilldap-protocol-guide skillmcp-tools-development skillโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Layer 1: MCP Layer (aidb_mcp/) โ
โ โโโ 12 debugging tools for AI agents โ
โ โโโ Handler dispatch, response optimization โ
โ โโโ Session management integration โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 2: API Layer (aidb/api/) โ
โ โโโ DebugAPI - Main entry point โ
โ โโโ SessionManager, SessionBuilder โ
โ โโโ .introspection / .orchestration operations โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 3: Session Layer (aidb/session/) โ
โ โโโ Session - Component delegation hub โ
โ โโโ SessionState, SessionConnector โ
โ โโโ SessionRegistry, ResourceManager โ
โ โโโ Parent-child session support (JavaScript) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 4: Adapter Layer (aidb/adapters/) โ
โ โโโ DebugAdapter - Component delegation base โ
โ โโโ ProcessManager, PortManager, LaunchOrchestrator โ
โ โโโ Language Adapters - Python, JavaScript, Java โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 5: DAP Client Layer (aidb/dap/client/) โ
โ โโโ DAPClient - Single request path โ
โ โโโ Transport, RequestHandler, EventProcessor โ
โ โโโ MessageRouter, ConnectionManager โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 6: Protocol Layer (aidb/dap/protocol.py) โ
โ โโโ Fully-typed DAP specification (see dap-protocol-guide) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
"I want to understand..."
| Topic | Resource | Contents |
|---|---|---|
| MCP & API Layers | api-mcp-layer.md | 12 tools, handler pattern, response system, DebugAPI, introspection/orchestration |
| Session Layer | session-layer.md | Component delegation, SessionState, SessionConnector, parent-child sessions |
| Adapter Layer | adapter-architecture.md | DebugAdapter base, ProcessManager, PortManager, lifecycle hooks, Python/JS/Java |
| DAP Client | dap-client.md | Single request path, Future-based async, event handling, design decisions |
| Patterns & Resources | patterns-and-resources.md | Architectural principles, three-tier cleanup, resource management, data flows |
For detailed explanations, see patterns-and-resources.md.
Three-Tier Cleanup Strategy:
Why Order Matters: Prevents port conflicts and orphaned processes.
Key Components:
aidb/resources/pids.py)aidb/resources/ports.py)aidb/resources/orphan_cleanup.py)aidb/session/resource.py)| Skill | Use For |
|---|---|
adapter-development | Language-specific adapter implementation patterns |
dap-protocol-guide | DAP protocol specification and usage |
mcp-tools-development | MCP tool creation and agent optimization |
| Resource | Content |
|---|---|
| api-mcp-layer.md | MCP server, 12 tools, handler pattern, API layer, introspection/orchestration |
| session-layer.md | Session architecture, component delegation, state management, parent-child |
| adapter-architecture.md | Adapter base class, components, lifecycle hooks, language-specific patterns |
| dap-client.md | DAP client design, single request path, Future-based async, events |
| patterns-and-resources.md | Architectural principles, resource management, cleanup, data flows |
Documentation:
docs/developer-guide/overview.mdsrc/aidb/, src/aidb_mcp/, src/aidb_cli/, src/aidb_common/, src/aidb_logging/6 Layers: MCP โ API โ Session โ Adapter โ DAP Client โ Protocol
Key Patterns: Component delegation, language-agnostic, human-cadence debugging, resource lifecycle, parent-child sessions, single request path
5 Resource Files: api-mcp-layer, session-layer, adapter-architecture, dap-client, patterns-and-resources