maestro-flow 0.4.10 → 0.4.12

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 (354) hide show
  1. package/.agents/agents/cli-explore-agent.md +187 -0
  2. package/.agents/agents/cross-role-reviewer.md +173 -0
  3. package/.agents/agents/impeccable-agent.md +101 -0
  4. package/.agents/agents/role-design-author.md +218 -0
  5. package/.agents/agents/team-supervisor.md +145 -0
  6. package/.agents/agents/team-worker.md +239 -0
  7. package/.agents/agents/ui-design-agent.md +272 -0
  8. package/.agents/agents/workflow-analyzer.md +117 -0
  9. package/.agents/agents/workflow-codebase-mapper.md +79 -0
  10. package/.agents/agents/workflow-collab-planner.md +145 -0
  11. package/.agents/agents/workflow-debugger.md +105 -0
  12. package/.agents/agents/workflow-executor.md +134 -0
  13. package/.agents/agents/workflow-external-researcher.md +88 -0
  14. package/.agents/agents/workflow-integration-checker.md +85 -0
  15. package/.agents/agents/workflow-nyquist-auditor.md +87 -0
  16. package/.agents/agents/workflow-phase-researcher.md +87 -0
  17. package/.agents/agents/workflow-plan-checker.md +92 -0
  18. package/.agents/agents/workflow-planner.md +197 -0
  19. package/.agents/agents/workflow-project-researcher.md +76 -0
  20. package/.agents/agents/workflow-research-synthesizer.md +72 -0
  21. package/.agents/agents/workflow-reviewer.md +84 -0
  22. package/.agents/agents/workflow-roadmapper.md +83 -0
  23. package/.agents/agents/workflow-verifier.md +122 -0
  24. package/.agents/skills/codify-to-knowhow/SKILL.md +169 -0
  25. package/.agents/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  26. package/.agents/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  27. package/.agents/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  28. package/.agents/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  29. package/.agents/skills/learn-decompose/SKILL.md +118 -0
  30. package/.agents/skills/learn-follow/SKILL.md +129 -0
  31. package/.agents/skills/learn-investigate/SKILL.md +154 -0
  32. package/.agents/skills/learn-retro/SKILL.md +159 -0
  33. package/.agents/skills/learn-second-opinion/SKILL.md +124 -0
  34. package/.agents/skills/maestro/SKILL.md +258 -0
  35. package/.agents/skills/maestro-amend/SKILL.md +165 -0
  36. package/.agents/skills/maestro-analyze/SKILL.md +161 -0
  37. package/.agents/skills/maestro-blueprint/SKILL.md +132 -0
  38. package/.agents/skills/maestro-brainstorm/SKILL.md +134 -0
  39. package/.agents/skills/maestro-collab/SKILL.md +174 -0
  40. package/.agents/skills/maestro-composer/SKILL.md +181 -0
  41. package/.agents/skills/maestro-execute/SKILL.md +133 -0
  42. package/.agents/skills/maestro-fork/SKILL.md +88 -0
  43. package/.agents/skills/maestro-guard/SKILL.md +103 -0
  44. package/.agents/skills/maestro-help/SKILL.md +300 -0
  45. package/.agents/skills/maestro-help/index/catalog.json +202 -0
  46. package/.agents/skills/maestro-help/phases/01-parse-intent.md +122 -0
  47. package/.agents/skills/maestro-help/phases/02-search-present.md +183 -0
  48. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +213 -0
  49. package/.agents/skills/maestro-impeccable/SKILL.md +251 -0
  50. package/.agents/skills/maestro-init/SKILL.md +80 -0
  51. package/.agents/skills/maestro-learn/SKILL.md +142 -0
  52. package/.agents/skills/maestro-merge/SKILL.md +66 -0
  53. package/.agents/skills/maestro-milestone-audit/SKILL.md +72 -0
  54. package/.agents/skills/maestro-milestone-complete/SKILL.md +79 -0
  55. package/.agents/skills/maestro-milestone-release/SKILL.md +98 -0
  56. package/.agents/skills/maestro-overlay/SKILL.md +180 -0
  57. package/.agents/skills/maestro-plan/SKILL.md +182 -0
  58. package/.agents/skills/maestro-player/SKILL.md +177 -0
  59. package/.agents/skills/maestro-quick/SKILL.md +67 -0
  60. package/.agents/skills/maestro-ralph/SKILL.md +756 -0
  61. package/.agents/skills/maestro-ralph-execute/SKILL.md +273 -0
  62. package/.agents/skills/maestro-roadmap/SKILL.md +131 -0
  63. package/.agents/skills/maestro-tools-execute/SKILL.md +119 -0
  64. package/.agents/skills/maestro-tools-register/SKILL.md +159 -0
  65. package/.agents/skills/maestro-ui-codify/SKILL.md +82 -0
  66. package/.agents/skills/maestro-update/SKILL.md +178 -0
  67. package/.agents/skills/maestro-verify/SKILL.md +111 -0
  68. package/.agents/skills/manage-codebase-rebuild/SKILL.md +77 -0
  69. package/.agents/skills/manage-codebase-refresh/SKILL.md +59 -0
  70. package/.agents/skills/manage-harvest/SKILL.md +96 -0
  71. package/.agents/skills/manage-issue/SKILL.md +75 -0
  72. package/.agents/skills/manage-issue-discover/SKILL.md +83 -0
  73. package/.agents/skills/manage-knowhow/SKILL.md +79 -0
  74. package/.agents/skills/manage-knowhow-capture/SKILL.md +81 -0
  75. package/.agents/skills/manage-learn/SKILL.md +67 -0
  76. package/.agents/skills/manage-status/SKILL.md +54 -0
  77. package/.agents/skills/manage-wiki/SKILL.md +64 -0
  78. package/.agents/skills/quality-auto-test/SKILL.md +138 -0
  79. package/.agents/skills/quality-debug/SKILL.md +122 -0
  80. package/.agents/skills/quality-refactor/SKILL.md +69 -0
  81. package/.agents/skills/quality-retrospective/SKILL.md +79 -0
  82. package/.agents/skills/quality-review/SKILL.md +130 -0
  83. package/.agents/skills/quality-sync/SKILL.md +53 -0
  84. package/.agents/skills/quality-test/SKILL.md +119 -0
  85. package/.agents/skills/security-audit/SKILL.md +157 -0
  86. package/.agents/skills/skill-iter-tune/SKILL.md +384 -0
  87. package/.agents/skills/skill-iter-tune/phases/01-setup.md +144 -0
  88. package/.agents/skills/skill-iter-tune/phases/02-execute.md +292 -0
  89. package/.agents/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  90. package/.agents/skills/skill-iter-tune/phases/04-improve.md +186 -0
  91. package/.agents/skills/skill-iter-tune/phases/05-report.md +166 -0
  92. package/.agents/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  93. package/.agents/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  94. package/.agents/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  95. package/.agents/skills/spec-add/SKILL.md +70 -0
  96. package/.agents/skills/spec-load/SKILL.md +73 -0
  97. package/.agents/skills/spec-remove/SKILL.md +53 -0
  98. package/.agents/skills/spec-setup/SKILL.md +50 -0
  99. package/.agents/skills/team-coordinate/SKILL.md +268 -0
  100. package/.agents/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
  101. package/.agents/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
  102. package/.agents/skills/team-coordinate/roles/coordinator/commands/monitor.md +358 -0
  103. package/.agents/skills/team-coordinate/roles/coordinator/role.md +365 -0
  104. package/.agents/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
  105. package/.agents/skills/team-coordinate/specs/pipelines.md +97 -0
  106. package/.agents/skills/team-coordinate/specs/quality-gates.md +112 -0
  107. package/.agents/skills/team-coordinate/specs/role-spec-template.md +198 -0
  108. package/.agents/skills/team-executor/SKILL.md +191 -0
  109. package/.agents/skills/team-executor/roles/executor/commands/monitor.md +239 -0
  110. package/.agents/skills/team-executor/roles/executor/role.md +171 -0
  111. package/.agents/skills/team-executor/specs/session-schema.md +264 -0
  112. package/.agents/skills/team-lifecycle-v4/SKILL.md +211 -0
  113. package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +96 -0
  114. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
  115. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
  116. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
  117. package/.agents/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
  118. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
  119. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
  120. package/.agents/skills/team-lifecycle-v4/roles/executor/role.md +69 -0
  121. package/.agents/skills/team-lifecycle-v4/roles/planner/role.md +87 -0
  122. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
  123. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
  124. package/.agents/skills/team-lifecycle-v4/roles/reviewer/role.md +71 -0
  125. package/.agents/skills/team-lifecycle-v4/roles/supervisor/role.md +194 -0
  126. package/.agents/skills/team-lifecycle-v4/roles/tester/role.md +89 -0
  127. package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +97 -0
  128. package/.agents/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
  129. package/.agents/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
  130. package/.agents/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
  131. package/.agents/skills/team-lifecycle-v4/templates/architecture.md +254 -0
  132. package/.agents/skills/team-lifecycle-v4/templates/epics.md +196 -0
  133. package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
  134. package/.agents/skills/team-lifecycle-v4/templates/requirements.md +224 -0
  135. package/.agents/skills/team-quality-assurance/SKILL.md +149 -0
  136. package/.agents/skills/team-quality-assurance/roles/analyst/role.md +90 -0
  137. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
  138. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
  139. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +250 -0
  140. package/.agents/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
  141. package/.agents/skills/team-quality-assurance/roles/executor/role.md +68 -0
  142. package/.agents/skills/team-quality-assurance/roles/generator/role.md +70 -0
  143. package/.agents/skills/team-quality-assurance/roles/scout/role.md +77 -0
  144. package/.agents/skills/team-quality-assurance/roles/strategist/role.md +73 -0
  145. package/.agents/skills/team-quality-assurance/specs/pipelines.md +115 -0
  146. package/.agents/skills/team-quality-assurance/specs/team-config.json +131 -0
  147. package/.agents/skills/team-review/SKILL.md +149 -0
  148. package/.agents/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
  149. package/.agents/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
  150. package/.agents/skills/team-review/roles/coordinator/commands/monitor.md +224 -0
  151. package/.agents/skills/team-review/roles/coordinator/role.md +132 -0
  152. package/.agents/skills/team-review/roles/fixer/role.md +78 -0
  153. package/.agents/skills/team-review/roles/reviewer/role.md +70 -0
  154. package/.agents/skills/team-review/roles/scanner/role.md +81 -0
  155. package/.agents/skills/team-review/specs/dimensions.md +82 -0
  156. package/.agents/skills/team-review/specs/finding-schema.json +82 -0
  157. package/.agents/skills/team-review/specs/pipelines.md +102 -0
  158. package/.agents/skills/team-review/specs/team-config.json +27 -0
  159. package/.agents/skills/team-tech-debt/SKILL.md +130 -0
  160. package/.agents/skills/team-tech-debt/roles/assessor/role.md +79 -0
  161. package/.agents/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
  162. package/.agents/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
  163. package/.agents/skills/team-tech-debt/roles/coordinator/commands/monitor.md +209 -0
  164. package/.agents/skills/team-tech-debt/roles/coordinator/role.md +123 -0
  165. package/.agents/skills/team-tech-debt/roles/executor/role.md +78 -0
  166. package/.agents/skills/team-tech-debt/roles/planner/role.md +71 -0
  167. package/.agents/skills/team-tech-debt/roles/scanner/role.md +92 -0
  168. package/.agents/skills/team-tech-debt/roles/validator/role.md +80 -0
  169. package/.agents/skills/team-tech-debt/specs/pipelines.md +47 -0
  170. package/.agents/skills/team-tech-debt/specs/team-config.json +129 -0
  171. package/.agents/skills/team-testing/SKILL.md +145 -0
  172. package/.agents/skills/team-testing/roles/analyst/role.md +105 -0
  173. package/.agents/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
  174. package/.agents/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
  175. package/.agents/skills/team-testing/roles/coordinator/commands/monitor.md +257 -0
  176. package/.agents/skills/team-testing/roles/coordinator/role.md +134 -0
  177. package/.agents/skills/team-testing/roles/executor/role.md +101 -0
  178. package/.agents/skills/team-testing/roles/generator/role.md +100 -0
  179. package/.agents/skills/team-testing/roles/strategist/role.md +85 -0
  180. package/.agents/skills/team-testing/specs/pipelines.md +101 -0
  181. package/.agents/skills/team-testing/specs/team-config.json +93 -0
  182. package/.agents/skills/wiki-connect/SKILL.md +64 -0
  183. package/.agents/skills/wiki-digest/SKILL.md +70 -0
  184. package/.agents/skills/workflow-skill-designer/SKILL.md +498 -0
  185. package/.agents/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
  186. package/.agents/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
  187. package/.agents/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
  188. package/.agents/skills/workflow-skill-designer/phases/04-validation.md +471 -0
  189. package/.agy/agents/cli-explore-agent.md +1 -3
  190. package/.agy/agents/cross-role-reviewer.md +170 -0
  191. package/.agy/agents/role-design-author.md +215 -0
  192. package/.agy/agents/ui-design-agent.md +1 -18
  193. package/.agy/agents/workflow-analyzer.md +1 -1
  194. package/.agy/agents/workflow-external-researcher.md +1 -1
  195. package/.agy/skills/maestro/SKILL.md +63 -27
  196. package/.agy/skills/maestro-analyze/SKILL.md +30 -4
  197. package/.agy/skills/maestro-blueprint/SKILL.md +132 -0
  198. package/.agy/skills/maestro-brainstorm/SKILL.md +119 -103
  199. package/.agy/skills/maestro-help/SKILL.md +48 -14
  200. package/.agy/skills/maestro-help/index/catalog.json +29 -11
  201. package/.agy/skills/maestro-help/phases/01-parse-intent.md +1 -1
  202. package/.agy/skills/maestro-help/phases/02-search-present.md +6 -4
  203. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  204. package/.agy/skills/maestro-init/SKILL.md +3 -3
  205. package/.agy/skills/maestro-milestone-audit/SKILL.md +5 -3
  206. package/.agy/skills/maestro-milestone-complete/SKILL.md +7 -5
  207. package/.agy/skills/maestro-plan/SKILL.md +14 -4
  208. package/.agy/skills/maestro-ralph/SKILL.md +368 -162
  209. package/.agy/skills/maestro-ralph-execute/SKILL.md +81 -67
  210. package/.agy/skills/maestro-roadmap/SKILL.md +42 -81
  211. package/.agy/skills/quality-auto-test/SKILL.md +1 -1
  212. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  213. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  214. package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  215. package/.agy/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  216. package/.agy/skills/team-lifecycle-v4/templates/epics.md +2 -2
  217. package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  218. package/.agy/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  219. package/.claude/agents/cli-explore-agent.md +1 -3
  220. package/.claude/agents/cross-role-reviewer.md +171 -0
  221. package/.claude/agents/role-design-author.md +216 -0
  222. package/.claude/agents/ui-design-agent.md +1 -18
  223. package/.claude/agents/workflow-analyzer.md +1 -1
  224. package/.claude/agents/workflow-external-researcher.md +1 -1
  225. package/.claude/commands/maestro-analyze.md +30 -4
  226. package/.claude/commands/maestro-blueprint.md +130 -0
  227. package/.claude/commands/maestro-brainstorm.md +132 -116
  228. package/.claude/commands/maestro-init.md +3 -3
  229. package/.claude/commands/maestro-milestone-audit.md +5 -3
  230. package/.claude/commands/maestro-milestone-complete.md +7 -5
  231. package/.claude/commands/maestro-plan.md +14 -4
  232. package/.claude/commands/maestro-ralph-execute.md +81 -67
  233. package/.claude/commands/maestro-ralph.md +368 -162
  234. package/.claude/commands/maestro-roadmap.md +42 -81
  235. package/.claude/commands/maestro.md +63 -27
  236. package/.claude/commands/quality-auto-test.md +1 -1
  237. package/.claude/skills/maestro-help/SKILL.md +48 -14
  238. package/.claude/skills/maestro-help/index/catalog.json +29 -11
  239. package/.claude/skills/maestro-help/phases/01-parse-intent.md +1 -1
  240. package/.claude/skills/maestro-help/phases/02-search-present.md +6 -4
  241. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  242. package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  243. package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  244. package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  245. package/.claude/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  246. package/.claude/skills/team-lifecycle-v4/templates/epics.md +2 -2
  247. package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  248. package/.claude/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  249. package/.codex/skills/maestro/SKILL.md +84 -41
  250. package/.codex/skills/maestro-amend/SKILL.md +157 -0
  251. package/.codex/skills/maestro-analyze/SKILL.md +71 -23
  252. package/.codex/skills/maestro-blueprint/SKILL.md +122 -0
  253. package/.codex/skills/maestro-brainstorm/SKILL.md +135 -45
  254. package/.codex/skills/maestro-composer/SKILL.md +1 -1
  255. package/.codex/skills/maestro-execute/SKILL.md +13 -4
  256. package/.codex/skills/maestro-help/SKILL.md +28 -18
  257. package/.codex/skills/maestro-help/catalog.json +29 -11
  258. package/.codex/skills/maestro-init/SKILL.md +7 -7
  259. package/.codex/skills/maestro-plan/SKILL.md +27 -9
  260. package/.codex/skills/maestro-ralph/SKILL.md +740 -491
  261. package/.codex/skills/maestro-roadmap/SKILL.md +55 -72
  262. package/.codex/skills/maestro-update/SKILL.md +169 -0
  263. package/.codex/skills/maestro-verify/SKILL.md +11 -2
  264. package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -2
  265. package/.codex/skills/manage-harvest/SKILL.md +10 -2
  266. package/.codex/skills/quality-retrospective/SKILL.md +9 -2
  267. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
  268. package/.codex/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  269. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  270. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  271. package/.codex/skills/team-lifecycle-v4/templates/epics.md +2 -2
  272. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  273. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  274. package/README.md +8 -8
  275. package/README.zh-CN.md +8 -8
  276. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +3 -3
  277. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  278. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  279. package/dist/src/agents/cli-agent-runner.js +13 -7
  280. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  281. package/dist/src/commands/install-backend.d.ts +12 -0
  282. package/dist/src/commands/install-backend.d.ts.map +1 -1
  283. package/dist/src/commands/install-backend.js +144 -0
  284. package/dist/src/commands/install-backend.js.map +1 -1
  285. package/dist/src/commands/spec.d.ts.map +1 -1
  286. package/dist/src/commands/spec.js +8 -1
  287. package/dist/src/commands/spec.js.map +1 -1
  288. package/dist/src/core/component-defs.d.ts +6 -0
  289. package/dist/src/core/component-defs.d.ts.map +1 -1
  290. package/dist/src/core/component-defs.js +97 -0
  291. package/dist/src/core/component-defs.js.map +1 -1
  292. package/dist/src/tools/spec-init.d.ts +16 -2
  293. package/dist/src/tools/spec-init.d.ts.map +1 -1
  294. package/dist/src/tools/spec-init.js +58 -187
  295. package/dist/src/tools/spec-init.js.map +1 -1
  296. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  297. package/dist/src/tools/spec-loader.js +16 -16
  298. package/dist/src/tools/spec-loader.js.map +1 -1
  299. package/dist/src/tools/spec-seeds.d.ts +33 -0
  300. package/dist/src/tools/spec-seeds.d.ts.map +1 -0
  301. package/dist/src/tools/spec-seeds.js +200 -0
  302. package/dist/src/tools/spec-seeds.js.map +1 -0
  303. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  304. package/dist/src/tools/spec-writer.js +7 -9
  305. package/dist/src/tools/spec-writer.js.map +1 -1
  306. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts +11 -0
  307. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts.map +1 -0
  308. package/dist/src/tui/install-ui/ExtraMcpConfig.js +61 -0
  309. package/dist/src/tui/install-ui/ExtraMcpConfig.js.map +1 -0
  310. package/dist/src/tui/install-ui/InstallConfirm.d.ts +3 -0
  311. package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
  312. package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
  313. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  314. package/dist/src/tui/install-ui/InstallExecution.d.ts +2 -0
  315. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  316. package/dist/src/tui/install-ui/InstallExecution.js +14 -2
  317. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  318. package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
  319. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  320. package/dist/src/tui/install-ui/InstallFlow.js +16 -3
  321. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  322. package/dist/src/tui/install-ui/InstallHub.d.ts +2 -0
  323. package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
  324. package/dist/src/tui/install-ui/InstallHub.js +8 -0
  325. package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
  326. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
  327. package/dist/src/tui/install-ui/InstallResult.js +3 -1
  328. package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
  329. package/dist/src/utils/update-notices.js +31 -0
  330. package/dist/src/utils/update-notices.js.map +1 -1
  331. package/package.json +5 -2
  332. package/templates/business-test-report.json +1 -1
  333. package/templates/index.json +1 -1
  334. package/templates/roadmap.md +15 -9
  335. package/templates/state.json +18 -17
  336. package/workflows/analyze.md +79 -11
  337. package/workflows/auto-test.md +6 -6
  338. package/workflows/blueprint.md +431 -0
  339. package/workflows/brainstorm.md +603 -496
  340. package/workflows/business-test.md +7 -7
  341. package/workflows/codebase-rebuild.md +4 -4
  342. package/workflows/harvest.md +184 -10
  343. package/workflows/init.md +9 -8
  344. package/workflows/maestro.md +1 -1
  345. package/workflows/milestone-audit.md +12 -4
  346. package/workflows/milestone-complete.md +11 -6
  347. package/workflows/plan.md +88 -22
  348. package/workflows/roadmap-common.md +1 -1
  349. package/workflows/roadmap.md +13 -3
  350. package/workflows/spec-generate.md +24 -13
  351. package/workflows/ui-design.md +2 -2
  352. package/workflows/ui-style.md +1 -1
  353. package/.agy/agents/conceptual-planning-agent.md +0 -244
  354. package/.claude/agents/conceptual-planning-agent.md +0 -245
@@ -0,0 +1,198 @@
1
+ # Dynamic Role-Spec Template
2
+
3
+ Template used by coordinator to generate lightweight worker role-spec files at runtime. Each generated role-spec is written to `<session>/role-specs/<role-name>.md`.
4
+
5
+ **Key difference from v1**: Role-specs contain ONLY Phase 2-4 domain logic + YAML frontmatter. All shared behavior (Phase 1 Task Discovery, Phase 5 Report/Fast-Advance, Message Bus, Consensus, Inner Loop) is built into the `team-worker` agent.
6
+
7
+ ## Template
8
+
9
+ ```markdown
10
+ ---
11
+ role: <role_name>
12
+ prefix: <PREFIX>
13
+ inner_loop: <true|false>
14
+ CLI tools: [<CLI tool-names>]
15
+ message_types:
16
+ success: <prefix>_complete
17
+ error: error
18
+ ---
19
+
20
+ # <Role Name> — Phase 2-4
21
+
22
+ ## Phase 2: <phase2_name>
23
+
24
+ <phase2_content>
25
+
26
+ ## Phase 3: <phase3_name>
27
+
28
+ <phase3_content>
29
+
30
+ ## Phase 4: <phase4_name>
31
+
32
+ <phase4_content>
33
+
34
+ ## Error Handling
35
+
36
+ | Scenario | Resolution |
37
+ |----------|------------|
38
+ <error_entries>
39
+ ```
40
+
41
+ ## Frontmatter Fields
42
+
43
+ | Field | Required | Description |
44
+ |-------|----------|-------------|
45
+ | `role` | Yes | Role name matching session registry |
46
+ | `prefix` | Yes | Task prefix to filter (e.g., RESEARCH, DRAFT, IMPL) |
47
+ | `inner_loop` | Yes | Whether team-worker loops through same-prefix tasks |
48
+ | `CLI tools` | No | Array of CLI tool types this role may call |
49
+ | `output_tag` | Yes | Output tag for all messages, e.g., `[researcher]` |
50
+ | `message_types` | Yes | Message type mapping for team_msg |
51
+ | `message_types.success` | Yes | Type string for successful completion |
52
+ | `message_types.error` | Yes | Type string for errors (usually "error") |
53
+
54
+ ## Design Rules
55
+
56
+ | Rule | Description |
57
+ |------|-------------|
58
+ | Phase 2-4 only | No Phase 1 (Task Discovery) or Phase 5 (Report) — team-worker handles these |
59
+ | No message bus code | No team_msg calls — team-worker handles logging |
60
+ | No consensus handling | No consensus_reached/blocked logic — team-worker handles routing |
61
+ | No inner loop logic | No Phase 5-L/5-F — team-worker handles looping |
62
+ | ~80 lines target | Lightweight, domain-focused |
63
+ | No pseudocode | Decision tables + text + tool calls only |
64
+ | `<placeholder>` notation | Use angle brackets for variable substitution |
65
+ | Reference CLI tools by name | team-worker resolves invocation from its delegation templates |
66
+
67
+ ## Generated Role-Spec Structure
68
+
69
+ Every generated role-spec MUST include these blocks:
70
+
71
+ ### Identity Block (mandatory — first section of generated spec)
72
+
73
+ ```
74
+ Tag: [<role_name>] | Prefix: <PREFIX>-*
75
+ Responsibility: <one-line from task analysis>
76
+ ```
77
+
78
+ ### Boundaries Block (mandatory — after Identity)
79
+
80
+ ```
81
+ ### MUST
82
+ - <3-5 rules derived from task analysis>
83
+
84
+ ### MUST NOT
85
+ - Execute work outside assigned prefix
86
+ - Modify artifacts from other roles
87
+ - Skip Phase 4 verification
88
+ ```
89
+
90
+ ## Behavioral Traits
91
+
92
+ All dynamically generated role-specs MUST embed these traits into Phase 4. Coordinator copies this section verbatim into every generated role-spec as a Phase 4 appendix.
93
+
94
+ **Design principle**: Constrain behavioral characteristics (accuracy, feedback, quality gates), NOT specific actions (which tool, which CLI tool, which path). Tasks are diverse — the coordinator composes task-specific Phase 2-3 instructions, while these traits ensure execution quality regardless of task type.
95
+
96
+ ### Accuracy — outputs must be verifiable
97
+
98
+ - Files claimed as **created** → Read to confirm file exists and has content
99
+ - Files claimed as **modified** → Read to confirm content actually changed
100
+ - Analysis claimed as **complete** → artifact file exists in `<session>/artifacts/`
101
+
102
+ ### Feedback Contract — completion report must include evidence
103
+
104
+ Phase 4 must produce a verification summary with these fields:
105
+
106
+ | Field | When Required | Content |
107
+ |-------|---------------|---------|
108
+ | `files_produced` | New files created | Path list |
109
+ | `files_modified` | Existing files changed | Path + before/after line count |
110
+ | `artifacts_written` | Always | Paths in `<session>/artifacts/` |
111
+ | `verification_method` | Always | How verified: Read confirm / syntax check / diff |
112
+
113
+ ### Quality Gate — verify before reporting complete
114
+
115
+ - Phase 4 MUST verify Phase 3's **actual output** (not planned output)
116
+ - Verification fails → retry Phase 3 (max 2 retries)
117
+ - Still fails → report `partial_completion` with details, NOT `completed`
118
+ - Update shared state via `team_msg(operation="log", type="state_update", data={...})` after verification passes
119
+
120
+ Quality thresholds from [specs/quality-gates.md](quality-gates.md):
121
+ - Pass >= 80%: report completed
122
+ - Review 60-79%: report completed with warnings
123
+ - Fail < 60%: retry Phase 3 (max 2)
124
+
125
+ ### Tech Profile Injection
126
+
127
+ When generating role-specs for analysis or exploration roles, append a Tech Profile Scan instruction after their Phase 3:
128
+ - Instruct the role to scan analysis results for codebase signals relevant to its domain
129
+ - Include `tech_profile` in state_update data for coordinator specialist injection evaluation
130
+
131
+ ### Error Protocol
132
+
133
+ - Primary approach fails → try alternative (different CLI tool / different tool)
134
+ - 2 retries exhausted → escalate to coordinator with failure details
135
+ - NEVER: skip verification and report completed
136
+
137
+ ---
138
+
139
+ ## Reference Patterns
140
+
141
+ Coordinator MAY reference these patterns when composing Phase 2-4 content for a role-spec. These are **structural guidance, not mandatory templates**. The task description determines specific behavior — patterns only suggest common phase structures.
142
+
143
+ ### Research / Exploration
144
+
145
+ - Phase 2: Define exploration scope + load prior knowledge from shared state and wisdom
146
+ - Phase 3: Explore via CLI tools, direct tool calls, or codebase search — approach chosen by agent
147
+ - Phase 4: Verify findings documented (Behavioral Traits) + update shared state
148
+
149
+ ### Document / Content
150
+
151
+ - Phase 2: Load upstream artifacts + read target files (if modifying existing docs)
152
+ - Phase 3: Create new documents OR modify existing documents — determined by task, not template
153
+ - Phase 4: Verify documents exist with expected content (Behavioral Traits) + update shared state
154
+
155
+ ### Code Implementation
156
+
157
+ - Phase 2: Load design/spec artifacts from upstream
158
+ - Phase 3: Implement code changes — CLI tool choice and approach determined by task complexity
159
+ - Phase 4: Syntax check + file verification (Behavioral Traits) + update shared state
160
+
161
+ ### Analysis / Audit
162
+
163
+ - Phase 2: Load analysis targets (artifacts or source files)
164
+ - Phase 3: Multi-dimension analysis — perspectives and depth determined by task
165
+ - Phase 4: Verify report exists + severity classification (Behavioral Traits) + update shared state
166
+
167
+ ### Validation / Testing
168
+
169
+ - Phase 2: Detect test framework + identify changed files from upstream
170
+ - Phase 3: Run test-fix cycle — iteration count and strategy determined by task
171
+ - Phase 4: Verify pass rate + coverage (Behavioral Traits) + update shared state
172
+
173
+ ---
174
+
175
+ ## Knowledge Transfer Protocol
176
+
177
+ Full protocol: [specs/knowledge-transfer.md](knowledge-transfer.md)
178
+
179
+ Generated role-specs Phase 2 MUST declare which upstream sources to load.
180
+ Generated role-specs Phase 4 MUST include state update and artifact publishing.
181
+
182
+ ---
183
+
184
+ ## Generated Role-Spec Validation
185
+
186
+ Coordinator verifies before writing each role-spec:
187
+
188
+ | Check | Criteria |
189
+ |-------|----------|
190
+ | Frontmatter complete | All required fields present (role, prefix, inner_loop, output_tag, message_types, CLI tools) |
191
+ | Identity block | Tag, prefix, responsibility defined |
192
+ | Boundaries | MUST and MUST NOT rules present |
193
+ | Phase 2 | Context loading sources specified |
194
+ | Phase 3 | Execution goal clear, not prescriptive about tools |
195
+ | Phase 4 | Behavioral Traits copied verbatim |
196
+ | Error Handling | Table with 3+ scenarios |
197
+ | Line count | Target ~80 lines (max 120) |
198
+ | No built-in overlap | No Phase 1/5, no message bus code, no consensus handling |
@@ -0,0 +1,191 @@
1
+ ---
2
+ name: team-executor
3
+ description: Lightweight session execution skill. Resumes existing team-coordinate sessions for pure execution via team-worker agents. No analysis, no role generation -- only loads and executes. Session path required. Triggers on "Team Executor".
4
+ allowed-tools: team_create(*), team_delete(*), send_message(*), task_create(*), task_update(*), task_list(*), task_get(*), agent(*), ask_user_question(*), read(*), write(*), edit(*), bash(*), glob(*), grep(*), mcp__ccw-tools__team_msg(*)
5
+ ---
6
+ <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
7
+
8
+
9
+ # Team Executor
10
+
11
+ Lightweight session execution skill: load session -> reconcile state -> spawn team-worker agents -> execute -> deliver. **No analysis, no role generation** -- only executes existing team-coordinate sessions.
12
+
13
+
14
+ ## Architecture
15
+
16
+ ```
17
+ +---------------------------------------------------+
18
+ | invoke_skill(skill="team-executor") |
19
+ | args="--session=<path>" [REQUIRED] |
20
+ +-------------------+-------------------------------+
21
+ | Session Validation
22
+ +---- --session valid? ----+
23
+ | NO | YES
24
+ v v
25
+ Error immediately Orchestration Mode
26
+ (no session) -> executor
27
+ |
28
+ +-------+-------+-------+
29
+ v v v v
30
+ [team-worker agents loaded from session role-specs]
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Session Validation (BEFORE routing)
36
+
37
+ **CRITICAL**: Session validation MUST occur before any execution.
38
+
39
+ ### Parse Arguments
40
+
41
+ Extract from `$ARGUMENTS`:
42
+ - `--session=<path>`: Path to team-coordinate session folder (REQUIRED)
43
+
44
+ ### Validation Steps
45
+
46
+ 1. **Check `--session` provided**:
47
+ - If missing -> **ERROR**: "Session required. Usage: --session=<path-to-TC-folder>"
48
+
49
+ 2. **Validate session structure** (see specs/session-schema.md):
50
+ - Directory exists at path
51
+ - `team-session.json` exists and valid JSON
52
+ - `task-analysis.json` exists and valid JSON
53
+ - `role-specs/` directory has at least one `.md` file
54
+ - Each role in `team-session.json#roles` has corresponding `.md` file in `role-specs/`
55
+
56
+ 3. **Validation failure**:
57
+ - Report specific missing component
58
+ - Suggest re-running team-coordinate or checking path
59
+
60
+ ---
61
+
62
+ ## Role Router
63
+
64
+ This skill is **executor-only**. Workers do NOT invoke this skill -- they are spawned as `team-worker` agents directly.
65
+
66
+ ### Dispatch Logic
67
+
68
+ | Scenario | Action |
69
+ |----------|--------|
70
+ | No `--session` | **ERROR** immediately |
71
+ | `--session` invalid | **ERROR** with specific reason |
72
+ | Valid session | Orchestration Mode -> executor |
73
+
74
+ ### Orchestration Mode
75
+
76
+ **Invocation**: `invoke_skill(skill="team-executor", args="--session=<session-folder>")`
77
+
78
+ **Lifecycle**:
79
+ ```
80
+ Validate session
81
+ -> executor Phase 0: Reconcile state (reset interrupted, detect orphans)
82
+ -> executor Phase 1: Spawn first batch team-worker agents (background) -> STOP
83
+ -> Worker executes -> send_message callback -> executor advances next step
84
+ -> Loop until pipeline complete -> Phase 2 report + completion action
85
+ ```
86
+
87
+ **User Commands** (wake paused executor):
88
+
89
+ | Command | Action |
90
+ |---------|--------|
91
+ | `check` / `status` | Output execution status graph, no advancement |
92
+ | `resume` / `continue` | Check worker states, advance next step |
93
+
94
+ ---
95
+
96
+ ## Role Registry
97
+
98
+ | Role | File | Type |
99
+ |------|------|------|
100
+ | executor | [roles/executor/role.md](roles/executor/role.md) | built-in orchestrator |
101
+ | (dynamic) | `<session>/role-specs/<role-name>.md` | loaded from session |
102
+
103
+ ---
104
+
105
+ ## Executor Spawn Template
106
+
107
+ ### v2 Worker Spawn (all roles)
108
+
109
+ When executor spawns workers, use `team-worker` agent with role-spec path:
110
+
111
+ ```
112
+ delegate_subagent({
113
+ subagent_type: "team-worker",
114
+ description: "Spawn <role> worker",
115
+ team_name: <team-name>,
116
+ name: "<role>",
117
+ run_in_background: true,
118
+ prompt: `## Role Assignment
119
+ role: <role>
120
+ role_spec: <session-folder>/role-specs/<role>.md
121
+ session: <session-folder>
122
+ session_id: <session-id>
123
+ team_name: <team-name>
124
+ requirement: <task-description>
125
+ inner_loop: <true|false>
126
+
127
+ ## Progress Milestones
128
+ session_id: <session-id>
129
+ Report progress via team_msg at natural phase boundaries (context loaded -> core work done -> verification).
130
+ Report blockers immediately via team_msg type="blocker".
131
+ Report completion via team_msg type="task_complete" after final send_message.
132
+
133
+ Read role_spec file to load Phase 2-4 domain instructions.`
134
+ })
135
+ ```
136
+
137
+ ---
138
+
139
+ ## Completion Action
140
+
141
+ When pipeline completes (all tasks done), executor presents an interactive choice:
142
+
143
+ ```
144
+ ask_user({
145
+ questions: [{
146
+ question: "Team pipeline complete. What would you like to do?",
147
+ header: "Completion",
148
+ multiSelect: false,
149
+ options: [
150
+ { label: "Archive & Clean (Recommended)", description: "Archive session, clean up team" },
151
+ { label: "Keep Active", description: "Keep session for follow-up work" },
152
+ { label: "Export Results", description: "Export deliverables to target directory, then clean" }
153
+ ]
154
+ }]
155
+ })
156
+ ```
157
+
158
+ ### Action Handlers
159
+
160
+ | Choice | Steps |
161
+ |--------|-------|
162
+ | Archive & Clean | Update session status="completed" -> delete_team -> output final summary with artifact paths |
163
+ | Keep Active | Update session status="paused" -> output: "Resume with: invoke_skill(skill='team-executor', args='--session=<path>')" |
164
+ | Export Results | ask_user(target path) -> copy artifacts to target -> Archive & Clean |
165
+
166
+ ---
167
+
168
+ ## Integration with team-coordinate
169
+
170
+ | Scenario | Skill |
171
+ |----------|-------|
172
+ | New task, no session | team-coordinate |
173
+ | Existing session, resume execution | **team-executor** |
174
+ | Session needs new roles | team-coordinate (with resume) |
175
+ | Pure execution, no analysis | **team-executor** |
176
+
177
+ ---
178
+
179
+ ## Error Handling
180
+
181
+ | Scenario | Resolution |
182
+ |----------|------------|
183
+ | No --session provided | ERROR immediately with usage message |
184
+ | Session directory not found | ERROR with path, suggest checking path |
185
+ | team-session.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
186
+ | task-analysis.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
187
+ | No role-specs in session | ERROR, session incomplete, suggest re-run team-coordinate |
188
+ | Role-spec file not found | ERROR with expected path |
189
+ | capability_gap reported | Warn only, cannot generate new role-specs |
190
+ | Fast-advance spawns wrong task | Executor reconciles on next callback |
191
+ | Completion action fails | Default to Keep Active, log warning |
@@ -0,0 +1,239 @@
1
+ # Command: monitor
2
+
3
+ ## Purpose
4
+
5
+ Event-driven pipeline coordination with Spawn-and-Stop pattern for team-executor v2. Role names are read from `team-session.json#roles`. Workers are spawned as `team-worker` agents with role-spec paths. **handleAdapt is LIMITED**: only warns, cannot generate new role-specs. Includes `handleComplete` for pipeline completion action.
6
+
7
+ ## Constants
8
+
9
+ | Constant | Value | Description |
10
+ |----------|-------|-------------|
11
+ | SPAWN_MODE | background | All workers spawned via `Task(run_in_background: true)` |
12
+ | ONE_STEP_PER_INVOCATION | true | Executor does one operation then STOPS |
13
+ | FAST_ADVANCE_AWARE | true | Workers may skip executor for simple linear successors |
14
+ | ROLE_GENERATION | disabled | handleAdapt cannot generate new role-specs |
15
+ | WORKER_AGENT | team-worker | All workers spawned as team-worker agents |
16
+
17
+ ## Phase 2: Context Loading
18
+
19
+ | Input | Source | Required |
20
+ |-------|--------|----------|
21
+ | Session file | `<session-folder>/team-session.json` | Yes |
22
+ | Task list | `list_tasks()` | Yes |
23
+ | Active workers | session.active_workers[] | Yes |
24
+ | Role registry | session.roles[] | Yes |
25
+
26
+ **Dynamic role resolution**: Known worker roles are loaded from `session.roles[].name`. Role-spec paths are in `session.roles[].role_spec`.
27
+
28
+ ## Phase 3: Handler Routing
29
+
30
+ ### Wake-up Source Detection
31
+
32
+ Parse `$ARGUMENTS` to determine handler:
33
+
34
+ | Priority | Condition | Handler |
35
+ |----------|-----------|---------|
36
+ | 1 | Message contains `[<role-name>]` from session roles | handleCallback |
37
+ | 2 | Contains "capability_gap" | handleAdapt |
38
+ | 3 | Contains "check" or "status" | handleCheck |
39
+ | 4 | Contains "resume", "continue", or "next" | handleResume |
40
+ | 5 | Pipeline detected as complete | handleComplete |
41
+ | 6 | None of the above (initial spawn after dispatch) | handleSpawnNext |
42
+
43
+ ---
44
+
45
+ ### Handler: handleCallback
46
+
47
+ Worker completed a task. Verify completion, update state, auto-advance.
48
+
49
+ ```
50
+ Receive callback from [<role>]
51
+ +- Find matching active worker by role (from session.roles)
52
+ +- Is this a progress update (not final)?
53
+ | +- YES -> Update session state, do NOT remove from active_workers -> STOP
54
+ +- Task status = completed?
55
+ | +- YES -> remove from active_workers -> update session
56
+ | | +- -> handleSpawnNext
57
+ | +- NO -> progress message, do not advance -> STOP
58
+ +- No matching worker found
59
+ +- Scan all active workers for completed tasks
60
+ +- Found completed -> process each -> handleSpawnNext
61
+ +- None completed -> STOP
62
+ ```
63
+
64
+ **Fast-advance note**: Check if expected next task is already `in_progress` (fast-advanced). If yes -> skip spawning, sync active_workers.
65
+
66
+ ---
67
+
68
+ ### Handler: handleCheck
69
+
70
+ Read-only status report. No pipeline advancement.
71
+
72
+ ```
73
+ [executor] Pipeline Status
74
+ [executor] Progress: <completed>/<total> (<percent>%)
75
+
76
+ [executor] Execution Graph:
77
+ <visual representation with status icons>
78
+
79
+ done=completed >>>=running o=pending .=not created
80
+
81
+ [executor] Active Workers:
82
+ > <subject> (<role>) - running <elapsed>
83
+
84
+ [executor] Ready to spawn: <subjects>
85
+ [executor] Commands: 'resume' to advance | 'check' to refresh
86
+ ```
87
+
88
+ Then STOP.
89
+
90
+ ---
91
+
92
+ ### Handler: handleResume
93
+
94
+ Check active worker completion, process results, advance pipeline.
95
+
96
+ ```
97
+ Load active_workers from session
98
+ +- No active workers -> handleSpawnNext
99
+ +- Has active workers -> check each:
100
+ +- status = completed -> mark done, log
101
+ +- status = in_progress -> still running, log
102
+ +- other status -> worker failure -> reset to pending
103
+ After processing:
104
+ +- Some completed -> handleSpawnNext
105
+ +- All still running -> report status -> STOP
106
+ +- All failed -> handleSpawnNext (retry)
107
+ ```
108
+
109
+ ---
110
+
111
+ ### Handler: handleSpawnNext
112
+
113
+ Find all ready tasks, spawn team-worker agents in background, update session, STOP.
114
+
115
+ ```
116
+ Collect task states from list_tasks()
117
+ +- completedSubjects: status = completed
118
+ +- inProgressSubjects: status = in_progress
119
+ +- readySubjects: pending + all blockedBy in completedSubjects
120
+
121
+ Ready tasks found?
122
+ +- NONE + work in progress -> report waiting -> STOP
123
+ +- NONE + nothing in progress -> PIPELINE_COMPLETE -> handleComplete
124
+ +- HAS ready tasks -> for each:
125
+ +- Is task owner an Inner Loop role AND already has active_worker?
126
+ | +- YES -> SKIP spawn (existing worker picks it up)
127
+ | +- NO -> normal spawn below
128
+ +- update_task -> in_progress
129
+ +- team_msg log -> task_unblocked (session_id=<session-id>)
130
+ +- Spawn team-worker (see spawn tool call below)
131
+ +- Add to session.active_workers
132
+ Update session file -> output summary -> STOP
133
+ ```
134
+
135
+ **Spawn worker tool call**:
136
+
137
+ ```
138
+ delegate_subagent({
139
+ subagent_type: "team-worker",
140
+ description: "Spawn <role> worker for <subject>",
141
+ team_name: <team-name>,
142
+ name: "<role>",
143
+ run_in_background: true,
144
+ prompt: `## Role Assignment
145
+ role: <role>
146
+ role_spec: <session-folder>/role-specs/<role>.md
147
+ session: <session-folder>
148
+ session_id: <session-id>
149
+ team_name: <team-name>
150
+ requirement: <task-description>
151
+ inner_loop: <true|false>
152
+
153
+ Read role_spec file to load Phase 2-4 domain instructions.`
154
+ })
155
+ ```
156
+
157
+ ---
158
+
159
+ ### Handler: handleComplete
160
+
161
+ Pipeline complete. Execute completion action.
162
+
163
+ ```
164
+ All tasks completed (no pending, no in_progress)
165
+ +- Generate pipeline summary (deliverables, stats, duration)
166
+ +- Read session.completion_action:
167
+ |
168
+ +- "interactive":
169
+ | ask_user -> user choice:
170
+ | +- "Archive & Clean": session status="completed" -> delete_team -> summary
171
+ | +- "Keep Active": session status="paused" -> resume command
172
+ | +- "Export Results": copy artifacts -> Archive & Clean
173
+ |
174
+ +- "auto_archive": Execute Archive & Clean
175
+ +- "auto_keep": Execute Keep Active
176
+ ```
177
+
178
+ **Fallback**: If completion action fails, default to Keep Active, log warning.
179
+
180
+ ---
181
+
182
+ ### Handler: handleAdapt (LIMITED)
183
+
184
+ **UNLIKE team-coordinate, executor CANNOT generate new role-specs.**
185
+
186
+ ```
187
+ Receive capability_gap from [<role>]
188
+ +- Log via team_msg (type: warning)
189
+ +- Check existing roles -> does any cover this?
190
+ | +- YES -> redirect to that role -> STOP
191
+ | +- NO -> genuine gap, report to user:
192
+ | "Capability gap detected. team-executor cannot generate new role-specs.
193
+ | Options: 1. Continue 2. Re-run team-coordinate 3. Manually add role-spec"
194
+ +- Continue execution with existing roles
195
+ ```
196
+
197
+ ---
198
+
199
+ ### Worker Failure Handling
200
+
201
+ 1. Reset task -> pending via update_task
202
+ 2. Log via team_msg (type: error)
203
+ 3. Report to user: task reset, will retry on next resume
204
+
205
+ ### Fast-Advance Failure Recovery
206
+
207
+ Detect orphaned tasks (in_progress without active_worker, > 5 minutes) -> reset to pending -> handleSpawnNext.
208
+
209
+ ### Consensus-Blocked Handling
210
+
211
+ ```
212
+ Route by severity:
213
+ +- HIGH: Create REVISION task (max 1). Already revised -> PAUSE for user
214
+ +- MEDIUM: Proceed with warning, log to wisdom/issues.md
215
+ +- LOW: Proceed normally as consensus_reached with notes
216
+ ```
217
+
218
+ ## Phase 4: Validation
219
+
220
+ | Check | Criteria |
221
+ |-------|----------|
222
+ | Session state consistent | active_workers matches list_tasks in_progress tasks |
223
+ | No orphaned tasks | Every in_progress task has an active_worker entry |
224
+ | Dynamic roles valid | All task owners exist in session.roles |
225
+ | Completion detection | readySubjects=0 + inProgressSubjects=0 -> PIPELINE_COMPLETE |
226
+ | Fast-advance tracking | Detect fast-advanced tasks, sync to active_workers |
227
+
228
+ ## Error Handling
229
+
230
+ | Scenario | Resolution |
231
+ |----------|------------|
232
+ | Session file not found | Error, suggest re-run team-coordinate |
233
+ | Worker callback from unknown role | Log info, scan for other completions |
234
+ | All workers still running on resume | Report status, suggest check later |
235
+ | Pipeline stall | Check for missing tasks, report to user |
236
+ | Fast-advance conflict | Executor reconciles, no duplicate spawns |
237
+ | Role-spec file not found | Error, cannot proceed |
238
+ | capability_gap | WARN only, cannot generate new role-specs |
239
+ | Completion action fails | Default to Keep Active, log warning |