maestro-flow 0.5.33 → 0.5.34

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.
Files changed (190) hide show
  1. package/.agents/agents/role-design-author.md +5 -3
  2. package/.agents/skills/maestro/SKILL.md +8 -1
  3. package/.agents/skills/maestro-help/SKILL.md +39 -10
  4. package/.agents/skills/maestro-help/index/catalog.json +118 -53
  5. package/.agents/skills/maestro-help/phases/01-parse-intent.md +9 -6
  6. package/.agents/skills/maestro-help/phases/02-search-present.md +55 -15
  7. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +35 -2
  8. package/.agents/skills/maestro-ralph/SKILL.md +9 -2
  9. package/.agents/skills/maestro-ralph-beta/SKILL.md +7 -2
  10. package/.agents/skills/maestro-ralph-execute/SKILL.md +1 -0
  11. package/.agents/skills/manage-harvest/SKILL.md +3 -0
  12. package/.agents/skills/manage-knowledge-audit/SKILL.md +29 -0
  13. package/.agents/skills/odyssey-debug/SKILL.md +7 -1
  14. package/.agents/skills/odyssey-improve/SKILL.md +7 -1
  15. package/.agents/skills/odyssey-planex/SKILL.md +11 -1
  16. package/.agents/skills/odyssey-review-test-fix/SKILL.md +7 -1
  17. package/.agents/skills/odyssey-ui/SKILL.md +7 -1
  18. package/.agents/skills/quality-review/SKILL.md +3 -0
  19. package/.agy/agents/role-design-author.md +5 -3
  20. package/.agy/skills/maestro/SKILL.md +8 -1
  21. package/.agy/skills/maestro-help/SKILL.md +39 -10
  22. package/.agy/skills/maestro-help/index/catalog.json +118 -53
  23. package/.agy/skills/maestro-help/phases/01-parse-intent.md +9 -6
  24. package/.agy/skills/maestro-help/phases/02-search-present.md +55 -15
  25. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +35 -2
  26. package/.agy/skills/maestro-ralph/SKILL.md +9 -2
  27. package/.agy/skills/maestro-ralph-beta/SKILL.md +7 -2
  28. package/.agy/skills/maestro-ralph-execute/SKILL.md +1 -0
  29. package/.agy/skills/manage-harvest/SKILL.md +3 -0
  30. package/.agy/skills/manage-knowledge-audit/SKILL.md +29 -0
  31. package/.agy/skills/odyssey-debug/SKILL.md +7 -1
  32. package/.agy/skills/odyssey-improve/SKILL.md +7 -1
  33. package/.agy/skills/odyssey-planex/SKILL.md +11 -1
  34. package/.agy/skills/odyssey-review-test-fix/SKILL.md +7 -1
  35. package/.agy/skills/odyssey-ui/SKILL.md +7 -1
  36. package/.agy/skills/quality-review/SKILL.md +3 -0
  37. package/.claude/agents/role-design-author.md +5 -3
  38. package/.claude/commands/maestro-ralph-beta.md +7 -2
  39. package/.claude/commands/maestro-ralph-execute.md +1 -0
  40. package/.claude/commands/maestro-ralph.md +9 -2
  41. package/.claude/commands/maestro.md +8 -1
  42. package/.claude/commands/manage-harvest.md +3 -0
  43. package/.claude/commands/manage-knowledge-audit.md +29 -0
  44. package/.claude/commands/odyssey-debug.md +7 -1
  45. package/.claude/commands/odyssey-improve.md +7 -1
  46. package/.claude/commands/odyssey-planex.md +11 -1
  47. package/.claude/commands/odyssey-review-test-fix.md +7 -1
  48. package/.claude/commands/odyssey-ui.md +7 -1
  49. package/.claude/commands/quality-review.md +3 -0
  50. package/.claude/skills/maestro-help/SKILL.md +39 -10
  51. package/.claude/skills/maestro-help/index/catalog.json +118 -53
  52. package/.claude/skills/maestro-help/phases/01-parse-intent.md +9 -6
  53. package/.claude/skills/maestro-help/phases/02-search-present.md +55 -15
  54. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +35 -2
  55. package/.codex/skills/manage-harvest/SKILL.md +2 -1
  56. package/.codex/skills/quality-review/SKILL.md +4 -2
  57. package/README.md +196 -87
  58. package/README.zh-CN.md +198 -79
  59. package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js +9 -4
  60. package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js.map +1 -1
  61. package/dashboard/dist-server/dashboard/src/server/wiki/search.d.ts +8 -5
  62. package/dashboard/dist-server/dashboard/src/server/wiki/search.js +22 -42
  63. package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
  64. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +1 -4
  65. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +28 -42
  66. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  67. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +22 -22
  68. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
  69. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +12 -12
  70. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
  71. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +10 -3
  72. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
  73. package/dashboard/dist-server/src/graph/kg/db/types.d.ts +2 -1
  74. package/dashboard/dist-server/src/graph/kg/db/types.js.map +1 -1
  75. package/dashboard/dist-server/src/graph/kg/extraction/knowledge-extractor-registry.d.ts +22 -0
  76. package/dashboard/dist-server/src/graph/kg/extraction/knowledge-extractor-registry.js +64 -0
  77. package/dashboard/dist-server/src/graph/kg/extraction/knowledge-extractor-registry.js.map +1 -0
  78. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js +12 -98
  79. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js.map +1 -1
  80. package/dashboard/dist-server/src/hooks/keyword-spec-injector.js +5 -2
  81. package/dashboard/dist-server/src/hooks/keyword-spec-injector.js.map +1 -1
  82. package/dashboard/dist-server/src/hooks/wiki-role-loader.js +2 -1
  83. package/dashboard/dist-server/src/hooks/wiki-role-loader.js.map +1 -1
  84. package/dashboard/dist-server/src/tools/domain-loader.js +22 -16
  85. package/dashboard/dist-server/src/tools/domain-loader.js.map +1 -1
  86. package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +6 -1
  87. package/dashboard/dist-server/src/tools/spec-entry-parser.js +44 -13
  88. package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
  89. package/dashboard/dist-server/src/tools/spec-keyword-index.d.ts +2 -0
  90. package/dashboard/dist-server/src/tools/spec-keyword-index.js +4 -9
  91. package/dashboard/dist-server/src/tools/spec-keyword-index.js.map +1 -1
  92. package/dashboard/dist-server/src/tools/spec-loader.js +3 -11
  93. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  94. package/dashboard/dist-server/src/types/index.d.ts +14 -0
  95. package/dashboard/dist-server/src/utils/frontmatter.d.ts +15 -0
  96. package/dashboard/dist-server/src/utils/frontmatter.js +76 -0
  97. package/dashboard/dist-server/src/utils/frontmatter.js.map +1 -0
  98. package/dist/src/commands/domain.d.ts.map +1 -1
  99. package/dist/src/commands/domain.js +8 -2
  100. package/dist/src/commands/domain.js.map +1 -1
  101. package/dist/src/commands/install.d.ts.map +1 -1
  102. package/dist/src/commands/install.js +6 -2
  103. package/dist/src/commands/install.js.map +1 -1
  104. package/dist/src/commands/knowhow.d.ts.map +1 -1
  105. package/dist/src/commands/knowhow.js +3 -26
  106. package/dist/src/commands/knowhow.js.map +1 -1
  107. package/dist/src/commands/search.d.ts +1 -1
  108. package/dist/src/commands/search.d.ts.map +1 -1
  109. package/dist/src/commands/search.js +43 -41
  110. package/dist/src/commands/search.js.map +1 -1
  111. package/dist/src/commands/spec.d.ts.map +1 -1
  112. package/dist/src/commands/spec.js +106 -6
  113. package/dist/src/commands/spec.js.map +1 -1
  114. package/dist/src/commands/uninstall.d.ts.map +1 -1
  115. package/dist/src/commands/uninstall.js +12 -3
  116. package/dist/src/commands/uninstall.js.map +1 -1
  117. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  118. package/dist/src/config/cli-tools-config.js +2 -0
  119. package/dist/src/config/cli-tools-config.js.map +1 -1
  120. package/dist/src/core/extension-loader.d.ts.map +1 -1
  121. package/dist/src/core/extension-loader.js +4 -0
  122. package/dist/src/core/extension-loader.js.map +1 -1
  123. package/dist/src/core/install-executor.d.ts.map +1 -1
  124. package/dist/src/core/install-executor.js +2 -0
  125. package/dist/src/core/install-executor.js.map +1 -1
  126. package/dist/src/graph/analyzers/fs-analyzer.js +2 -2
  127. package/dist/src/graph/analyzers/fs-analyzer.js.map +1 -1
  128. package/dist/src/graph/kg/db/node-kind-registry.d.ts +18 -0
  129. package/dist/src/graph/kg/db/node-kind-registry.d.ts.map +1 -0
  130. package/dist/src/graph/kg/db/node-kind-registry.js +42 -0
  131. package/dist/src/graph/kg/db/node-kind-registry.js.map +1 -0
  132. package/dist/src/graph/kg/db/types.d.ts +2 -1
  133. package/dist/src/graph/kg/db/types.d.ts.map +1 -1
  134. package/dist/src/graph/kg/db/types.js.map +1 -1
  135. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.d.ts +23 -0
  136. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.d.ts.map +1 -0
  137. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.js +64 -0
  138. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.js.map +1 -0
  139. package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -1
  140. package/dist/src/graph/kg/extraction/orchestrator.js +12 -98
  141. package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
  142. package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -1
  143. package/dist/src/hooks/keyword-spec-injector.js +5 -2
  144. package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
  145. package/dist/src/hooks/wiki-role-loader.d.ts.map +1 -1
  146. package/dist/src/hooks/wiki-role-loader.js +2 -1
  147. package/dist/src/hooks/wiki-role-loader.js.map +1 -1
  148. package/dist/src/index.d.ts +6 -0
  149. package/dist/src/index.d.ts.map +1 -1
  150. package/dist/src/index.js +4 -0
  151. package/dist/src/index.js.map +1 -1
  152. package/dist/src/tools/domain-loader.d.ts.map +1 -1
  153. package/dist/src/tools/domain-loader.js +22 -16
  154. package/dist/src/tools/domain-loader.js.map +1 -1
  155. package/dist/src/tools/spec-conflict-marker.d.ts +55 -0
  156. package/dist/src/tools/spec-conflict-marker.d.ts.map +1 -0
  157. package/dist/src/tools/spec-conflict-marker.js +228 -0
  158. package/dist/src/tools/spec-conflict-marker.js.map +1 -0
  159. package/dist/src/tools/spec-entry-parser.d.ts +6 -1
  160. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  161. package/dist/src/tools/spec-entry-parser.js +44 -13
  162. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  163. package/dist/src/tools/spec-keyword-index.d.ts +2 -0
  164. package/dist/src/tools/spec-keyword-index.d.ts.map +1 -1
  165. package/dist/src/tools/spec-keyword-index.js +4 -9
  166. package/dist/src/tools/spec-keyword-index.js.map +1 -1
  167. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  168. package/dist/src/tools/spec-loader.js +3 -11
  169. package/dist/src/tools/spec-loader.js.map +1 -1
  170. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  171. package/dist/src/tools/spec-writer.js +2 -6
  172. package/dist/src/tools/spec-writer.js.map +1 -1
  173. package/dist/src/tools/store-knowhow.d.ts.map +1 -1
  174. package/dist/src/tools/store-knowhow.js +6 -52
  175. package/dist/src/tools/store-knowhow.js.map +1 -1
  176. package/dist/src/tui/uninstall-ui/UninstallFlow.d.ts.map +1 -1
  177. package/dist/src/tui/uninstall-ui/UninstallFlow.js +3 -1
  178. package/dist/src/tui/uninstall-ui/UninstallFlow.js.map +1 -1
  179. package/dist/src/types/index.d.ts +14 -0
  180. package/dist/src/types/index.d.ts.map +1 -1
  181. package/dist/src/utils/frontmatter.d.ts +16 -0
  182. package/dist/src/utils/frontmatter.d.ts.map +1 -0
  183. package/dist/src/utils/frontmatter.js +76 -0
  184. package/dist/src/utils/frontmatter.js.map +1 -0
  185. package/dist/src/utils/migration-registry.d.ts.map +1 -1
  186. package/dist/src/utils/migration-registry.js +14 -1
  187. package/dist/src/utils/migration-registry.js.map +1 -1
  188. package/package.json +2 -2
  189. package/workflows/claude-instructions.md +48 -45
  190. package/workflows/codex-instructions.md +25 -19
@@ -57,6 +57,7 @@ Follow '~/.maestro/workflows/harvest.md' Stages 1–8 (standard mode) or Stage 9
57
57
  4. **Never modify source artifacts** — purely extractive
58
58
  5. **Confidence filtering** — below threshold logged but not routed
59
59
  6. **Spec format enforcement** — all spec routing must use `<spec-entry>` closed-tag format with `title`, `description`, `keywords`, `date`, `source="harvest"` attributes
60
+ 7. **Conflict pre-check on spec routing** — when routing to spec, compare new entry against existing specs with same keywords/category. If semantic conflict detected, set `confidence="low"` on the new entry and log conflict note. Use `maestro spec conflict mark` if contradiction is clear
60
61
 
61
62
  **Routing rules:**
62
63
  - Universal design patterns → `coding` or `arch` category
@@ -66,7 +67,7 @@ Follow '~/.maestro/workflows/harvest.md' Stages 1–8 (standard mode) or Stage 9
66
67
  - Spec: `maestro wiki append spec-<file> --body "<content>" --keywords "<kws>"` (unified write path) or `$spec-add "<category> <content>"`
67
68
  - Issue: append to `issues.jsonl` matching canonical schema, with `source: "harvest"` field (distinguishes from `manage-issue-discover`, which uses `source: "discover"` — required for cross-skill dedup when both write concurrently)
68
69
 
69
- **Next steps:** `$manage-wiki health`, `maestro search --type note`, `$wiki-connect --fix`, `$wiki-digest`, `$manage-issue list --source harvest`
70
+ **Next steps:** `$manage-wiki health`, `maestro search --type note`, `$wiki-connect --fix`, `$wiki-digest`, `$manage-issue list --source harvest`, `$manage-knowledge-audit --scope spec` (when specs extracted, check for conflicts)
70
71
 
71
72
  **Prune mode** (`--prune`): Classifies artifacts (active/graduated/stale/protected), graduates harvested artifacts to wiki knowhow, archives from `artifacts[]` → `artifact_archive[]`, prunes resolved entries from accumulated_context. Files on disk are never deleted. Always backs up state.json before writing.
72
73
  </execution>
@@ -197,7 +197,7 @@ Session folder: `.workflow/.csv-wave/{sessionId}/` — create via `mkdir -p`
197
197
 
198
198
  If `--dimensions` flag provided, override with explicit list.
199
199
 
200
- 6. **Specs loading**: Run `maestro spec load --category review` to load review standards, checklists, AND discoverable knowhow tools (unless `--skip-specs`)
200
+ 6. **Specs loading**: Run `maestro spec load --category review` to load review standards, checklists, AND discoverable knowhow tools (unless `--skip-specs`). Also run `maestro spec conflict list` to load existing conflict markers (review should prioritize verifying contested entries against code)
201
201
  7. **CSV generation**: One row per dimension + one aggregation row
202
202
 
203
203
  **Wave computation**: Simple 2-wave -- all dimension tasks = wave 1, aggregation = wave 2.
@@ -352,11 +352,13 @@ Generate `context.md`:
352
352
  | standard | critical + high |
353
353
  | deep | critical + high + medium |
354
354
 
355
+ **Spec conflict check**: If any finding directly contradicts a loaded spec entry (code behavior ≠ spec rule), suggest `maestro spec conflict mark <file> <line> --note "<evidence>"` on the spec entry. Code is the single source of truth. Log spec conflicts in review.json as `spec_conflicts[]`.
356
+
355
357
  **Phase index update**: Update `{artifact_dir}/index.json` with review status.
356
358
 
357
359
  **Register artifact**: Append to `state.json.artifacts[]` with `type: "review"`, `id: REV-NNN`, `path: "scratch/{YYYYMMDD}-review-P{N}-{slug}"`, `depends_on: exec_art.id`. Output directory is independent scratch, not shared with plan.
358
360
 
359
- Display summary.
361
+ Display summary. If spec conflicts detected, suggest: `maestro spec conflict list` → `$manage-knowledge-audit --scope spec`.
360
362
 
361
363
  ### Shared Discovery Board Protocol
362
364
 
package/README.md CHANGED
@@ -2,22 +2,59 @@
2
2
 
3
3
  # Maestro-Flow
4
4
 
5
- ### The Orchestration Layer for the Multi-Agent Era
5
+ ### Intent-Driven Workflow Orchestration for the Multi-Agent Era
6
6
 
7
- **Don't just run agents. Orchestrate them.**
7
+ **Describe what you want. Maestro figures out how to get there.**
8
8
 
9
+ <br/>
10
+
11
+ [![npm version](https://img.shields.io/npm/v/maestro-flow?color=cb3837&logo=npm&logoColor=white)](https://www.npmjs.com/package/maestro-flow)
9
12
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
10
13
  [![Node.js](https://img.shields.io/badge/Node.js-≥18-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
11
14
  [![MCP](https://img.shields.io/badge/MCP-Protocol-8B5CF6)](https://modelcontextprotocol.io/)
12
15
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
13
16
 
14
- [English](README.md) | [简体中文](README.zh-CN.md)
17
+ [English](README.md)&nbsp;&nbsp;|&nbsp;&nbsp;[简体中文](README.zh-CN.md)
15
18
 
16
19
  </div>
17
20
 
18
- ---
21
+ <br/>
22
+
23
+ > Most AI coding tools let you run one agent on one task.
24
+ > Maestro-Flow orchestrates **multiple agents across an entire development lifecycle** — from brainstorming to deployment — with an adaptive decision engine, a self-reinforcing knowledge graph, and a real-time visual dashboard.
25
+
26
+ <br/>
19
27
 
20
- Maestro-Flow is a workflow orchestration framework for multi-agent development with Claude Code, Codex, Gemini, and other AI agents. Describe your intent, and Maestro-Flow routes to the optimal command chain, drives parallel agent execution, and closes the loop through adaptive decision-making, a real-time dashboard, and an evolving knowledge graph.
28
+ ## Two Pillars
29
+
30
+ Maestro-Flow is built on two interconnected systems that reinforce each other:
31
+
32
+ ```
33
+ ┌─────────────────────────────────────┐
34
+ │ Maestro-Flow │
35
+ │ │
36
+ ┌──────────────┴──────────────┐ ┌──────────────────┴───────────────┐
37
+ │ Workflow Orchestration │ │ Knowledge System │
38
+ │ │ │ │
39
+ │ Intent Router │ │ Knowledge Graph (SQLite) │
40
+ │ └─ 40+ chain types │ │ └─ Code + Knowledge unified │
41
+ │ Ralph Decision Engine │ │ Spec Injection (Hooks) │
42
+ │ └─ 11-state FSM │ │ └─ Auto-inject into prompts │
43
+ │ Quality Pipeline │ │ Wiki + BM25 Search │
44
+ │ └─ verify → review → test│ │ └─ Backlinks + health score │
45
+ │ Multi-Agent Dispatch │ │ Learning Loop │
46
+ │ └─ Claude, Gemini, Codex │ │ └─ retro → persist → inject │
47
+ │ │ │ │
48
+ └─────────────┬───────────────┘ └──────────────────┬───────────────┘
49
+ │ ▲ │ ▲
50
+ │ │ knowledge │ │
51
+ │ │ injection │ │
52
+ │ └──────────────┘ │
53
+ │ execution results │
54
+ └──────────────────────────────────────┘
55
+ ```
56
+
57
+ **Workflows generate knowledge. Knowledge improves future workflows.** Agents learn from each session, persist discoveries as specs and knowhow, and future agents automatically receive that context through hook injection — creating a self-reinforcing cycle.
21
58
 
22
59
  ---
23
60
 
@@ -28,24 +65,26 @@ npm install -g maestro-flow
28
65
  maestro install
29
66
  ```
30
67
 
31
- **Prerequisites**: Node.js >= 18, Claude Code CLI. Optional: Codex CLI, Gemini CLI for multi-agent workflows.
68
+ **Prerequisites**: Node.js 18, Claude Code CLI. Optional: Codex CLI, Gemini CLI for multi-agent workflows.
32
69
 
33
70
  ---
34
71
 
35
72
  ## Quick Start
36
73
 
37
- **`/maestro-ralph`** is the primary entry point — a closed-loop lifecycle engine that reads project state, infers your position, builds an adaptive command chain, and drives it to completion:
74
+ ### The Ralph Engine
75
+
76
+ **`/maestro-ralph`** is the primary entry point — a closed-loop lifecycle engine that reads project state, infers your position in the development lifecycle, and builds an adaptive command chain:
38
77
 
39
78
  ```bash
40
79
  /maestro-ralph "implement OAuth2 authentication with refresh tokens"
41
80
  ```
42
81
 
43
- Ralph automatically determines where you are in the lifecycle (brainstorm → blueprint → analyze → roadmap → plan → execute → verify → review → test → milestone-complete) and builds the appropriate chain. Upstream origin commands (brainstorm, blueprint) and roadmap are optional — Ralph skips them based on project state and scope. Decision nodes at key checkpoints evaluate results and dynamically insert debug+fix loops when needed.
82
+ Ralph automatically determines where you are (brainstorm → plan → execute → verify → review → test → milestone) and builds the appropriate chain. Decision nodes at key checkpoints evaluate results and dynamically insert debugfix → retry loops when needed.
44
83
 
45
84
  ```bash
46
85
  /maestro-ralph status # View session progress
47
86
  /maestro-ralph continue # Resume after decision pause
48
- /maestro-ralph -y "build a REST API" # Full auto mode — no pauses
87
+ /maestro-ralph -y "build a REST API" # Full auto — no pauses
49
88
  ```
50
89
 
51
90
  ### Other Entry Points
@@ -54,102 +93,169 @@ Ralph automatically determines where you are in the lifecycle (brainstorm → bl
54
93
  |---------|-------------|
55
94
  | `/maestro "..."` | Describe intent, let AI route to the optimal command chain |
56
95
  | `/maestro-quick` | Quick fixes, small features (analyze → plan → execute) |
57
- | `/maestro-*` | Step-by-step: init, brainstorm, blueprint, analyze, roadmap, plan, execute, verify |
96
+ | `/maestro-*` | Step-by-step: brainstorm, blueprint, analyze, plan, execute, verify |
58
97
 
59
98
  ---
60
99
 
61
- ## Key Features
100
+ ## Workflow Orchestration
62
101
 
63
- ### 1. Adaptive Lifecycle Engine (`maestro-ralph`)
102
+ ### Adaptive Lifecycle Engine
64
103
 
65
- Reads project state infers lifecycle position builds command chain with decision nodes. At each checkpoint, Ralph reads actual execution results and decides: continue, or insert a debug → fix → retry loop. The chain grows and shrinks dynamically based on outcomes.
104
+ Ralph is an 11-state finite state machine that **decides** but never executes. It reads project state, infers lifecycle position, builds a command chain with quality gates, and hands off execution to `maestro-ralph-execute`. At each decision node (`◆`), Ralph evaluates actual results and decides: proceed, or insert a debug → fix → retry loop.
66
105
 
67
106
  ```
68
107
  brainstorm → blueprint(opt) → init → analyze(macro) → roadmap(opt) → analyze(micro) → plan → execute → verify
69
- post-verify
70
- business-test
71
- post-business-test
72
- review
73
- ◆ post-review
74
- test
75
- ◆ post-test
76
- milestone-audit → milestone-complete
77
- ◆ post-milestone → next milestone
108
+ decision
109
+ review ─── ◆ ─── test ─── ◆ ─── milestone-audit → milestone-complete
110
+ → next milestone
78
111
  ```
79
112
 
80
- **Three quality modes** control how thorough each phase is:
113
+ **Three quality modes** control thoroughness:
81
114
 
82
- | Mode | Stages | When |
83
- |------|--------|------|
84
- | `full` | verify → business-test → review → test-gen → test | Production features, security-critical code |
85
- | `standard` | verify → review → test | Default, balanced quality |
86
- | `quick` | verify → CLI-review | Quick fixes, prototyping |
115
+ | Mode | Pipeline | Use Case |
116
+ |------|----------|----------|
117
+ | `full` | verify → business-test → review → test-gen → test | Production, security-critical |
118
+ | `standard` | verify → review → test | Default, balanced |
119
+ | `quick` | verify → CLI-review | Prototyping, quick fixes |
87
120
 
88
- **Full pipeline explained** — each stage serves a distinct quality gate:
121
+ ### Intent-Driven Routing
89
122
 
90
- 1. **verify** goal-backward verification: checks that all plan requirements are implemented, validates architectural constraints, anti-pattern scan, Nyquist test coverage
91
- 2. **business-test** — PRD-forward business testing: requirement traceability, fixture generation, multi-layer execution against acceptance criteria
92
- 3. **review** — multi-dimensional code review: correctness, readability, performance, security, testing, architecture
93
- 4. **test-gen** — coverage gap analysis and automatic test generation (TDD/E2E classification, L0-L3 progressive layers)
94
- 5. **test** — conversational UAT: interactive exploratory testing with session persistence and gap-plan closure
123
+ You don't write pipeline YAML. You describe intent in natural language, and Maestro classifies it into one of **40+ chain types**, each a pre-composed sequence of commands. The same intent produces different chains depending on project state:
95
124
 
96
- At each `◆` decision node, Ralph evaluates outcomes and decides: pass through, or insert a debug → fix → retry loop. Max retries configurable per decision point.
125
+ ```bash
126
+ /maestro "add user profile page"
127
+ # → New project: brainstorm → blueprint → analyze → plan → execute → verify
128
+ # → Existing project: analyze → plan → execute → verify
129
+ # → Quick fix: plan → execute → verify
130
+ ```
97
131
 
98
- ### 2. Layered Command Topology
132
+ ### Layered Command Topology
99
133
 
100
- Commands are organized in four layers: **upstream origin** (brainstorm, blueprint), **understanding** (analyze with dual-mode: macro for scope exploration, micro for phase-level depth), **orchestration** (roadmap — optional, pure Milestone > Phase decomposition), and **execution** (plan → execute → verify). Six canonical paths (A–F) cover everything from full greenfield projects to small fixes. 50 slash commands across 7 categories power every stage, with all artifacts in `.workflow/scratch/` tracked by `state.json`.
134
+ Commands are organized in four layers:
101
135
 
102
- ### 3. Issue Closed-Loop
136
+ | Layer | Purpose | Commands |
137
+ |-------|---------|----------|
138
+ | **Origin** | Diverge ideas, converge direction | brainstorm, blueprint |
139
+ | **Understanding** | Explore scope (macro) + deep-dive (micro) | analyze (dual-mode) |
140
+ | **Orchestration** | Structure into milestones and phases | roadmap |
141
+ | **Execution** | Plan, implement, verify | plan, execute, verify, review, test |
103
142
 
104
- Issues aren't just tickets they're a self-healing pipeline: discover analyze → plan → execute → close. Quality commands automatically create issues for problems they find. Issue fixes flow back into the phase pipeline.
143
+ Six canonical paths (A–F) cover everything from full greenfield projects to single-line fixes.
105
144
 
106
- ### 4. Visual Dashboard
145
+ ### Multi-Agent Dispatch
146
+
147
+ Maestro coordinates **Claude Code, Codex, Gemini, Qwen, and OpenCode** through four composable orchestration patterns:
148
+
149
+ | Pattern | How It Works |
150
+ |---------|-------------|
151
+ | **Delegate** | Dispatch to any CLI tool via `maestro delegate` with SQLite-backed job broker, async execution, and message injection for follow-up chaining |
152
+ | **Team** | Coordinator-worker architecture — coordinators generate role-specs, spawn `team-worker` agents in parallel, supervised by a resident quality observer |
153
+ | **Wave** | Topological sort of tasks into dependency waves; independent tasks run concurrently within each wave |
154
+ | **Swarm** | ACO-driven multi-agent exploration for complex problem spaces with pheromone-guided convergence |
107
155
 
108
- Real-time dashboard at `http://127.0.0.1:3001` with Kanban board, Gantt timeline, sortable table, and command center. Pick an agent on any issue card and dispatch. Built with React 19, Tailwind CSS 4, WebSocket live updates.
156
+ These patterns compose: a team coordinator can delegate subtasks to different LLM backends, wave execution parallelizes independent work, and the dashboard provides a real-time supervisory control loop all sharing the broker and message bus as coordination primitives.
157
+
158
+ ---
159
+
160
+ ## Knowledge System
161
+
162
+ ### Knowledge Graph
163
+
164
+ A SQLite-backed unified graph that stores both **code structure** (functions, classes, call chains via tree-sitter extraction) and **project knowledge** (specs, knowhow, domain terms, issues) in one queryable structure.
109
165
 
110
166
  ```bash
111
- maestro serve # http://127.0.0.1:3001
112
- maestro view # Terminal TUI alternative
113
- maestro command-help # Open interactive command reference in browser (alias: ch)
167
+ maestro kg search <symbol> # Find nodes
168
+ maestro kg context <node> # Get surrounding context
169
+ maestro kg callers <function> # Trace call chains
170
+ maestro kg callees <function> # Trace dependencies
114
171
  ```
115
172
 
116
- ### 5. Multi-Agent Engine
173
+ ### Spec Injection
174
+
175
+ Project rules (coding standards, architecture constraints, quality criteria) are stored as `<spec-entry>` blocks with keyword tags. **Hooks automatically inject relevant specs into every agent prompt** based on keyword matching — agents receive project-specific rules without explicit loading.
117
176
 
118
- Coordinates Claude Code, Codex, Gemini, Qwen, and OpenCode in parallel via wave-based execution. Independent tasks run concurrently; dependent tasks wait for predecessors.
177
+ ### Self-Reinforcing Learning Loop
119
178
 
120
- ### 6. Smart Knowledge Base
179
+ ```
180
+ Agent executes task
181
+ → Discovers pattern/pitfall/decision
182
+ → Persists as spec entry or knowhow doc
183
+ → Hook system indexes new knowledge
184
+ → Future agents auto-receive via prompt injection
185
+ → Better execution → more discoveries → ...
186
+ ```
121
187
 
122
- Wiki knowledge graph with BM25 search, backlink traversal, and health scoring. Learning toolkit (retro, follow, decompose, investigate, second-opinion) feeds into a unified `lessons.jsonl` store.
188
+ Four learning tools feed this cycle: `learn-retro` (retrospective), `learn-follow` (pattern study), `learn-decompose` (architecture breakdown), `learn-investigate` (deep dive).
123
189
 
124
- ### 7. Hook & Overlay System
190
+ ### Wiki & Search
125
191
 
126
- 11 context-aware hooks inject project specs into agent prompts, monitor context usage, and track delegate execution. The overlay system enables non-invasive patches for `.claude/commands/*.md` that survive upgrades.
192
+ WikiIndexer walks the `.workflow/` directory, parses frontmatter, builds backlink graphs, and creates a **BM25 inverted index** for full-text search across all project knowledge — specs, knowhow, issues, and KG nodes as virtual entries.
127
193
 
128
194
  ---
129
195
 
130
- ## Commands & Agents
196
+ ## Issue Closed-Loop
131
197
 
132
- | Category | Count | Prefix | Purpose |
133
- |----------|-------|--------|---------|
134
- | **Core Workflow** | 19 | `maestro-*` | Full lifecycle — ralph, init, brainstorm, blueprint, analyze, roadmap, plan, execute, verify, milestones, overlays |
135
- | **Management** | 12 | `manage-*` | Issue lifecycle, codebase docs, knowledge capture, memory, status |
136
- | **Quality** | 9 | `quality-*` | Review, test, debug, test-gen, integration-test, business-test, refactor, sync |
137
- | **Learning** | 5 | `learn-*` | Retro, follow-along, pattern decompose, investigate, second opinion |
138
- | **Specification** | 3 | `spec-*` | Setup, add, load |
139
- | **Wiki** | 2 | `wiki-*` | Connection discovery, knowledge digest |
198
+ Issues aren't just tickets. They're a self-healing pipeline:
140
199
 
141
- 21 specialized agent definitions in `.claude/agents/` — each a focused Markdown file that Claude Code loads on demand.
200
+ ```
201
+ discover → analyze → plan → execute → close
202
+ ▲ │
203
+ └────── quality commands auto-create ─┘
204
+ ```
205
+
206
+ Quality commands (review, test, verify) automatically create issues for problems they find. Issue fixes flow back into the phase pipeline.
142
207
 
143
208
  ---
144
209
 
145
- ## Architecture
210
+ ## Visual Dashboard
211
+
212
+ Real-time dashboard at `http://127.0.0.1:3001` — Kanban board, Gantt timeline, sortable table, and command center. Pick an agent on any issue card and dispatch.
213
+
214
+ ```bash
215
+ maestro serve # Launch web dashboard
216
+ maestro view # Terminal TUI alternative
217
+ maestro command-help # Interactive command reference (alias: ch)
218
+ ```
219
+
220
+ Built with React 19, Zustand, Tailwind CSS 4, Framer Motion, Hono, WebSocket.
221
+
222
+ ---
223
+
224
+ ## At a Glance
225
+
226
+ | Metric | Count |
227
+ |--------|-------|
228
+ | Source files (TypeScript) | 446 |
229
+ | Lines of code | ~111,000 |
230
+ | Slash commands | 64 |
231
+ | Workflow definitions | 115 |
232
+ | Skill packages | 45 |
233
+ | Agent definitions | 23 |
234
+ | CLI commands | 32 |
235
+ | Templates | 92 |
236
+ | Guides (bilingual) | 66 |
237
+
238
+ ### Tech Stack
239
+
240
+ | Layer | Technology |
241
+ |-------|-----------|
242
+ | CLI | Commander.js, TypeScript, ESM |
243
+ | MCP | @modelcontextprotocol/sdk (stdio) |
244
+ | Knowledge Graph | better-sqlite3, Drizzle ORM, web-tree-sitter |
245
+ | Frontend | React 19, Zustand, Tailwind CSS 4, Framer Motion, Radix UI |
246
+ | Backend | Hono, WebSocket, SSE |
247
+ | Agents | Claude Agent SDK, Codex CLI, Gemini CLI, OpenCode |
248
+ | Build | Vite 6, TypeScript 5.7, Vitest |
249
+
250
+ ### Architecture
146
251
 
147
252
  ```
148
253
  maestro/
149
254
  ├── bin/ # CLI entry points
150
255
  ├── src/ # Core CLI (Commander.js + MCP SDK)
151
- │ ├── commands/ # 11 CLI commands (serve, run, cli, ext, tool, ...)
256
+ │ ├── commands/ # 32 CLI commands
152
257
  │ ├── mcp/ # MCP server (stdio transport)
258
+ │ ├── graph/ # Knowledge Graph (SQLite + tree-sitter)
153
259
  │ └── core/ # Tool registry, extension loader
154
260
  ├── dashboard/ # Real-time web dashboard
155
261
  │ └── src/
@@ -157,38 +263,41 @@ maestro/
157
263
  │ ├── server/ # Hono API + WebSocket + SSE
158
264
  │ └── shared/ # Shared types
159
265
  ├── .claude/
160
- │ ├── commands/ # 50 slash commands (.md)
161
- └── agents/ # 21 agent definitions (.md)
162
- ├── workflows/ # 45 workflow implementations (.md)
163
- ├── templates/ # JSON templates (task, plan, issue, ...)
266
+ │ ├── commands/ # 64 slash commands (.md)
267
+ ├── agents/ # 23 agent definitions (.md)
268
+ │ └── skills/ # 45 skill packages
269
+ ├── workflows/ # 115 workflow definitions (.md)
270
+ ├── templates/ # 92 JSON templates
164
271
  └── extensions/ # Plugin system
165
272
  ```
166
273
 
167
- | Layer | Technology |
168
- |-------|-----------|
169
- | CLI | Commander.js, TypeScript, ESM |
170
- | MCP | @modelcontextprotocol/sdk (stdio) |
171
- | Frontend | React 19, Zustand, Tailwind CSS 4, Framer Motion, Radix UI |
172
- | Backend | Hono, WebSocket, SSE |
173
- | Agents | Claude Agent SDK, Codex CLI, Gemini CLI, OpenCode |
174
- | Build | Vite 6, TypeScript 5.7, Vitest |
175
-
176
274
  ---
177
275
 
178
276
  ## Documentation
179
277
 
180
- - **[Maestro Ralph Guide](guide/maestro-ralph-guide.md)** — Adaptive lifecycle engine: position inference, decision nodes, quality modes, retry escalation
181
- - **[Command Usage Guide](guide/command-usage-guide.md)** — All 53 commands with workflow diagrams, pipeline chaining, Issue closed-loop
182
- - **[Command Reference (HTML)](guide/command-usage-guide.html)** — Interactive HTML version with search, card grid, and workflow examples (`maestro command-help` to open)
183
- - **[CLI Commands Reference](guide/cli-commands-guide.en.md)** — All 21 terminal commands: install, delegate, coordinate, wiki, hooks, overlay, collab
184
- - **[Spec System Guide](guide/spec-system-guide.md)** — Project specs with `<spec-entry>` format, keyword-based loading, validation hooks
185
- - **[Delegate Async Guide](guide/delegate-async-guide.md)** — Async task delegation: CLI & MCP usage, message injection, chaining
186
- - **[Overlay Guide](guide/overlay-guide.md)** — Non-invasive command extensions: format, section injection, bundle/import
187
- - **[Hooks Guide](guide/hooks-guide.md)** — Hook system architecture, 11 hooks, spec injection, context budget
188
- - **[Worktree Guide](guide/worktree-guide.md)** — Milestone-level parallel development: fork, sync, merge, dashboard integration
189
- - **[Collab User Guide](guide/team-lite-guide.md)** — Multi-person collaboration for 2-8 person teams
190
- - **[Collab — Design](guide/team-lite-design.md)** — Architecture, data model, namespace boundaries
278
+ **Getting Started**
279
+ - **[Quick Start Guide](guide/quick-start-guide.en.md)** — Install, first workflow, key concepts
280
+ - **[Maestro Ralph Guide](guide/maestro-ralph-guide.en.md)** — Adaptive lifecycle engine, decision nodes, quality modes
281
+
282
+ **Workflow**
283
+ - **[Command Usage Guide](guide/command-usage-guide.en.md)** — All 64 commands with workflow diagrams and pipeline chaining
284
+ - **[CLI Commands Reference](guide/cli-commands-guide.en.md)** — All 32 terminal commands
285
+ - **[Workflow Structure Guide](guide/workflow-structure-guide.en.md)** — Command topology, chain composition
286
+ - **[Quality Pipeline Guide](guide/quality-pipeline-guide.en.md)** — Verify, review, test pipeline
287
+ - **[Maestro Coordinator Guide](guide/maestro-coordinator-guide.en.md)** — Multi-agent coordination patterns
288
+
289
+ **Knowledge**
290
+ - **[Knowledge Management Guide](guide/knowledge-management-guide.en.md)** — KG, specs, knowhow, wiki
291
+ - **[Spec System Guide](guide/spec-system-guide.en.md)** — Spec entries, keyword loading, validation hooks
292
+ - **[Hooks Guide](guide/hooks-guide.en.md)** — 17 hooks, spec injection, context budget
293
+ - **[Learning Tools Guide](guide/learn-tools-guide.en.md)** — Retro, follow, decompose, investigate
294
+
295
+ **Advanced**
296
+ - **[Delegate Async Guide](guide/delegate-async-guide.en.md)** — Multi-CLI delegation, message injection, chaining
297
+ - **[Overlay Guide](guide/overlay-guide.en.md)** — Non-invasive command extensions
298
+ - **[Worktree Guide](guide/worktree-guide.en.md)** — Milestone-level parallel development
191
299
  - **[MCP Tools Reference](guide/mcp-tools-guide.en.md)** — All 9 MCP endpoint tools
300
+ - **[Collab Guide](guide/team-lite-guide.en.md)** — 2-8 person team collaboration
192
301
 
193
302
  ---
194
303
 
@@ -196,7 +305,7 @@ maestro/
196
305
 
197
306
  - **[GET SHIT DONE](https://github.com/gsd-build/get-shit-done)** by TACHES — The spec-driven development model and context engineering philosophy.
198
307
  - **[Claude-Code-Workflow](https://github.com/catlog22/Claude-Code-Workflow)** — The predecessor that pioneered multi-CLI orchestration and skill-based workflow routing.
199
- - **[Impeccable](https://github.com/pbakaus/impeccable)** by [@pbakaus](https://github.com/pbakaus) — The UI design skill integrated as `maestro-impeccable`. Live variant mode, critique storage, design parser, and CSP detection modules are derived from this project. Licensed under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
308
+ - **[Impeccable](https://github.com/pbakaus/impeccable)** by [@pbakaus](https://github.com/pbakaus) — UI design skill integrated as `maestro-impeccable`. Licensed under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
200
309
 
201
310
  ## Contributors
202
311