Skip to content
/

Maestro

maestro-orchestrate · last commit 2026-05-02

Primitive shape 39 total
Subagents 39
00

Summary

Maestro (josstei/maestro-orchestrate) — Summary

One-line description

Multi-agent development orchestration platform with 39 specialist agents, Express + Standard 4-phase workflows, persistent session state, and a single canonical source tree compiled to Gemini CLI, Claude Code, Codex, and Qwen Code runtimes.

Vital stats

Field Value
Repo josstei/maestro-orchestrate
Stars 422
License Apache-2.0
Primary language JavaScript
Version 1.6.4
Contributors 4
Last commit 2026-05-02

What it is

Maestro is a cross-runtime orchestration platform that runs one canonical src/ codebase and generates runtime-specific adapters for four AI coding tools: Gemini CLI (primary), Claude Code, Codex, and Qwen Code. It provides 39 specialist agents (from accessibility_specialist to zos_sysprog), 12 user-facing commands, persistent session state, and an MCP server that serves agent methodology, skill content, and runtime context at delegation time.

Core value proposition

A single design → plan → execute → complete workflow usable without modification across all four major CLI coding agents, with session state persisted across CLI restarts, parallel or sequential subagent execution, and approval gates at design and code review phases.

Architecture in 3 bullets

  • src-first, generated-runtime: one canonical src/ tree; generate.js builds runtime-specific outputs into ./ (Gemini), claude/, plugins/maestro/ (Codex), qwen/
  • MCP server as intelligence backbone: 12 handler modules serve agent methodology, skills, session state, and workspace context; agents are thin stubs that delegate to MCP at runtime
  • Two workflow paths: Express (1 question, 1 agent, sequential) for simple tasks; Standard 4-phase (Design/Plan/Execute/Complete) with hard-gated approval points for medium/complex tasks
01

Overview

Maestro (josstei/maestro-orchestrate) — Overview

Problem statement

Different AI coding tools (Gemini CLI, Claude Code, Codex, Qwen Code) require incompatible agent definition formats, hook systems, command surfaces, and delegation syntax. Building an orchestration layer means maintaining four separate codebases. Maestro solves this by authorizing once in src/ and generating all four runtime targets from a single manifest.

Target users

  • Solo developers who switch between AI coding tools
  • Teams standardizing on a multi-agent development workflow
  • Projects that need persistent session state across CLI restarts

Design goals

  1. Runtime portability: one workflow, four runtimes — no feature divergence between Claude and Gemini
  2. Specialist depth: 39 pre-defined agents covering the full engineering function from UX to mainframe COBOL
  3. Session persistence: design documents, implementation plans, phase outcomes survive CLI restart via docs/maestro/ state directory
  4. Hard approval gates: no agent dispatched until design is explicitly approved; no session closed until code review passes Critical/Major finding check

Non-goals

  • Maestro is not an AI coding tool itself — it orchestrates tools
  • No hosted cloud service, no issue-tracker integration (unlike AO)
  • No autonomous PR creation (human drives the CLI)

Install surface

Runtime Install command
Gemini CLI gemini extensions install https://github.com/josstei/maestro-orchestrate
Claude Code claude plugin marketplace add josstei/maestro-orchestrate + claude plugin install maestro@maestro-orchestrator
Codex codex plugin marketplace add josstei/maestro-orchestrate then interactive install
Qwen Code qwen extensions install https://github.com/josstei/maestro-orchestrate

Public command surface (Claude, 19 skills)

Core (3): /orchestrate, /execute, /resume-session

Entry-point (9): /review-code, /debug-workflow, /archive, /status, /security-audit, /perf-check, /seo-audit, /a11y-audit, /compliance-check

Infrastructure (7, user-invocable: false): code-review, delegation, design-dialogue, execution, implementation-planning, session-management, validation

Gemini / Qwen commands (12 TOML commands)

/maestro:orchestrate, /maestro:execute, /maestro:resume, /maestro:status, /maestro:archive, /maestro:review-code, /maestro:debug-workflow, /maestro:security-audit, /maestro:perf-check, /maestro:seo-audit, /maestro:a11y-audit, /maestro:compliance-check

02

Architecture

Maestro (josstei/maestro-orchestrate) — Architecture

Principle: src-first, generated-runtime

src/              ← canonical source of truth
├── manifest.js   ← mapping: src files → (transforms, runtimes)
├── platforms/    ← Gemini | Claude | Codex | Qwen runtime configs
├── mcp/          ← MCP server (12 handler modules, 3 tool packs, 17 tools)
├── skills/       ← 7 shared skills (delegation, execution, validation, etc.)
├── templates/    ← design-document.md, implementation-plan.md
├── transforms/   ← 6 transform functions (parse-frontmatter, agent-stub, etc.)
├── hooks/        ← hook logic (session-start, before-agent, after-agent, session-end)
└── references/   ← architecture.md, orchestration-steps.md

generate.js       ← build boundary: runs transforms, emits to runtime dirs
  ↓
./               ← Gemini CLI (TOML commands, snake_case agents)
claude/          ← Claude Code plugin (kebab-case agents, 19 skills)
plugins/maestro/ ← Codex plugin (Markdown skills, spawn_agent)
qwen/            ← Qwen Code extension (Gemini-compatible format)

Runtime target comparison

Aspect Gemini CLI Claude Code Codex Qwen Code
Agent naming snake_case kebab-case kebab-case snake_case
Command format TOML .toml Markdown SKILL.md Markdown TOML (Gemini-compatible)
Delegation syntax {{agent}}(query: "...") Agent(subagent_type: "maestro:{{agent}}", ...) spawn_agent(...) {{agent}}(query: "...")
MCP server mcp/maestro-server.js (root) claude/mcp/maestro-server.js (thin wrapper) npx -p @josstei/maestro maestro-mcp-server mcp/maestro-server.js (root, MAESTRO_RUNTIME=qwen)
Hooks TOML hooks.json (SessionStart/BeforeAgent/AfterAgent/SessionEnd) JSON claude-hooks.json (SessionStart/PreToolUse×2/SessionEnd) None (no runtime hooks) SubagentStart/SubagentStop
Plan Mode Native N/A (direct file writes) N/A N/A

MCP server (17 tools across 3 packs)

Content pack (3): get_agent, get_skill_content, get_runtime_context

Workspace pack (4): initialize_workspace, assess_task_complexity, resolve_settings, validate_plan

Session pack (10): create_session, get_session_status, update_session, transition_phase, archive_session, enter_design_gate, get_design_gate_status, record_design_approval, scan_phase_changes, reconcile_phase

Transform pipeline

Transform Purpose
parse-frontmatter Parse YAML frontmatter, stash in pipeline state
extract-examples Extract <example> blocks (Claude only)
rebuild-frontmatter Emit runtime-specific YAML (tools, kind, fields)
agent-stub Replace agent body with MCP delegation stub
skill-discovery-stub Replace shared skill body with MCP tool stub
skill-metadata Inject user-invocable: false (Claude infrastructure skills)

Agent format (source)

---
name: coder
kind: local
description: "Implementation specialist..."
tools: [read_file, list_directory, glob, grep_search, write_file, replace,
        run_shell_command, write_todos, activate_skill, read_many_files, ask_user]
temperature: 0.2
max_turns: 25
timeout_mins: 10
---
Agent methodology loaded via MCP tool `get_agent`.

At runtime the body becomes a stub: Call get_agent(agents: ["coder"]).

Session state storage

Default: docs/maestro/ (configurable via MAESTRO_STATE_DIR)

docs/maestro/
├── plans/          ← design document + implementation plan
└── state/
    └── active-session.md   ← session state (phases, outcomes, downstream context)

Session ID format: YYYY-MM-DD-<kebab-task-slug>

Hook state is separate: ${MAESTRO_HOOKS_DIR:-<os.tmpdir()>/maestro-hooks-<uid>}/<session-id>/ — ephemeral, not accessible to the orchestrator.

03

Components

Maestro (josstei/maestro-orchestrate) — Components

39 Specialist Agents

Agent Kind
accessibility_specialist local
analytics_engineer local
api_designer local
architect local
cloud_architect local
cobol_engineer local
code_reviewer local
coder local
compliance_reviewer local
content_strategist local
copywriter local
data_engineer local
database_administrator local
db2_dba local
debugger local
design_system_engineer local
devops_engineer local
hlasm_assembler_specialist local
i18n_specialist local
ibm_i_specialist local
integration_engineer local
ml_engineer local
mlops_engineer local
mobile_engineer local
observability_engineer local
performance_engineer local
platform_engineer local
product_manager local
prompt_engineer local
refactor local
release_manager local
security_engineer local
seo_specialist local
site_reliability_engineer local
solutions_architect local
technical_writer local
tester local
ux_designer local
zos_sysprog local

7 Shared Skills (src/skills/shared/)

Skill Purpose
code-review/SKILL.md Code review protocol (blocking on Critical/Major)
delegation/SKILL.md Subagent prompt construction, context chaining, downstream consumer declaration
design-dialogue/SKILL.md Design conversation protocol (Quick/Standard/Deep depth)
execution/SKILL.md Execution mode gate (parallel vs sequential)
implementation-planning/SKILL.md Implementation plan drafting protocol
session-management/SKILL.md Session CRUD, state access, hook-level vs orchestration state
validation/SKILL.md Plan and output validation

MCP server module breakdown

12 handler implementations in src/mcp/handlers/:

  • get-agent.js — agent methodology serving
  • get-skill-content.js — skill/template/reference serving
  • get-runtime-context.js — runtime config snapshot (tool names, delegation syntax, paths)
  • initialize-workspace.js — directory setup (rejects paths inside extension caches)
  • assess-task-complexity.js — repo analysis signals for Express/Standard routing
  • validate-plan.js — dependency DAG check, phase count limits, file overlap, agent compatibility
  • resolve-settings.js — env var + .env resolution for MAESTRO_* vars
  • session-state-core.js — session-state transaction helpers
  • session-state-tools.js — session CRUD (create/get/update/transition/archive)
  • design-gate.js — design gate lifecycle (3 tools: enter/status/record-approval)
  • reconciliation.js — phase reconciliation (scan_phase_changes, reconcile_phase)
  • blocker-parser.js — child-agent blocker surfacing

Templates (src/templates/)

  • design-document.md — approved design document structure
  • implementation-plan.md — phase-based implementation plan with YAML frontmatter
  • session-state.md — active session state template

Entry-point registry (src/entry-points/registry.js)

9 entry-points: review, debug, archive, status, security-audit, perf-check, seo-audit, a11y-audit, compliance-check

3 core commands (separate registry): orchestrate, execute, resume

Note: reviewreview-code, debugdebug-workflow, resumeresume-session in Claude (HOST_RESERVED_NAMES collision avoidance).

Generator (scripts/generate.js + src/generator/)

Modules: entry-point-expander.js, file-writer.js, generation-session.js, manifest-curator.js, manifest-expander.js, payload-builder.js, registry-scanner.js, stale-pruner.js

Run via npm run generate. CI checks for zero-diff (tests/integration/zero-diff.test.js).

NPM binaries

Binary File Purpose
maestro-mcp-server bin/maestro-mcp-server.js MCP server entrypoint (used by Codex via npx)
maestro-install-codex scripts/install-codex-plugin.js Codex plugin installation helper
05

Prompts

Maestro (josstei/maestro-orchestrate) — Prompt Excerpts

Excerpt 1: GEMINI.md — Technology Recommendation Gate

Source: GEMINI.md

## Context Budget
- Minimize simultaneous skill activations — deactivate skills you are no longer using.
- Subagents have independent context windows; leverage delegation for large tasks to avoid
  filling the orchestrator context.

Prompting technique: Explicit context budget management. Maestro anticipates the finite context window of the orchestrator and instructs it to deactivate skills after use and leverage subagent isolation for heavy work.


Excerpt 2: orchestration-steps.md — Hard Gate pattern

Source: src/references/orchestration-steps.md (Step 7)

<HARD-GATE>
This batch MUST complete before any `enter_plan_mode` call. Some runtimes
(notably Gemini CLI) deregister MCP tools once Plan Mode is active —
attempting to fetch these skills from inside Plan Mode will fail with
"tool not found" and strand the orchestrator.
</HARD-GATE>

Prompting technique: XML-tagged <HARD-GATE> blocks with explicit failure mode explanation. The instruction doesn't just say "do this" — it explains why the constraint exists (Gemini deregisters MCP tools in Plan Mode), which helps the model understand the constraint is not arbitrary.


Excerpt 3: orchestration-steps.md — Session ID Invariance

Source: src/references/orchestration-steps.md (Step 9a)

<HARD-GATE>
Session ID Invariance — the session_id chosen here MUST be passed unchanged
to every MCP call that accepts a session_id parameter for the remainder of
this workflow. Do NOT substitute a placeholder id for initial calls and a final
id later — the design gate is keyed by session_id, so a drift orphans the approved
gate and strands the design document. `create_session` rejects with
`DESIGN_GATE_SESSION_MISMATCH` when it detects an approved gate for a different
session_id than the one passed in.
</HARD-GATE>

Prompting technique: Name the failure mode (DESIGN_GATE_SESSION_MISMATCH) explicitly. By giving the error code in the prompt, the model can recognize it if it occurs and trace it back to the constraint. The anti-pattern is also described: "substitute a placeholder id."


Excerpt 4: orchestration-steps.md — Anti-pattern block

Source: src/references/orchestration-steps.md (Technology Gate)

<ANTI-PATTERN>
WRONG: user requests "fan site" → options include React, Next.js, Astro
CORRECT: user requests "fan site" → recommended option is vanilla HTML/CSS/JS
</ANTI-PATTERN>

Prompting technique: Concrete WRONG/CORRECT examples paired with the rule. This mirrors few-shot prompting embedded in the instruction, not in the conversation history. Particularly effective for edge cases where the model's training distribution would otherwise override the explicit rule.


Excerpt 5: delegation SKILL.md — Downstream Consumer Declaration

Source: src/skills/shared/delegation/SKILL.md

Every delegation prompt must declare who will consume the agent's output:

Your output will be consumed by: [downstream agent name(s)] who need [specific information they require]

This primes the agent to structure their Downstream Context section for maximum utility
to the next agent in the chain.

Prompting technique: Recipient priming — explicitly stating the consumer of an agent's output shapes how it formats that output. The agent writes for the next agent, not for the human, which produces structured handoff artifacts rather than prose summaries.


Excerpt 6: coder.md agent — Frontmatter as config

Source: agents/coder.md

---
temperature: 0.2
max_turns: 25
timeout_mins: 10
tools:
  - read_file
  - list_directory
  - glob
  - grep_search
  - write_file
  - replace
  - run_shell_command
---

Prompting technique: Agent specialization via frontmatter constraints. Low temperature (0.2) for implementation work reduces creative drift. Explicit tool list prevents the coder from using tools outside its domain (no ask_user, no design tools). max_turns: 25 and timeout_mins: 10 create bounded delegation units — the orchestrator knows the worst-case cost before dispatching.

09

Uniqueness

Maestro (josstei/maestro-orchestrate) — Uniqueness vs Seeds

Position in taxonomy

Maestro is a cross-runtime orchestration harness — the only system in the corpus that maintains a single canonical source tree compiled to four incompatible AI coding tool runtimes. It is not a specification document generator, not a memory layer, and not an autonomous background daemon.

Differentiators vs seed frameworks

vs claude-flow / ruflo

Claude-flow is a swarm coordinator with shared SQLite memory. Maestro has no swarm topology and no shared memory. Maestro's differentiator is cross-runtime portability and structured session state persistence. Claude-flow targets Claude Code only; Maestro targets Claude Code, Gemini CLI, Codex, and Qwen Code.

vs BMAD-METHOD

BMAD produces specification documents that a human then uses to implement. Maestro skips human implementation entirely — it delegates implementation to specialist agents with bounded tool access and turn limits. Both use design-document → plan → execute phases but BMAD's consumer is a human, Maestro's consumer is an agent.

vs taskmaster-ai

Taskmaster manages a linear task list in a single CLI session. Maestro manages multi-phase, multi-agent sessions with cross-phase context chaining, blocker handling, and mandatory code review gates.

vs openspec / kiro

OpenSpec and Kiro produce requirement specifications. Maestro consumes a design dialogue to produce a design document, then autonomously implements it. The tool roles are complementary but opposite in direction.

vs agent-os

agent-os is a personal memory system with protocol files. Maestro is a workflow harness with no persistent memory beyond session state. agent-os informs single-agent behavior; Maestro coordinates 39 agents.

vs claude-conductor

claude-conductor coordinates multiple Claude instances in parallel. Maestro uses a single orchestrator dispatching to specialist agents sequentially or in parallel — the topology is similar but Maestro is cross-model and the orchestrator is stateful.

Unique primitives

Primitive Description
src-first, generated-runtime Single canonical codebase compiled to 4 runtimes via manifest + transforms
Design gate (server-side) MCP server enforces design approval before create_session can proceed — not advisory
validate_plan (DAG) Server-side dependency cycle detection, file overlap check, agent compatibility validation before plan approval
Downstream context chaining Each phase produces structured downstream_context; next phases receive accumulated context from all blocked_by phases
<HARD-GATE> notation XML-tagged mandatory constraints with failure mode explanation embedded in orchestration instructions
ANTI-PATTERN blocks Inline wrong/correct examples in orchestration prompts
transition_phase per-agent (parallel) Explicitly forbids merging parallel agents' outputs into one call — enforces phase-level file attribution
Technology Recommendation Gate Prompt-level rule preventing React/Next.js recommendation for static/fan-site requests — enforced via ANTI-PATTERN block
39 IBM mainframe agents cobol_engineer, hlasm_assembler_specialist, ibm_i_specialist, db2_dba, zos_sysprog — unique coverage of legacy enterprise stack
Recovery protocol scan_phase_changesreconcile_phase — detects filesystem changes when agent returned no manifest

What Maestro is NOT

  • Not a code review tool (it delegates to code_reviewer agent)
  • Not an issue tracker integration (no Linear/GitHub/GitLab polling)
  • Not a background daemon (human drives every /orchestrate invocation)
  • Not a memory system (no vector store, no knowledge base)
  • Not production-ready for autonomous PR creation (human remains in the loop)

Closest peer in corpus

agentflow-berabuddies is structurally closest: both define DAG-based multi-agent workflows with explicit phase dependencies. Maestro differentiates on: (1) cross-runtime portability, (2) server-side approval gates, (3) 39 pre-defined specialist agents, (4) session persistence. agentflow differentiates on: (1) Python DSL with >> operator, (2) native EC2/ECS/SSH execution targets, (3) no approval gates.

04

Workflow

Maestro (josstei/maestro-orchestrate) — Workflow

Routing

After startup (steps 1-6), complexity is assessed:

assess_task_complexity
  → simple   → Express Workflow  (steps 31-40)
  → medium   → Standard Workflow (steps 10-30)
  → complex  → Standard Workflow (steps 10-30)

Startup (Turn 1, tool calls only, no text)

  1. get_runtime_context — load delegation syntax, tool names, paths
  2. resolve_settings — resolve all MAESTRO_* env vars
  3. initialize_workspace — validate and create state directory
  4. get_session_status — check for active/resumable session
  5. assess_task_complexity — classify task
  6. Parse MAESTRO_DISABLED_AGENTS; exclude from planning

Standard Workflow (4 phases)

Phase 1: Design

Pre-entry: enter_design_gate(session_id) — blocks create_session until record_design_approval

Pre-load via single batch: get_skill_content(["architecture", "design-dialogue", "design-document", "implementation-planning", "implementation-plan"])

Hard gate: batch must complete before enter_plan_mode (Gemini deregisters MCP tools in Plan Mode).

Design dialogue:

  • Depth selector: Quick / Standard / Deep
  • One question at a time via ask_user
  • Technology Gate: static/fan-site requests must recommend vanilla HTML/CSS/JS (not React/Next.js)
  • Sections presented one at a time; each approved before proceeding

Write design document → exit Plan Mode → record_design_approval

Phase 2: Plan

validate_plan before presenting for approval — enforces: phase count limits, dependency DAG (no cycles), unknown agents, file overlap, agent-deliverable compatibility.

User approval gate: Approve / Revise / Abort

Write implementation plan to <state_dir>/plans/

Phase 3: Execute

Execution mode gate: present Parallel or Sequential (never "Ask" — that's an internal setting value).

Load: get_skill_content(["execution"]) + ["session-management", "session-state"]

create_session with validated plan object (exact shape from validate_plan).

Delegation loop (per phase or parallel batch):

  1. get_agent(agents: ["<agent>"]) — load full methodology
  2. Dispatch via registered agent tool (never generalist)
  3. Parse ## Blockers section — if non-empty, ask user before transition_phase
  4. transition_phase — persists files_created, files_modified, files_deleted, downstream_context

Hard gate (parallel): transition_phase called individually for every completed phase in batch; merging payloads is forbidden.

transition_phase recovery:

  • HANDOFF_INCOMPLETE: downstream_context empty despite files produced → re-request
  • requires_reconciliation: true: no manifest AND no downstream_context → Recovery Protocol: scan_phase_changes → user confirm → reconcile_phase

Phase 4: Complete

Load code-review skill.

If non-documentation files changed: delegate to code_reviewer agent.

Hard gate: Critical/Major findings → re-delegate to implementing agent. Orchestrator never writes code directly.

archive_session (if MAESTRO_AUTO_ARCHIVE is true or unset).

Present final summary.

Express Workflow (simple tasks)

Bypasses design gate, execution mode gate, implementation plan.

  1. Verify classification is simple (single agent, single phase)
  2. 1-2 clarifying questions from Area 1 only (via ask_user tool, not plain text)
  3. Present structured brief as plain text; separate ask_user call for approval
  4. create_session with workflow_mode: "express", exactly 1 phase
  5. Load agent-base-protocol + filesystem-safety-protocol
  6. Delegate to assigned agent (registered tool, not generalist)
  7. transition_phase — mandatory before code review
  8. Delegate to code_reviewer agent (1 retry on Critical/Major)
  9. archive_session

Phase artifacts

Phase Artifact Location
Design Design document <state_dir>/plans/design-<session-id>.md
Plan Implementation plan <state_dir>/plans/plan-<session-id>.md
Execute Phase outcomes + downstream_context <state_dir>/state/active-session.md
Complete Archived session <state_dir>/state/archived/

Key environment variables

Variable Default Purpose
MAESTRO_STATE_DIR docs/maestro Session and plan state root
MAESTRO_EXECUTION_MODE ask ask / parallel / sequential
MAESTRO_AUTO_ARCHIVE true Auto-archive on completion
MAESTRO_MAX_RETRIES 2 Phase retry limit
MAESTRO_MAX_CONCURRENT 0 (all ready) Parallel batch chunk size
MAESTRO_DISABLED_AGENTS none Comma-separated agents to exclude
06

Memory Context

Maestro (josstei/maestro-orchestrate) — Memory & Context

Session state storage

Primary: docs/maestro/ (configurable via MAESTRO_STATE_DIR)

<state_dir>/
├── plans/
│   ├── design-<session-id>.md
│   └── plan-<session-id>.md
└── state/
    ├── active-session.md
    └── archived/
        └── <session-id>-<timestamp>.md

Session state is Markdown with YAML frontmatter. All state operations are available via MCP tools (preferred) or direct file write (fallback).

Session ID format

YYYY-MM-DD-<kebab-task-slug>

Chosen at step 9a of the orchestration workflow and held invariant across all subsequent MCP calls. Drift between design gate session_id and create_session session_id causes DESIGN_GATE_SESSION_MISMATCH rejection.

What persists per phase

Each completed phase records:

  • files_created — list of created file paths
  • files_modified — list of modified file paths
  • files_deleted — list of deleted file paths
  • downstream_context — structured handoff block for the next agent in the chain

The downstream context chain is the primary cross-phase memory mechanism. Phase N+1 receives accumulated context from all phases it is blocked_by.

Hook-level state (ephemeral, separate system)

Location: ${MAESTRO_HOOKS_DIR:-<os.tmpdir()>/maestro-hooks-<uid>}/<session-id>/

Contents:

  • active-agent file — written by pre-delegation hook, cleared by post-delegation hook

This state is NOT accessible to the orchestrator. It is managed exclusively by hooks. Stale directories (>2 hours) are pruned by session-start and pre-delegation hooks.

No persistent vector memory

Maestro does not ship a knowledge base or vector index. Agent methodology is loaded fresh from the MCP server (get_agent) at each delegation step.

Context budget management

The orchestrator (GEMINI.md) explicitly instructs:

  • Deactivate skills after use — minimize simultaneous activations
  • Subagents have independent context windows — delegate heavy tasks to avoid filling orchestrator context
  • For long-running sessions, summarize completed phase outcomes rather than re-reading full outputs

Cross-session resume

/maestro:resume (or /resume-session on Claude) re-reads active-session.md and restores the orchestrator to the appropriate phase. get_session_status is called at startup (step 4) to detect resumable sessions automatically.

MCP content serving model

All agent methodology and skill content is filesystem-only (no cloud, no vector retrieval):

Content type MCP tool Source
Agent methodology get_agent agents/*.md (compiled to stub at install time)
Skill content get_skill_content src/skills/shared/*/SKILL.md
Templates get_skill_content src/templates/*.md
Runtime context get_runtime_context src/platforms/*/runtime-config.js

Lazy loading is intentional — execution-phase skills are NOT pre-loaded during startup (to avoid filling orchestrator context before Phase 3 begins).

07

Orchestration

Maestro (josstei/maestro-orchestrate) — Orchestration

Pattern

Hierarchical orchestrator → specialist agent, with optional parallel batching in Phase 3.

The orchestrator never implements code directly. All implementation is delegated to specialist agents via the agent's registered runtime tool (not the generalist).

Orchestrator (TechLead)
  ├── Phase 1: design_system_engineer / architect / product_manager (via design dialogue)
  ├── Phase 2: (orchestrator self-plans, validates via validate_plan)
  ├── Phase 3 (execution):
  │     Parallel batch A: [coder, tester]        ← parallel if no blocked_by dependency
  │     Sequential phase B: [code_reviewer]       ← blocked_by Phase A
  └── Phase 4: code_reviewer (blocking approval gate)

Delegation mechanics

Per the get_runtime_context response, the orchestrator reads delegation.constraints and shapes each dispatch accordingly. Delegation syntax differs by runtime:

Runtime Syntax
Gemini / Qwen {{agent}}(query: "...")
Claude Code Agent(subagent_type: "maestro:{{agent}}", prompt: "...")
Codex spawn_agent(...)

Each agent's YAML frontmatter specifies temperature, max_turns, timeout_mins, and tools — the orchestrator uses these constraints, not its own defaults.

Plan-level dependency graph

validate_plan enforces a DAG on the blocked_by field of each phase:

  • No cycles
  • No unknown agent names
  • No file ownership conflicts (two phases writing the same file)
  • Agent-deliverable compatibility (read-only agents cannot own file-creating phases)

If validate_plan returns error-severity violations, the orchestrator must fix the plan and re-validate before presenting it for approval.

Parallel execution

When MAESTRO_EXECUTION_MODE=parallel (or user selects Parallel at execution mode gate):

  • Phases with no unsatisfied blocked_by are dispatched as a batch
  • MAESTRO_MAX_CONCURRENT chunks the batch (0 = all at once)
  • transition_phase is called INDIVIDUALLY per completed phase — merging payloads is forbidden
  • Downstream context from each phase is sourced to only the phases that list it in blocked_by

Blocker handling

After each agent returns:

  1. Parse ## Blockers section in the response
  2. If non-empty: aggregate blockers across batch → ask user via ask_user tool → re-delegate
  3. Only when blockers are empty: call transition_phase

Recovery protocol (reconciliation)

If transition_phase returns requires_reconciliation: true (no manifest AND no downstream_context):

  1. scan_phase_changes — detect filesystem changes since phase start
  2. Present to user for confirmation
  3. reconcile_phase — commit changes to session state

Design gate enforcement

enter_design_gate blocks create_session until record_design_approval is called. This is a server-side enforcement mechanism — the MCP server rejects create_session calls if the design gate is open. The constraint exists even for runtimes without native Plan Mode (Codex, Claude).

Hooks (Claude runtime)

Event Matcher Script Purpose
SessionStart hook-runner.js claude session-start Initialize hook state dir
PreToolUse Agent hook-runner.js claude before-agent Write active-agent file
PreToolUse Bash policy-enforcer.js Shell command safety policy
SessionEnd hook-runner.js claude session-end Clean up hook state

Code review gate (Phase 4)

If execution changed non-documentation files: mandatory code_reviewer delegation.

  • Critical or Major findings → re-delegate to implementing agent (1 retry)
  • Orchestrator never writes code to fix findings
  • Second failure → escalate to user
08

Ui Cli Surface

Maestro (josstei/maestro-orchestrate) — UI & CLI Surface

No standalone CLI

Maestro has no maestro CLI binary for end users. The interface is entirely through the host runtime's native command surface.

Claude Code commands (19 skills)

Core (3 user-invocable)

Skill Purpose
/orchestrate Start Standard or Express orchestration workflow
/execute Resume from Phase 3 (execution)
/resume-session Resume the last active session from any phase

Entry-point (9 user-invocable)

Skill Purpose
/review-code Standalone code review (delegates to code_reviewer)
/debug-workflow Standalone debugging session
/archive Archive the active session
/status Show current session status
/security-audit Security review
/perf-check Performance analysis
/seo-audit SEO audit
/a11y-audit Accessibility audit
/compliance-check Compliance review

Infrastructure (7, user-invocable: false)

code-review, delegation, design-dialogue, execution, implementation-planning, session-management, validation — surfaced in Claude's skill picker but serve as MCP stubs; not intended for direct invocation.

Gemini CLI / Qwen Code commands (12 TOML commands, prefix /maestro:)

orchestrate, execute, resume, status, archive, review-code, debug-workflow, security-audit, perf-check, seo-audit, a11y-audit, compliance-check

Codex commands (Markdown skills, prefix $maestro:)

Same 12 commands. Invoked as $maestro:orchestrate, $maestro:review-code, etc.

MCP server

All runtimes connect to the Maestro MCP server at startup. Server provides 17 tools across 3 packs. There is no HTTP API or web dashboard.

Runtime Server launch
Gemini / Qwen node mcp/maestro-server.js (repo root)
Claude Code node ${CLAUDE_PLUGIN_ROOT}/mcp/maestro-server.js
Codex npx -p @josstei/maestro@<version> maestro-mcp-server

NPM binaries (for tooling, not end-user CLI)

Binary Purpose
maestro-mcp-server MCP server entrypoint (Codex spawns via npx)
maestro-install-codex Installs Codex plugin from marketplace

Hooks (Claude, runtime-integrated)

PreToolUse(Bash) hook runs policy-enforcer.js on every shell command — provides safety rails without requiring the orchestrator to validate every run_shell_command call.

No web dashboard

Maestro is entirely CLI/IDE-native. Session state is in docs/maestro/ as readable Markdown files — human-readable without a dashboard.

ask_user constraints (Gemini)

Headers must be ≤16 characters for UI chip display. Maestro instructs the orchestrator to use short headers: Database, Auth, Approach rather than full questions.

Related frameworks

same archetype · same primary tool · same memory type

claude-mem (thedotmack) ★ 78k

Background worker service captures every tool call as an observation, AI-compresses sessions, and auto-injects relevant past…

pi (badlogic/earendil) ★ 55k

A minimal, hackable, multi-provider terminal coding agent that adapts to your workflows via npm-installable TypeScript Extensions…

Agent Skills (Addy Osmani) ★ 46k

Encodes senior-engineer software development lifecycle as 23 auto-routed skills and 7 slash commands for any AI coding agent.

wshobson/agents Plugin Marketplace ★ 36k

Single Markdown source for 83 domain-specialized plugins that auto-generates idiomatic artifacts for five AI coding harnesses.

TabbyML/Tabby ★ 34k

Self-hosted AI coding assistant server (alternative to GitHub Copilot) with admin dashboard, RAG-based completions, and multi-IDE…

Compound Engineering ★ 17k

Make each unit of engineering work compound into easier future work via brainstorm→plan→execute→review→learn cycles.