Maestro Workflow logo

Maestro Workflow

Organization
sionic-ai
maestro-workflow

Multi-LLM orchestration implementing the 5-stage coding workflow: Example Analysis → Hypothesis → Implementation → Debug Loop → Recursive Improvement. Based on "Towards a Science of Scaling Agent Systems" (Kim et al., 2025): - Centralized Consult architecture (Claude orchestrates, others advise) - Measured coordination (avoid MAS overhead in tool-heavy stages) - Tests-first selection (Poetiq pattern, not voting) Use when: Debugging complex issues, analyzing unfamiliar code, refactoring, or any task that benefits from diverse LLM perspectives with verification.

Overview

Publishersionic-ai
Repositorysionic-maestro-skills
Skill namemaestro-workflow
Stars
48
Forks
4
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by sionic-ai on GitHub. Read the source before you install it.

Installation

Install the Maestro Workflow AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/sionic-ai/sionic-maestro-skills/tree/main/.claude/skills/maestro-workflow
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sionic-ai/sionic-maestro-skills.git /tmp/sionic-maestro-skills
mkdir -p .claude/skills
cp -r /tmp/sionic-maestro-skills/.claude/skills/maestro-workflow .claude/skills/maestro-workflow
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Maestro Workflow in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Maestro Workflow on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Maestro Workflow is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Maestro Workflow: Multi-LLM Orchestration with Measured Coordination

Core Philosophy (Paper-Based)

This workflow implements findings from "Towards a Science of Scaling Agent Systems":

1. Tool-Coordination Trade-off

  • Paper finding: Tool-heavy tasks suffer from multi-agent coordination overhead
  • Our rule: Only Claude Code (orchestrator) runs tools (edit files, run tests)
  • Sub-agents (Codex/Gemini) provide TEXT ADVICE ONLY

2. Capability Saturation (~45% threshold)

  • Paper finding: When single-agent baseline exceeds ~45%, MAS returns diminish
  • Our rule: If you're confident about the solution, SKIP ensemble generation
  • Ask yourself: "Am I stuck, or do I just want confirmation?"

3. Error Amplification Prevention

  • Paper finding: Independent agents amplify errors 17.2x without verification
  • Our rule: ALWAYS verify with tests before accepting any candidate
  • Use maestro_select_best with tests_first mode (not voting!)

Available Tools

ToolPurposeWhen to Use
maestro_consultSingle model consultationAnalysis, code review, specific questions
maestro_ensemble_generateMultiple candidatesHypothesis generation, solution exploration
maestro_select_bestPick best candidateAfter ensemble, with test/lint results
maestro_pack_contextSmart context packingBefore any consultation
maestro_run_stageExecute workflow stageStructured 5-stage execution
maestro_workflow_stateCheck progressMonitor budget, see history
maestro_get_metricsPaper-aligned metricsPerformance analysis

The 5-Stage Workflow

Stage 1: Example Analysis (analyze)

Goal: Freeze facts before guessing.

Process:

  1. Gather context with file reads, grep, ls
  2. Optionally use maestro_consult(provider="gemini") for large file summarization
  3. Document observations, repro steps, affected modules

Output (JSON):

json
{
  "observations": ["Test fails with IndexError on line 42"],
  "repro_steps": ["Run pytest test_auth.py::test_login"],
  "affected_modules": ["src/auth.py", "src/db.py"],
  "invariants": ["Must not break existing login flow"]
}

Coordination Policy: Low overhead allowed (2 consults max)


Stage 2: Hypothesis Formulation (hypothesize)

Goal: Generate competing explanations with testable predictions.

Process:

  1. Use maestro_ensemble_generate(task="Top 3 root causes...", providers=["codex", "gemini"])
  2. Each hypothesis must have a VERIFICATION TEST
  3. Use maestro_select_best to pick most testable hypothesis

Output (JSON):

json
{
  "hypotheses": [
    {
      "id": "H1",
      "claim": "Off-by-one error in array indexing",
      "verification_test": "Add edge case test with empty array",
      "confidence": 0.7
    }
  ],
  "selected": "H1",
  "test_command": "pytest test_auth.py::test_empty_users -v"
}

Coordination Policy: Ensemble ENCOURAGED (best stage for MAS)


Stage 3: Code Implementation (implement)

Goal: Apply minimal, testable changes.

Process:

  1. Claude Code (orchestrator) edits the file directly
  2. Optionally consult maestro_consult(provider="codex") for diff suggestions
  3. Run tests IMMEDIATELY after edit

Key Rules:

  • NO parallel implementations (creates conflicts)
  • ONE change at a time
  • Test after EVERY change

Coordination Policy: Single agent PREFERRED (tool-heavy = bad for MAS)


Stage 4: Iterative Debugging (debug)

Goal: Fix without divergence.

Process:

  1. Analyze the NEW error (what changed?)
  2. Update hypothesis confidence
  3. Make SINGLE smallest change
  4. Test again

WARNING: Paper shows sequential debugging DEGRADES with multi-agent!

Coordination Policy:

  • Single agent ONLY for first 2 iterations
  • Consult external ONLY if stuck for 3+ iterations
  • Feed error logs into context

Iteration Limit: 5 (escalate if exceeded)


Stage 5: Recursive Improvement (improve)

Goal: Refactor and stabilize after tests pass.

Process:

  1. Review for code quality (but don't over-engineer!)
  2. Identify edge cases
  3. Add regression tests
  4. Optional: maestro_consult(provider="claude") for safety review

Entry Condition: ALL TESTS MUST PASS

Coordination Policy: Ensemble OK for review/suggestions


Example Usage Patterns

Pattern 1: Bug Investigation

User: "The login test is failing, can you debug it?"

1. [ANALYZE] Read test file, error logs
   maestro_pack_context(files=["tests/test_auth.py"], errors=[error_log], stage="analyze")

2. [HYPOTHESIZE] Generate root cause theories
   maestro_ensemble_generate(task="Top 3 causes for IndexError in auth...", providers=["codex", "gemini"])

3. [SELECT] Pick most testable hypothesis
   maestro_select_best(candidates=..., mode="tests_first", test_results=[...])

4. [IMPLEMENT] Fix (Claude edits directly)
   Edit file, run pytest

5. [DEBUG] If test still fails, iterate
   Single agent mode, minimal changes

6. [IMPROVE] After tests pass
   Add edge case tests, review for safety

Pattern 2: Code Review with Diverse Perspectives

User: "Review this PR for security issues"

1. maestro_pack_context(files=[changed_files], stage="analyze")

2. maestro_ensemble_generate(
     task="Security review: identify vulnerabilities in...",
     providers=["codex", "gemini", "claude"]
   )

3. maestro_select_best(candidates=..., mode="llm_judge", criteria=["security", "severity"])

Pattern 3: Checking Metrics Mid-Workflow

User: "How much coordination overhead have we used?"

maestro_workflow_state()
# Returns: consults used, budget remaining, efficiency score

Coordination Budget

Per Workflow Limits (configurable):

  • Max consults per stage: 2
  • Max total consults: 6
  • Capability threshold: 45%

When to SKIP ensemble:

  • You're confident in the solution
  • It's a tool-heavy stage (implement, debug)
  • Budget is exhausted

Error Handling

If a sub-agent fails:

  1. Check stderr in the response
  2. Try a different provider
  3. Fall back to single-agent mode
  4. Document the failure in tracing

Metrics (Paper-Aligned)

After any workflow, check:

maestro_get_metrics()

Key metrics:

  • Coordination Overhead (O%): Extra calls vs single-agent
  • Efficiency Score (Ec): Success / overhead ratio
  • Test Coverage Rate: Selections that had test signals

Target: O% < 300%, Ec > 0.4, Test Coverage > 80%

Frequently asked questions

What does the Maestro Workflow AI skill do?

Multi-LLM orchestration implementing the 5-stage coding workflow: Example Analysis → Hypothesis → Implementation → Debug Loop → Recursive Improvement. Based on "Towards a Science of Scaling Agent Systems" (Kim et al., 2025): - Centralized Consult architecture (Claude orchestrates, others advise) - Measured coordination (avoid MAS overhead in tool-heavy stages) - Tests-first selection (Poetiq pattern, not voting) Use when: Debugging complex issues, analyzing unfamiliar code, refactoring, or any task that benefits from diverse LLM perspectives with verification.

Why use Maestro Workflow on TypingMind?

Because you install it once and use it with any model. Maestro Workflow is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Maestro Workflow in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/sionic-ai/sionic-maestro-skills/tree/main/.claude/skills/maestro-workflow. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Maestro Workflow?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Maestro Workflow?

As many as you like. As long as a model supports skills, you can use Maestro Workflow with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Maestro Workflow AI skill free?

It is published on GitHub by sionic-ai. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇