# iapro-community/orquestrador-maestro architecture

> Architecture diagram of the GitHub repository iapro-community/orquestrador-maestro, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iapro-community/orquestrador-maestro
- Repository: https://github.com/iapro-community/orquestrador-maestro

## Overview

Orquestrador Maestro is a cross-tool AI-work orchestration product: it prepares project context, routes work to suitable skills and provider tools, and makes verification and useful handoff part of completion. Its runtime also includes a resolution engine for evidence-backed outcomes and an OpenAI desktop/plugin integration. A separate benchmark harness evaluates Maestro against OpenCode and produces comparative reports. The map combines README-documented workflow with sampled source and SOURCE INDEX references; unsampled implementation details and their links are intentionally limited.

Main entry points: [`runtime/application/maestro-application.js`](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/application/maestro-application.js) (Maestro application), [`benchmark-harness/src/orchestrator/index.ts`](https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/orchestrator/index.ts) (Benchmark orchestrator), [`runtime/verification/engine.js`](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/verification/engine.js) (Verification engine), [`benchmark-harness/src/cli/index.ts`](https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/cli/index.ts) (Benchmark CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Planning and context"]
  node_context["Context engine<br/>[context-engine.js]"]
  node_context_budget["Context budget<br/>[context-budget.js]"]
  node_intent_router["Intent router<br/>[intent-router.js]"]
  node_skill_router["Skill Router v3<br/>[skill-router-v3.js]"]
  node_skill_registry["Skill registry<br/>[registry.js]"]
end

subgraph group_execution["Execution runtime"]
  node_maestro["Maestro application"]
  node_core["Domain entities<br/>[entities.js]"]
  node_terminals["Terminal manager"]
  node_run_store[("Run persistence")]
end

subgraph group_assurance["Verification and resolution"]
  node_verification["Verification engine<br/>[engine.js]"]
  node_resolution["Resolution engine"]
  node_governance["Change governance"]
end

subgraph group_integration["Tool integrations"]
  node_providers["Provider adapters"]
  node_openai_plugin["OpenAI integration<br/>[adapter.js]"]
  node_context_ledger["Session context ledger<br/>[context-ledger.js]"]
end

subgraph group_benchmark["Benchmark harness"]
  node_benchmark_cli["Benchmark CLI<br/>[index.ts]"]
  node_scenarios["Scenario loader<br/>[loader.ts]"]
  node_orchestrator["Benchmark orchestrator<br/>[index.ts]"]
  node_drivers["Agent drivers<br/>[maestro.ts]"]
  node_evidence["Run evidence<br/>[index.ts]"]
  node_metrics["Metrics and comparison<br/>[statistics.ts]"]
  node_reports["Report generation<br/>[markdown.ts]"]
end

node_user(("Project user"))
node_benchmark_user(("Benchmark operator"))

node_user -->|"requests work"| node_maestro
node_maestro -->|"prepares context"| node_context
node_context -->|"budgets items"| node_context_budget
node_maestro -->|"routes intent"| node_intent_router
node_maestro -->|"selects skills"| node_skill_router
node_skill_router -->|"looks up skills"| node_skill_registry
node_maestro -->|"creates domain records"| node_core
node_maestro -->|"dispatches work"| node_providers
node_maestro -->|"manages sessions"| node_terminals
node_maestro -->|"persists runs"| node_run_store
node_maestro -->|"verifies results"| node_verification
node_verification -->|"creates checks"| node_core
node_verification -.->|"informs outcome"| node_resolution
node_maestro -->|"applies change policy"| node_governance
node_maestro -.->|"finalizes outcome"| node_resolution
node_maestro -.->|"serves plugin integration"| node_openai_plugin
node_openai_plugin -->|"tracks session context"| node_context_ledger
node_benchmark_user -->|"runs benchmark"| node_benchmark_cli
node_benchmark_cli -->|"loads scenarios"| node_scenarios
node_benchmark_cli -->|"starts runs"| node_orchestrator
node_orchestrator -->|"executes agents"| node_drivers
node_orchestrator -->|"preserves evidence"| node_evidence
node_orchestrator -.->|"compares runs"| node_metrics
node_orchestrator -->|"generates reports"| node_reports

click node_maestro "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/application/maestro-application.js"
click node_context "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/context/context-engine.js"
click node_context_budget "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/context/context-budget.js"
click node_intent_router "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/planner/intent-router.js"
click node_skill_router "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/planner/skill-router-v3.js"
click node_skill_registry "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/skills/registry.js"
click node_core "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/core/entities.js"
click node_providers "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/providers/provider-adapter.js"
click node_terminals "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/terminals/terminal-manager.js"
click node_run_store "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/store/json-file-run-store.js"
click node_verification "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/verification/engine.js"
click node_resolution "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/resolution/resolution-engine.js"
click node_governance "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/governance/change-governance.js"
click node_openai_plugin "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/integrations/openai/adapter.js"
click node_context_ledger "https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/integrations/openai/context-ledger.js"
click node_benchmark_cli "https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/cli/index.ts"
click node_scenarios "https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/scenarios/loader.ts"
click node_orchestrator "https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/orchestrator/index.ts"
click node_drivers "https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/drivers/maestro.ts"
click node_evidence "https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/evidence/index.ts"
click node_metrics "https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/metrics/statistics.ts"
click node_reports "https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/reporter/markdown.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_context,node_context_budget,node_intent_router,node_skill_router,node_skill_registry,node_user toneBlue
class node_maestro,node_core,node_terminals,node_run_store toneAmber
class node_verification,node_resolution,node_governance toneMint
class node_providers,node_openai_plugin,node_context_ledger toneRose
class node_benchmark_cli,node_scenarios,node_orchestrator,node_drivers,node_evidence,node_metrics,node_reports,node_benchmark_user toneIndigo
```

## Components

### Planning and context

- [Context engine](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/context/context-engine.js): `runtime/context/context-engine.js`
- [Context budget](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/context/context-budget.js): `runtime/context/context-budget.js`
- [Intent router](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/planner/intent-router.js): `runtime/planner/intent-router.js`
- [Skill Router v3](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/planner/skill-router-v3.js): `runtime/planner/skill-router-v3.js`
- [Skill registry](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/skills/registry.js): `runtime/skills/registry.js`

### Execution runtime

- [Maestro application](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/application/maestro-application.js): `runtime/application/maestro-application.js`
- [Domain entities](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/core/entities.js): `runtime/core/entities.js`
- [Terminal manager](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/terminals/terminal-manager.js): `runtime/terminals/terminal-manager.js`
- [Run persistence](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/store/json-file-run-store.js): `runtime/store/json-file-run-store.js`

### Verification and resolution

- [Verification engine](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/verification/engine.js): `runtime/verification/engine.js`
- [Resolution engine](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/resolution/resolution-engine.js): `runtime/resolution/resolution-engine.js`
- [Change governance](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/governance/change-governance.js): `runtime/governance/change-governance.js`

### Tool integrations

- [Provider adapters](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/providers/provider-adapter.js): `runtime/providers/provider-adapter.js`
- [OpenAI integration](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/integrations/openai/adapter.js): `runtime/integrations/openai/adapter.js`
- [Session context ledger](https://github.com/iapro-community/orquestrador-maestro/blob/v1/runtime/integrations/openai/context-ledger.js): `runtime/integrations/openai/context-ledger.js`

### Benchmark harness

- [Benchmark CLI](https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/cli/index.ts): `benchmark-harness/src/cli/index.ts`
- [Scenario loader](https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/scenarios/loader.ts): `benchmark-harness/src/scenarios/loader.ts`
- [Benchmark orchestrator](https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/orchestrator/index.ts): `benchmark-harness/src/orchestrator/index.ts`
- [Agent drivers](https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/drivers/maestro.ts): `benchmark-harness/src/drivers/maestro.ts`
- [Run evidence](https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/evidence/index.ts): `benchmark-harness/src/evidence/index.ts`
- [Metrics and comparison](https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/metrics/statistics.ts): `benchmark-harness/src/metrics/statistics.ts`
- [Report generation](https://github.com/iapro-community/orquestrador-maestro/blob/v1/benchmark-harness/src/reporter/markdown.ts): `benchmark-harness/src/reporter/markdown.ts`

### Other components

- **Project user**
- **Benchmark operator**

## Connections

- Project user → Maestro application: requests work (evidence: `README.md`)
- Maestro application → Context engine: prepares context (evidence: `runtime/application/maestro-application.js`)
- Context engine → Context budget: budgets items (evidence: `runtime/context/context-engine.js`)
- Maestro application → Intent router: routes intent (evidence: `runtime/application/maestro-application.js`)
- Maestro application → Skill Router v3: selects skills (evidence: `runtime/application/maestro-application.js`)
- Skill Router v3 → Skill registry: looks up skills (evidence: `runtime/planner/skill-router-v3.js`)
- Maestro application → Domain entities: creates domain records (evidence: `runtime/application/maestro-application.js`)
- Maestro application → Provider adapters: dispatches work (evidence: `runtime/application/maestro-application.js`)
- Maestro application → Terminal manager: manages sessions (evidence: `runtime/application/maestro-application.js`)
- Maestro application → Run persistence: persists runs (evidence: `runtime/application/maestro-application.js`)
- Maestro application → Verification engine: verifies results (evidence: `runtime/application/maestro-application.js`)
- Verification engine → Domain entities: creates checks (evidence: `runtime/verification/engine.js`)
- Verification engine → Resolution engine: informs outcome
- Maestro application → Change governance: applies change policy (evidence: `runtime/application/maestro-application.js`)
- Maestro application → Resolution engine: finalizes outcome
- Maestro application → OpenAI integration: serves plugin integration
- OpenAI integration → Session context ledger: tracks session context (evidence: `runtime/integrations/openai/context-ledger.js`)
- Benchmark operator → Benchmark CLI: runs benchmark
- Benchmark CLI → Scenario loader: loads scenarios
- Benchmark CLI → Benchmark orchestrator: starts runs
- Benchmark orchestrator → Agent drivers: executes agents (evidence: `benchmark-harness/src/index.ts`)
- Benchmark orchestrator → Run evidence: preserves evidence (evidence: `benchmark-harness/src/index.ts`)
- Benchmark orchestrator → Metrics and comparison: compares runs
- Benchmark orchestrator → Report generation: generates reports (evidence: `benchmark-harness/src/index.ts`)
