maestro-ai-cli 2.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- maestro_ai_cli-2.4.0/LICENSE +21 -0
- maestro_ai_cli-2.4.0/PKG-INFO +504 -0
- maestro_ai_cli-2.4.0/README.md +461 -0
- maestro_ai_cli-2.4.0/pyproject.toml +105 -0
- maestro_ai_cli-2.4.0/setup.cfg +4 -0
- maestro_ai_cli-2.4.0/src/maestro_ai_cli.egg-info/PKG-INFO +504 -0
- maestro_ai_cli-2.4.0/src/maestro_ai_cli.egg-info/SOURCES.txt +208 -0
- maestro_ai_cli-2.4.0/src/maestro_ai_cli.egg-info/dependency_links.txt +1 -0
- maestro_ai_cli-2.4.0/src/maestro_ai_cli.egg-info/entry_points.txt +3 -0
- maestro_ai_cli-2.4.0/src/maestro_ai_cli.egg-info/requires.txt +22 -0
- maestro_ai_cli-2.4.0/src/maestro_ai_cli.egg-info/top_level.txt +1 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/__init__.py +79 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/__main__.py +4 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/ag_ui.py +325 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/audit.py +950 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/benchmark.py +1290 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/blame.py +333 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/budget.py +131 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/cache.py +921 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/chat.py +915 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/ci.py +177 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/ci_agent.py +199 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/ci_github_actions.py +169 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/ci_gitlab_ci.py +178 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/cleanup.py +42 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/cli.py +1845 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/codebase_graph.py +946 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/contracts.py +446 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/cost_backfill.py +269 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/council.py +565 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/diff.py +375 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/doctor.py +342 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/dynamic.py +328 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/errors.py +113 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/eval.py +552 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/eventsource.py +291 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/explain.py +466 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/knowledge.py +1128 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/knowledge_graph.py +349 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/live.py +393 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/loader.py +3745 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/mcp_server.py +624 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/mcts.py +515 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/memory.py +1498 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/models.py +2293 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/multi.py +382 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/otel.py +450 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/plugins.py +363 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/policy.py +220 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/py.typed +0 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/relationships.py +56 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/replan.py +1896 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/report.py +430 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/routing.py +485 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/runners.py +8191 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/scaffold.py +886 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/scheduler.py +3479 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/shell.py +275 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/skill_registry.py +342 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/status.py +383 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/suggest.py +430 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/symbols.py +393 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/tui/__init__.py +5 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/tui/app.py +321 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/tui/app.tcss +43 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/tui/widgets.py +898 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/utils.py +573 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/watch.py +2112 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/__init__.py +5 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/app.py +62 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/routes_agui.py +289 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/routes_api.py +1212 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/routes_sse.py +99 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/state.py +137 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/app.js +128 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/charts.js +826 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/dashboard.js +697 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/index.html +157 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/log-viewer.js +325 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/logs.html +79 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/new-run.html +178 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/new-run.js +994 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/run-detail.js +744 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/run.html +160 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/web/static/style.css +1994 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/workspace_assertions.py +313 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/workspace_index.py +669 -0
- maestro_ai_cli-2.4.0/src/maestro_cli/worktree.py +525 -0
- maestro_ai_cli-2.4.0/tests/test_advanced_judge.py +701 -0
- maestro_ai_cli-2.4.0/tests/test_ag_ui.py +984 -0
- maestro_ai_cli-2.4.0/tests/test_allowed_tools.py +1139 -0
- maestro_ai_cli-2.4.0/tests/test_anchor_support.py +131 -0
- maestro_ai_cli-2.4.0/tests/test_approval.py +434 -0
- maestro_ai_cli-2.4.0/tests/test_audit.py +5177 -0
- maestro_ai_cli-2.4.0/tests/test_benchmark.py +610 -0
- maestro_ai_cli-2.4.0/tests/test_blame.py +1006 -0
- maestro_ai_cli-2.4.0/tests/test_budget.py +519 -0
- maestro_ai_cli-2.4.0/tests/test_cache.py +3136 -0
- maestro_ai_cli-2.4.0/tests/test_callback_multi.py +295 -0
- maestro_ai_cli-2.4.0/tests/test_cfi.py +663 -0
- maestro_ai_cli-2.4.0/tests/test_chat.py +5949 -0
- maestro_ai_cli-2.4.0/tests/test_checkpoint.py +369 -0
- maestro_ai_cli-2.4.0/tests/test_ci.py +274 -0
- maestro_ai_cli-2.4.0/tests/test_ci_github_actions.py +160 -0
- maestro_ai_cli-2.4.0/tests/test_ci_gitlab_ci.py +122 -0
- maestro_ai_cli-2.4.0/tests/test_cleanup.py +230 -0
- maestro_ai_cli-2.4.0/tests/test_cli.py +5420 -0
- maestro_ai_cli-2.4.0/tests/test_codebase_graph.py +393 -0
- maestro_ai_cli-2.4.0/tests/test_compact.py +172 -0
- maestro_ai_cli-2.4.0/tests/test_context_budget.py +397 -0
- maestro_ai_cli-2.4.0/tests/test_context_mode.py +684 -0
- maestro_ai_cli-2.4.0/tests/test_context_model.py +180 -0
- maestro_ai_cli-2.4.0/tests/test_contracts.py +2071 -0
- maestro_ai_cli-2.4.0/tests/test_copilot_engine.py +481 -0
- maestro_ai_cli-2.4.0/tests/test_cost_backfill.py +1346 -0
- maestro_ai_cli-2.4.0/tests/test_cost_tracking.py +503 -0
- maestro_ai_cli-2.4.0/tests/test_council.py +1409 -0
- maestro_ai_cli-2.4.0/tests/test_diff.py +1194 -0
- maestro_ai_cli-2.4.0/tests/test_doc_sync.py +297 -0
- maestro_ai_cli-2.4.0/tests/test_doctor.py +831 -0
- maestro_ai_cli-2.4.0/tests/test_dynamic_group.py +1491 -0
- maestro_ai_cli-2.4.0/tests/test_e2e_real_engines.py +107 -0
- maestro_ai_cli-2.4.0/tests/test_error_codes.py +201 -0
- maestro_ai_cli-2.4.0/tests/test_eval.py +2294 -0
- maestro_ai_cli-2.4.0/tests/test_event_callback.py +1112 -0
- maestro_ai_cli-2.4.0/tests/test_eventsource.py +880 -0
- maestro_ai_cli-2.4.0/tests/test_explain.py +134 -0
- maestro_ai_cli-2.4.0/tests/test_explain_trajectory.py +1007 -0
- maestro_ai_cli-2.4.0/tests/test_failure_analysis.py +280 -0
- maestro_ai_cli-2.4.0/tests/test_fault_tolerance.py +254 -0
- maestro_ai_cli-2.4.0/tests/test_gemini_engine.py +419 -0
- maestro_ai_cli-2.4.0/tests/test_goal.py +411 -0
- maestro_ai_cli-2.4.0/tests/test_group_tasks.py +395 -0
- maestro_ai_cli-2.4.0/tests/test_imports.py +526 -0
- maestro_ai_cli-2.4.0/tests/test_integration_features.py +848 -0
- maestro_ai_cli-2.4.0/tests/test_intent_filtering.py +218 -0
- maestro_ai_cli-2.4.0/tests/test_jsonl_output.py +641 -0
- maestro_ai_cli-2.4.0/tests/test_judge_evaluation.py +694 -0
- maestro_ai_cli-2.4.0/tests/test_judge_extras.py +406 -0
- maestro_ai_cli-2.4.0/tests/test_judge_quorum.py +962 -0
- maestro_ai_cli-2.4.0/tests/test_knowledge.py +1403 -0
- maestro_ai_cli-2.4.0/tests/test_knowledge_archive.py +212 -0
- maestro_ai_cli-2.4.0/tests/test_knowledge_graph.py +365 -0
- maestro_ai_cli-2.4.0/tests/test_layered_context.py +506 -0
- maestro_ai_cli-2.4.0/tests/test_live.py +1248 -0
- maestro_ai_cli-2.4.0/tests/test_live_integration.py +286 -0
- maestro_ai_cli-2.4.0/tests/test_llama_engine.py +548 -0
- maestro_ai_cli-2.4.0/tests/test_loader.py +7683 -0
- maestro_ai_cli-2.4.0/tests/test_loader_validation.py +2323 -0
- maestro_ai_cli-2.4.0/tests/test_loader_watch.py +1403 -0
- maestro_ai_cli-2.4.0/tests/test_matrix.py +360 -0
- maestro_ai_cli-2.4.0/tests/test_mcp_server.py +1477 -0
- maestro_ai_cli-2.4.0/tests/test_mcts.py +611 -0
- maestro_ai_cli-2.4.0/tests/test_memory.py +793 -0
- maestro_ai_cli-2.4.0/tests/test_models.py +3586 -0
- maestro_ai_cli-2.4.0/tests/test_multi.py +1623 -0
- maestro_ai_cli-2.4.0/tests/test_ollama.py +131 -0
- maestro_ai_cli-2.4.0/tests/test_otel.py +884 -0
- maestro_ai_cli-2.4.0/tests/test_pipeline_integration.py +7221 -0
- maestro_ai_cli-2.4.0/tests/test_plugins.py +1165 -0
- maestro_ai_cli-2.4.0/tests/test_policy.py +715 -0
- maestro_ai_cli-2.4.0/tests/test_policy_fuzz.py +3711 -0
- maestro_ai_cli-2.4.0/tests/test_quickwins.py +942 -0
- maestro_ai_cli-2.4.0/tests/test_qwen.py +132 -0
- maestro_ai_cli-2.4.0/tests/test_recursive_context.py +789 -0
- maestro_ai_cli-2.4.0/tests/test_regression_guards.py +177 -0
- maestro_ai_cli-2.4.0/tests/test_relationships.py +396 -0
- maestro_ai_cli-2.4.0/tests/test_replan.py +2675 -0
- maestro_ai_cli-2.4.0/tests/test_report.py +989 -0
- maestro_ai_cli-2.4.0/tests/test_resilience.py +289 -0
- maestro_ai_cli-2.4.0/tests/test_routing.py +1422 -0
- maestro_ai_cli-2.4.0/tests/test_routing_strategy.py +162 -0
- maestro_ai_cli-2.4.0/tests/test_run_events.py +310 -0
- maestro_ai_cli-2.4.0/tests/test_runners.py +13924 -0
- maestro_ai_cli-2.4.0/tests/test_runners_watch.py +4443 -0
- maestro_ai_cli-2.4.0/tests/test_scaffold.py +1706 -0
- maestro_ai_cli-2.4.0/tests/test_scheduler.py +12153 -0
- maestro_ai_cli-2.4.0/tests/test_scheduler_watch.py +1092 -0
- maestro_ai_cli-2.4.0/tests/test_sdk_surface.py +271 -0
- maestro_ai_cli-2.4.0/tests/test_secrets.py +214 -0
- maestro_ai_cli-2.4.0/tests/test_shell.py +838 -0
- maestro_ai_cli-2.4.0/tests/test_signals.py +451 -0
- maestro_ai_cli-2.4.0/tests/test_smart_context.py +231 -0
- maestro_ai_cli-2.4.0/tests/test_smart_eval.py +230 -0
- maestro_ai_cli-2.4.0/tests/test_status.py +1912 -0
- maestro_ai_cli-2.4.0/tests/test_suggest.py +3261 -0
- maestro_ai_cli-2.4.0/tests/test_symbols.py +341 -0
- maestro_ai_cli-2.4.0/tests/test_tags.py +311 -0
- maestro_ai_cli-2.4.0/tests/test_taint.py +539 -0
- maestro_ai_cli-2.4.0/tests/test_tui.py +1950 -0
- maestro_ai_cli-2.4.0/tests/test_utils.py +1087 -0
- maestro_ai_cli-2.4.0/tests/test_v126_features.py +766 -0
- maestro_ai_cli-2.4.0/tests/test_v127_features.py +617 -0
- maestro_ai_cli-2.4.0/tests/test_v128_features.py +361 -0
- maestro_ai_cli-2.4.0/tests/test_v129_features.py +460 -0
- maestro_ai_cli-2.4.0/tests/test_v130_features.py +264 -0
- maestro_ai_cli-2.4.0/tests/test_v1_14.py +837 -0
- maestro_ai_cli-2.4.0/tests/test_v1_contract.py +521 -0
- maestro_ai_cli-2.4.0/tests/test_validation_warnings.py +1626 -0
- maestro_ai_cli-2.4.0/tests/test_verbose_quiet.py +174 -0
- maestro_ai_cli-2.4.0/tests/test_verify_and_retry.py +675 -0
- maestro_ai_cli-2.4.0/tests/test_watch.py +6671 -0
- maestro_ai_cli-2.4.0/tests/test_web_agui.py +1004 -0
- maestro_ai_cli-2.4.0/tests/test_web_api.py +2061 -0
- maestro_ai_cli-2.4.0/tests/test_web_sse.py +388 -0
- maestro_ai_cli-2.4.0/tests/test_web_tokens.py +235 -0
- maestro_ai_cli-2.4.0/tests/test_webhook.py +373 -0
- maestro_ai_cli-2.4.0/tests/test_workspace_assertions.py +1734 -0
- maestro_ai_cli-2.4.0/tests/test_workspace_index.py +662 -0
- maestro_ai_cli-2.4.0/tests/test_worktree.py +2201 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tiago Perez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: maestro-ai-cli
|
|
3
|
+
Version: 2.4.0
|
|
4
|
+
Summary: CLI orchestrator for multi-step AI execution plans (Codex, Claude, Gemini, Copilot, Qwen, Ollama, Llama)
|
|
5
|
+
Author: Tiago Perez
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/tiagojcperez/maestro-cli
|
|
8
|
+
Project-URL: Repository, https://github.com/tiagojcperez/maestro-cli
|
|
9
|
+
Project-URL: Issues, https://github.com/tiagojcperez/maestro-cli/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/tiagojcperez/maestro-cli/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: ai,cli,orchestration,llm,dag,claude,codex,gemini,workflow,agents
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: PyYAML>=6.0
|
|
27
|
+
Provides-Extra: live
|
|
28
|
+
Requires-Dist: rich>=13.0.0; extra == "live"
|
|
29
|
+
Provides-Extra: web
|
|
30
|
+
Requires-Dist: fastapi>=0.115.0; extra == "web"
|
|
31
|
+
Requires-Dist: uvicorn[standard]>=0.32.0; extra == "web"
|
|
32
|
+
Provides-Extra: tui
|
|
33
|
+
Requires-Dist: textual<9.0.0,>=1.0.0; extra == "tui"
|
|
34
|
+
Provides-Extra: agui
|
|
35
|
+
Requires-Dist: ag-ui-protocol>=0.1.14; extra == "agui"
|
|
36
|
+
Provides-Extra: mcp
|
|
37
|
+
Requires-Dist: mcp>=1.26.0; extra == "mcp"
|
|
38
|
+
Provides-Extra: otel
|
|
39
|
+
Requires-Dist: opentelemetry-api>=1.20.0; extra == "otel"
|
|
40
|
+
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "otel"
|
|
41
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.20.0; extra == "otel"
|
|
42
|
+
Dynamic: license-file
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
██ ██ ████ ██████ ████ ██████ █████ ████
|
|
46
|
+
███ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
|
47
|
+
██ █ ██ ██████ █████ ███ ██ █████ ██ ██
|
|
48
|
+
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
|
49
|
+
██ ██ ██ ██ ██████ ████ ██ ██ ██ ████
|
|
50
|
+
|
|
51
|
+
Maestro CLI -- Version 2.4.0
|
|
52
|
+
CLI orchestrator for multi-step AI execution plans
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
# Maestro CLI
|
|
56
|
+
|
|
57
|
+
[](https://github.com/tiagojcperez/maestro-cli/actions/workflows/ci.yml)
|
|
58
|
+
[](https://codecov.io/gh/tiagojcperez/maestro-cli)
|
|
59
|
+
[](LICENSE)
|
|
60
|
+
[](https://www.python.org/downloads/)
|
|
61
|
+
|
|
62
|
+
**Maestro turns a YAML file into a parallel, dependency-aware pipeline of AI agents and shell commands.**
|
|
63
|
+
Instead of gluing engine CLIs together with bash, you declare the pipeline once and get parallel DAG
|
|
64
|
+
scheduling, context passing between steps, cost budgets, quality gates, and deterministic, replayable logs
|
|
65
|
+
for free -- across Claude, Codex, Gemini, Copilot, Qwen, Ollama, and Llama, from one dependency-light CLI
|
|
66
|
+
(PyYAML is the only required dependency; everything else is stdlib or optional).
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
# the smallest useful plan
|
|
70
|
+
version: 1
|
|
71
|
+
name: hello
|
|
72
|
+
tasks:
|
|
73
|
+
- id: greet
|
|
74
|
+
engine: claude
|
|
75
|
+
prompt: "Say hello in three languages."
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
maestro run plan.yaml # runs the DAG; one engine call, deterministic logs in .maestro-runs/
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
> That example needs the `claude` CLI on PATH. To try Maestro with **zero setup and no API keys**, run the engine-free [`examples/demo_plan.yaml`](examples/demo_plan.yaml) from the [Quickstart](#quickstart) below.
|
|
83
|
+
|
|
84
|
+
### Supported Engines
|
|
85
|
+
|
|
86
|
+
<p>
|
|
87
|
+
<img src="https://img.shields.io/badge/Claude-D97757?style=for-the-badge&logo=claude&logoColor=white" alt="Claude"> <img src="https://img.shields.io/badge/Codex-412991?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0yMi4yODIgOS44MjFhNS45ODUgNS45ODUgMCAwIDAtLjUxNi00LjkxIDYuMDQ2IDYuMDQ2IDAgMCAwLTYuNTEtMi45QTYuMDY1IDYuMDY1IDAgMCAwIDQuOTgxIDQuMThhNS45ODUgNS45ODUgMCAwIDAtMy45OTggMi45IDYuMDQ2IDYuMDQ2IDAgMCAwIC43NDMgNy4wOTcgNS45OCA1Ljk4IDAgMCAwIC41MSA0LjkxMSA2LjA1MSA2LjA1MSAwIDAgMCA2LjUxNSAyLjlBNS45ODUgNS45ODUgMCAwIDAgMTMuMjYgMjRhNi4wNTYgNi4wNTYgMCAwIDAgNS43NzItNC4yMDYgNS45OSA1Ljk5IDAgMCAwIDMuOTk3LTIuOSA2LjA1NiA2LjA1NiAwIDAgMC0uNzQ3LTcuMDczek0xMy4yNiAyMi40M2E0LjQ3NiA0LjQ3NiAwIDAgMS0yLjg3Ni0xLjA0bC4xNDEtLjA4MSA0Ljc3OS0yLjc1OGEuNzk1Ljc5NSAwIDAgMCAuMzkyLS42ODF2LTYuNzM3bDIuMDIgMS4xNjhhLjA3MS4wNzEgMCAwIDEgLjAzOC4wNTJ2NS41ODNhNC41MDQgNC41MDQgMCAwIDEtNC40OTQgNC40OTR6TTMuNiAxOC4zMDRhNC40NyA0LjQ3IDAgMCAxLS41MzUtMy4wMTRsLjE0Mi4wODUgNC43ODMgMi43NTlhLjc3MS43NzEgMCAwIDAgLjc4IDBsNS44NDMtMy4zNjl2Mi4zMzJhLjA4LjA4IDAgMCAxLS4wMzMuMDYyTDkuNzQgMTkuOTVhNC41IDQuNSAwIDAgMS02LjE0LTEuNjQ2ek0yLjM0IDcuODk2YTQuNDg1IDQuNDg1IDAgMCAxIDIuMzY2LTEuOTczVjExLjZhLjc2Ni43NjYgMCAwIDAgLjM4OC42NzdsNS44MTUgMy4zNTUtMi4wMiAxLjE2OGEuMDc2LjA3NiAwIDAgMS0uMDcxIDBsLTQuODMtMi43ODZBNC41MDQgNC41MDQgMCAwIDEgMi4zNCA3Ljg3MnptMTYuNTk3IDMuODU1bC01LjgzMy0zLjM4N0wxNS4xMTkgNy4yYS4wNzYuMDc2IDAgMCAxIC4wNzEgMGw0LjgzIDIuNzkxYTQuNDk0IDQuNDk0IDAgMCAxLS42NzYgOC4xMDV2LTUuNjc4YS43OS43OSAwIDAgMC0uNDA3LS42Njd6bTIuMDEtMy4wMjNsLS4xNDEtLjA4NS00Ljc3NC0yLjc4MmEuNzc2Ljc3NiAwIDAgMC0uNzg1IDBMOS40MDkgOS4yM1Y2Ljg5N2EuMDY2LjA2NiAwIDAgMSAuMDI4LS4wNjFsNC44My0yLjc4N2E0LjUgNC41IDAgMCAxIDYuNjggNC42NnptLTEyLjY0IDQuMTM1bC0yLjAyLTEuMTY0YS4wOC4wOCAwIDAgMS0uMDM4LS4wNTdWNi4wNzVhNC41IDQuNSAwIDAgMSA3LjM3NS0zLjQ1M2wtLjE0Mi4wOEw4LjcwNCA1LjQ2YS43OTUuNzk1IDAgMCAwLS4zOTMuNjgxem0xLjA5Ny0yLjM2NWwyLjYwMi0xLjUgMi42MDcgMS41djIuOTk5bC0yLjU5NyAxLjUtMi42MDctMS41eiIvPjwvc3ZnPg==&logoColor=white" alt="Codex"> <img src="https://img.shields.io/badge/Gemini-886FBF?style=for-the-badge&logo=googlegemini&logoColor=white" alt="Gemini"> <img src="https://img.shields.io/badge/Copilot-000?style=for-the-badge&logo=githubcopilot&logoColor=white" alt="Copilot"> <img src="https://img.shields.io/badge/Qwen-5A29E4?style=for-the-badge&logo=alibabadotcom&logoColor=white" alt="Qwen"> <img src="https://img.shields.io/badge/Ollama-000000?style=for-the-badge&logo=ollama&logoColor=white" alt="Ollama"> <img src="https://img.shields.io/badge/Llama-0467DF?style=for-the-badge&logo=meta&logoColor=white" alt="Llama">
|
|
88
|
+
</p>
|
|
89
|
+
|
|
90
|
+
**Contents:** [Why Maestro?](#why-maestro) · [Python SDK](#python-sdk) · [Install](#install) · [Quickstart](#quickstart) · [Features](#features) · [Plan Schema](#plan-schema-compact) · [CLI Commands](#cli-commands) · [Writing Plans](#writing-effective-plans) · [Models](#models-quick-reference) · [Architecture](#architecture) · [Troubleshooting](#troubleshooting)
|
|
91
|
+
|
|
92
|
+
## Why Maestro?
|
|
93
|
+
|
|
94
|
+
- **One YAML, many engines** -- orchestrate Claude, Codex, Gemini, Copilot, Qwen, Ollama, and Llama (plus raw shell commands) in a single plan, with per-engine model aliases and reasoning-effort control.
|
|
95
|
+
- **Parallel DAG scheduling** -- declare dependencies and Maestro runs tasks in the right order with configurable parallelism, matrix expansion, and nested sub-plans.
|
|
96
|
+
- **Context that flows** -- pass outputs between tasks with 9 context modes, from zero-cost BM25 selection to multi-model council deliberation, with token budgets and progressive compaction.
|
|
97
|
+
- **Quality gates built in** -- LLM-as-Judge (rubrics, G-Eval, debate, quorum), zero-cost typed assertions, and `verify_command` retries with feedback injection keep results honest.
|
|
98
|
+
- **Cost-aware and resilient** -- per-task and cross-run budgets, retries with backoff, auto-escalation to stronger models, cross-engine fallback, and circuit breakers.
|
|
99
|
+
- **Deterministic and observable** -- every run is logged to JSON/JSONL with hash-chained, tamper-detectable events; watch it live in a TUI, a Web UI, or `maestro report`.
|
|
100
|
+
- **Secure by default** -- untrusted-context taint tracking, prompt-injection containment (`allowed_tools:`), and 23 audit rules via `maestro audit`.
|
|
101
|
+
- **Dependency-light** -- PyYAML is the only required dependency; everything else is stdlib or an optional extra.
|
|
102
|
+
|
|
103
|
+
For the exhaustive capability list, see [Features](#features) below. | v1 stability contract: [docs/V1_API_FREEZE.md](docs/V1_API_FREEZE.md) | Migration from 0.x: [docs/MIGRATING_TO_V1.md](docs/MIGRATING_TO_V1.md)
|
|
104
|
+
|
|
105
|
+
## Python SDK
|
|
106
|
+
|
|
107
|
+
Maestro CLI ships with a programmatic API (29 stable exports) and a `py.typed` marker for static analysis:
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from maestro_cli import load_plan, run_plan
|
|
111
|
+
|
|
112
|
+
plan = load_plan("plan.yaml")
|
|
113
|
+
result = run_plan(plan)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Install
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
git clone https://github.com/tiagojcperez/maestro-cli.git
|
|
120
|
+
cd maestro-cli
|
|
121
|
+
|
|
122
|
+
pip install -e . # CLI only
|
|
123
|
+
pip install -e ".[live]" # CLI + Rich live table (--output live)
|
|
124
|
+
pip install -e ".[tui]" # CLI + Textual TUI (--output tui)
|
|
125
|
+
pip install -e ".[web]" # CLI + Web UI (FastAPI + uvicorn)
|
|
126
|
+
pip install -e ".[agui]" # CLI + AG-UI protocol endpoint
|
|
127
|
+
pip install -e ".[mcp]" # CLI + MCP server for IDE integration
|
|
128
|
+
pip install -e ".[otel]" # CLI + OpenTelemetry OTLP exporter
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Requires Python >= 3.11 and at least one engine CLI on PATH (`codex`, `claude`, `gemini`, `copilot`, `qwen`, `ollama`, `llama`).
|
|
132
|
+
|
|
133
|
+
## Quickstart
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Validate a plan (examples/demo_plan.yaml runs with no API keys)
|
|
137
|
+
maestro validate examples/demo_plan.yaml
|
|
138
|
+
# -> "Plan is valid: ... name: demo, tasks: 4"
|
|
139
|
+
|
|
140
|
+
# Run it -- the demo uses only shell tasks, so no API keys are needed
|
|
141
|
+
maestro run examples/demo_plan.yaml
|
|
142
|
+
# -> "... 4 ok / 0 failed / 0 skipped" (artifacts written to .maestro-runs/)
|
|
143
|
+
|
|
144
|
+
# Dry run (build commands without executing)
|
|
145
|
+
maestro run examples/demo_plan.yaml --dry-run
|
|
146
|
+
|
|
147
|
+
# Run with parallel tasks
|
|
148
|
+
maestro run examples/demo_plan.yaml --max-parallel 3 --execution-profile yolo
|
|
149
|
+
|
|
150
|
+
# Resume from last failed run
|
|
151
|
+
maestro run examples/demo_plan.yaml --resume-last
|
|
152
|
+
|
|
153
|
+
# Stream structured events to stdout
|
|
154
|
+
maestro run examples/demo_plan.yaml --output jsonl
|
|
155
|
+
|
|
156
|
+
# Run multiple plans with shared budget
|
|
157
|
+
maestro run examples/demo_plan.yaml examples/demo_plan.yaml --parallel
|
|
158
|
+
|
|
159
|
+
# Adaptive re-planning on failure (multi-variant search, tournament selection,
|
|
160
|
+
# elitism and diversity floors are documented in docs/CLI_REFERENCE.md)
|
|
161
|
+
maestro replan examples/demo_plan.yaml --max-attempts 3
|
|
162
|
+
|
|
163
|
+
# Autonomous metric-driven iteration loop (your plan needs a watch: block)
|
|
164
|
+
maestro watch your-plan.yaml --output tui
|
|
165
|
+
|
|
166
|
+
# Multi-model interactive chat
|
|
167
|
+
maestro chat --engine claude --model sonnet
|
|
168
|
+
|
|
169
|
+
# Trace failure causality in a completed run
|
|
170
|
+
maestro blame .maestro-runs/<run-dir>/
|
|
171
|
+
|
|
172
|
+
# Diagnose environment
|
|
173
|
+
maestro doctor --json
|
|
174
|
+
|
|
175
|
+
# Security audit a plan
|
|
176
|
+
maestro audit examples/demo_plan.yaml --fix
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Next steps:** write your own plan with the [Plan Guide](docs/PLAN_GUIDE.md) -> copy a ready-made recipe from the [Playbook](docs/PLAYBOOK.md) -> look up any flag in the [CLI Reference](docs/CLI_REFERENCE.md).
|
|
180
|
+
|
|
181
|
+
## Features
|
|
182
|
+
|
|
183
|
+
### Core
|
|
184
|
+
|
|
185
|
+
| Category | Features |
|
|
186
|
+
|----------|----------|
|
|
187
|
+
| **Scheduling** | YAML DAG format, dependency validation, cycle detection (DFS), parallel execution with `max_parallel`, matrix expansion, batch task mode |
|
|
188
|
+
| **Engines** | `codex exec`, `claude --print`, `gemini`, `copilot` (autopilot), `qwen`, `ollama` (local), `llama` (local via llama-cpp), raw shell commands; execution profiles (plan/safe/yolo) |
|
|
189
|
+
| **Prompts & context** | Inline, file, or markdown extraction; inter-task context passing (9 modes: raw/selective/summarized/map_reduce/recursive/layered/structural/council/knowledge_graph); progressive compaction; privacy pipeline (`output_redact`, `context_allowlist`) |
|
|
190
|
+
| **Reliability** | `verify_command`, workspace assertions (`assert:`), `max_retries` with feedback injection, retry strategies (constant/linear/exponential), `allow_failure`, auto-escalation, cross-engine fallback, circuit breakers, `checkpoint` protocol |
|
|
191
|
+
| **Cost control** | Per-task cost/token tracking, budget limits (`max_cost_usd`), cross-run budget tracking (`budget_period`), per-engine pricing tables, budget warning thresholds |
|
|
192
|
+
| **Quality gates** | LLM-as-Judge with typed assertions, Likert rubrics, G-Eval, adversarial debate judge, comparative eval, named presets, `guard_command`, quorum voting, timeout auto-scaling |
|
|
193
|
+
| **Security** | `maestro audit` (SEC001-SEC023) + `--fix`; `allowed_tools:` per-task restriction; untrusted-context detection and taint propagation; control flow integrity; trajectory guardrails; semantic firewall for MCP metadata; phantom workspace; git worktree isolation per task |
|
|
194
|
+
| **Caching** | Policy-versioned SHA-256 Merkle DAG keys, short-lived negative cache (`negative_cache_ttl_sec`), contamination-aware bypass, pre-hash normalization, eviction "why" fields, `--no-cache`, `maestro explain` / `maestro status` |
|
|
195
|
+
| **Flow control** | Conditional execution (`when`), `fail_fast`, `--only`/`--skip` filtering, `--tags`/`--skip-tags`, approval gates |
|
|
196
|
+
| **Secrets** | `secrets:` plan field (explicit list or `auto`), `--mask-secrets` CLI flag |
|
|
197
|
+
|
|
198
|
+
<details>
|
|
199
|
+
<summary><b>Advanced capabilities</b> — relational contracts, adaptive search, persistent memory, policies, watch loops, blame, event sourcing</summary>
|
|
200
|
+
|
|
201
|
+
| Category | Features |
|
|
202
|
+
|----------|----------|
|
|
203
|
+
| **Relational safety** | Typed `contract_type:` producers, `consumes_contracts:` consumers, `consistency_group:` membership, `reconcile_after:` group gates |
|
|
204
|
+
| **Adaptive** | Mid-task signals (`signals: true`) — progress, metrics, timeout extension, budget query, artifacts; dynamic task decomposition (`dynamic_group: true`); cross-run knowledge auto-injection with prompt-relevant retrieval + `{{ knowledge_index }}`; adaptive temporal routing with trend detection + cross-task affinity; population-based search (best-of-N models); MCTS workflow search (draft/debug/improve, UCB1, `tree.jsonl`); self-evolving `replan` (multi-variant, tournament, elitism, diversity, novelty/knowledge priors, stepping stones) |
|
|
205
|
+
| **Knowledge + memory** | SQLite-backed per-plan memory store (`.maestro-cache/memory/<plan>.db`) with WAL, automatic JSONL migration, time-decayed confidence, bi-temporal records (`valid_from`/`valid_to` + `recorded_at`), provenance/trust labels, conflict resolution, relation confidence, poisoning quarantine, and score history (`ScoreRecord`, `plan_hash`, `quality_score`) |
|
|
206
|
+
| **Plan intelligence** | `deliberation: true` — haiku pre-call skips engine if task is self-answerable; `maestro validate` prints DAG density report (S_complex, W17/W18/W19 warnings); `output_schema` for structured inter-task typed outputs |
|
|
207
|
+
| **Imports** | `imports:` for reusable task templates with prefix namespacing, nested imports, cycle detection |
|
|
208
|
+
| **Policies** | Declarative runtime policies (`block`/`warn`/`audit`) with safe AST evaluation |
|
|
209
|
+
| **Event sourcing** | Hash-chained `events.jsonl` with tamper detection; `maestro verify` validates integrity |
|
|
210
|
+
| **Blame** | `maestro blame` traces failure causality, classifies root causes, suggests fixes |
|
|
211
|
+
| **Watch** | Autonomous iteration loops (`maestro watch`): custom metric-driven mode and built-in plan improvement mode (`mode: improve`); git commit/rollback, consolidation agent with safety gates (trust labels, instructionality rejection, firewall), experiments.jsonl |
|
|
212
|
+
|
|
213
|
+
</details>
|
|
214
|
+
|
|
215
|
+
### Output Modes
|
|
216
|
+
|
|
217
|
+
| Mode | Flag | Description |
|
|
218
|
+
|------|------|-------------|
|
|
219
|
+
| **Text** | `--output text` | Default. Human-readable `[maestro]` console output |
|
|
220
|
+
| **JSONL** | `--output jsonl` | Structured JSON Lines events to stdout; suppresses text |
|
|
221
|
+
| **Live** | `--output live` | Real-time Rich table with task progress, cost, duration. `pip install maestro-ai-cli[live]` |
|
|
222
|
+
| **TUI** | `--output tui` | Interactive Textual app with DAG panel, detail panel, event feed, keyboard nav. `pip install maestro-ai-cli[tui]` |
|
|
223
|
+
|
|
224
|
+
### Observability
|
|
225
|
+
|
|
226
|
+
| Feature | Description |
|
|
227
|
+
|---------|-------------|
|
|
228
|
+
| **Token tracking** | `TokenUsage` per task (input/cached/output), aggregated in manifest and summary |
|
|
229
|
+
| **Web UI** | Dashboard with stats, charts, cost trends, and collaboration summaries; run detail with ownership/blockers/activity, Gantt timeline, and log viewer |
|
|
230
|
+
| **Structured errors** | Error codes E001-E072 (validation), E100-E110 (runtime); warning codes W1-W30 |
|
|
231
|
+
| **Mid-task signals** | `task_progress`, `task_metric`, `task_artifact`, `timeout_extended` events from running tasks |
|
|
232
|
+
| **OTel export** | `maestro export-otel` emits per-task spans with `gen_ai.*` attributes, optional content capture/redaction, and task events such as `knowledge_poison_alert` and `memory_write` |
|
|
233
|
+
| **Diagnostics** | `maestro doctor` checks Python, PyYAML, engine CLIs, plugins, Git; `--full` adds cache, knowledge, skills, plans, prior runs |
|
|
234
|
+
|
|
235
|
+
## Plan Schema (compact)
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
version: 1
|
|
239
|
+
name: my-plan
|
|
240
|
+
workspace_root: /path/to/project
|
|
241
|
+
max_parallel: 3
|
|
242
|
+
max_cost_usd: 25.00
|
|
243
|
+
budget_warning_pct: 0.8
|
|
244
|
+
|
|
245
|
+
defaults:
|
|
246
|
+
timeout_sec: 600
|
|
247
|
+
claude:
|
|
248
|
+
model: sonnet
|
|
249
|
+
|
|
250
|
+
tasks:
|
|
251
|
+
- id: setup
|
|
252
|
+
command: ["bash", "-c", "npm install"]
|
|
253
|
+
tags: [infra]
|
|
254
|
+
|
|
255
|
+
- id: implement
|
|
256
|
+
depends_on: [setup]
|
|
257
|
+
engine: claude
|
|
258
|
+
model: haiku
|
|
259
|
+
escalation: [haiku, sonnet, opus]
|
|
260
|
+
negative_cache_ttl_sec: 300
|
|
261
|
+
prompt: "Implement the feature..."
|
|
262
|
+
verify_command: "npm test"
|
|
263
|
+
max_retries: 2
|
|
264
|
+
|
|
265
|
+
- id: review
|
|
266
|
+
depends_on: [implement]
|
|
267
|
+
context_from: [implement]
|
|
268
|
+
context_mode: summarized
|
|
269
|
+
engine: claude
|
|
270
|
+
cache: false
|
|
271
|
+
prompt: "Review changes: {{ implement.summary }}"
|
|
272
|
+
judge:
|
|
273
|
+
method: g_eval
|
|
274
|
+
criteria:
|
|
275
|
+
- type: rubric
|
|
276
|
+
name: correctness
|
|
277
|
+
levels:
|
|
278
|
+
- { score: 1, description: "Major bugs" }
|
|
279
|
+
- { score: 5, description: "Correct and well-tested" }
|
|
280
|
+
pass_threshold: 0.7
|
|
281
|
+
on_fail: warn
|
|
282
|
+
|
|
283
|
+
- id: deploy
|
|
284
|
+
depends_on: [review]
|
|
285
|
+
when: "{{ review.status }} == success"
|
|
286
|
+
requires_approval: true
|
|
287
|
+
command: "echo 'Deploying...'"
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Full annotated schema with all fields: [docs/PLAN_GUIDE.md](docs/PLAN_GUIDE.md)
|
|
291
|
+
|
|
292
|
+
## CLI Commands
|
|
293
|
+
|
|
294
|
+
| Group | Commands |
|
|
295
|
+
|-------|----------|
|
|
296
|
+
| **Plan lifecycle** | `validate`, `check`, `run`, `replan`, `scaffold`, `watch` |
|
|
297
|
+
| **Observability** | `report`, `diff`, `explain`, `status`, `eval`, `suggest`, `blame`, `budget` |
|
|
298
|
+
| **Security** | `audit`, `verify` |
|
|
299
|
+
| **Infrastructure** | `doctor`, `ci`, `ci-analyze`, `cleanup`, `backfill-costs`, `ui`, `mcp-server`, `export-otel` |
|
|
300
|
+
| **Interactive** | `chat`, `shell` |
|
|
301
|
+
| **Discovery** | `skill` (`list`, `search`, `recommend`) |
|
|
302
|
+
|
|
303
|
+
Key `run` flags: `--dry-run`, `--max-parallel N`, `--execution-profile plan|safe|yolo`, `--only`/`--skip`, `--tags`/`--skip-tags`, `--resume-last`, `--output text|jsonl|live|tui`, `--mask-secrets`, `--auto-approve`, `--no-cache`
|
|
304
|
+
|
|
305
|
+
Full CLI reference with all flags: [docs/CLI_REFERENCE.md](docs/CLI_REFERENCE.md)
|
|
306
|
+
|
|
307
|
+
## Writing Effective Plans
|
|
308
|
+
|
|
309
|
+
**Prompt sources**: inline `prompt:`, file via `prompt_file:`, or markdown extraction via `prompt_md_file:` + `prompt_md_heading:`.
|
|
310
|
+
|
|
311
|
+
**Context passing**: use `context_from:` to inject upstream outputs. Nine modes: `raw` (free), `selective` (BM25 chunk-level, free), `summarized` (haiku per upstream), `map_reduce` (N haiku + synthesis), `recursive` (full workspace awareness), `layered` (L0/L1/L2 budget-aware tiers), `structural` (package-aware symbol extraction with re-export resolution and PageRank-based blast-radius scoring, free), `council` (multi-model deliberation with star/chain/graph topologies), `knowledge_graph` (entity extraction, free). Control budget with `context_budget_tokens:`. Add `context_compaction: progressive` for staged degradation. Use `maestro explain --context` to see why context was selected.
|
|
312
|
+
|
|
313
|
+
**Cross-run memory**: full runs accumulate reusable lessons in `.maestro-cache/memory/<plan>.db`. Matching records are injected automatically as `{{ task_knowledge }}`, and a compact `{{ knowledge_index }}` is available when you want the model to choose from a wider memory surface without pasting every record.
|
|
314
|
+
|
|
315
|
+
**Semantic firewall**: set top-level `firewall_model: haiku` to enable an opt-in second pass for MCP metadata and tainted upstream text (`stdout_tail`, `result_text`, `summary`). Classifier failures fail open to the deterministic sanitizer rather than blocking task execution. For MCP providers that mutate shared local state, set `mcp_servers[].is_concurrency_safe: false` so parallel `worktree: true` tasks are serialized around that provider.
|
|
316
|
+
|
|
317
|
+
**Verify + retry**: add `verify_command:` + `max_retries:` -- failure output is auto-injected into the retry prompt. Add `retry_delay_sec: [2, 5, 15]` for backoff.
|
|
318
|
+
|
|
319
|
+
**Caching policy**: keep default positive caching for deterministic tasks. For flaky or rate-limited tasks, set `negative_cache_ttl_sec:` to suppress repeated failures for a short window without pinning bad results for too long. Results from untrusted/tainted/partial runs, plus structured tool-failure outputs, are excluded from positive cache writes.
|
|
320
|
+
|
|
321
|
+
**Tracing**: `maestro export-otel` converts completed runs into OTLP spans or JSON, attaching `gen_ai.*` attributes, optional task input/output previews via `--include-content`, and prompt redaction via `--otel-mask-prompts`. Span events include runtime signals such as `knowledge_poison_alert` and `memory_write`.
|
|
322
|
+
|
|
323
|
+
**Quality gates**: `judge:` block with typed assertions (zero-cost `contains`/`regex`/`is-json`) and LLM rubrics. `guard_command:` for lightweight stdin-pipe validation.
|
|
324
|
+
|
|
325
|
+
**Budget**: `max_cost_usd:` at plan level. Set `budget_warning_pct: 0.8` for early alerts. Track across runs with `budget_period: weekly`.
|
|
326
|
+
|
|
327
|
+
**Conditional execution**: `when: "{{ task.status }} == success"` enables deploy-on-success / rollback-on-failure patterns.
|
|
328
|
+
|
|
329
|
+
**Signals**: `signals: true` on long-running tasks for progress reporting, timeout extension, and budget queries via `[MAESTRO_SIGNAL]` stdout protocol.
|
|
330
|
+
|
|
331
|
+
**Watch loops**: `maestro watch plan.yaml` for autonomous metric-driven iteration. `mode: improve` auto-fixes plan failures.
|
|
332
|
+
|
|
333
|
+
Complete guide with examples: [docs/PLAN_GUIDE.md](docs/PLAN_GUIDE.md)
|
|
334
|
+
|
|
335
|
+
## Models (quick reference)
|
|
336
|
+
|
|
337
|
+
| Engine | Example Aliases | Reasoning Effort | Cost Model |
|
|
338
|
+
|--------|----------------|-----------------|------------|
|
|
339
|
+
| **Claude** | `haiku`, `sonnet`, `opus` | `low` to `max` (Opus; `xhigh`/`max` are Opus-tier) | Per-token |
|
|
340
|
+
| **Codex** | `5.4-mini`, `5.4`, `5.5` | `none` to `xhigh` | Per-token |
|
|
341
|
+
| **Gemini** | `flash`, `pro`, `pro-3.1` | N/A (use model selection) | Per-token |
|
|
342
|
+
| **Copilot** | `sonnet`, `gpt-5.4-codex`, `gemini-pro` | N/A | Subscription |
|
|
343
|
+
| **Qwen** | `coder`, `max`, `qwq` | N/A | Per-token |
|
|
344
|
+
| **Ollama** | `llama4`, `qwen3-coder`, `deepseek-r1` | N/A | Free (local) |
|
|
345
|
+
| **Llama** | `llama3`, `llama4-scout`, `codellama` | N/A | Free (local, llama-cpp) |
|
|
346
|
+
|
|
347
|
+
Set `model: auto` for automatic routing based on task complexity. Control bias with `routing_strategy: cost_optimized | quality_first | balanced`.
|
|
348
|
+
|
|
349
|
+
Full model alias tables and pricing: [docs/MODELS.md](docs/MODELS.md)
|
|
350
|
+
|
|
351
|
+
## Execution Profiles
|
|
352
|
+
|
|
353
|
+
| Profile | Codex | Claude | Gemini | Copilot | Qwen | Ollama | Llama |
|
|
354
|
+
|---------|-------|--------|--------|---------|------|--------|-------|
|
|
355
|
+
| `plan` | Use YAML args exactly | Use YAML args exactly | Use YAML args exactly | Use YAML args exactly | Use YAML args exactly | Use YAML args exactly | Use YAML args exactly |
|
|
356
|
+
| `safe` | Forces sandbox + approval gates | Forces default permissions | Strips dangerous flags | Strips `--yolo` | Strips `--yolo` | No change | No change |
|
|
357
|
+
| `yolo` | Ensures full bypass | Ensures `--dangerously-skip-permissions` | Ensures `--approval-mode yolo` | Ensures `--yolo` | Ensures `--yolo` | No change | No change |
|
|
358
|
+
|
|
359
|
+
## Output Structure
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
.maestro-runs/<timestamp>_<plan-name>/
|
|
363
|
+
├── .cache/ # Task result cache (content-addressable)
|
|
364
|
+
├── run_manifest.json # Aggregated results (status, cost, tokens, plan_hash/quality_score on full runs)
|
|
365
|
+
├── run_summary.md # Human-readable summary with cost/timing/tokens
|
|
366
|
+
├── events.jsonl # Structured event log (hash-chained, tamper-detectable)
|
|
367
|
+
├── <task-id>.log # Execution transcript
|
|
368
|
+
└── <task-id>.result.json # Structured result (status, exit_code, duration, cost, tokens)
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
Cross-run state lives separately in `.maestro-cache/`: task cache entries, knowledge JSONL from older versions, and the current SQLite memory store under `.maestro-cache/memory/`.
|
|
372
|
+
|
|
373
|
+
## Architecture
|
|
374
|
+
|
|
375
|
+
```
|
|
376
|
+
src/maestro_cli/
|
|
377
|
+
├── cli.py # argparse CLI (27 subcommands) + --version + banner
|
|
378
|
+
├── models.py # Dataclasses and typed results (PlanSpec, TaskSpec, TaskResult, ScoreRecord, ...)
|
|
379
|
+
├── loader.py # YAML parsing + validation + cycle detection + matrix + imports
|
|
380
|
+
├── runners.py # Command building + execution + verify/retry + judge + signals + secrets
|
|
381
|
+
├── scheduler.py # DAG scheduler (ThreadPoolExecutor) + context + policies + budget getter
|
|
382
|
+
├── routing.py # Semantic model routing (model: auto) + predictive + temporal + cross-task
|
|
383
|
+
├── memory.py # SQLite-backed Knowledge + Memory v2 (WAL, provenance, score history)
|
|
384
|
+
├── policy.py # Declarative runtime policy engine (safe AST)
|
|
385
|
+
├── blame.py # Causal failure attribution
|
|
386
|
+
├── audit.py # Plan security scanner (SEC001-SEC023)
|
|
387
|
+
├── eventsource.py # Hash-chained event sourcing + verify
|
|
388
|
+
├── replan.py # Adaptive re-planning + multi-variant search + knowledge-guided scoring
|
|
389
|
+
├── mcts.py # MCTS workflow search (WorkflowVariant tree, selection, simulation, pruning)
|
|
390
|
+
├── watch.py # Autonomous metric-driven iteration loop (custom + improve mode)
|
|
391
|
+
├── worktree.py # Git worktree isolation per task
|
|
392
|
+
├── dynamic.py # Dynamic task decomposition (dynamic_group runtime sub-plans)
|
|
393
|
+
├── knowledge.py # Cross-run knowledge accumulation + consolidation + auto-inject
|
|
394
|
+
├── contracts.py # Typed contract normalization (sql-schema, api-schema, etc.)
|
|
395
|
+
├── budget.py # Cross-run budget tracking and ledger
|
|
396
|
+
├── chat.py # Multi-model interactive terminal
|
|
397
|
+
├── shell.py # Interactive REPL with slash commands
|
|
398
|
+
├── plugins.py # Custom engine plugin discovery
|
|
399
|
+
├── multi.py # Multi-plan execution
|
|
400
|
+
├── live.py # Rich live output + signal progress (--output live)
|
|
401
|
+
├── tui/ # Textual TUI + signal events (--output tui)
|
|
402
|
+
├── web/ # FastAPI + vanilla JS dashboard
|
|
403
|
+
├── cache.py # Task/plan hashing + semantic cache policy
|
|
404
|
+
├── codebase_graph.py # AST-backed codebase graph + blast radius analysis
|
|
405
|
+
├── scaffold.py # Plan generation from briefs + workflow libraries
|
|
406
|
+
├── skill_registry.py # Skill discovery, search, and recommendation (maestro skill)
|
|
407
|
+
├── ci_agent.py # CI failure analysis and remediation (maestro ci-analyze)
|
|
408
|
+
├── suggest.py # Run history analysis + optimization heuristics
|
|
409
|
+
├── eval.py # Batch judge evaluation
|
|
410
|
+
├── diff.py # Run comparison
|
|
411
|
+
├── explain.py # Cache hit/miss explanation + context trajectory
|
|
412
|
+
├── status.py # Task staleness detection
|
|
413
|
+
├── report.py # HTML report generation
|
|
414
|
+
├── cost_backfill.py # Historical cost/token backfill
|
|
415
|
+
├── cleanup.py # Run directory cleanup
|
|
416
|
+
├── doctor.py # Environment diagnostics
|
|
417
|
+
├── ag_ui.py # AG-UI protocol adapter (event translation + state tracking)
|
|
418
|
+
├── mcp_server.py # MCP server (12 tools, 8 resources, 3 prompts)
|
|
419
|
+
├── otel.py # OTLP exporter (run → OpenTelemetry spans)
|
|
420
|
+
├── council.py # Multi-model deliberation (star/chain/graph topologies)
|
|
421
|
+
├── knowledge_graph.py # Entity extraction + graph-based context
|
|
422
|
+
├── symbols.py # Regex-based code symbol extraction (10 languages)
|
|
423
|
+
├── errors.py # PlanValidationError (E001-E072), TaskExecutionError (E100-E110)
|
|
424
|
+
└── utils.py # Paths, templates, markdown extraction
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**Design principles**: local-first persistence (run artifacts + SQLite memory), engine-agnostic (shells out to CLIs), minimal deps (only PyYAML in core; SQLite is stdlib), strong typing (dataclasses throughout).
|
|
428
|
+
|
|
429
|
+
## Testing & Guarantees
|
|
430
|
+
|
|
431
|
+
Maestro is tested offline-first. The full suite (12k+ tests) runs on every push
|
|
432
|
+
across Python 3.11 / 3.12 / 3.13 plus a Windows lane, alongside strict `mypy`,
|
|
433
|
+
a documentation lint, and CodeQL. Engine calls are **mocked** in CI; the
|
|
434
|
+
real-engine end-to-end tests are opt-in (`MAESTRO_RUN_REAL_ENGINE_TESTS=1`, they
|
|
435
|
+
need provider credentials and cost money) and run on a separate, manually-enabled
|
|
436
|
+
lane.
|
|
437
|
+
|
|
438
|
+
| Area | Unit | Integration | Real-engine |
|
|
439
|
+
|------|:----:|:-----------:|:-----------:|
|
|
440
|
+
| DAG scheduling / dependencies | ✅ | ✅ | n/a |
|
|
441
|
+
| Shell tasks | ✅ | ✅ | n/a |
|
|
442
|
+
| Engines (codex/claude/gemini/copilot/qwen/ollama/llama) | ✅ (mocked) | ✅ (command build) | opt-in |
|
|
443
|
+
| Context passing (9 modes) | ✅ | ✅ | partial |
|
|
444
|
+
| Budgets / cost / token tracking | ✅ | ✅ | partial |
|
|
445
|
+
| Quality gates (judge / verify / guard / assert) | ✅ | ✅ | partial |
|
|
446
|
+
| Retries / fallback / circuit breakers | ✅ | ✅ | n/a |
|
|
447
|
+
| Secret masking | ✅ | ✅ | n/a |
|
|
448
|
+
| Policy engine (safe AST) | ✅ (fuzzed) | ✅ | n/a |
|
|
449
|
+
| Security audit (SEC001-SEC023) | ✅ | ✅ | n/a |
|
|
450
|
+
| Cache / event sourcing / blame | ✅ | ✅ | n/a |
|
|
451
|
+
|
|
452
|
+
**Maestro guarantees** DAG ordering and dependency semantics, retry/fallback
|
|
453
|
+
behaviour, the documented `version: 1` plan schema and run-artifact shapes (the
|
|
454
|
+
[v1 stability contract](docs/V1_API_FREEZE.md)), best-effort secret masking, and
|
|
455
|
+
deterministic, replayable run logs.
|
|
456
|
+
|
|
457
|
+
**Maestro does not guarantee** deterministic LLM output, provider/CLI availability,
|
|
458
|
+
model-pricing accuracy (the pricing tables are best-effort and overridable), or the
|
|
459
|
+
safety of arbitrary user-authored shell commands — you own the plans you run.
|
|
460
|
+
|
|
461
|
+
## Troubleshooting
|
|
462
|
+
|
|
463
|
+
| Symptom | Cause | Fix |
|
|
464
|
+
|---------|-------|-----|
|
|
465
|
+
| `[E0xx] message` | Plan validation error | Check error code, fix the YAML |
|
|
466
|
+
| `Heading not found in markdown` | `prompt_md_heading` includes `## ` | Remove the `## ` prefix |
|
|
467
|
+
| `No code fence found` | Prompt text not in `` ```text `` block | Wrap prompt in code fence |
|
|
468
|
+
| Task immediately fails | Engine CLI not on PATH | Run `maestro doctor` |
|
|
469
|
+
| Copilot auth fails | GitHub token missing/expired | Set `COPILOT_GITHUB_TOKEN` or `GH_TOKEN` |
|
|
470
|
+
| `exit_code: 124` | Task timed out | Increase `timeout_sec` |
|
|
471
|
+
| Task skipped | Dependency failed or `fail_fast` | Fix upstream, use `--resume-last` |
|
|
472
|
+
| Shell fails on Windows | `shell: true` uses `cmd.exe` | Use list-format command with Git Bash |
|
|
473
|
+
| Budget exceeded | `max_cost_usd` limit reached | Increase limit or optimize model selection |
|
|
474
|
+
| Judge times out | `g_eval` + many criteria | Set `judge.timeout_sec: 180` or let auto-scaling handle it |
|
|
475
|
+
| Worktree merge conflict | Parallel tasks edit same files | Use `worktree: true` with non-overlapping tasks, or add a reconciler |
|
|
476
|
+
|
|
477
|
+
For Windows-specific pitfalls, see [docs/PITFALLS.md](docs/PITFALLS.md).
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
## Roadmap
|
|
482
|
+
|
|
483
|
+
See [CHANGELOG.md](CHANGELOG.md) for full release history and [docs/ROADMAP.md](docs/ROADMAP.md) for planned features.
|
|
484
|
+
|
|
485
|
+
**Current repo state**: `v2.4.0` is the latest tagged release; `main` also carries early `v2.5.0` session-memory foundations for long-horizon `watch` loops on top of the completed Phase 3 work. 7 engines, 9 context modes, SQLite-backed memory, durable watch `session_snapshots`, and ~11.3K tests in the latest full-suite run.
|
|
486
|
+
|
|
487
|
+
## Requirements
|
|
488
|
+
|
|
489
|
+
- Python >= 3.11
|
|
490
|
+
- PyYAML >= 6.0
|
|
491
|
+
- Engine CLIs on PATH: `codex`, `claude`, `gemini`, `copilot`, `qwen`, `ollama`, `llama` (as needed)
|
|
492
|
+
- Optional: `[live]` (Rich), `[tui]` (Textual), `[web]` (FastAPI + uvicorn), `[agui]` (AG-UI protocol), `[mcp]` (MCP SDK), `[otel]` (OpenTelemetry OTLP exporter)
|
|
493
|
+
|
|
494
|
+
## Contributing
|
|
495
|
+
|
|
496
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, CI, and code conventions. Please also read our [Code of Conduct](CODE_OF_CONDUCT.md), and the [security policy](SECURITY.md) for reporting vulnerabilities privately.
|
|
497
|
+
|
|
498
|
+
Full documentation index: [docs/README.md](docs/README.md).
|
|
499
|
+
|
|
500
|
+
## License
|
|
501
|
+
|
|
502
|
+
Maestro CLI is released under the [MIT License](LICENSE).
|
|
503
|
+
|
|
504
|
+
Copyright (c) 2026 Tiago Perez
|