maestro-flow 0.3.37 → 0.3.39

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 (186) hide show
  1. package/.claude/agents/workflow-analyzer.md +2 -0
  2. package/.claude/agents/workflow-debugger.md +2 -0
  3. package/.claude/agents/workflow-executor.md +2 -0
  4. package/.claude/agents/workflow-integration-checker.md +1 -0
  5. package/.claude/agents/workflow-nyquist-auditor.md +1 -0
  6. package/.claude/agents/workflow-planner.md +2 -0
  7. package/.claude/agents/workflow-reviewer.md +2 -0
  8. package/.claude/agents/workflow-verifier.md +2 -0
  9. package/.claude/commands/learn-decompose.md +176 -176
  10. package/.claude/commands/learn-follow.md +167 -167
  11. package/.claude/commands/learn-investigate.md +221 -221
  12. package/.claude/commands/learn-retro.md +303 -303
  13. package/.claude/commands/learn-second-opinion.md +167 -167
  14. package/.claude/commands/maestro-amend.md +300 -300
  15. package/.claude/commands/maestro-analyze.md +126 -126
  16. package/.claude/commands/maestro-brainstorm.md +100 -100
  17. package/.claude/commands/maestro-composer.md +354 -354
  18. package/.claude/commands/maestro-execute.md +120 -114
  19. package/.claude/commands/maestro-fork.md +86 -86
  20. package/.claude/commands/maestro-init.md +78 -78
  21. package/.claude/commands/maestro-learn.md +140 -140
  22. package/.claude/commands/maestro-link-coordinate.md +1 -1
  23. package/.claude/commands/maestro-merge.md +61 -61
  24. package/.claude/commands/maestro-milestone-release.md +96 -96
  25. package/.claude/commands/maestro-overlay.md +178 -178
  26. package/.claude/commands/maestro-plan.md +150 -138
  27. package/.claude/commands/maestro-player.md +404 -404
  28. package/.claude/commands/maestro-quick.md +56 -56
  29. package/.claude/commands/maestro-ralph-execute.md +7 -18
  30. package/.claude/commands/maestro-ralph.md +9 -3
  31. package/.claude/commands/maestro-roadmap.md +1 -1
  32. package/.claude/commands/maestro-ui-design.md +93 -93
  33. package/.claude/commands/maestro-update.md +176 -176
  34. package/.claude/commands/maestro-verify.md +96 -90
  35. package/.claude/commands/maestro.md +121 -121
  36. package/.claude/commands/manage-codebase-rebuild.md +75 -75
  37. package/.claude/commands/manage-codebase-refresh.md +57 -57
  38. package/.claude/commands/manage-harvest.md +94 -94
  39. package/.claude/commands/manage-issue-discover.md +77 -77
  40. package/.claude/commands/manage-issue.md +73 -73
  41. package/.claude/commands/manage-knowhow-capture.md +193 -193
  42. package/.claude/commands/manage-knowhow.md +77 -77
  43. package/.claude/commands/manage-learn.md +67 -67
  44. package/.claude/commands/manage-status.md +51 -51
  45. package/.claude/commands/manage-wiki.md +62 -62
  46. package/.claude/commands/quality-auto-test.md +1 -1
  47. package/.claude/commands/quality-debug.md +121 -115
  48. package/.claude/commands/quality-refactor.md +55 -55
  49. package/.claude/commands/quality-retrospective.md +78 -78
  50. package/.claude/commands/quality-review.md +114 -108
  51. package/.claude/commands/quality-sync.md +51 -51
  52. package/.claude/commands/quality-test.md +103 -103
  53. package/.claude/commands/spec-add.md +49 -49
  54. package/.claude/commands/spec-load.md +51 -51
  55. package/.claude/commands/spec-remove.md +51 -51
  56. package/.claude/commands/spec-setup.md +51 -51
  57. package/.claude/commands/wiki-connect.md +62 -62
  58. package/.claude/commands/wiki-digest.md +69 -69
  59. package/.codex/skills/learn-decompose/SKILL.md +113 -113
  60. package/.codex/skills/learn-follow/SKILL.md +1 -1
  61. package/.codex/skills/learn-investigate/SKILL.md +83 -83
  62. package/.codex/skills/learn-retro/SKILL.md +83 -83
  63. package/.codex/skills/learn-second-opinion/SKILL.md +86 -86
  64. package/.codex/skills/maestro/SKILL.md +304 -304
  65. package/.codex/skills/maestro-analyze/SKILL.md +9 -8
  66. package/.codex/skills/maestro-brainstorm/SKILL.md +442 -397
  67. package/.codex/skills/maestro-composer/SKILL.md +213 -213
  68. package/.codex/skills/maestro-execute/SKILL.md +346 -318
  69. package/.codex/skills/maestro-fork/SKILL.md +56 -2
  70. package/.codex/skills/maestro-init/SKILL.md +40 -16
  71. package/.codex/skills/maestro-learn/SKILL.md +80 -80
  72. package/.codex/skills/maestro-link-coordinate/SKILL.md +257 -257
  73. package/.codex/skills/maestro-merge/SKILL.md +1 -1
  74. package/.codex/skills/maestro-milestone-audit/SKILL.md +1 -1
  75. package/.codex/skills/maestro-milestone-complete/SKILL.md +40 -9
  76. package/.codex/skills/maestro-milestone-release/SKILL.md +70 -70
  77. package/.codex/skills/maestro-overlay/SKILL.md +1 -1
  78. package/.codex/skills/maestro-plan/SKILL.md +19 -4
  79. package/.codex/skills/maestro-player/SKILL.md +323 -323
  80. package/.codex/skills/maestro-quick/SKILL.md +1 -1
  81. package/.codex/skills/maestro-ralph/SKILL.md +681 -578
  82. package/.codex/skills/maestro-roadmap/SKILL.md +518 -468
  83. package/.codex/skills/maestro-ui-design/SKILL.md +109 -12
  84. package/.codex/skills/maestro-verify/SKILL.md +27 -9
  85. package/.codex/skills/manage-codebase-rebuild/SKILL.md +3 -2
  86. package/.codex/skills/manage-codebase-refresh/SKILL.md +1 -1
  87. package/.codex/skills/manage-harvest/SKILL.md +91 -91
  88. package/.codex/skills/manage-issue/SKILL.md +19 -6
  89. package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
  90. package/.codex/skills/manage-knowhow/SKILL.md +95 -95
  91. package/.codex/skills/manage-knowhow-capture/SKILL.md +110 -110
  92. package/.codex/skills/manage-learn/SKILL.md +1 -1
  93. package/.codex/skills/manage-status/SKILL.md +1 -1
  94. package/.codex/skills/manage-wiki/SKILL.md +55 -55
  95. package/.codex/skills/quality-auto-test/SKILL.md +547 -547
  96. package/.codex/skills/quality-debug/SKILL.md +339 -334
  97. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  98. package/.codex/skills/quality-retrospective/SKILL.md +292 -292
  99. package/.codex/skills/quality-review/SKILL.md +365 -364
  100. package/.codex/skills/quality-sync/SKILL.md +1 -1
  101. package/.codex/skills/quality-test/SKILL.md +498 -498
  102. package/.codex/skills/spec-add/SKILL.md +101 -101
  103. package/.codex/skills/spec-load/SKILL.md +77 -77
  104. package/.codex/skills/spec-map/SKILL.md +1 -1
  105. package/.codex/skills/spec-remove/SKILL.md +69 -69
  106. package/.codex/skills/spec-setup/SKILL.md +1 -1
  107. package/.codex/skills/team-coordinate/SKILL.md +2 -1
  108. package/.codex/skills/team-executor/SKILL.md +116 -115
  109. package/.codex/skills/team-lifecycle-v4/SKILL.md +2 -1
  110. package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +14 -6
  111. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +16 -4
  112. package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +7 -1
  113. package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +16 -4
  114. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +8 -2
  115. package/.codex/skills/team-quality-assurance/SKILL.md +2 -1
  116. package/.codex/skills/team-quality-assurance/roles/scout/role.md +9 -2
  117. package/.codex/skills/team-review/SKILL.md +2 -1
  118. package/.codex/skills/team-review/roles/reviewer/role.md +10 -1
  119. package/.codex/skills/team-review/roles/scanner/role.md +10 -1
  120. package/.codex/skills/team-tech-debt/SKILL.md +144 -143
  121. package/.codex/skills/team-tech-debt/roles/executor/role.md +9 -5
  122. package/.codex/skills/team-tech-debt/roles/scanner/role.md +10 -0
  123. package/.codex/skills/team-tech-debt/roles/validator/role.md +8 -2
  124. package/.codex/skills/team-testing/SKILL.md +2 -1
  125. package/.codex/skills/team-testing/roles/executor/role.md +8 -2
  126. package/.codex/skills/team-testing/roles/generator/role.md +8 -2
  127. package/.codex/skills/wiki-connect/SKILL.md +73 -73
  128. package/.codex/skills/wiki-digest/SKILL.md +87 -87
  129. package/README.md +6 -0
  130. package/README.zh-CN.md +6 -0
  131. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +4 -0
  132. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
  133. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +118 -7
  134. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  135. package/dashboard/dist-server/shared/agent-types.d.ts +2 -0
  136. package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +2 -0
  137. package/dashboard/dist-server/src/agents/cli-agent-runner.js +4 -0
  138. package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
  139. package/dashboard/dist-server/src/commands/delegate.d.ts +2 -0
  140. package/dashboard/dist-server/src/commands/delegate.js +18 -0
  141. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  142. package/dashboard/dist-server/src/config/cli-tools-config.d.ts +6 -0
  143. package/dashboard/dist-server/src/config/cli-tools-config.js +2 -0
  144. package/dashboard/dist-server/src/config/cli-tools-config.js.map +1 -1
  145. package/dist/shared/agent-types.d.ts +2 -0
  146. package/dist/shared/agent-types.d.ts.map +1 -1
  147. package/dist/src/agents/cli-agent-runner.d.ts +2 -0
  148. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  149. package/dist/src/agents/cli-agent-runner.js +4 -0
  150. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  151. package/dist/src/commands/config.d.ts.map +1 -1
  152. package/dist/src/commands/config.js +29 -1
  153. package/dist/src/commands/config.js.map +1 -1
  154. package/dist/src/commands/delegate.d.ts +2 -0
  155. package/dist/src/commands/delegate.d.ts.map +1 -1
  156. package/dist/src/commands/delegate.js +18 -0
  157. package/dist/src/commands/delegate.js.map +1 -1
  158. package/dist/src/commands/launcher.d.ts.map +1 -1
  159. package/dist/src/commands/launcher.js +27 -4
  160. package/dist/src/commands/launcher.js.map +1 -1
  161. package/dist/src/config/cli-tools-config.d.ts +6 -0
  162. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  163. package/dist/src/config/cli-tools-config.js +2 -0
  164. package/dist/src/config/cli-tools-config.js.map +1 -1
  165. package/dist/src/core/overlay/applier.d.ts.map +1 -1
  166. package/dist/src/core/overlay/applier.js +65 -5
  167. package/dist/src/core/overlay/applier.js.map +1 -1
  168. package/dist/src/core/overlay/loader.d.ts.map +1 -1
  169. package/dist/src/core/overlay/loader.js +9 -4
  170. package/dist/src/core/overlay/loader.js.map +1 -1
  171. package/dist/src/core/overlay/types.d.ts +2 -0
  172. package/dist/src/core/overlay/types.d.ts.map +1 -1
  173. package/dist/src/core/overlay/types.js +2 -0
  174. package/dist/src/core/overlay/types.js.map +1 -1
  175. package/dist/src/tui/tools-ui/ToolsDashboard.d.ts.map +1 -1
  176. package/dist/src/tui/tools-ui/ToolsDashboard.js +1 -1
  177. package/dist/src/tui/tools-ui/ToolsDashboard.js.map +1 -1
  178. package/dist/src/tui/tools-ui/ToolsOverview.d.ts.map +1 -1
  179. package/dist/src/tui/tools-ui/ToolsOverview.js +51 -4
  180. package/dist/src/tui/tools-ui/ToolsOverview.js.map +1 -1
  181. package/package.json +1 -1
  182. package/shared/agent-types.ts +2 -0
  183. package/workflows/delegate-protocol.codex.md +65 -0
  184. package/workflows/issue-analyze.md +2 -3
  185. package/workflows/issue-gaps-analyze.codex.md +260 -0
  186. package/workflows/issue-gaps-analyze.md +214 -0
@@ -1,143 +1,144 @@
1
- ---
2
- name: team-tech-debt
3
- description: Unified team skill for tech debt identification and remediation. Scans codebase for tech debt, assesses severity, plans and executes fixes with validation. Uses team-worker agent architecture with roles/ for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team tech debt".
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__ace-tool__search_context(*), mcp__maestro-tools__read_file(*), mcp__maestro-tools__write_file(*), mcp__maestro-tools__edit_file(*), mcp__maestro-tools__team_msg(*)
5
- ---
6
-
7
- <purpose>
8
- Systematic tech debt governance: scan -> assess -> plan -> fix -> validate. Built on **team-worker agent architecture** — all worker roles share a single agent definition with role-specific Phase 2-4 loaded from `roles/<role>/role.md`.
9
-
10
- ```
11
- Skill(skill="team-tech-debt", args="task description")
12
- |
13
- SKILL.md (this file) = Router
14
- |
15
- +--------------+--------------+
16
- | |
17
- no --role flag --role <name>
18
- | |
19
- Coordinator Worker
20
- roles/coordinator/role.md roles/<name>/role.md
21
- |
22
- +-- analyze → dispatch → spawn workers → STOP
23
- |
24
- +-------+-------+-------+-------+
25
- v v v v v
26
- [team-worker agents, each loads roles/<role>/role.md]
27
- scanner assessor planner executor validator
28
- ```
29
- </purpose>
30
-
31
- <context>
32
- $ARGUMENTS — task description and optional flags.
33
-
34
- **Role Router:**
35
- - Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
36
- - No `--role` → `roles/coordinator/role.md`, execute entry router
37
-
38
- **Role Registry:**
39
- | Role | Path | Prefix | Inner Loop |
40
- |------|------|--------|------------|
41
- | coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
42
- | scanner | [roles/scanner/role.md](roles/scanner/role.md) | TDSCAN-* | false |
43
- | assessor | [roles/assessor/role.md](roles/assessor/role.md) | TDEVAL-* | false |
44
- | planner | [roles/planner/role.md](roles/planner/role.md) | TDPLAN-* | false |
45
- | executor | [roles/executor/role.md](roles/executor/role.md) | TDFIX-* | true |
46
- | validator | [roles/validator/role.md](roles/validator/role.md) | TDVAL-* | false |
47
-
48
- **User Commands:**
49
- | Command | Action |
50
- |---------|--------|
51
- | `check` / `status` | View execution status graph |
52
- | `resume` / `continue` | Advance to next step |
53
- | `--mode=scan` | Scan-only pipeline (TDSCAN + TDEVAL) |
54
- | `--mode=targeted` | Targeted pipeline (TDPLAN + TDFIX + TDVAL) |
55
- | `--mode=remediate` | Full pipeline (default) |
56
- | `-y` / `--yes` | Skip confirmations |
57
-
58
- **Delegation Lock — Coordinator is PURE ORCHESTRATOR:**
59
- | Tool Call | Verdict | Reason |
60
- |-----------|---------|--------|
61
- | `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `followup_task` | ALLOWED | Orchestration |
62
- | `list_agents`, `request_user_input`, `mcp__maestro-tools__team_msg` | ALLOWED | Coordination |
63
- | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
64
- | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading instructions |
65
- | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
66
- | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
67
- | `Bash` running build/test/lint | BLOCKED | Delegate to worker |
68
-
69
- **No exceptions.** Even single-file tasks MUST go through spawn_agent.
70
-
71
- **Shared Constants:**
72
- - Session prefix: `TD`
73
- - Session path: `.workflow/.team/TD-<slug>-<date>/`
74
- - CLI tools: `maestro delegate --mode analysis|write`
75
- - Max GC rounds: 3
76
-
77
- **Specs:** [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
78
-
79
- **Session Directory:**
80
- ```
81
- .workflow/.team/TD-<slug>-<date>/
82
- ├── .msg/ # Team message bus
83
- ├── scan/ # Scanner output
84
- ├── assessment/ # Assessor output
85
- ├── plan/ # Planner output
86
- ├── fixes/ # Executor output
87
- ├── validation/ # Validator output
88
- └── wisdom/ # Cross-task knowledge
89
- ```
90
- </context>
91
-
92
- <invariants>
93
- 1. **Coordinator never executes domain work** — only orchestrates via spawn_agent
94
- 2. **Scanner results inform downstream** — each stage narrows and refines
95
- 3. **Pipeline flow**: TDSCAN TDEVAL TDPLAN TDFIX → TDVAL
96
- </invariants>
97
-
98
- <execution>
99
-
100
- ### Worker Spawn Template
101
-
102
- Spawn via `team-worker` agent. Message includes: role, role_spec path, session folder/id, requirement, inner_loop flag, task context, upstream context. After spawning: `wait_agent` (30 min). Timeout: STATUS_CHECK (3 min) -> FINALIZE (3 min) -> close.
103
-
104
- ### Model Selection Guide
105
-
106
- | Role | reasoning_effort |
107
- |------|-------------------|
108
- | scanner | medium |
109
- | assessor | high |
110
- | planner | high |
111
- | executor | high |
112
- | validator | medium |
113
-
114
- ### v4 Agent Coordination
115
-
116
- **Message Semantics**: `send_message` for supplementary info to downstream. `followup_task` to assign fixes from planner output. `list_agents` for health checks.
117
-
118
- **Agent Health Check**: Reconcile `meta.json` active tasks with `list_agents({})`. Reset orphaned tasks to pending.
119
-
120
- **Named Targeting**: `send_message({ target: "TDSCAN-001" })`, `followup_task({ target: "TDFIX-001" })`, `close_agent({ target: "TDVAL-001" })`.
121
- </execution>
122
-
123
- <error_codes>
124
- | Scenario | Resolution |
125
- |----------|------------|
126
- | Unknown command | Error with available command list |
127
- | Role not found | Error with role registry |
128
- | Session corruption | Attempt recovery, fallback to manual |
129
- | Fast-advance conflict | Coordinator reconciles on next callback |
130
- | Completion action fails | Default to Keep Active |
131
- | Scanner finds no debt | Report clean codebase, skip to summary |
132
- </error_codes>
133
-
134
- <success_criteria>
135
- - [ ] Role routing correct (coordinator vs worker)
136
- - [ ] Delegation lock enforced (coordinator never executes domain work)
137
- - [ ] Pipeline stages execute in order (scan assess plan → fix → validate)
138
- - [ ] Worker spawn uses correct template with role-spec paths
139
- - [ ] Timeout handling applied (STATUS_CHECK FINALIZE close)
140
- - [ ] Scanner results flow through downstream stages
141
- - [ ] Session directory structure maintained
142
- - [ ] Completion action presented to user
143
- </success_criteria>
1
+ ---
2
+ name: team-tech-debt
3
+ description: Team tech debt identification and remediation
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__ace-tool__search_context(*), mcp__maestro-tools__read_file(*), mcp__maestro-tools__write_file(*), mcp__maestro-tools__edit_file(*), mcp__maestro-tools__team_msg(*)
5
+ ---
6
+
7
+ <purpose>
8
+ Systematic tech debt governance: scan -> assess -> plan -> fix -> validate. Built on **team-worker agent architecture** — all worker roles share a single agent definition with role-specific Phase 2-4 loaded from `roles/<role>/role.md`.
9
+
10
+ ```
11
+ Skill(skill="team-tech-debt", args="task description")
12
+ |
13
+ SKILL.md (this file) = Router
14
+ |
15
+ +--------------+--------------+
16
+ | |
17
+ no --role flag --role <name>
18
+ | |
19
+ Coordinator Worker
20
+ roles/coordinator/role.md roles/<name>/role.md
21
+ |
22
+ +-- analyze → dispatch → spawn workers → STOP
23
+ |
24
+ +-------+-------+-------+-------+
25
+ v v v v v
26
+ [team-worker agents, each loads roles/<role>/role.md]
27
+ scanner assessor planner executor validator
28
+ ```
29
+
30
+ </purpose>
31
+
32
+ <context>
33
+ $ARGUMENTS — task description and optional flags.
34
+
35
+ **Role Router:**
36
+ - Has `--role <name>` Read `roles/<name>/role.md`, execute Phase 2-4
37
+ - No `--role` → `roles/coordinator/role.md`, execute entry router
38
+
39
+ **Role Registry:**
40
+ | Role | Path | Prefix | Inner Loop |
41
+ |------|------|--------|------------|
42
+ | coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | | |
43
+ | scanner | [roles/scanner/role.md](roles/scanner/role.md) | TDSCAN-* | false |
44
+ | assessor | [roles/assessor/role.md](roles/assessor/role.md) | TDEVAL-* | false |
45
+ | planner | [roles/planner/role.md](roles/planner/role.md) | TDPLAN-* | false |
46
+ | executor | [roles/executor/role.md](roles/executor/role.md) | TDFIX-* | true |
47
+ | validator | [roles/validator/role.md](roles/validator/role.md) | TDVAL-* | false |
48
+
49
+ **User Commands:**
50
+ | Command | Action |
51
+ |---------|--------|
52
+ | `check` / `status` | View execution status graph |
53
+ | `resume` / `continue` | Advance to next step |
54
+ | `--mode=scan` | Scan-only pipeline (TDSCAN + TDEVAL) |
55
+ | `--mode=targeted` | Targeted pipeline (TDPLAN + TDFIX + TDVAL) |
56
+ | `--mode=remediate` | Full pipeline (default) |
57
+ | `-y` / `--yes` | Skip confirmations |
58
+
59
+ **Delegation Lock Coordinator is PURE ORCHESTRATOR:**
60
+ | Tool Call | Verdict | Reason |
61
+ |-----------|---------|--------|
62
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `followup_task` | ALLOWED | Orchestration |
63
+ | `list_agents`, `request_user_input`, `mcp__maestro-tools__team_msg` | ALLOWED | Coordination |
64
+ | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
65
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading instructions |
66
+ | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
67
+ | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
68
+ | `Bash` running build/test/lint | BLOCKED | Delegate to worker |
69
+
70
+ **No exceptions.** Even single-file tasks MUST go through spawn_agent.
71
+
72
+ **Shared Constants:**
73
+ - Session prefix: `TD`
74
+ - Session path: `.workflow/.team/TD-<slug>-<date>/`
75
+ - CLI tools: `maestro delegate --mode analysis|write`
76
+ - Max GC rounds: 3
77
+
78
+ **Specs:** [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
79
+
80
+ **Session Directory:**
81
+ ```
82
+ .workflow/.team/TD-<slug>-<date>/
83
+ ├── .msg/ # Team message bus
84
+ ├── scan/ # Scanner output
85
+ ├── assessment/ # Assessor output
86
+ ├── plan/ # Planner output
87
+ ├── fixes/ # Executor output
88
+ ├── validation/ # Validator output
89
+ └── wisdom/ # Cross-task knowledge
90
+ ```
91
+ </context>
92
+
93
+ <invariants>
94
+ 1. **Coordinator never executes domain work** — only orchestrates via spawn_agent
95
+ 2. **Scanner results inform downstream** each stage narrows and refines
96
+ 3. **Pipeline flow**: TDSCAN → TDEVAL → TDPLAN → TDFIX → TDVAL
97
+ </invariants>
98
+
99
+ <execution>
100
+
101
+ ### Worker Spawn Template
102
+
103
+ Spawn via `team-worker` agent. Message includes: role, role_spec path, session folder/id, requirement, inner_loop flag, task context, upstream context. After spawning: `wait_agent` (30 min). Timeout: STATUS_CHECK (3 min) -> FINALIZE (3 min) -> close.
104
+
105
+ ### Model Selection Guide
106
+
107
+ | Role | reasoning_effort |
108
+ |------|-------------------|
109
+ | scanner | medium |
110
+ | assessor | high |
111
+ | planner | high |
112
+ | executor | high |
113
+ | validator | medium |
114
+
115
+ ### v4 Agent Coordination
116
+
117
+ **Message Semantics**: `send_message` for supplementary info to downstream. `followup_task` to assign fixes from planner output. `list_agents` for health checks.
118
+
119
+ **Agent Health Check**: Reconcile `meta.json` active tasks with `list_agents({})`. Reset orphaned tasks to pending.
120
+
121
+ **Named Targeting**: `send_message({ target: "TDSCAN-001" })`, `followup_task({ target: "TDFIX-001" })`, `close_agent({ target: "TDVAL-001" })`.
122
+ </execution>
123
+
124
+ <error_codes>
125
+ | Scenario | Resolution |
126
+ |----------|------------|
127
+ | Unknown command | Error with available command list |
128
+ | Role not found | Error with role registry |
129
+ | Session corruption | Attempt recovery, fallback to manual |
130
+ | Fast-advance conflict | Coordinator reconciles on next callback |
131
+ | Completion action fails | Default to Keep Active |
132
+ | Scanner finds no debt | Report clean codebase, skip to summary |
133
+ </error_codes>
134
+
135
+ <success_criteria>
136
+ - [ ] Role routing correct (coordinator vs worker)
137
+ - [ ] Delegation lock enforced (coordinator never executes domain work)
138
+ - [ ] Pipeline stages execute in order (scan assess → plan → fix → validate)
139
+ - [ ] Worker spawn uses correct template with role-spec paths
140
+ - [ ] Timeout handling applied (STATUS_CHECK FINALIZE → close)
141
+ - [ ] Scanner results flow through downstream stages
142
+ - [ ] Session directory structure maintained
143
+ - [ ] Completion action presented to user
144
+ </success_criteria>
@@ -36,19 +36,23 @@ For each batch, use CLI tool for implementation:
36
36
 
37
37
  **Per-batch delegation**:
38
38
 
39
- ```bash
40
- maestro delegate "PURPOSE: Apply tech debt fixes in batch; success = all items fixed without breaking changes
39
+ ```
40
+ exec_command({
41
+ cmd: `maestro delegate "PURPOSE: Apply tech debt fixes in batch; success = all items fixed without breaking changes
41
42
  TASK: <batch-type-specific-tasks>
42
43
  MODE: write
43
44
  CONTEXT: @<worktree-path>/**/* | Memory: Remediation plan context
44
45
  EXPECTED: Code changes that fix debt items, maintain backward compatibility, pass existing tests
45
46
  CONSTRAINTS: Minimal changes only | No new features | No suppressions | Read files before modifying
46
47
  Batch type: <refactor|update-deps|add-tests|add-docs|restructure>
47
- Items: <list-of-items-with-file-paths-and-descriptions>" --tool gemini --mode write --cd "<worktree-path>"
48
+ Items: <list-of-items-with-file-paths-and-descriptions>" --role implement --mode write --cd "<worktree-path>"`,
49
+ yield_time_ms: 30000,
50
+ max_output_tokens: 6000
51
+ })
52
+ // ⚠️ If session_id returned → poll write_stdin until completion (see @~/.maestro/workflows/delegate-protocol.codex.md)
53
+ // NEVER skip — must wait for batch fix to complete before next batch or validation
48
54
  ```
49
55
 
50
- Wait for CLI completion before proceeding to next batch.
51
-
52
56
  **Fix Results Tracking**:
53
57
 
54
58
  | Field | Description |
@@ -61,6 +61,16 @@ Multi-dimension tech debt scanner. Scan codebase across 5 dimensions (code, arch
61
61
  - Fan-out C (High only): Multi-perspective analysis (security, performance, code-quality, architecture) via `--role analyze`
62
62
  - Fan-in: Merge results, cross-deduplicate by file:line, boost severity for multi-source findings
63
63
 
64
+ **Delegate execution protocol** (applies to ALL fan-out CLI calls):
65
+ ```
66
+ exec_command({
67
+ cmd: `maestro delegate "<prompt>" --role <role> --mode analysis`,
68
+ yield_time_ms: 30000, max_output_tokens: 6000
69
+ })
70
+ // ⚠️ If session_id returned → poll write_stdin until completion (see @~/.maestro/workflows/delegate-protocol.codex.md)
71
+ // NEVER skip — each fan-out result is required for fan-in merge
72
+ ```
73
+
64
74
  **Standardize each finding**:
65
75
 
66
76
  | Field | Description |
@@ -58,12 +58,18 @@ Execute 4-layer validation (all commands in worktree):
58
58
  **Auto-fix attempt** (when total_regressions <= 3):
59
59
  - Use CLI tool to fix regressions in worktree:
60
60
  ```
61
- Bash(`cd "${worktreePath}" && maestro delegate "PURPOSE: Fix regressions found in validation
61
+ exec_command({
62
+ cmd: `cd "${worktreePath}" && maestro delegate "PURPOSE: Fix regressions found in validation
62
63
  TASK: ${regressionDetails}
63
64
  MODE: write
64
65
  CONTEXT: @${modifiedFiles.join(' @')}
65
66
  EXPECTED: Fixed regressions
66
- CONSTRAINTS: Fix only regressions | Preserve debt cleanup changes | No suppressions" --tool gemini --mode write`)
67
+ CONSTRAINTS: Fix only regressions | Preserve debt cleanup changes | No suppressions" --role implement --mode write`,
68
+ yield_time_ms: 30000,
69
+ max_output_tokens: 6000
70
+ })
71
+ // ⚠️ If session_id returned → poll write_stdin until completion (see @~/.maestro/workflows/delegate-protocol.codex.md)
72
+ // NEVER skip — must wait for fix before re-running validation
67
73
  ```
68
74
  - Re-run validation checks after fix attempt
69
75
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: team-testing
3
- description: Unified team skill for testing team. Progressive test coverage through Generator-Critic loops, shared memory, and dynamic layer selection. Triggers on "team testing".
3
+ description: Team testing with progressive coverage and generator-critic loops
4
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
 
@@ -26,6 +26,7 @@ Skill(skill="team-testing", args="task description")
26
26
  [strat] [gen] [exec] [analyst]
27
27
  team-worker agents, each loads roles/<role>/role.md
28
28
  ```
29
+
29
30
  </purpose>
30
31
 
31
32
  <context>
@@ -61,14 +61,20 @@ Bash("<test-command> 2>&1 || true")
61
61
  **Auto-fix delegation** (on failure):
62
62
 
63
63
  ```
64
- Bash(`maestro delegate "PURPOSE: Fix test failures to achieve pass rate >= 0.95; success = all tests pass
64
+ exec_command({
65
+ cmd: `maestro delegate "PURPOSE: Fix test failures to achieve pass rate >= 0.95; success = all tests pass
65
66
  TASK: • Analyze test failure output • Identify root causes • Fix test code only (not source) • Preserve test intent
66
67
  MODE: write
67
68
  CONTEXT: @<session>/<test-dir>/**/* | Memory: Test framework: <framework>, iteration <N>/3
68
69
  EXPECTED: Fixed test files with: corrected assertions, proper async handling, fixed imports, maintained coverage
69
70
  CONSTRAINTS: Only modify test files | Preserve test structure | No source code changes
70
71
  Test failures:
71
- <test-output>" --tool gemini --mode write --cd <session>`)
72
+ <test-output>" --role implement --mode write --cd <session>`,
73
+ yield_time_ms: 30000,
74
+ max_output_tokens: 6000
75
+ })
76
+ // ⚠️ If session_id returned → poll write_stdin until completion (see @~/.maestro/workflows/delegate-protocol.codex.md)
77
+ // NEVER skip — must wait for fix to complete before re-running tests
72
78
  ```
73
79
 
74
80
  **Save results**: `<session>/results/run-<N>.json`
@@ -63,7 +63,8 @@ For revision mode:
63
63
  **CLI delegation** (medium/high complexity):
64
64
 
65
65
  ```
66
- Bash(`maestro delegate "PURPOSE: Generate <layer> tests using <framework> to achieve coverage target; success = all priority files covered with quality tests
66
+ exec_command({
67
+ cmd: `maestro delegate "PURPOSE: Generate <layer> tests using <framework> to achieve coverage target; success = all priority files covered with quality tests
67
68
  TASK: • Analyze source files • Generate test cases (happy path, edge cases, errors) • Write test files with proper structure • Ensure import resolution
68
69
  MODE: write
69
70
  CONTEXT: @<source-files> @<session>/strategy/test-strategy.md | Memory: Framework: <framework>, Layer: <layer>, Round: <round>
@@ -72,7 +73,12 @@ Effective patterns: <patterns-from-meta>>
72
73
  EXPECTED: Test files in <session>/tests/<layer>/ with: proper test structure, comprehensive coverage, correct imports, framework conventions
73
74
  CONSTRAINTS: Follow test strategy priorities | Use framework best practices | <layer>-appropriate assertions
74
75
  Source files to test:
75
- <file-list-with-content>" --tool gemini --mode write --cd <session>`)
76
+ <file-list-with-content>" --role implement --mode write --cd <session>`,
77
+ yield_time_ms: 30000,
78
+ max_output_tokens: 6000
79
+ })
80
+ // ⚠️ If session_id returned → poll write_stdin until completion (see @~/.maestro/workflows/delegate-protocol.codex.md)
81
+ // NEVER skip — must wait for test files to be generated before verification
76
82
  ```
77
83
 
78
84
  **Output verification**:
@@ -1,73 +1,73 @@
1
- ---
2
- name: wiki-connect
3
- description: Wiki knowledge graph link discovery and health improvement. Finds orphaned entries, missing connections, transitive gaps. Scores candidates and optionally auto-applies new related links via --fix.
4
- argument-hint: "[--scope <type>] [--min-similarity N] [--fix] [--max N]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
- ---
7
-
8
- <purpose>
9
- Knowledge graph link discovery. Analyzes wiki index to find orphaned entries, missing
10
- bidirectional links, and transitive closure gaps. Scores connection candidates and
11
- optionally auto-applies new `related` links to improve graph connectivity.
12
- </purpose>
13
-
14
- <context>
15
- $ARGUMENTS — optional flags.
16
-
17
- **Flags:**
18
- - `--scope <type>` — Limit to wiki type (spec, knowhow, note, lesson, issue). Default: all.
19
- - `--min-similarity N` — Threshold 0.0-1.0 (default: 0.3)
20
- - `--fix` — Auto-apply top suggestions
21
- - `--max N` — Max suggestions (default: 20)
22
-
23
- **Output**: `.workflow/learning/wiki-connections-{date}.md`
24
- </context>
25
-
26
- <execution>
27
-
28
- ### Stage 1: Load Wiki State
29
- Parallel `maestro wiki` commands: `list --json`, `health`, `orphans`, `hubs --top 10`.
30
-
31
- ### Stage 2: Identify Connection Candidates
32
- - **Orphan rescue**: BM25 search by title, tag overlap, same category/parent
33
- - **Missing bidirectional**: A→B exists but B→A missing
34
- - **Transitive closure**: A→B and B→C but no A→C (with shared tags/category)
35
- - **Type bridge**: Different types referencing same concept but unlinked
36
- - **Parent cluster**: Entries sharing the same parent but not linked to each other
37
-
38
- ### Stage 3: Score Candidates
39
- Score = 0.4 x tag_overlap + 0.3 x title_bm25 + 0.2 x same_category + 0.1 x type_bridge. Filter by `--min-similarity`, rank desc, limit by `--max`.
40
-
41
- ### Stage 4: Present Suggestions
42
- Display ranked suggestions with scores, reasons, projected health delta.
43
- If not `--fix`: display and exit.
44
-
45
- ### Stage 5: Apply (--fix only)
46
- For each suggestion: get entry → append target to `related` → update via `maestro wiki update`.
47
- Re-run `maestro wiki health` for delta.
48
-
49
- ### Stage 6: Persist
50
- Write `wiki-connections-{date}.md`. Append graph insights to `lessons.jsonl` (source: "wiki-connect").
51
-
52
- **Next steps:** `/wiki-digest <topic>`, `/manage-wiki health`, `/learn-follow <wiki-id>`, `maestro wiki graph`
53
- </execution>
54
-
55
- <error_codes>
56
- | Code | Severity | Condition | Recovery |
57
- |------|----------|-----------|----------|
58
- | E001 | error | No wiki entries found | Initialize wiki content |
59
- | W001 | warning | No candidates above threshold | Lower --min-similarity |
60
- | W002 | warning | Some wiki updates failed during --fix | Retry manually |
61
- | W003 | warning | Health score unchanged after fix | Connections may not affect specific metrics |
62
- </error_codes>
63
-
64
- <success_criteria>
65
- - [ ] Wiki index loaded with type distribution
66
- - [ ] Baseline health score recorded
67
- - [ ] Orphans identified and rescue candidates generated
68
- - [ ] Candidates scored and ranked
69
- - [ ] Suggestions displayed with scores and reasons
70
- - [ ] If --fix: entries updated, new health score reported
71
- - [ ] Report written to `wiki-connections-{date}.md`
72
- - [ ] Graph insights appended to `lessons.jsonl`
73
- </success_criteria>
1
+ ---
2
+ name: wiki-connect
3
+ description: Find and link hidden connections in wiki graph
4
+ argument-hint: "[--scope <type>] [--min-similarity N] [--fix] [--max N]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Knowledge graph link discovery. Analyzes wiki index to find orphaned entries, missing
10
+ bidirectional links, and transitive closure gaps. Scores connection candidates and
11
+ optionally auto-applies new `related` links to improve graph connectivity.
12
+ </purpose>
13
+
14
+ <context>
15
+ $ARGUMENTS — optional flags.
16
+
17
+ **Flags:**
18
+ - `--scope <type>` — Limit to wiki type (spec, knowhow, note, lesson, issue). Default: all.
19
+ - `--min-similarity N` — Threshold 0.0-1.0 (default: 0.3)
20
+ - `--fix` — Auto-apply top suggestions
21
+ - `--max N` — Max suggestions (default: 20)
22
+
23
+ **Output**: `.workflow/learning/wiki-connections-{date}.md`
24
+ </context>
25
+
26
+ <execution>
27
+
28
+ ### Stage 1: Load Wiki State
29
+ Parallel `maestro wiki` commands: `list --json`, `health`, `orphans`, `hubs --top 10`.
30
+
31
+ ### Stage 2: Identify Connection Candidates
32
+ - **Orphan rescue**: BM25 search by title, tag overlap, same category/parent
33
+ - **Missing bidirectional**: A→B exists but B→A missing
34
+ - **Transitive closure**: A→B and B→C but no A→C (with shared tags/category)
35
+ - **Type bridge**: Different types referencing same concept but unlinked
36
+ - **Parent cluster**: Entries sharing the same parent but not linked to each other
37
+
38
+ ### Stage 3: Score Candidates
39
+ Score = 0.4 x tag_overlap + 0.3 x title_bm25 + 0.2 x same_category + 0.1 x type_bridge. Filter by `--min-similarity`, rank desc, limit by `--max`.
40
+
41
+ ### Stage 4: Present Suggestions
42
+ Display ranked suggestions with scores, reasons, projected health delta.
43
+ If not `--fix`: display and exit.
44
+
45
+ ### Stage 5: Apply (--fix only)
46
+ For each suggestion: get entry → append target to `related` → update via `maestro wiki update`.
47
+ Re-run `maestro wiki health` for delta.
48
+
49
+ ### Stage 6: Persist
50
+ Write `wiki-connections-{date}.md`. Append graph insights to `lessons.jsonl` (source: "wiki-connect").
51
+
52
+ **Next steps:** `/wiki-digest <topic>`, `/manage-wiki health`, `/learn-follow <wiki-id>`, `maestro wiki graph`
53
+ </execution>
54
+
55
+ <error_codes>
56
+ | Code | Severity | Condition | Recovery |
57
+ |------|----------|-----------|----------|
58
+ | E001 | error | No wiki entries found | Initialize wiki content |
59
+ | W001 | warning | No candidates above threshold | Lower --min-similarity |
60
+ | W002 | warning | Some wiki updates failed during --fix | Retry manually |
61
+ | W003 | warning | Health score unchanged after fix | Connections may not affect specific metrics |
62
+ </error_codes>
63
+
64
+ <success_criteria>
65
+ - [ ] Wiki index loaded with type distribution
66
+ - [ ] Baseline health score recorded
67
+ - [ ] Orphans identified and rescue candidates generated
68
+ - [ ] Candidates scored and ranked
69
+ - [ ] Suggestions displayed with scores and reasons
70
+ - [ ] If --fix: entries updated, new health score reported
71
+ - [ ] Report written to `wiki-connections-{date}.md`
72
+ - [ ] Graph insights appended to `lessons.jsonl`
73
+ </success_criteria>