maestro-flow 0.2.1 → 0.3.0

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 (143) hide show
  1. package/.claude/agents/team-supervisor.md +18 -8
  2. package/.claude/agents/team-worker.md +84 -2
  3. package/.claude/commands/manage-harvest.md +131 -0
  4. package/.claude/skills/team-coordinate/SKILL.md +266 -0
  5. package/.claude/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
  6. package/.claude/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
  7. package/.claude/skills/team-coordinate/roles/coordinator/commands/monitor.md +358 -0
  8. package/.claude/skills/team-coordinate/roles/coordinator/role.md +363 -0
  9. package/.claude/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
  10. package/.claude/skills/team-coordinate/specs/pipelines.md +97 -0
  11. package/.claude/skills/team-coordinate/specs/quality-gates.md +112 -0
  12. package/.claude/skills/team-coordinate/specs/role-spec-template.md +198 -0
  13. package/.claude/skills/team-executor/SKILL.md +189 -0
  14. package/.claude/skills/team-executor/roles/executor/commands/monitor.md +239 -0
  15. package/.claude/skills/team-executor/roles/executor/role.md +171 -0
  16. package/.claude/skills/team-executor/specs/session-schema.md +264 -0
  17. package/.claude/skills/team-lifecycle-v4/SKILL.md +209 -0
  18. package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +94 -0
  19. package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
  20. package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
  21. package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
  22. package/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
  23. package/.claude/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
  24. package/.claude/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
  25. package/.claude/skills/team-lifecycle-v4/roles/executor/role.md +67 -0
  26. package/.claude/skills/team-lifecycle-v4/roles/planner/role.md +85 -0
  27. package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
  28. package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
  29. package/.claude/skills/team-lifecycle-v4/roles/reviewer/role.md +69 -0
  30. package/.claude/skills/team-lifecycle-v4/roles/supervisor/role.md +192 -0
  31. package/.claude/skills/team-lifecycle-v4/roles/tester/role.md +87 -0
  32. package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +95 -0
  33. package/.claude/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
  34. package/.claude/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
  35. package/.claude/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
  36. package/.claude/skills/team-lifecycle-v4/templates/architecture.md +254 -0
  37. package/.claude/skills/team-lifecycle-v4/templates/epics.md +196 -0
  38. package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
  39. package/.claude/skills/team-lifecycle-v4/templates/requirements.md +224 -0
  40. package/.claude/skills/team-quality-assurance/SKILL.md +147 -0
  41. package/.claude/skills/team-quality-assurance/roles/analyst/role.md +88 -0
  42. package/.claude/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
  43. package/.claude/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
  44. package/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +250 -0
  45. package/.claude/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
  46. package/.claude/skills/team-quality-assurance/roles/executor/role.md +66 -0
  47. package/.claude/skills/team-quality-assurance/roles/generator/role.md +68 -0
  48. package/.claude/skills/team-quality-assurance/roles/scout/role.md +75 -0
  49. package/.claude/skills/team-quality-assurance/roles/strategist/role.md +71 -0
  50. package/.claude/skills/team-quality-assurance/specs/pipelines.md +115 -0
  51. package/.claude/skills/team-quality-assurance/specs/team-config.json +131 -0
  52. package/.claude/skills/team-review/SKILL.md +147 -0
  53. package/.claude/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
  54. package/.claude/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
  55. package/.claude/skills/team-review/roles/coordinator/commands/monitor.md +224 -0
  56. package/.claude/skills/team-review/roles/coordinator/role.md +132 -0
  57. package/.claude/skills/team-review/roles/fixer/role.md +76 -0
  58. package/.claude/skills/team-review/roles/reviewer/role.md +68 -0
  59. package/.claude/skills/team-review/roles/scanner/role.md +79 -0
  60. package/.claude/skills/team-review/specs/dimensions.md +82 -0
  61. package/.claude/skills/team-review/specs/finding-schema.json +82 -0
  62. package/.claude/skills/team-review/specs/pipelines.md +102 -0
  63. package/.claude/skills/team-review/specs/team-config.json +27 -0
  64. package/.claude/skills/team-tech-debt/SKILL.md +128 -0
  65. package/.claude/skills/team-tech-debt/roles/assessor/role.md +77 -0
  66. package/.claude/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
  67. package/.claude/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
  68. package/.claude/skills/team-tech-debt/roles/coordinator/commands/monitor.md +209 -0
  69. package/.claude/skills/team-tech-debt/roles/coordinator/role.md +123 -0
  70. package/.claude/skills/team-tech-debt/roles/executor/role.md +76 -0
  71. package/.claude/skills/team-tech-debt/roles/planner/role.md +69 -0
  72. package/.claude/skills/team-tech-debt/roles/scanner/role.md +90 -0
  73. package/.claude/skills/team-tech-debt/roles/validator/role.md +78 -0
  74. package/.claude/skills/team-tech-debt/specs/pipelines.md +47 -0
  75. package/.claude/skills/team-tech-debt/specs/team-config.json +129 -0
  76. package/.claude/skills/team-testing/SKILL.md +143 -0
  77. package/.claude/skills/team-testing/roles/analyst/role.md +103 -0
  78. package/.claude/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
  79. package/.claude/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
  80. package/.claude/skills/team-testing/roles/coordinator/commands/monitor.md +257 -0
  81. package/.claude/skills/team-testing/roles/coordinator/role.md +134 -0
  82. package/.claude/skills/team-testing/roles/executor/role.md +99 -0
  83. package/.claude/skills/team-testing/roles/generator/role.md +98 -0
  84. package/.claude/skills/team-testing/roles/strategist/role.md +83 -0
  85. package/.claude/skills/team-testing/specs/pipelines.md +101 -0
  86. package/.claude/skills/team-testing/specs/team-config.json +93 -0
  87. package/.codex/skills/maestro-coordinate/SKILL.md +6 -6
  88. package/.codex/skills/maestro-overlay/SKILL.md +1 -3
  89. package/.codex/skills/manage-issue-analyze/SKILL.md +2 -2
  90. package/.codex/skills/quality-retrospective/SKILL.md +30 -31
  91. package/.codex/skills/team-coordinate/SKILL.md +16 -18
  92. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +50 -7
  93. package/.codex/skills/team-coordinate/roles/coordinator/role.md +4 -4
  94. package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +2 -0
  95. package/.codex/skills/team-executor/SKILL.md +11 -13
  96. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +47 -11
  97. package/.codex/skills/team-lifecycle-v4/SKILL.md +27 -33
  98. package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +94 -0
  99. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +1 -1
  100. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +94 -27
  101. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +12 -14
  102. package/.codex/skills/team-lifecycle-v4/roles/supervisor/role.md +1 -1
  103. package/.codex/skills/team-lifecycle-v4/specs/knowledge-transfer.md +69 -1
  104. package/.codex/skills/team-quality-assurance/SKILL.md +14 -16
  105. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +60 -11
  106. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +4 -4
  107. package/.codex/skills/team-review/SKILL.md +14 -16
  108. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +47 -10
  109. package/.codex/skills/team-review/roles/coordinator/role.md +4 -4
  110. package/.codex/skills/team-tech-debt/SKILL.md +13 -15
  111. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +51 -12
  112. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +4 -4
  113. package/.codex/skills/team-testing/SKILL.md +15 -17
  114. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +51 -13
  115. package/.codex/skills/team-testing/roles/coordinator/role.md +4 -4
  116. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +4 -0
  117. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
  118. package/dashboard/dist-server/dashboard/src/server/routes/cli-history.js +8 -1
  119. package/dashboard/dist-server/dashboard/src/server/routes/cli-history.js.map +1 -1
  120. package/dashboard/dist-server/dashboard/src/server/routes/mcp.js +20 -0
  121. package/dashboard/dist-server/dashboard/src/server/routes/mcp.js.map +1 -1
  122. package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +1 -0
  123. package/dashboard/dist-server/dashboard/src/shared/constants.js +1 -0
  124. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  125. package/dashboard/dist-server/src/agents/cli-history-store.js +21 -3
  126. package/dashboard/dist-server/src/agents/cli-history-store.js.map +1 -1
  127. package/dist/src/agents/cli-history-store.d.ts.map +1 -1
  128. package/dist/src/agents/cli-history-store.js +21 -3
  129. package/dist/src/agents/cli-history-store.js.map +1 -1
  130. package/dist/src/commands/cli.d.ts.map +1 -1
  131. package/dist/src/commands/cli.js +20 -8
  132. package/dist/src/commands/cli.js.map +1 -1
  133. package/dist/src/commands/uninstall-ui/UninstallFlow.d.ts.map +1 -1
  134. package/dist/src/commands/uninstall-ui/UninstallFlow.js +5 -4
  135. package/dist/src/commands/uninstall-ui/UninstallFlow.js.map +1 -1
  136. package/dist/src/commands/uninstall.js +1 -1
  137. package/dist/src/commands/uninstall.js.map +1 -1
  138. package/dist/src/core/manifest.d.ts.map +1 -1
  139. package/dist/src/core/manifest.js +9 -1
  140. package/dist/src/core/manifest.js.map +1 -1
  141. package/package.json +1 -1
  142. package/workflows/cli-tools-usage.md +6 -2
  143. package/workflows/harvest.md +420 -0
@@ -0,0 +1,83 @@
1
+ ---
2
+ role: strategist
3
+ prefix: STRATEGY
4
+ inner_loop: false
5
+ message_types:
6
+ success: strategy_ready
7
+ error: error
8
+ ---
9
+
10
+ # Test Strategist
11
+
12
+ Analyze git diff, determine test layers, define coverage targets, and formulate test strategy with prioritized execution order.
13
+
14
+ ## Phase 2: Context & Environment Detection
15
+
16
+ | Input | Source | Required |
17
+ |-------|--------|----------|
18
+ | Task description | From task subject/description | Yes |
19
+ | Session path | Extracted from task description | Yes |
20
+ | .msg/meta.json | <session>/wisdom/.msg/meta.json | No |
21
+
22
+ 1. Extract session path and scope from task description
23
+ 2. Get git diff for change analysis:
24
+
25
+ ```
26
+ Bash("git diff HEAD~1 --name-only 2>/dev/null || git diff --cached --name-only")
27
+ Bash("git diff HEAD~1 -- <changed-files> 2>/dev/null || git diff --cached -- <changed-files>")
28
+ ```
29
+
30
+ 3. Detect test framework from project files:
31
+
32
+ | Signal File | Framework | Test Pattern |
33
+ |-------------|-----------|-------------|
34
+ | jest.config.js/ts | Jest | `**/*.test.{ts,tsx,js}` |
35
+ | vitest.config.ts/js | Vitest | `**/*.test.{ts,tsx}` |
36
+ | pytest.ini / pyproject.toml | Pytest | `**/test_*.py` |
37
+ | No detection | Default | Jest patterns |
38
+
39
+ 4. Scan existing test patterns:
40
+
41
+ ```
42
+ Glob("**/*.test.*")
43
+ Glob("**/*.spec.*")
44
+ ```
45
+
46
+ 5. Read .msg/meta.json if exists for session context
47
+
48
+ ## Phase 3: Strategy Formulation
49
+
50
+ **Change analysis dimensions**:
51
+
52
+ | Change Type | Analysis | Priority |
53
+ |-------------|----------|----------|
54
+ | New files | Need new tests | High |
55
+ | Modified functions | Need updated tests | Medium |
56
+ | Deleted files | Need test cleanup | Low |
57
+ | Config changes | May need integration tests | Variable |
58
+
59
+ **Strategy output structure**:
60
+
61
+ 1. **Change Analysis Table**: File, Change Type, Impact, Priority
62
+ 2. **Test Layer Recommendations**:
63
+ - L1 Unit: Scope, Coverage Target, Priority Files, Patterns
64
+ - L2 Integration: Scope, Coverage Target, Integration Points
65
+ - L3 E2E: Scope, Coverage Target, User Scenarios
66
+ 3. **Risk Assessment**: Risk, Probability, Impact, Mitigation
67
+ 4. **Test Execution Order**: Prioritized sequence
68
+
69
+ Write strategy to `<session>/strategy/test-strategy.md`
70
+
71
+ **Self-validation**:
72
+
73
+ | Check | Criteria | Fallback |
74
+ |-------|----------|----------|
75
+ | Has L1 scope | L1 scope not empty | Default to all changed files |
76
+ | Has coverage targets | L1 target > 0 | Use defaults (80/60/40) |
77
+ | Has priority files | List not empty | Use all changed files |
78
+
79
+ ## Phase 4: Wisdom & State Update
80
+
81
+ 1. Write discoveries to `<session>/wisdom/conventions.md` (detected framework, patterns)
82
+ 2. Update `<session>/wisdom/.msg/meta.json` under `strategist` namespace:
83
+ - Read existing -> merge `{ "strategist": { framework, layers, coverage_targets, priority_files, risks } }` -> write back
@@ -0,0 +1,101 @@
1
+ # Testing Pipelines
2
+
3
+ Pipeline definitions and task registry for team-testing.
4
+
5
+ ## Pipeline Selection
6
+
7
+ | Condition | Pipeline |
8
+ |-----------|----------|
9
+ | fileCount <= 3 AND moduleCount <= 1 | targeted |
10
+ | fileCount <= 10 AND moduleCount <= 3 | standard |
11
+ | Otherwise | comprehensive |
12
+
13
+ ## Pipeline Definitions
14
+
15
+ ### Targeted Pipeline (3 tasks, serial)
16
+
17
+ ```
18
+ STRATEGY-001 -> TESTGEN-001 -> TESTRUN-001
19
+ ```
20
+
21
+ | Task ID | Role | Dependencies | Layer | Description |
22
+ |---------|------|-------------|-------|-------------|
23
+ | STRATEGY-001 | strategist | (none) | — | Analyze changes, define test strategy |
24
+ | TESTGEN-001 | generator | STRATEGY-001 | L1 | Generate L1 unit tests |
25
+ | TESTRUN-001 | executor | TESTGEN-001 | L1 | Execute L1 tests, collect coverage |
26
+
27
+ ### Standard Pipeline (6 tasks, progressive layers)
28
+
29
+ ```
30
+ STRATEGY-001 -> TESTGEN-001 -> TESTRUN-001 -> TESTGEN-002 -> TESTRUN-002 -> TESTANA-001
31
+ ```
32
+
33
+ | Task ID | Role | Dependencies | Layer | Description |
34
+ |---------|------|-------------|-------|-------------|
35
+ | STRATEGY-001 | strategist | (none) | — | Analyze changes, define test strategy |
36
+ | TESTGEN-001 | generator | STRATEGY-001 | L1 | Generate L1 unit tests |
37
+ | TESTRUN-001 | executor | TESTGEN-001 | L1 | Execute L1 tests, collect coverage |
38
+ | TESTGEN-002 | generator | TESTRUN-001 | L2 | Generate L2 integration tests |
39
+ | TESTRUN-002 | executor | TESTGEN-002 | L2 | Execute L2 tests, collect coverage |
40
+ | TESTANA-001 | analyst | TESTRUN-002 | — | Defect pattern analysis, quality report |
41
+
42
+ ### Comprehensive Pipeline (8 tasks, parallel windows)
43
+
44
+ ```
45
+ STRATEGY-001 -> [TESTGEN-001 || TESTGEN-002] -> [TESTRUN-001 || TESTRUN-002] -> TESTGEN-003 -> TESTRUN-003 -> TESTANA-001
46
+ ```
47
+
48
+ | Task ID | Role | Dependencies | Layer | Description |
49
+ |---------|------|-------------|-------|-------------|
50
+ | STRATEGY-001 | strategist | (none) | — | Analyze changes, define test strategy |
51
+ | TESTGEN-001 | generator-1 | STRATEGY-001 | L1 | Generate L1 unit tests (parallel) |
52
+ | TESTGEN-002 | generator-2 | STRATEGY-001 | L2 | Generate L2 integration tests (parallel) |
53
+ | TESTRUN-001 | executor-1 | TESTGEN-001 | L1 | Execute L1 tests (parallel) |
54
+ | TESTRUN-002 | executor-2 | TESTGEN-002 | L2 | Execute L2 tests (parallel) |
55
+ | TESTGEN-003 | generator | TESTRUN-001, TESTRUN-002 | L3 | Generate L3 E2E tests |
56
+ | TESTRUN-003 | executor | TESTGEN-003 | L3 | Execute L3 tests, collect coverage |
57
+ | TESTANA-001 | analyst | TESTRUN-003 | — | Defect pattern analysis, quality report |
58
+
59
+ ## GC Loop (Generator-Critic)
60
+
61
+ Generator and executor iterate per test layer:
62
+
63
+ ```
64
+ TESTGEN -> TESTRUN -> (if pass_rate < 0.95 OR coverage < target) -> TESTGEN-fix -> TESTRUN-fix
65
+ (if pass_rate >= 0.95 AND coverage >= target) -> next layer or TESTANA
66
+ ```
67
+
68
+ - Max iterations: 3 per layer
69
+ - After 3 iterations: accept current state with warning
70
+
71
+ ## Coverage Targets
72
+
73
+ | Layer | Name | Default Target |
74
+ |-------|------|----------------|
75
+ | L1 | Unit Tests | 80% |
76
+ | L2 | Integration Tests | 60% |
77
+ | L3 | E2E Tests | 40% |
78
+
79
+ ## Session Directory
80
+
81
+ ```
82
+ .workflow/.team/TST-<slug>-<YYYY-MM-DD>/
83
+ ├── .msg/messages.jsonl # Message bus log
84
+ ├── .msg/meta.json # Session metadata
85
+ ├── wisdom/ # Cross-task knowledge
86
+ │ ├── learnings.md
87
+ │ ├── decisions.md
88
+ │ ├── conventions.md
89
+ │ └── issues.md
90
+ ├── strategy/ # Strategist output
91
+ │ └── test-strategy.md
92
+ ├── tests/ # Generator output
93
+ │ ├── L1-unit/
94
+ │ ├── L2-integration/
95
+ │ └── L3-e2e/
96
+ ├── results/ # Executor output
97
+ │ ├── run-001.json
98
+ │ └── coverage-001.json
99
+ └── analysis/ # Analyst output
100
+ └── quality-report.md
101
+ ```
@@ -0,0 +1,93 @@
1
+ {
2
+ "team_name": "team-testing",
3
+ "team_display_name": "Team Testing",
4
+ "description": "Testing team with Generator-Critic loop, shared defect memory, and progressive test layers",
5
+ "version": "1.0.0",
6
+
7
+ "roles": {
8
+ "coordinator": {
9
+ "task_prefix": null,
10
+ "responsibility": "Change scope analysis, layer selection, quality gating",
11
+ "message_types": ["pipeline_selected", "gc_loop_trigger", "quality_gate", "task_unblocked", "error", "shutdown"]
12
+ },
13
+ "strategist": {
14
+ "task_prefix": "STRATEGY",
15
+ "responsibility": "Analyze git diff, determine test layers, define coverage targets",
16
+ "message_types": ["strategy_ready", "error"]
17
+ },
18
+ "generator": {
19
+ "task_prefix": "TESTGEN",
20
+ "responsibility": "Generate test cases by layer (unit/integration/E2E)",
21
+ "message_types": ["tests_generated", "tests_revised", "error"]
22
+ },
23
+ "executor": {
24
+ "task_prefix": "TESTRUN",
25
+ "responsibility": "Execute tests, collect coverage, auto-fix failures",
26
+ "message_types": ["tests_passed", "tests_failed", "coverage_report", "error"]
27
+ },
28
+ "analyst": {
29
+ "task_prefix": "TESTANA",
30
+ "responsibility": "Defect pattern analysis, coverage gap analysis, quality report",
31
+ "message_types": ["analysis_ready", "error"]
32
+ }
33
+ },
34
+
35
+ "pipelines": {
36
+ "targeted": {
37
+ "description": "Small scope: strategy → generate L1 → run",
38
+ "task_chain": ["STRATEGY-001", "TESTGEN-001", "TESTRUN-001"],
39
+ "gc_loops": 0
40
+ },
41
+ "standard": {
42
+ "description": "Progressive: L1 → L2 with analysis",
43
+ "task_chain": ["STRATEGY-001", "TESTGEN-001", "TESTRUN-001", "TESTGEN-002", "TESTRUN-002", "TESTANA-001"],
44
+ "gc_loops": 1
45
+ },
46
+ "comprehensive": {
47
+ "description": "Full coverage: parallel L1+L2, then L3 with analysis",
48
+ "task_chain": ["STRATEGY-001", "TESTGEN-001", "TESTGEN-002", "TESTRUN-001", "TESTRUN-002", "TESTGEN-003", "TESTRUN-003", "TESTANA-001"],
49
+ "gc_loops": 2,
50
+ "parallel_groups": [["TESTGEN-001", "TESTGEN-002"], ["TESTRUN-001", "TESTRUN-002"]]
51
+ }
52
+ },
53
+
54
+ "innovation_patterns": {
55
+ "generator_critic": {
56
+ "generator": "generator",
57
+ "critic": "executor",
58
+ "max_rounds": 3,
59
+ "convergence_trigger": "coverage >= target && pass_rate >= 0.95"
60
+ },
61
+ "shared_memory": {
62
+ "file": "shared-memory.json",
63
+ "fields": {
64
+ "strategist": "test_strategy",
65
+ "generator": "generated_tests",
66
+ "executor": "execution_results",
67
+ "analyst": "analysis_report"
68
+ },
69
+ "persistent_fields": ["defect_patterns", "effective_test_patterns", "coverage_history"]
70
+ },
71
+ "dynamic_pipeline": {
72
+ "selector": "coordinator",
73
+ "criteria": "changed_file_count + module_count + change_type"
74
+ }
75
+ },
76
+
77
+ "test_layers": {
78
+ "L1": { "name": "Unit Tests", "coverage_target": 80, "description": "Function-level isolation tests" },
79
+ "L2": { "name": "Integration Tests", "coverage_target": 60, "description": "Module interaction tests" },
80
+ "L3": { "name": "E2E Tests", "coverage_target": 40, "description": "User scenario end-to-end tests" }
81
+ },
82
+
83
+ "collaboration_patterns": ["CP-1", "CP-3", "CP-5"],
84
+
85
+ "session_dirs": {
86
+ "base": ".workflow/.team/TST-{slug}-{YYYY-MM-DD}/",
87
+ "strategy": "strategy/",
88
+ "tests": "tests/",
89
+ "results": "results/",
90
+ "analysis": "analysis/",
91
+ "messages": ".workflow/.team-msg/{team-name}/"
92
+ }
93
+ }
@@ -2,7 +2,7 @@
2
2
  name: maestro-coordinate
3
3
  description: Team-agent pipeline coordinator — classifies intent, maps to skill chain, spawns one agent per step whose prompt contains the skill invocation ($skill-name "intent"). Step results propagate as context to each successor. Session state at .workflow/.maestro-coordinate/{session-id}/state.json.
4
4
  argument-hint: "\"intent text\" [-y] [-c|--continue] [--dry-run] [--chain <name>]"
5
- allowed-tools: spawn_agent, wait, send_input, close_agent, Read, Write, Bash, Glob, Grep
5
+ allowed-tools: spawn_agent, wait_agent, send_message, close_agent, Read, Write, Bash, Glob, Grep
6
6
  ---
7
7
 
8
8
  ## Auto Mode
@@ -165,10 +165,10 @@ for (const step of state.steps.filter(s => s.status === 'pending')) {
165
165
  const agent = spawn_agent({ message: stepPrompt })
166
166
 
167
167
  // Wait — with timeout urge
168
- let result = wait({ ids: [agent], timeout_ms: 600000 })
168
+ let result = wait_agent({ timeout_ms: 600000 })
169
169
  if (result.timed_out) {
170
- send_input({ id: agent, message: "Please wrap up and output your findings JSON now." })
171
- result = wait({ ids: [agent], timeout_ms: 120000 })
170
+ send_message({ target: agent, message: "Please wrap up and output your findings JSON now." })
171
+ result = wait_agent({ timeout_ms: 600000 })
172
172
  }
173
173
 
174
174
  // Parse structured output from agent
@@ -178,7 +178,7 @@ for (const step of state.steps.filter(s => s.status === 'pending')) {
178
178
  hints_for_next: ""
179
179
  }
180
180
 
181
- close_agent({ id: agent })
181
+ close_agent({ target: agent })
182
182
 
183
183
  // Persist step result
184
184
  step.status = result.timed_out ? "failed" : "completed"
@@ -307,5 +307,5 @@ Resume: $maestro-coordinate --continue
307
307
  5. **Skip on Failure**: Step failure immediately marks all remaining steps `skipped` and aborts the loop
308
308
  6. **Close before spawn**: Always `close_agent` the current step agent before spawning the next
309
309
  7. **Dry-run is read-only**: Stop after displaying the chain plan — never spawn agents
310
- 8. **Timeout handling**: One urge via `send_input`; if still timed out → mark `failed`
310
+ 8. **Timeout handling**: One urge via `send_message`; if still timed out → mark `failed`
311
311
  9. **No CLI fallback**: All execution is agent-native — no `exec_command("maestro cli ...")`
@@ -68,9 +68,7 @@ functions.update_plan({
68
68
  ```javascript
69
69
  functions.request_user_input({
70
70
  id: "overlay-clarify",
71
- items: [
72
- { type: "text", text: "Which command(s) should this overlay target? (e.g. maestro-execute, maestro-plan)" }
73
- ]
71
+ message: "Which command(s) should this overlay target? (e.g. maestro-execute, maestro-plan)"
74
72
  })
75
73
  ```
76
74
 
@@ -69,7 +69,7 @@ If `status` is not `open` or `registered`, emit W001 but continue.
69
69
  ```javascript
70
70
  spawn_agent({
71
71
  task_name: "ctx-explore",
72
- fork_context: false,
72
+ fork_turns: "none",
73
73
  message: `## TASK ASSIGNMENT
74
74
 
75
75
  ### MANDATORY FIRST STEPS
@@ -87,7 +87,7 @@ Identify: affected locations (file:line), caller/callee chains, data flow, exist
87
87
  EXPECTED: JSON with: affected_files [{file, line, snippet, relevance}], related_modules, error_handling_gaps, test_coverage_gaps.
88
88
  `
89
89
  })
90
- const ctxResult = wait_agent({ targets: ["ctx-explore"], timeout_ms: 300000 })
90
+ const ctxResult = wait_agent({ timeout_ms: 600000 })
91
91
  close_agent({ target: "ctx-explore" })
92
92
  ```
93
93
 
@@ -63,7 +63,7 @@ $maestro-retrospective "3 --compare 2 --auto-yes"
63
63
 
64
64
  Stage 4: Context-Agent Fork (Pattern 2.10)
65
65
  ┌────────────────────────────────────────────────────────────────┐
66
- │ spawn ctx (fork_context: false)
66
+ │ spawn ctx (fork_turns: "none")
67
67
  │ wait ctx │
68
68
  │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
69
69
  │ │lens-tech │ │lens-proc │ │lens-qual │ │lens-dec │ │
@@ -75,7 +75,7 @@ $maestro-retrospective "3 --compare 2 --auto-yes"
75
75
  │ lens results
76
76
  Stage 5: Synthesizer
77
77
  ┌──────────────────────────────────────────┐
78
- │ spawn synthesizer (fork_context: false) │
78
+ │ spawn synthesizer (fork_turns: "none") │
79
79
  │ → wait → close │
80
80
  └──────────────────┬───────────────────────┘
81
81
  │ distilled_insights
@@ -84,29 +84,29 @@ $maestro-retrospective "3 --compare 2 --auto-yes"
84
84
 
85
85
  ## Agent Registry
86
86
 
87
- | Agent | task_name | fork_context | Responsibility |
88
- |-------|-----------|-------------|----------------|
89
- | Context Agent | `ctx` | false | Load all phase artifacts: index.json, plan.json, verification.json, review.json, uat.md, issues.jsonl, task summaries |
90
- | Technical Lens | `lens-tech` | true | Technical debt, architecture decisions, code quality gaps, performance issues |
91
- | Process Lens | `lens-proc` | true | Workflow efficiency, collaboration patterns, planning accuracy, bottlenecks |
92
- | Quality Lens | `lens-qual` | true | Test coverage gaps, verification failures, UAT issues, quality gate outcomes |
93
- | Decision Lens | `lens-dec` | true | Key decisions made, tradeoffs accepted, ADR candidates, reversibility |
94
- | Synthesizer | `synthesizer` | false | Merge lens results, deduplicate insights, classify routing targets |
87
+ | Agent | task_name | fork_turns | Responsibility |
88
+ |-------|-----------|------------|----------------|
89
+ | Context Agent | `ctx` | "none" | Load all phase artifacts: index.json, plan.json, verification.json, review.json, uat.md, issues.jsonl, task summaries |
90
+ | Technical Lens | `lens-tech` | "all" | Technical debt, architecture decisions, code quality gaps, performance issues |
91
+ | Process Lens | `lens-proc` | "all" | Workflow efficiency, collaboration patterns, planning accuracy, bottlenecks |
92
+ | Quality Lens | `lens-qual` | "all" | Test coverage gaps, verification failures, UAT issues, quality gate outcomes |
93
+ | Decision Lens | `lens-dec` | "all" | Key decisions made, tradeoffs accepted, ADR candidates, reversibility |
94
+ | Synthesizer | `synthesizer` | "none" | Merge lens results, deduplicate insights, classify routing targets |
95
95
 
96
- ## Fork Context Strategy
96
+ ## Fork Turns Strategy
97
97
 
98
- | Agent | task_name | fork_context | fork_from | Rationale |
99
- |-------|-----------|-------------|-----------|-----------|
100
- | Context Agent | `ctx` | false | — | Independent artifact loader; clean start |
101
- | Technical Lens | `lens-tech` | true | `ctx` | Inherits loaded artifacts — no redundant file reads |
102
- | Process Lens | `lens-proc` | true | `ctx` | Inherits loaded artifacts — no redundant file reads |
103
- | Quality Lens | `lens-qual` | true | `ctx` | Inherits loaded artifacts — no redundant file reads |
104
- | Decision Lens | `lens-dec` | true | `ctx` | Inherits loaded artifacts — no redundant file reads |
105
- | Synthesizer | `synthesizer` | false | — | Clean context; receives lens results via message |
98
+ | Agent | task_name | fork_turns | fork_from | Rationale |
99
+ |-------|-----------|------------|-----------|-----------|
100
+ | Context Agent | `ctx` | "none" | — | Independent artifact loader; clean start |
101
+ | Technical Lens | `lens-tech` | "all" | `ctx` | Inherits loaded artifacts — no redundant file reads |
102
+ | Process Lens | `lens-proc` | "all" | `ctx` | Inherits loaded artifacts — no redundant file reads |
103
+ | Quality Lens | `lens-qual` | "all" | `ctx` | Inherits loaded artifacts — no redundant file reads |
104
+ | Decision Lens | `lens-dec` | "all" | `ctx` | Inherits loaded artifacts — no redundant file reads |
105
+ | Synthesizer | `synthesizer` | "none" | — | Clean context; receives lens results via message |
106
106
 
107
- **Context-Agent Lifecycle**: Spawn `ctx` first → `wait_agent` → spawn all lens agents (`fork_context: true`) → `wait_agent` batch for lenses → `close_agent` lenses → `close_agent ctx` LAST.
107
+ **Context-Agent Lifecycle**: Spawn `ctx` first → `wait_agent` → spawn all lens agents (`fork_turns: "all"`) → `wait_agent` batch for lenses → `close_agent` lenses → `close_agent ctx` LAST.
108
108
 
109
- > **fork_context semantics**: `fork_context: true` means the spawned agent inherits the *orchestrator's* current conversation context — not the ctx agent's own context. When `wait_agent(["ctx"])` returns, the ctx agent's completed artifact summaries are visible in the orchestrator's context. Lens agents forked after that point therefore inherit those summaries. Lens agents do **not** fork directly from `ctx`; the `fork_from: ctx` column above is conceptual shorthand for this sequencing.
109
+ > **fork_turns semantics**: `fork_turns: "all"` means the spawned agent inherits the *orchestrator's* current conversation context — not the ctx agent's own context. When `wait_agent` for ctx returns, the ctx agent's completed artifact summaries are visible in the orchestrator's context. Lens agents forked after that point therefore inherit those summaries. Lens agents do **not** fork directly from `ctx`; the `fork_from: ctx` column above is conceptual shorthand for this sequencing.
110
110
 
111
111
  ---
112
112
 
@@ -172,7 +172,7 @@ If existing `retrospective.{md,json}` present, move to `{phase_dir}/.history/` w
172
172
  ```javascript
173
173
  spawn_agent({
174
174
  task_name: "ctx",
175
- fork_context: false,
175
+ fork_turns: "none",
176
176
  message: `## TASK ASSIGNMENT
177
177
 
178
178
  ### MANDATORY FIRST STEPS
@@ -199,14 +199,14 @@ EXPECTED: Comprehensive artifact summary covering:
199
199
  - Key metrics: lines changed, test coverage, time taken
200
200
  `
201
201
  })
202
- wait_agent({ targets: ["ctx"], timeout_ms: 300000 })
202
+ wait_agent({ timeout_ms: 600000 })
203
203
  ```
204
204
 
205
205
  **Step 4b: Fork 4 lens agents** (only active lenses based on `--lens` flag; default: all 4)
206
206
  ```javascript
207
207
  spawn_agent({
208
208
  task_name: "lens-tech",
209
- fork_context: true,
209
+ fork_turns: "all",
210
210
  message: `## TECHNICAL LENS ANALYSIS
211
211
 
212
212
  Analyze the loaded phase artifacts from a TECHNICAL perspective.
@@ -232,7 +232,7 @@ EXPECTED: JSON array of insights, each: {
232
232
 
233
233
  spawn_agent({
234
234
  task_name: "lens-proc",
235
- fork_context: true,
235
+ fork_turns: "all",
236
236
  message: `## PROCESS LENS ANALYSIS
237
237
 
238
238
  Analyze the loaded phase artifacts from a PROCESS perspective.
@@ -250,7 +250,7 @@ EXPECTED: Same JSON array schema as technical lens.
250
250
 
251
251
  spawn_agent({
252
252
  task_name: "lens-qual",
253
- fork_context: true,
253
+ fork_turns: "all",
254
254
  message: `## QUALITY LENS ANALYSIS
255
255
 
256
256
  Analyze the loaded phase artifacts from a QUALITY perspective.
@@ -268,7 +268,7 @@ EXPECTED: Same JSON array schema as technical lens.
268
268
 
269
269
  spawn_agent({
270
270
  task_name: "lens-dec",
271
- fork_context: true,
271
+ fork_turns: "all",
272
272
  message: `## DECISION LENS ANALYSIS
273
273
 
274
274
  Analyze the loaded phase artifacts from a DECISION perspective.
@@ -285,7 +285,6 @@ EXPECTED: Same JSON array schema as technical lens.
285
285
  })
286
286
 
287
287
  const lensResults = wait_agent({
288
- targets: ["lens-tech", "lens-proc", "lens-qual", "lens-dec"],
289
288
  timeout_ms: 600000
290
289
  })
291
290
 
@@ -302,7 +301,7 @@ If `lensResults.timed_out` for any agent: emit W001, continue with partial cover
302
301
  ```javascript
303
302
  spawn_agent({
304
303
  task_name: "synthesizer",
305
- fork_context: false,
304
+ fork_turns: "none",
306
305
  message: `## SYNTHESIS TASK
307
306
 
308
307
  Merge and distill insights from 4 lens analyses.
@@ -324,7 +323,7 @@ EXPECTED: JSON with:
324
323
  `
325
324
  })
326
325
 
327
- const synthResult = wait_agent({ targets: ["synthesizer"], timeout_ms: 300000 })
326
+ const synthResult = wait_agent({ timeout_ms: 600000 })
328
327
  close_agent({ target: "synthesizer" })
329
328
  ```
330
329
 
@@ -498,7 +497,7 @@ Next:
498
497
  2. **Context-agent spawns first**: `ctx` must complete before any lens agent is spawned
499
498
  3. **Parallel lens dispatch**: All active lens agents spawned in a single batch, then `wait_agent` for all together — never sequentially
500
499
  4. **Context-agent closes last**: Close all lens agents before closing `ctx`
501
- 5. **Synthesizer is isolated**: `fork_context: false` — receives lens results only via message, not full conversation history
500
+ 5. **Synthesizer is isolated**: `fork_turns: "none"` — receives lens results only via message, not full conversation history
502
501
  6. **Stable INS-ids**: `INS-{8hex}` from `hash(phase_num + lens + title)` — re-runs do not create duplicates
503
502
  7. **Archive before overwrite**: Move existing retrospective.{md,json} to `.history/` with timestamp before writing new ones
504
503
  8. **Spec learnings.md backward-compat**: Append to it only if it already exists — never create it
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: team-coordinate
3
3
  description: Universal team coordination skill with dynamic role generation. Uses team-worker agent architecture with role-spec files. Only coordinator is built-in -- all worker roles are generated at runtime as role-specs and spawned via team-worker agent. Beat/cadence model for orchestration. Triggers on "Team Coordinate ".
4
- allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), assign_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*)
4
+ allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), followup_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__maestro-tools__team_msg(*)
5
5
  ---
6
6
 
7
7
  # Team Coordinate
@@ -40,7 +40,7 @@ Before calling ANY tool, apply this check:
40
40
 
41
41
  | Tool Call | Verdict | Reason |
42
42
  |-----------|---------|--------|
43
- | `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `assign_task` | ALLOWED | Orchestration |
43
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `followup_task` | ALLOWED | Orchestration |
44
44
  | `list_agents` | ALLOWED | Agent health check |
45
45
  | `request_user_input` | ALLOWED | User interaction |
46
46
  | `mcp__maestro-tools__team_msg` | ALLOWED | Message bus |
@@ -138,9 +138,8 @@ When coordinator spawns workers, use `team-worker` agent with role-spec path:
138
138
  spawn_agent({
139
139
  agent_type: "team_worker",
140
140
  task_name: "<task-id>",
141
- fork_context: false,
142
- items: [
143
- { type: "text", text: `## Role Assignment
141
+ fork_turns: "none",
142
+ message: `## Role Assignment
144
143
  role: <role>
145
144
  role_spec: <session-folder>/role-specs/<role>.md
146
145
  session: <session-folder>
@@ -148,21 +147,20 @@ session_id: <session-id>
148
147
  requirement: <task-description>
149
148
  inner_loop: <true|false>
150
149
 
151
- Read role_spec file to load Phase 2-4 domain instructions.` },
150
+ Read role_spec file to load Phase 2-4 domain instructions.
152
151
 
153
- { type: "text", text: `## Task Context
152
+ ## Task Context
154
153
  task_id: <task-id>
155
154
  title: <task-title>
156
155
  description: <task-description>
157
- pipeline_phase: <pipeline-phase>` },
156
+ pipeline_phase: <pipeline-phase>
158
157
 
159
- { type: "text", text: `## Upstream Context
160
- <prev_context>` }
161
- ]
158
+ ## Upstream Context
159
+ <prev_context>`
162
160
  })
163
161
  ```
164
162
 
165
- After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
163
+ After spawning, use `wait_agent({ timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
166
164
 
167
165
  **Inner Loop roles** (role has 2+ serial same-prefix tasks): Set `inner_loop: true`. The team-worker agent handles the loop internally.
168
166
 
@@ -190,10 +188,10 @@ Override model/reasoning_effort in spawn_agent when cost optimization is needed:
190
188
  spawn_agent({
191
189
  agent_type: "team_worker",
192
190
  task_name: "<task-id>",
193
- fork_context: false,
191
+ fork_turns: "none",
194
192
  model: "<model-override>",
195
193
  reasoning_effort: "<effort-level>",
196
- items: [...]
194
+ message: "..."
197
195
  })
198
196
  ```
199
197
 
@@ -204,14 +202,14 @@ spawn_agent({
204
202
  | Intent | API | Example |
205
203
  |--------|-----|---------|
206
204
  | Queue supplementary info (don't interrupt) | `send_message` | Send upstream task findings to a running downstream worker |
207
- | Not used in this skill | `assign_task` | No resident agents -- all workers are one-shot |
205
+ | Not used in this skill | `followup_task` | No resident agents -- all workers are one-shot |
208
206
  | Check running agents | `list_agents` | Verify agent health during resume |
209
207
 
210
208
  **Note**: Since roles are dynamically generated, the coordinator must resolve task prefixes and role names from `team-session.json#roles` at runtime. There are no hardcoded role-specific examples.
211
209
 
212
- ### fork_context Strategy
210
+ ### fork_turns Strategy
213
211
 
214
- `fork_context: false` is the default. Consider `fork_context: true` only when:
212
+ `fork_turns: "none"` is the default. Consider `fork_turns: "all"` only when:
215
213
  - Runtime analysis reveals the task requires deep familiarity with the full conversation context
216
214
  - The dynamically-generated role-spec indicates the worker needs project-wide understanding
217
215
  - The coordinator has already accumulated significant context about the codebase
@@ -232,7 +230,7 @@ const running = list_agents({})
232
230
  ### Named Agent Targeting
233
231
 
234
232
  Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
235
- - `send_message({ target: "<TASK-ID>", items: [...] })` -- queue upstream context without interrupting
233
+ - `send_message({ target: "<TASK-ID>", message: "..." })` -- queue upstream context without interrupting
236
234
  - `close_agent({ target: "<TASK-ID>" })` -- cleanup by name
237
235
 
238
236
  ## Completion Action