Logo Maestro Workflow

Maestro Workflow

Tổ chức
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.

Tổng quan

Nhà phát hànhsionic-ai
Kho mãsionic-maestro-skills
Tên kỹ năngmaestro-workflow
Sao
48
Bản fork
4
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được sionic-ai công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Maestro Workflow trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/sionic-ai/sionic-maestro-skills/tree/main/.claude/skills/maestro-workflow
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Maestro Workflow trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Maestro Workflow ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Maestro Workflow không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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%

Câu hỏi thường gặp

Kỹ năng AI Maestro Workflow làm được gì?

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.

Vì sao nên dùng Maestro Workflow trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Maestro Workflow là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Maestro Workflow trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/sionic-ai/sionic-maestro-skills/tree/main/.claude/skills/maestro-workflow. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Maestro Workflow?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Maestro Workflow với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Maestro Workflow với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Maestro Workflow có miễn phí không?

Kỹ năng này được sionic-ai phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇