@josstei/maestro 1.6.4-rc.1 → 1.6.4-rc.2

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 (40) hide show
  1. package/EXAMPLES.md +2 -2
  2. package/GEMINI.md +46 -26
  3. package/QWEN.md +63 -30
  4. package/claude/.claude-plugin/plugin.json +1 -1
  5. package/claude/src/platforms/shared/agent-names.js +10 -5
  6. package/claude/src/skills/shared/delegation/SKILL.md +18 -1
  7. package/claude/src/skills/shared/design-dialogue/SKILL.md +1 -1
  8. package/claude/src/skills/shared/execution/SKILL.md +1 -1
  9. package/claude/src/skills/shared/implementation-planning/SKILL.md +30 -26
  10. package/claude/src/skills/shared/session-management/SKILL.md +4 -4
  11. package/claude/src/version.json +1 -1
  12. package/docs/architecture.md +24 -11
  13. package/docs/cicd.md +2 -2
  14. package/docs/flow.md +14 -3
  15. package/docs/maestro-cheatsheet.md +8 -0
  16. package/docs/overview.md +2 -2
  17. package/docs/runtime-codex.md +12 -12
  18. package/docs/runtime-gemini.md +5 -2
  19. package/docs/runtime-qwen.md +9 -6
  20. package/docs/usage.md +11 -8
  21. package/gemini-extension.json +2 -1
  22. package/package.json +1 -1
  23. package/plugins/maestro/.codex-plugin/plugin.json +1 -1
  24. package/plugins/maestro/.mcp.json +1 -1
  25. package/plugins/maestro/README.md +2 -2
  26. package/plugins/maestro/src/platforms/shared/agent-names.js +10 -5
  27. package/plugins/maestro/src/skills/shared/delegation/SKILL.md +18 -1
  28. package/plugins/maestro/src/skills/shared/design-dialogue/SKILL.md +1 -1
  29. package/plugins/maestro/src/skills/shared/execution/SKILL.md +1 -1
  30. package/plugins/maestro/src/skills/shared/implementation-planning/SKILL.md +30 -26
  31. package/plugins/maestro/src/skills/shared/session-management/SKILL.md +4 -4
  32. package/plugins/maestro/src/version.json +1 -1
  33. package/qwen-extension.json +2 -1
  34. package/src/platforms/metadata-shared.js +3 -1
  35. package/src/platforms/shared/agent-names.js +10 -5
  36. package/src/skills/shared/delegation/SKILL.md +18 -1
  37. package/src/skills/shared/design-dialogue/SKILL.md +1 -1
  38. package/src/skills/shared/execution/SKILL.md +1 -1
  39. package/src/skills/shared/implementation-planning/SKILL.md +30 -26
  40. package/src/skills/shared/session-management/SKILL.md +4 -4
@@ -80,7 +80,7 @@ Each runtime (`src/platforms/*/runtime-config.js`) declares:
80
80
  | `agentNaming` | `snake_case` | `kebab-case` | `kebab-case` | `snake_case` |
81
81
  | `delegation.pattern` | `{{agent}}(query: "...")` | `Agent(subagent_type: "maestro:{{agent}}", prompt: "...")` | `spawn_agent(...)` | `{{agent}}(query: "...")` |
82
82
  | `env.extensionPath` | `extensionPath` | `CLAUDE_PLUGIN_ROOT` | `.` (relative) | `extensionPath` |
83
- | `env.workspacePath` | `workspacePath` | `CLAUDE_PROJECT_DIR` | `MAESTRO_WORKSPACE_PATH` | `workspacePath` |
83
+ | `env.workspacePath` | `null` (manifest injects `MAESTRO_WORKSPACE_PATH=${workspacePath}`) | `CLAUDE_PROJECT_DIR` | `MAESTRO_WORKSPACE_PATH` | `workspacePath` |
84
84
 
85
85
  ### Entry-Point Registry
86
86
 
@@ -97,7 +97,7 @@ Plus 3 core commands (orchestrate, execute, resume) maintained separately in `sr
97
97
 
98
98
  ## MCP Server Architecture
99
99
 
100
- The MCP server is authored directly in modular source under `src/mcp/`. Gemini and Claude runtime roots expose thin public wrappers at `mcp/maestro-server.js` that resolve into the nearest generator-owned `src/mcp/maestro-server.js` payload. Codex has no in-plugin wrapper — it spawns the server via `npx` against the versioned `@josstei/maestro` npm package and the `maestro-mcp-server` bin (`bin/maestro-mcp-server.js`) declared in `package.json`.
100
+ The MCP server is authored directly in modular source under `src/mcp/`. Gemini and Qwen share the repo-root public wrapper at `mcp/maestro-server.js`; their manifests set `MAESTRO_RUNTIME` to select the runtime config. Claude exposes its own thin wrapper at `claude/mcp/maestro-server.js` so detached plugin installs can fall back to `claude/src/`. Codex has no in-plugin wrapper — it spawns the server via `npx` against the versioned `@josstei/maestro` npm package and the `maestro-mcp-server` bin (`bin/maestro-mcp-server.js`) declared in `package.json`.
101
101
 
102
102
  ### Module Structure
103
103
 
@@ -145,7 +145,7 @@ The content tools (`get_agent`, `get_skill_content`) are filesystem-only in ever
145
145
  - Codex: `primary=filesystem`, `fallback=none`
146
146
  - Qwen: `primary=filesystem`, `fallback=none`
147
147
 
148
- Gemini's and Claude's thin entrypoints at `mcp/maestro-server.js` use direct `require()` calls to resolve `src/mcp/maestro-server.js`. Gemini's entrypoint sets `MAESTRO_RUNTIME=gemini` and requires `../src/mcp/maestro-server` directly. Claude uses dual-resolution: it prefers the repo-level `src/mcp/maestro-server.js` via `fs.existsSync()` and falls back to the bundled detached payload (`claude/src/mcp/maestro-server.js`) when running outside the repo. Codex spawns `bin/maestro-mcp-server.js` via a release-versioned `npx -p @josstei/maestro@<version> maestro-mcp-server` invocation (declared in `plugins/maestro/.mcp.json`); the bin sets `MAESTRO_RUNTIME=codex` and `MAESTRO_EXTENSION_PATH`, then requires `../src/mcp/maestro-server`.
148
+ Gemini and Qwen use the shared repo-root entrypoint at `mcp/maestro-server.js`, which requires `../src/mcp/maestro-server` directly. Their generated manifests set `MAESTRO_RUNTIME=gemini` or `MAESTRO_RUNTIME=qwen` before launch. Claude uses dual-resolution: it prefers the repo-level `src/mcp/maestro-server.js` via `fs.existsSync()` and falls back to the bundled detached payload (`claude/src/mcp/maestro-server.js`) when running outside the repo. Codex spawns `bin/maestro-mcp-server.js` via a release-versioned `npx -p @josstei/maestro@<version> maestro-mcp-server` invocation (declared in `plugins/maestro/.mcp.json`); the bin sets `MAESTRO_RUNTIME=codex` and `MAESTRO_EXTENSION_PATH`, then requires `../src/mcp/maestro-server`.
149
149
 
150
150
  This makes one architectural rule explicit:
151
151
 
@@ -156,9 +156,10 @@ This makes one architectural rule explicit:
156
156
 
157
157
  ### MCP Server Packaging
158
158
 
159
- Gemini and Claude keep a public entrypoint at `mcp/maestro-server.js`; Codex invokes the server via `npx` against a published bin. All three are thin wrappers around `src/mcp/maestro-server.js`:
159
+ Gemini and Qwen share the repo-root public entrypoint at `mcp/maestro-server.js`, Claude keeps a runtime-local public entrypoint at `claude/mcp/maestro-server.js`, and Codex invokes the server via `npx` against a published bin. All are thin wrappers around `src/mcp/maestro-server.js`:
160
160
 
161
- - **Gemini** (`mcp/maestro-server.js`): sets `MAESTRO_RUNTIME=gemini`, directly requires `../src/mcp/maestro-server` and calls `.main()`
161
+ - **Gemini** (`mcp/maestro-server.js`): launched with `MAESTRO_RUNTIME=gemini`, directly requires `../src/mcp/maestro-server` and calls `.main()`
162
+ - **Qwen** (`mcp/maestro-server.js`): launched with `MAESTRO_RUNTIME=qwen` from `qwen-extension.json`, using the same shared entrypoint as Gemini
162
163
  - **Claude** (`claude/mcp/maestro-server.js`): sets `MAESTRO_RUNTIME=claude`, uses `fs.existsSync()` to prefer repo `../../src/mcp/maestro-server.js` with fallback to bundled `../src/mcp/maestro-server.js`
163
164
  - **Codex** (`bin/maestro-mcp-server.js` invoked via `npx -y -p @josstei/maestro@<version> maestro-mcp-server` per `plugins/maestro/.mcp.json`): sets `MAESTRO_RUNTIME=codex` and `MAESTRO_EXTENSION_PATH`, then requires `../src/mcp/maestro-server` and calls `.main()`
164
165
 
@@ -258,11 +259,23 @@ Uses matchers to filter by tool type. Timeout: 10s (5s for policy-enforcer). Con
258
259
 
259
260
  ### Policy Enforcement
260
261
 
261
- Both runtimes block the same destructive commands (`rm -rf`, `git reset --hard`, `git clean`, heredocs) and require confirmation for redirects (`>`, `>>`, `tee`):
262
+ Gemini, Qwen, and Claude block the same destructive commands (`rm -rf`, `git reset --hard`, `git clean`, heredocs) and require confirmation for redirects (`>`, `>>`, `tee`):
262
263
 
263
264
  - **Gemini**: TOML policy rules in `policies/maestro.toml`
265
+ - **Qwen**: TOML policy rules in `policies/maestro.toml`
264
266
  - **Claude**: JavaScript policy-enforcer hook triggered on Bash tool use
265
267
 
268
+ ### Qwen Hooks
269
+
270
+ | Event | Script | Purpose |
271
+ |-------|--------|---------|
272
+ | `SessionStart` | session-start.js | Initialize hook state, prune stale sessions |
273
+ | `SubagentStart` | before-agent.js | Detect agent, inject session context |
274
+ | `SubagentStop` | after-agent.js | Validate handoff report format |
275
+ | `SessionEnd` | session-end.js | Clean up hook state |
276
+
277
+ Qwen uses its own hook registration file at `qwen/hooks.json`, while reusing the repo-root hook runner and logic modules.
278
+
266
279
  ### Hook State
267
280
 
268
281
  Ephemeral state stored in `/tmp/maestro-hooks-<uid>/`:
@@ -287,15 +300,15 @@ Ephemeral state stored in `/tmp/maestro-hooks-<uid>/`:
287
300
 
288
301
  ## CI and Testing
289
302
 
290
- For detailed documentation of all six GitHub Actions workflows, the release pipeline chain, and Mermaid flow diagrams, see [docs/cicd.md](cicd.md).
303
+ For detailed documentation of all seven GitHub Actions workflows, the release pipeline chain, and Mermaid flow diagrams, see [docs/cicd.md](cicd.md).
291
304
 
292
305
  ### Test Suite
293
306
 
294
- 54 test files with 851 tests using Node.js built-in `node:test`:
307
+ 86 test files using Node.js built-in `node:test`:
295
308
 
296
- - 30 unit tests (`tests/unit/`)
297
- - 13 transform tests (`tests/transforms/`)
298
- - 11 integration tests (`tests/integration/`)
309
+ - 53 unit test files (`tests/unit/`)
310
+ - 13 transform test files (`tests/transforms/`)
311
+ - 20 integration test files (`tests/integration/`)
299
312
 
300
313
  The justfile's `just test` target uses glob expansion
301
314
  (`tests/unit/*.test.js`, `tests/transforms/*.test.js`, `tests/integration/*.test.js`),
package/docs/cicd.md CHANGED
@@ -34,7 +34,7 @@ The six source-of-truth workflows share a common validation core: generate runti
34
34
 
35
35
  ### Purpose
36
36
 
37
- The foundational CI gate. Enforces that all generated runtime adapters (Gemini, Claude Code, Codex) are in sync with canonical source in `src/`, and that the full test suite passes. Runs on every push and pull request targeting `main`.
37
+ The foundational CI gate. Enforces that all generated runtime adapters (Gemini CLI, Claude Code, Codex, and Qwen Code) are in sync with canonical source in `src/`, and that the full test suite passes. Runs on every push and pull request targeting `main`.
38
38
 
39
39
  ### Trigger
40
40
 
@@ -371,7 +371,7 @@ graph TD
371
371
 
372
372
  | Item | Type | Purpose |
373
373
  |------|------|---------|
374
- | `RELEASE_TOKEN` | Secret | Personal access token with write permissions; used for checkout, branch push, PR creation, and auto-merge. Required because the default `GITHUB_TOKEN` cannot trigger downstream workflows. |
374
+ | `RELEASE_TOKEN` | Secret | Personal access token with write permissions; used for checkout, branch push, PR creation, and PR labeling. Required because the default `GITHUB_TOKEN` cannot trigger downstream workflows. |
375
375
 
376
376
  **Permissions**: `contents: write`, `pull-requests: write`
377
377
 
package/docs/flow.md CHANGED
@@ -16,9 +16,10 @@ The orchestration workflow is defined by 41 steps (numbered 0 through 40) in `sr
16
16
 
17
17
  ┌─────────────────────────────────────────────────┐
18
18
  │ CLASSIFICATION │
19
- │ Turn 2: Load architecture reference
19
+ │ Turn 2: Pre-load pre-execution skills
20
20
  │ Classify: simple / medium / complex │
21
- │ Route: simple → Express, else → Design
21
+ │ Route: simple → Express, else
22
+ │ finalize session_id + enter gate │
22
23
  └───────────────────────┬─────────────────────────┘
23
24
 
24
25
  ┌─────────────────────────────────────────────────┐
@@ -26,7 +27,7 @@ The orchestration workflow is defined by 41 steps (numbered 0 through 40) in `sr
26
27
  │ Load design-dialogue skill │
27
28
  │ Structured conversation (depth: quick/std/deep)│
28
29
  │ Present sections one-at-a-time for approval │
29
- Write design document to state_dir/plans/
30
+ Exit Plan Mode, then record design approval
30
31
  └───────────────────────┬─────────────────────────┘
31
32
 
32
33
  ┌─────────────────────────────────────────────────┐
@@ -46,8 +47,10 @@ The orchestration workflow is defined by 41 steps (numbered 0 through 40) in `sr
46
47
  │ For each phase: │
47
48
  │ → get_agent for methodology │
48
49
  │ → Delegate with protocols + context chain │
50
+ │ → Resolve Blockers before phase transition │
49
51
  │ → Parse Task Report + Downstream Context │
50
52
  │ → transition_phase (HARD-GATE per phase) │
53
+ │ → reconcile empty payloads when required │
51
54
  └───────────────────────┬─────────────────────────┘
52
55
 
53
56
  ┌─────────────────────────────────────────────────┐
@@ -150,9 +153,11 @@ Orchestrator Agent
150
153
  │ ├── ... (task work) ...
151
154
  │ ├── Run validation
152
155
  │ │
156
+ │◄── ## Blockers (if any) ─────────┤
153
157
  │◄── ## Task Report ───────────────┤
154
158
  │◄── ## Downstream Context ────────┤
155
159
  │ │
160
+ ├── Resolve blockers if present │
156
161
  ├── Parse handoff │
157
162
  ├── transition_phase() │
158
163
  └── Feed context to next phase │
@@ -212,11 +217,17 @@ Non-negotiable checkpoints that block progression:
212
217
  | Gate | Location | Condition |
213
218
  |------|----------|-----------|
214
219
  | Tech recommendations | Step 11 | Must recommend vanilla HTML/CSS/JS for static delivery unless framework explicitly required |
220
+ | Session ID | Step 9a | One finalized session ID must be reused for design approval, session creation, transitions, reconciliation, and archive |
221
+ | Design gate | Steps 9a/14a/21 | Standard workflow cannot create a session until approved design is recorded for the same session ID |
215
222
  | Design sections | Step 12 | Each section presented individually and approved |
223
+ | Design approval variant | Step 14a | Use content variant for Gemini; use path variant for Codex/Claude direct writes; never provide both |
216
224
  | validate_plan | Step 16 | Plan must pass validation before user sees it |
225
+ | Implementation plan variant | Step 21 | Use content variant for Gemini Plan Mode outputs; use path variant for direct workspace writes; never provide both |
217
226
  | Execution mode | Step 19 | Must present only Parallel and Sequential options |
218
227
  | Agent dispatch | Step 23 | Must dispatch by agent's registered tool directly |
228
+ | Blockers | Step 24 | Non-empty `## Blockers` must be answered and re-delegated before `transition_phase` |
219
229
  | transition_phase | Step 25 | Must be called individually for EVERY completed phase |
230
+ | Reconciliation | Step 25 | Empty file manifests plus empty downstream context require `scan_phase_changes` → user confirmation → `reconcile_phase` |
220
231
  | Code review | Step 28 | Critical/Major findings block completion |
221
232
  | Express 1-phase | Step 31 | Express sessions must have exactly one phase |
222
233
  | Express questions | Step 32 | Each question must use user prompt tool |
@@ -142,6 +142,7 @@ Common paths:
142
142
 
143
143
  - Command entry point: `/maestro:*`
144
144
  - Same command surface as Gemini CLI
145
+ - Uses `qwen/agents/` and `qwen/hooks.json`; commands, policies, MCP, and hook runner are shared from the repository root
145
146
 
146
147
  ## 7. Hook Reference
147
148
 
@@ -163,6 +164,13 @@ Common paths:
163
164
 
164
165
  - No runtime hooks
165
166
 
167
+ ### Qwen Code
168
+
169
+ - `SessionStart`
170
+ - `SubagentStart`
171
+ - `SubagentStop`
172
+ - `SessionEnd`
173
+
166
174
  ## 8. Common Notes
167
175
 
168
176
  ### Codex CLI
package/docs/overview.md CHANGED
@@ -33,7 +33,7 @@ Simple tasks use an **Express workflow** (1 agent, 1 phase), while medium/comple
33
33
  | Entry-point commands | 9 (+ 3 core) |
34
34
  | Runtime targets | 4 |
35
35
  | Source transforms | 6 |
36
- | Test cases | see `just test` output (70+ files across unit, transforms, integration) |
36
+ | Test files | 86 files across unit, transforms, and integration |
37
37
 
38
38
  ## Project Structure
39
39
 
@@ -57,7 +57,7 @@ maestro-orchestrate/
57
57
  │ └── manifest.js # Declarative file mapping rules
58
58
  ├── scripts/
59
59
  │ └── generate.js # Generator (manifest → output)
60
- ├── tests/ # 71 test files, 980 tests (see `just test` output)
60
+ ├── tests/ # 86 test files across unit, transforms, and integration
61
61
 
62
62
  ├── agents/ # [generated] Gemini agent stubs
63
63
  ├── commands/maestro/ # [generated] Gemini TOML commands
@@ -183,15 +183,15 @@ plugins/maestro/
183
183
 
184
184
  The runtime server is invoked via `npx` rather than a local wrapper file, so the plugin ships no local `mcp/` directory under `plugins/maestro/`. The bin entrypoint lives in the repo root `bin/maestro-mcp-server.js`; `node scripts/generate.js` derives `plugins/maestro/.mcp.json` from `package.json` so the plugin manifest and MCP package spec stay on the same version.
185
185
 
186
- ## Differences from Gemini and Claude
187
-
188
- | Aspect | Gemini | Claude | Codex |
189
- |--------|--------|--------|-------|
190
- | Agent names | snake_case | kebab-case | kebab-case |
191
- | Delegation | Direct function call | Agent subagent | spawn_agent |
192
- | Hooks | 4 events, no matchers | SessionStart, SessionEnd, PreToolUse + matchers | None |
193
- | Policies | TOML rules | JS hook enforcer | None |
194
- | Skill surface | N/A (commands) | 19 skills | plugin namespace `$maestro:*` |
195
- | Path style | Variable passthrough | Env var refs | `npx` bin |
196
- | Extra files | TOML policy rules | policy-enforcer | runtime guide |
197
- | Runtime payload | thin entrypoint only | thin entrypoint + detached `src/` payload | npx bin + detached `src/` payload |
186
+ ## Differences from Other Runtimes
187
+
188
+ | Aspect | Gemini | Claude | Qwen | Codex |
189
+ |--------|--------|--------|------|-------|
190
+ | Agent names | snake_case | kebab-case | snake_case | kebab-case |
191
+ | Delegation | Direct function call | Agent subagent | Direct function call | spawn_agent |
192
+ | Hooks | 4 events, no matchers | SessionStart, SessionEnd, PreToolUse + matchers | 4 events in `qwen/hooks.json` | None |
193
+ | Policies | TOML rules | JS hook enforcer | TOML rules | None |
194
+ | Skill surface | N/A (commands) | 19 skills | N/A (Gemini-compatible commands) | plugin namespace `$maestro:*` |
195
+ | Path style | Variable passthrough | Env var refs | Variable passthrough | `npx` bin |
196
+ | Extra files | TOML policy rules | policy-enforcer | Qwen manifest, context, agents, hooks config | runtime guide |
197
+ | Runtime payload | thin entrypoint only | thin entrypoint + detached `src/` payload | shared root entrypoint + `qwen/` stubs | npx bin + detached `src/` payload |
@@ -15,11 +15,14 @@ The Gemini CLI extension lives at the repository root. It is the primary runtime
15
15
  "command": "node",
16
16
  "args": ["${extensionPath}/mcp/maestro-server.js"],
17
17
  "cwd": "${extensionPath}",
18
- "env": { "MAESTRO_WORKSPACE_PATH": "${workspacePath}" }
18
+ "env": {
19
+ "MAESTRO_RUNTIME": "gemini",
20
+ "MAESTRO_WORKSPACE_PATH": "${workspacePath}"
21
+ }
19
22
  }
20
23
  ```
21
24
 
22
- The public server at `mcp/maestro-server.js` is a thin adapter. It sets `MAESTRO_RUNTIME=gemini`, requires canonical `src/mcp/maestro-server.js` directly, and runs the Gemini runtime against shared source in `src/`. Gemini declares `primary: filesystem` and `fallback: none`.
25
+ The public server at `mcp/maestro-server.js` is a thin adapter. The manifest launches it with `MAESTRO_RUNTIME=gemini`; the adapter also defaults to Gemini if that env var is absent. It requires canonical `src/mcp/maestro-server.js` directly and runs the Gemini runtime against shared source in `src/`. Gemini declares `primary: filesystem` and `fallback: none`.
23
26
 
24
27
  ## Agent Naming
25
28
 
@@ -15,11 +15,14 @@ The Qwen Code extension lives in `qwen/` (the output directory declared in `src/
15
15
  "command": "node",
16
16
  "args": ["${extensionPath}/mcp/maestro-server.js"],
17
17
  "cwd": "${extensionPath}",
18
- "env": { "MAESTRO_WORKSPACE_PATH": "${workspacePath}" }
18
+ "env": {
19
+ "MAESTRO_RUNTIME": "qwen",
20
+ "MAESTRO_WORKSPACE_PATH": "${workspacePath}"
21
+ }
19
22
  }
20
23
  ```
21
24
 
22
- The public server at `mcp/maestro-server.js` is a thin adapter. It sets `MAESTRO_RUNTIME=qwen`, requires canonical `src/mcp/maestro-server.js` directly, and runs the Qwen runtime against shared source in `src/`. Qwen declares `primary: filesystem` and `fallback: none`.
25
+ Qwen reuses the repo-root public server at `mcp/maestro-server.js`. The Qwen manifest launches that shared adapter with `MAESTRO_RUNTIME=qwen`; without that env var the adapter defaults to Gemini. The adapter requires canonical `src/mcp/maestro-server.js` directly and runs the Qwen runtime against shared source in `src/`. Qwen declares `primary: filesystem` and `fallback: none`.
23
26
 
24
27
  ## Agent Naming
25
28
 
@@ -42,16 +45,16 @@ The Qwen runtime does not emit its own TOML command files. `src/generator/entry-
42
45
 
43
46
  ## Hooks
44
47
 
45
- 4 hook events (same lifecycle shape as Gemini):
48
+ 4 hook events in `qwen/hooks.json`:
46
49
 
47
50
  | Event | Script | Purpose |
48
51
  |-------|--------|---------|
49
52
  | `SessionStart` | `hooks/hook-runner.js qwen session-start` | Initialize hook state, prune stale sessions |
50
- | `BeforeAgent` | `hooks/hook-runner.js qwen before-agent` | Detect agent, inject session context |
51
- | `AfterAgent` | `hooks/hook-runner.js qwen after-agent` | Validate Task Report + Downstream Context |
53
+ | `SubagentStart` | `hooks/hook-runner.js qwen before-agent` | Detect agent, inject session context |
54
+ | `SubagentStop` | `hooks/hook-runner.js qwen after-agent` | Validate Task Report + Downstream Context |
52
55
  | `SessionEnd` | `hooks/hook-runner.js qwen session-end` | Clean up hook state |
53
56
 
54
- ### AfterAgent Validation
57
+ ### SubagentStop Validation
55
58
 
56
59
  Qwen uses the same post-delegation validation as Gemini:
57
60
 
package/docs/usage.md CHANGED
@@ -11,7 +11,7 @@ node scripts/generate.js
11
11
  # Generate runtime adapters using package scripts
12
12
  npm run build
13
13
 
14
- # Run all 980 tests across 71 files
14
+ # Run all tests across unit, transform, and integration suites
15
15
  node --test tests/unit/*.test.js tests/transforms/*.test.js tests/integration/*.test.js
16
16
 
17
17
  # Show unified diff of changes
@@ -29,13 +29,13 @@ just test-transforms
29
29
  # Run only integration tests
30
30
  just test-integration
31
31
 
32
- # Generate + verify zero drift (CI equivalent)
32
+ # Generate + verify zero drift in a clean worktree/CI checkout
33
33
  just check
34
34
 
35
- # Full CI equivalent (check + test)
35
+ # Full CI equivalent in a clean worktree/CI checkout (check + check-layers + test)
36
36
  just ci
37
37
 
38
- # Verify lib/ import-boundary rules (enforced by check target)
38
+ # Verify lib/ import-boundary rules
39
39
  just check-layers
40
40
 
41
41
  # Delete local branches whose remotes are gone
@@ -44,11 +44,12 @@ just cleanup-branches
44
44
 
45
45
  ## Editing Workflow
46
46
 
47
- 1. Edit canonical source in `src/`. Maintain root docs (`README.md`, `EXAMPLES.md`, `USAGE.md`, `OVERVIEW.md`, `ARCHITECTURE.md`) directly, and do not edit generated `claude/`, `plugins/maestro/`, or `qwen/` output.
47
+ 1. Edit canonical source in `src/`. Maintain hand-authored root docs (`README.md`, `EXAMPLES.md`, `USAGE.md`, `OVERVIEW.md`, `ARCHITECTURE.md`, `CONTRIBUTING.md`, `SECURITY.md`) directly. Do not edit generated runtime stubs, command files, hook adapters, detached payloads, or generated skill copies directly.
48
48
  2. Run `node scripts/generate.js` or `npm run build` to regenerate runtime adapters
49
- 3. Run `node --test tests/unit/*.test.js tests/transforms/*.test.js tests/integration/*.test.js` (or `just test`) before committing
50
- 4. Commit canonical source, directly owned root docs, and generated adapter output together
51
- 5. CI will fail if runtime adapters drift from canonical `src/`
49
+ 3. Run `node scripts/generate.js --diff` to confirm the generator has no additional pending output
50
+ 4. Run `node --test tests/unit/*.test.js tests/transforms/*.test.js tests/integration/*.test.js` (or `just test`) before committing
51
+ 5. Commit canonical source, directly owned root docs, and generated adapter output together
52
+ 6. CI will fail if runtime adapters drift from canonical `src/`; `just check` and `just ci` are designed for clean worktrees because they end with `git diff --exit-code`
52
53
 
53
54
  ## Configuration
54
55
 
@@ -72,6 +73,8 @@ All settings are resolved with precedence: environment variable > workspace `.en
72
73
  |----------|---------|---------|
73
74
  | `MAESTRO_EXTENSION_PATH` | Gemini | Override extension root path |
74
75
  | `MAESTRO_WORKSPACE_PATH` | Gemini | Workspace root (set by Gemini CLI) |
76
+ | `MAESTRO_EXTENSION_PATH` | Qwen | Override extension root path |
77
+ | `MAESTRO_WORKSPACE_PATH` | Qwen | Workspace root (set by Qwen Code) |
75
78
  | `MAESTRO_WORKSPACE_PATH` | Codex | Optional workspace root override; otherwise Codex uses MCP `roots/list` |
76
79
  | `CLAUDE_PLUGIN_ROOT` | Claude | Plugin root (set by Claude Code) |
77
80
  | `CLAUDE_PROJECT_DIR` | Claude | Project directory (set by Claude Code) |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maestro",
3
- "version": "1.6.4-rc.1",
3
+ "version": "1.6.4-rc.2",
4
4
  "description": "Multi-agent development orchestration platform — 39 specialists, 4-phase orchestration, native parallel subagents, persistent sessions, and standalone review/debug/security/perf/seo/a11y/compliance commands",
5
5
  "contextFileName": "GEMINI.md",
6
6
  "settings": [
@@ -48,6 +48,7 @@
48
48
  ],
49
49
  "cwd": "${extensionPath}",
50
50
  "env": {
51
+ "MAESTRO_RUNTIME": "gemini",
51
52
  "MAESTRO_WORKSPACE_PATH": "${workspacePath}"
52
53
  }
53
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@josstei/maestro",
3
- "version": "1.6.4-rc.1",
3
+ "version": "1.6.4-rc.2",
4
4
  "description": "Multi-agent development orchestration platform — 39 specialists, 4-phase workflows, 4 runtime targets (Gemini CLI, Claude Code, OpenAI Codex, Qwen Code)",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maestro",
3
- "version": "1.6.4-rc.1",
3
+ "version": "1.6.4-rc.2",
4
4
  "description": "Generated Codex runtime for Maestro's multi-agent design, planning, execution, and review workflows.",
5
5
  "author": {
6
6
  "name": "josstei",
@@ -5,7 +5,7 @@
5
5
  "args": [
6
6
  "-y",
7
7
  "-p",
8
- "@josstei/maestro@1.6.4-rc.1",
8
+ "@josstei/maestro@1.6.4-rc.2",
9
9
  "maestro-mcp-server"
10
10
  ],
11
11
  "env": {
@@ -22,7 +22,7 @@ codex plugin marketplace add /absolute/path/to/maestro-orchestrate
22
22
 
23
23
  ## Architecture
24
24
 
25
- Codex shares the same canonical `src/` source tree as the Gemini CLI and Claude Code outputs:
25
+ Codex shares the same canonical `src/` source tree as the Gemini CLI, Claude Code, and Qwen Code outputs:
26
26
  - shared methodology, references, templates, hooks, and MCP server logic are authored only in `src/`
27
27
  - this plugin contains public entry skills, manifests, thin adapters, and a generated `./src/` runtime payload derived from canonical `src/`
28
28
  - Codex-specific behavior is isolated to this plugin's runtime guide and public entry skills, exposed under the plugin namespace as `$maestro:<skill>`
@@ -54,4 +54,4 @@ Codex shares the same canonical `src/` source tree as the Gemini CLI and Claude
54
54
 
55
55
  ## Alignment goal
56
56
 
57
- Codex is treated as a third generated runtime, not a separate implementation. If behavior changes, update shared `src/` first and regenerate.
57
+ Codex is treated as one of four generated runtimes, not a separate implementation. If behavior changes, update shared `src/` first and regenerate.
@@ -1,10 +1,15 @@
1
1
  module.exports = {
2
2
  agentNames: [
3
3
  'accessibility-specialist', 'analytics-engineer', 'api-designer', 'architect',
4
- 'code-reviewer', 'coder', 'compliance-reviewer', 'content-strategist',
5
- 'copywriter', 'data-engineer', 'debugger', 'design-system-engineer',
6
- 'devops-engineer', 'i18n-specialist', 'performance-engineer', 'product-manager',
7
- 'refactor', 'security-engineer', 'seo-specialist', 'technical-writer',
8
- 'tester', 'ux-designer',
4
+ 'cloud-architect', 'cobol-engineer', 'code-reviewer', 'coder',
5
+ 'compliance-reviewer', 'content-strategist', 'copywriter', 'data-engineer',
6
+ 'database-administrator', 'db2-dba', 'debugger', 'design-system-engineer',
7
+ 'devops-engineer', 'hlasm-assembler-specialist', 'i18n-specialist',
8
+ 'ibm-i-specialist', 'integration-engineer', 'ml-engineer', 'mlops-engineer',
9
+ 'mobile-engineer', 'observability-engineer', 'performance-engineer',
10
+ 'platform-engineer', 'product-manager', 'prompt-engineer', 'refactor',
11
+ 'release-manager', 'security-engineer', 'seo-specialist',
12
+ 'site-reliability-engineer', 'solutions-architect', 'technical-writer',
13
+ 'tester', 'ux-designer', 'zos-sysprog',
9
14
  ],
10
15
  };
@@ -130,17 +130,26 @@ Explicitly state what the agent must NOT do:
130
130
  | Task Domain | Agent | Key Capability |
131
131
  |-------------|-------|---------------|
132
132
  | System architecture, component design | `architect` | Read-only analysis, architecture patterns |
133
+ | Cloud architecture, multi-region topology | `cloud-architect` | Read-only cloud/IaC architecture |
134
+ | Enterprise integration architecture | `solutions-architect` | Read-only cross-team architecture |
133
135
  | API contracts, endpoint design | `api-designer` | Read-only, REST/GraphQL expertise |
134
136
  | Feature implementation, coding | `coder` | Full read/write/shell access |
135
137
  | Code quality assessment | `code-reviewer` | Read-only, verified findings |
136
138
  | Database schema, queries, ETL | `data-engineer` | Full read/write/shell access |
139
+ | RDBMS tuning, indexes, migration safety | `database-administrator` | Read + shell for database analysis |
140
+ | DB2 operations and tuning | `db2-dba` | Read + shell for DB2-specific work |
137
141
  | Bug investigation, root cause | `debugger` | Read + shell for investigation |
138
142
  | CI/CD, infrastructure, deployment | `devops-engineer` | Full read/write/shell access |
143
+ | Internal platforms, paved paths | `platform-engineer` | Full platform implementation access |
144
+ | B2B APIs, ETL, message brokers | `integration-engineer` | Full integration implementation access |
145
+ | SLOs, runbooks, reliability | `site-reliability-engineer` | Read + shell reliability analysis |
146
+ | Metrics, logs, traces, dashboards | `observability-engineer` | Full observability implementation access |
139
147
  | Performance analysis, profiling | `performance-engineer` | Read + shell for profiling |
140
148
  | Code restructuring, modernization | `refactor` | Read/write/shell, skill activation |
141
149
  | Security assessment, vulnerability | `security-engineer` | Read + shell for scanning |
142
150
  | Test creation, TDD, coverage | `tester` | Full read/write/shell access |
143
151
  | Documentation, READMEs, guides | `technical-writer` | Read/write, no shell |
152
+ | Release notes, changelogs, rollout | `release-manager` | Read/write for release artifacts |
144
153
  | Technical SEO auditing | `seo-specialist` | Read + shell + web search/fetch |
145
154
  | Marketing copy, content writing | `copywriter` | Read/write |
146
155
  | Content planning, strategy | `content-strategist` | Read + web search/fetch |
@@ -151,6 +160,14 @@ Explicitly state what the agent must NOT do:
151
160
  | Internationalization | `i18n-specialist` | Full read/write/shell access |
152
161
  | Design tokens, theming | `design-system-engineer` | Full read/write/shell access |
153
162
  | Legal, regulatory compliance | `compliance-reviewer` | Read + web search/fetch |
163
+ | Mobile platform work | `mobile-engineer` | Full mobile implementation access |
164
+ | Model training and inference integration | `ml-engineer` | Full ML implementation access |
165
+ | Model operations and model CI/CD | `mlops-engineer` | Full MLOps implementation access |
166
+ | Prompt design, few-shot, RAG tuning | `prompt-engineer` | Read/write prompt and eval design |
167
+ | Mainframe COBOL, JCL, CICS/IMS | `cobol-engineer` | Full mainframe implementation access |
168
+ | IBM HLASM for z/OS | `hlasm-assembler-specialist` | Full assembly implementation access |
169
+ | IBM i RPG/CL, DB2 for i | `ibm-i-specialist` | Full IBM i implementation access |
170
+ | z/OS systems programming, JCL, RACF | `zos-sysprog` | Read + shell for z/OS system work |
154
171
 
155
172
  ## Agent Tool Dispatch Contract
156
173
 
@@ -269,7 +286,7 @@ Before each agent dispatch, a hook tracks which agent is currently executing:
269
286
  - Preferred signal: the required `Agent: <agent_name>` header in the delegation prompt
270
287
  - Legacy fallbacks: `MAESTRO_CURRENT_AGENT` from the environment, then regex-based detection of patterns like `delegate to <agent>` or `@<agent>`
271
288
 
272
- The detected agent name is persisted to `/tmp/maestro-hooks/<session-id>/active-agent` and cleared by the post-delegation hook on every allowed response (both successful validation and retry allow-through). On deny (malformed output), the active agent is preserved to enable re-validation on retry.
289
+ The detected agent name is persisted to `${MAESTRO_HOOKS_DIR:-<os.tmpdir()>/maestro-hooks-<uid>}/<session-id>/active-agent` and cleared by the post-delegation hook on every allowed response (both successful validation and retry allow-through). On deny (malformed output), the active agent is preserved to enable re-validation on retry.
273
290
 
274
291
  ### Session Context Injection
275
292
 
@@ -257,7 +257,7 @@ Apply depth-gated reasoning enrichment to design section content during the conv
257
257
 
258
258
  The write path depends on whether your runtime provides a Plan Mode surface (check `get_runtime_context`, loaded at session start, step 0):
259
259
 
260
- - **Plan Mode active**: Some runtimes restrict writes to a temporary staging directory during Plan Mode. Write the design document there. After `exit_plan_mode` approval in Phase 2, copy it to the permanent location.
260
+ - **Plan Mode active**: Some runtimes restrict writes to a temporary staging directory during Plan Mode. Write the design document there first, then exit Plan Mode and complete the design approval handoff. When the runtime's Plan Mode path is not visible to the MCP server, use the `record_design_approval` content variant so the server materializes the canonical copy under `<state_dir>/plans/`.
261
261
  - **Plan Mode not active or not available**: Write directly to the permanent location. If your runtime does not provide Plan Mode, track design progress using the plan-update mechanism from runtime context and use the user-prompt tool from runtime context for section approvals and final signoff.
262
262
 
263
263
  Permanent location: `<state_dir>/plans/YYYY-MM-DD-<topic-slug>-design.md` (where `<state_dir>` resolves from `MAESTRO_STATE_DIR`, default `docs/maestro`).
@@ -121,7 +121,7 @@ Hooks fire automatically at agent boundaries. The orchestrator does not invoke t
121
121
 
122
122
  The hooks system tracks which agent is currently executing. Before each agent dispatch, a hook resolves the active agent identity from the required `Agent:` header first, then falls back to legacy env/regex detection, and injects compact session context. After completion, a hook validates that the response contains both `Task Report` and `Downstream Context`; it requests one retry on the first malformed response.
123
123
 
124
- The hook state directory under `/tmp/maestro-hooks/<session-id>/` is transient and separate from orchestration state.
124
+ The hook state directory under `${MAESTRO_HOOKS_DIR:-<os.tmpdir()>/maestro-hooks-<uid>}/<session-id>/` is transient and separate from orchestration state.
125
125
 
126
126
  ## Sequential Execution Protocol
127
127