maestro-flow 0.4.9 → 0.4.11

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 (410) hide show
  1. package/.agents/agents/cli-explore-agent.md +189 -0
  2. package/.agents/agents/conceptual-planning-agent.md +247 -0
  3. package/.agents/agents/impeccable-agent.md +101 -0
  4. package/.agents/agents/team-supervisor.md +145 -0
  5. package/.agents/agents/team-worker.md +239 -0
  6. package/.agents/agents/ui-design-agent.md +289 -0
  7. package/.agents/agents/workflow-analyzer.md +117 -0
  8. package/.agents/agents/workflow-codebase-mapper.md +79 -0
  9. package/.agents/agents/workflow-collab-planner.md +145 -0
  10. package/.agents/agents/workflow-debugger.md +105 -0
  11. package/.agents/agents/workflow-executor.md +134 -0
  12. package/.agents/agents/workflow-external-researcher.md +88 -0
  13. package/.agents/agents/workflow-integration-checker.md +85 -0
  14. package/.agents/agents/workflow-nyquist-auditor.md +87 -0
  15. package/.agents/agents/workflow-phase-researcher.md +87 -0
  16. package/.agents/agents/workflow-plan-checker.md +92 -0
  17. package/.agents/agents/workflow-planner.md +197 -0
  18. package/.agents/agents/workflow-project-researcher.md +76 -0
  19. package/.agents/agents/workflow-research-synthesizer.md +72 -0
  20. package/.agents/agents/workflow-reviewer.md +84 -0
  21. package/.agents/agents/workflow-roadmapper.md +83 -0
  22. package/.agents/agents/workflow-verifier.md +122 -0
  23. package/.agents/skills/codify-to-knowhow/SKILL.md +169 -0
  24. package/.agents/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  25. package/.agents/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  26. package/.agents/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  27. package/.agents/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  28. package/.agents/skills/learn-decompose/SKILL.md +118 -0
  29. package/.agents/skills/learn-follow/SKILL.md +129 -0
  30. package/.agents/skills/learn-investigate/SKILL.md +154 -0
  31. package/.agents/skills/learn-retro/SKILL.md +159 -0
  32. package/.agents/skills/learn-second-opinion/SKILL.md +124 -0
  33. package/.agents/skills/maestro/SKILL.md +224 -0
  34. package/.agents/skills/maestro-amend/SKILL.md +165 -0
  35. package/.agents/skills/maestro-analyze/SKILL.md +135 -0
  36. package/.agents/skills/maestro-brainstorm/SKILL.md +118 -0
  37. package/.agents/skills/maestro-collab/SKILL.md +174 -0
  38. package/.agents/skills/maestro-composer/SKILL.md +181 -0
  39. package/.agents/skills/maestro-execute/SKILL.md +133 -0
  40. package/.agents/skills/maestro-fork/SKILL.md +88 -0
  41. package/.agents/skills/maestro-guard/SKILL.md +103 -0
  42. package/.agents/skills/maestro-help/SKILL.md +266 -0
  43. package/.agents/skills/maestro-help/index/catalog.json +184 -0
  44. package/.agents/skills/maestro-help/phases/01-parse-intent.md +122 -0
  45. package/.agents/skills/maestro-help/phases/02-search-present.md +181 -0
  46. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +186 -0
  47. package/.agents/skills/maestro-impeccable/SKILL.md +251 -0
  48. package/.agents/skills/maestro-init/SKILL.md +80 -0
  49. package/.agents/skills/maestro-learn/SKILL.md +142 -0
  50. package/.agents/skills/maestro-merge/SKILL.md +66 -0
  51. package/.agents/skills/maestro-milestone-audit/SKILL.md +70 -0
  52. package/.agents/skills/maestro-milestone-complete/SKILL.md +77 -0
  53. package/.agents/skills/maestro-milestone-release/SKILL.md +98 -0
  54. package/.agents/skills/maestro-overlay/SKILL.md +180 -0
  55. package/.agents/skills/maestro-plan/SKILL.md +172 -0
  56. package/.agents/skills/maestro-player/SKILL.md +177 -0
  57. package/.agents/skills/maestro-quick/SKILL.md +67 -0
  58. package/.agents/skills/maestro-ralph/SKILL.md +685 -0
  59. package/.agents/skills/maestro-ralph-execute/SKILL.md +259 -0
  60. package/.agents/skills/maestro-roadmap/SKILL.md +170 -0
  61. package/.agents/skills/maestro-tools-execute/SKILL.md +119 -0
  62. package/.agents/skills/maestro-tools-register/SKILL.md +159 -0
  63. package/.agents/skills/maestro-ui-codify/SKILL.md +82 -0
  64. package/.agents/skills/maestro-update/SKILL.md +178 -0
  65. package/.agents/skills/maestro-verify/SKILL.md +111 -0
  66. package/.agents/skills/manage-codebase-rebuild/SKILL.md +77 -0
  67. package/.agents/skills/manage-codebase-refresh/SKILL.md +59 -0
  68. package/.agents/skills/manage-harvest/SKILL.md +96 -0
  69. package/.agents/skills/manage-issue/SKILL.md +75 -0
  70. package/.agents/skills/manage-issue-discover/SKILL.md +83 -0
  71. package/.agents/skills/manage-knowhow/SKILL.md +79 -0
  72. package/.agents/skills/manage-knowhow-capture/SKILL.md +81 -0
  73. package/.agents/skills/manage-learn/SKILL.md +67 -0
  74. package/.agents/skills/manage-status/SKILL.md +54 -0
  75. package/.agents/skills/manage-wiki/SKILL.md +64 -0
  76. package/.agents/skills/quality-auto-test/SKILL.md +138 -0
  77. package/.agents/skills/quality-debug/SKILL.md +122 -0
  78. package/.agents/skills/quality-refactor/SKILL.md +69 -0
  79. package/.agents/skills/quality-retrospective/SKILL.md +79 -0
  80. package/.agents/skills/quality-review/SKILL.md +130 -0
  81. package/.agents/skills/quality-sync/SKILL.md +53 -0
  82. package/.agents/skills/quality-test/SKILL.md +119 -0
  83. package/.agents/skills/security-audit/SKILL.md +157 -0
  84. package/.agents/skills/skill-iter-tune/SKILL.md +384 -0
  85. package/.agents/skills/skill-iter-tune/phases/01-setup.md +144 -0
  86. package/.agents/skills/skill-iter-tune/phases/02-execute.md +292 -0
  87. package/.agents/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  88. package/.agents/skills/skill-iter-tune/phases/04-improve.md +186 -0
  89. package/.agents/skills/skill-iter-tune/phases/05-report.md +166 -0
  90. package/.agents/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  91. package/.agents/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  92. package/.agents/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  93. package/.agents/skills/spec-add/SKILL.md +70 -0
  94. package/.agents/skills/spec-load/SKILL.md +73 -0
  95. package/.agents/skills/spec-remove/SKILL.md +53 -0
  96. package/.agents/skills/spec-setup/SKILL.md +50 -0
  97. package/.agents/skills/team-coordinate/SKILL.md +268 -0
  98. package/.agents/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
  99. package/.agents/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
  100. package/.agents/skills/team-coordinate/roles/coordinator/commands/monitor.md +358 -0
  101. package/.agents/skills/team-coordinate/roles/coordinator/role.md +365 -0
  102. package/.agents/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
  103. package/.agents/skills/team-coordinate/specs/pipelines.md +97 -0
  104. package/.agents/skills/team-coordinate/specs/quality-gates.md +112 -0
  105. package/.agents/skills/team-coordinate/specs/role-spec-template.md +198 -0
  106. package/.agents/skills/team-executor/SKILL.md +191 -0
  107. package/.agents/skills/team-executor/roles/executor/commands/monitor.md +239 -0
  108. package/.agents/skills/team-executor/roles/executor/role.md +171 -0
  109. package/.agents/skills/team-executor/specs/session-schema.md +264 -0
  110. package/.agents/skills/team-lifecycle-v4/SKILL.md +211 -0
  111. package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +96 -0
  112. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
  113. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
  114. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
  115. package/.agents/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
  116. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
  117. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
  118. package/.agents/skills/team-lifecycle-v4/roles/executor/role.md +69 -0
  119. package/.agents/skills/team-lifecycle-v4/roles/planner/role.md +87 -0
  120. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
  121. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
  122. package/.agents/skills/team-lifecycle-v4/roles/reviewer/role.md +71 -0
  123. package/.agents/skills/team-lifecycle-v4/roles/supervisor/role.md +194 -0
  124. package/.agents/skills/team-lifecycle-v4/roles/tester/role.md +89 -0
  125. package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +97 -0
  126. package/.agents/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
  127. package/.agents/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
  128. package/.agents/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
  129. package/.agents/skills/team-lifecycle-v4/templates/architecture.md +254 -0
  130. package/.agents/skills/team-lifecycle-v4/templates/epics.md +196 -0
  131. package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
  132. package/.agents/skills/team-lifecycle-v4/templates/requirements.md +224 -0
  133. package/.agents/skills/team-quality-assurance/SKILL.md +149 -0
  134. package/.agents/skills/team-quality-assurance/roles/analyst/role.md +90 -0
  135. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
  136. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
  137. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +250 -0
  138. package/.agents/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
  139. package/.agents/skills/team-quality-assurance/roles/executor/role.md +68 -0
  140. package/.agents/skills/team-quality-assurance/roles/generator/role.md +70 -0
  141. package/.agents/skills/team-quality-assurance/roles/scout/role.md +77 -0
  142. package/.agents/skills/team-quality-assurance/roles/strategist/role.md +73 -0
  143. package/.agents/skills/team-quality-assurance/specs/pipelines.md +115 -0
  144. package/.agents/skills/team-quality-assurance/specs/team-config.json +131 -0
  145. package/.agents/skills/team-review/SKILL.md +149 -0
  146. package/.agents/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
  147. package/.agents/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
  148. package/.agents/skills/team-review/roles/coordinator/commands/monitor.md +224 -0
  149. package/.agents/skills/team-review/roles/coordinator/role.md +132 -0
  150. package/.agents/skills/team-review/roles/fixer/role.md +78 -0
  151. package/.agents/skills/team-review/roles/reviewer/role.md +70 -0
  152. package/.agents/skills/team-review/roles/scanner/role.md +81 -0
  153. package/.agents/skills/team-review/specs/dimensions.md +82 -0
  154. package/.agents/skills/team-review/specs/finding-schema.json +82 -0
  155. package/.agents/skills/team-review/specs/pipelines.md +102 -0
  156. package/.agents/skills/team-review/specs/team-config.json +27 -0
  157. package/.agents/skills/team-tech-debt/SKILL.md +130 -0
  158. package/.agents/skills/team-tech-debt/roles/assessor/role.md +79 -0
  159. package/.agents/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
  160. package/.agents/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
  161. package/.agents/skills/team-tech-debt/roles/coordinator/commands/monitor.md +209 -0
  162. package/.agents/skills/team-tech-debt/roles/coordinator/role.md +123 -0
  163. package/.agents/skills/team-tech-debt/roles/executor/role.md +78 -0
  164. package/.agents/skills/team-tech-debt/roles/planner/role.md +71 -0
  165. package/.agents/skills/team-tech-debt/roles/scanner/role.md +92 -0
  166. package/.agents/skills/team-tech-debt/roles/validator/role.md +80 -0
  167. package/.agents/skills/team-tech-debt/specs/pipelines.md +47 -0
  168. package/.agents/skills/team-tech-debt/specs/team-config.json +129 -0
  169. package/.agents/skills/team-testing/SKILL.md +145 -0
  170. package/.agents/skills/team-testing/roles/analyst/role.md +105 -0
  171. package/.agents/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
  172. package/.agents/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
  173. package/.agents/skills/team-testing/roles/coordinator/commands/monitor.md +257 -0
  174. package/.agents/skills/team-testing/roles/coordinator/role.md +134 -0
  175. package/.agents/skills/team-testing/roles/executor/role.md +101 -0
  176. package/.agents/skills/team-testing/roles/generator/role.md +100 -0
  177. package/.agents/skills/team-testing/roles/strategist/role.md +85 -0
  178. package/.agents/skills/team-testing/specs/pipelines.md +101 -0
  179. package/.agents/skills/team-testing/specs/team-config.json +93 -0
  180. package/.agents/skills/wiki-connect/SKILL.md +64 -0
  181. package/.agents/skills/wiki-digest/SKILL.md +70 -0
  182. package/.agents/skills/workflow-skill-designer/SKILL.md +498 -0
  183. package/.agents/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
  184. package/.agents/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
  185. package/.agents/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
  186. package/.agents/skills/workflow-skill-designer/phases/04-validation.md +471 -0
  187. package/.agy/agents/cli-explore-agent.md +186 -0
  188. package/.agy/agents/conceptual-planning-agent.md +244 -0
  189. package/.agy/agents/impeccable-agent.md +97 -0
  190. package/.agy/agents/team-supervisor.md +142 -0
  191. package/.agy/agents/team-worker.md +236 -0
  192. package/.agy/agents/ui-design-agent.md +286 -0
  193. package/.agy/agents/workflow-analyzer.md +114 -0
  194. package/.agy/agents/workflow-codebase-mapper.md +76 -0
  195. package/.agy/agents/workflow-collab-planner.md +142 -0
  196. package/.agy/agents/workflow-debugger.md +102 -0
  197. package/.agy/agents/workflow-executor.md +131 -0
  198. package/.agy/agents/workflow-external-researcher.md +86 -0
  199. package/.agy/agents/workflow-integration-checker.md +82 -0
  200. package/.agy/agents/workflow-nyquist-auditor.md +84 -0
  201. package/.agy/agents/workflow-phase-researcher.md +84 -0
  202. package/.agy/agents/workflow-plan-checker.md +89 -0
  203. package/.agy/agents/workflow-planner.md +194 -0
  204. package/.agy/agents/workflow-project-researcher.md +73 -0
  205. package/.agy/agents/workflow-research-synthesizer.md +70 -0
  206. package/.agy/agents/workflow-reviewer.md +81 -0
  207. package/.agy/agents/workflow-roadmapper.md +81 -0
  208. package/.agy/agents/workflow-verifier.md +119 -0
  209. package/.agy/skills/codify-to-knowhow/SKILL.md +172 -0
  210. package/.agy/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  211. package/.agy/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  212. package/.agy/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  213. package/.agy/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  214. package/.agy/skills/learn-decompose/SKILL.md +118 -0
  215. package/.agy/skills/learn-follow/SKILL.md +129 -0
  216. package/.agy/skills/learn-investigate/SKILL.md +154 -0
  217. package/.agy/skills/learn-retro/SKILL.md +159 -0
  218. package/.agy/skills/learn-second-opinion/SKILL.md +124 -0
  219. package/.agy/skills/maestro/SKILL.md +223 -0
  220. package/.agy/skills/maestro-amend/SKILL.md +162 -0
  221. package/.agy/skills/maestro-analyze/SKILL.md +135 -0
  222. package/.agy/skills/maestro-brainstorm/SKILL.md +118 -0
  223. package/.agy/skills/maestro-collab/SKILL.md +174 -0
  224. package/.agy/skills/maestro-composer/SKILL.md +180 -0
  225. package/.agy/skills/maestro-execute/SKILL.md +133 -0
  226. package/.agy/skills/maestro-fork/SKILL.md +88 -0
  227. package/.agy/skills/maestro-guard/SKILL.md +101 -0
  228. package/.agy/skills/maestro-help/SKILL.md +267 -0
  229. package/.agy/skills/maestro-help/index/catalog.json +184 -0
  230. package/.agy/skills/maestro-help/phases/01-parse-intent.md +122 -0
  231. package/.agy/skills/maestro-help/phases/02-search-present.md +181 -0
  232. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +186 -0
  233. package/.agy/skills/maestro-impeccable/SKILL.md +250 -0
  234. package/.agy/skills/maestro-init/SKILL.md +80 -0
  235. package/.agy/skills/maestro-learn/SKILL.md +142 -0
  236. package/.agy/skills/maestro-merge/SKILL.md +66 -0
  237. package/.agy/skills/maestro-milestone-audit/SKILL.md +70 -0
  238. package/.agy/skills/maestro-milestone-complete/SKILL.md +77 -0
  239. package/.agy/skills/maestro-milestone-release/SKILL.md +98 -0
  240. package/.agy/skills/maestro-overlay/SKILL.md +177 -0
  241. package/.agy/skills/maestro-plan/SKILL.md +172 -0
  242. package/.agy/skills/maestro-player/SKILL.md +176 -0
  243. package/.agy/skills/maestro-quick/SKILL.md +67 -0
  244. package/.agy/skills/maestro-ralph/SKILL.md +681 -0
  245. package/.agy/skills/maestro-ralph-execute/SKILL.md +255 -0
  246. package/.agy/skills/maestro-roadmap/SKILL.md +170 -0
  247. package/.agy/skills/maestro-tools-execute/SKILL.md +119 -0
  248. package/.agy/skills/maestro-tools-register/SKILL.md +159 -0
  249. package/.agy/skills/maestro-ui-codify/SKILL.md +81 -0
  250. package/.agy/skills/maestro-update/SKILL.md +175 -0
  251. package/.agy/skills/maestro-verify/SKILL.md +111 -0
  252. package/.agy/skills/manage-codebase-rebuild/SKILL.md +77 -0
  253. package/.agy/skills/manage-codebase-refresh/SKILL.md +59 -0
  254. package/.agy/skills/manage-harvest/SKILL.md +96 -0
  255. package/.agy/skills/manage-issue/SKILL.md +72 -0
  256. package/.agy/skills/manage-issue-discover/SKILL.md +83 -0
  257. package/.agy/skills/manage-knowhow/SKILL.md +76 -0
  258. package/.agy/skills/manage-knowhow-capture/SKILL.md +78 -0
  259. package/.agy/skills/manage-learn/SKILL.md +64 -0
  260. package/.agy/skills/manage-status/SKILL.md +51 -0
  261. package/.agy/skills/manage-wiki/SKILL.md +61 -0
  262. package/.agy/skills/quality-auto-test/SKILL.md +135 -0
  263. package/.agy/skills/quality-debug/SKILL.md +122 -0
  264. package/.agy/skills/quality-refactor/SKILL.md +69 -0
  265. package/.agy/skills/quality-retrospective/SKILL.md +79 -0
  266. package/.agy/skills/quality-review/SKILL.md +130 -0
  267. package/.agy/skills/quality-sync/SKILL.md +53 -0
  268. package/.agy/skills/quality-test/SKILL.md +119 -0
  269. package/.agy/skills/security-audit/SKILL.md +157 -0
  270. package/.agy/skills/skill-iter-tune/SKILL.md +381 -0
  271. package/.agy/skills/skill-iter-tune/phases/01-setup.md +144 -0
  272. package/.agy/skills/skill-iter-tune/phases/02-execute.md +292 -0
  273. package/.agy/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  274. package/.agy/skills/skill-iter-tune/phases/04-improve.md +198 -0
  275. package/.agy/skills/skill-iter-tune/phases/05-report.md +166 -0
  276. package/.agy/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  277. package/.agy/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  278. package/.agy/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  279. package/.agy/skills/spec-add/SKILL.md +67 -0
  280. package/.agy/skills/spec-load/SKILL.md +70 -0
  281. package/.agy/skills/spec-remove/SKILL.md +50 -0
  282. package/.agy/skills/spec-setup/SKILL.md +47 -0
  283. package/.agy/skills/team-coordinate/SKILL.md +267 -0
  284. package/.agy/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
  285. package/.agy/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
  286. package/.agy/skills/team-coordinate/roles/coordinator/commands/monitor.md +348 -0
  287. package/.agy/skills/team-coordinate/roles/coordinator/role.md +362 -0
  288. package/.agy/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
  289. package/.agy/skills/team-coordinate/specs/pipelines.md +97 -0
  290. package/.agy/skills/team-coordinate/specs/quality-gates.md +112 -0
  291. package/.agy/skills/team-coordinate/specs/role-spec-template.md +198 -0
  292. package/.agy/skills/team-executor/SKILL.md +180 -0
  293. package/.agy/skills/team-executor/roles/executor/commands/monitor.md +235 -0
  294. package/.agy/skills/team-executor/roles/executor/role.md +171 -0
  295. package/.agy/skills/team-executor/specs/session-schema.md +264 -0
  296. package/.agy/skills/team-lifecycle-v4/SKILL.md +189 -0
  297. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +92 -0
  298. package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
  299. package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
  300. package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
  301. package/.agy/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
  302. package/.agy/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
  303. package/.agy/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
  304. package/.agy/skills/team-lifecycle-v4/roles/executor/role.md +64 -0
  305. package/.agy/skills/team-lifecycle-v4/roles/planner/role.md +82 -0
  306. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
  307. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
  308. package/.agy/skills/team-lifecycle-v4/roles/reviewer/role.md +65 -0
  309. package/.agy/skills/team-lifecycle-v4/roles/supervisor/role.md +188 -0
  310. package/.agy/skills/team-lifecycle-v4/roles/tester/role.md +84 -0
  311. package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +92 -0
  312. package/.agy/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
  313. package/.agy/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
  314. package/.agy/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
  315. package/.agy/skills/team-lifecycle-v4/templates/architecture.md +254 -0
  316. package/.agy/skills/team-lifecycle-v4/templates/epics.md +196 -0
  317. package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
  318. package/.agy/skills/team-lifecycle-v4/templates/requirements.md +224 -0
  319. package/.agy/skills/team-quality-assurance/SKILL.md +148 -0
  320. package/.agy/skills/team-quality-assurance/roles/analyst/role.md +85 -0
  321. package/.agy/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
  322. package/.agy/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
  323. package/.agy/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +235 -0
  324. package/.agy/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
  325. package/.agy/skills/team-quality-assurance/roles/executor/role.md +62 -0
  326. package/.agy/skills/team-quality-assurance/roles/generator/role.md +65 -0
  327. package/.agy/skills/team-quality-assurance/roles/scout/role.md +72 -0
  328. package/.agy/skills/team-quality-assurance/roles/strategist/role.md +69 -0
  329. package/.agy/skills/team-quality-assurance/specs/pipelines.md +115 -0
  330. package/.agy/skills/team-quality-assurance/specs/team-config.json +131 -0
  331. package/.agy/skills/team-review/SKILL.md +149 -0
  332. package/.agy/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
  333. package/.agy/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
  334. package/.agy/skills/team-review/roles/coordinator/commands/monitor.md +209 -0
  335. package/.agy/skills/team-review/roles/coordinator/role.md +132 -0
  336. package/.agy/skills/team-review/roles/fixer/role.md +74 -0
  337. package/.agy/skills/team-review/roles/reviewer/role.md +66 -0
  338. package/.agy/skills/team-review/roles/scanner/role.md +77 -0
  339. package/.agy/skills/team-review/specs/dimensions.md +82 -0
  340. package/.agy/skills/team-review/specs/finding-schema.json +82 -0
  341. package/.agy/skills/team-review/specs/pipelines.md +102 -0
  342. package/.agy/skills/team-review/specs/team-config.json +27 -0
  343. package/.agy/skills/team-tech-debt/SKILL.md +133 -0
  344. package/.agy/skills/team-tech-debt/roles/assessor/role.md +76 -0
  345. package/.agy/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
  346. package/.agy/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
  347. package/.agy/skills/team-tech-debt/roles/coordinator/commands/monitor.md +198 -0
  348. package/.agy/skills/team-tech-debt/roles/coordinator/role.md +123 -0
  349. package/.agy/skills/team-tech-debt/roles/executor/role.md +76 -0
  350. package/.agy/skills/team-tech-debt/roles/planner/role.md +68 -0
  351. package/.agy/skills/team-tech-debt/roles/scanner/role.md +90 -0
  352. package/.agy/skills/team-tech-debt/roles/validator/role.md +78 -0
  353. package/.agy/skills/team-tech-debt/specs/pipelines.md +47 -0
  354. package/.agy/skills/team-tech-debt/specs/team-config.json +129 -0
  355. package/.agy/skills/team-testing/SKILL.md +144 -0
  356. package/.agy/skills/team-testing/roles/analyst/role.md +101 -0
  357. package/.agy/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
  358. package/.agy/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
  359. package/.agy/skills/team-testing/roles/coordinator/commands/monitor.md +242 -0
  360. package/.agy/skills/team-testing/roles/coordinator/role.md +134 -0
  361. package/.agy/skills/team-testing/roles/executor/role.md +95 -0
  362. package/.agy/skills/team-testing/roles/generator/role.md +95 -0
  363. package/.agy/skills/team-testing/roles/strategist/role.md +81 -0
  364. package/.agy/skills/team-testing/specs/pipelines.md +101 -0
  365. package/.agy/skills/team-testing/specs/team-config.json +93 -0
  366. package/.agy/skills/wiki-connect/SKILL.md +64 -0
  367. package/.agy/skills/wiki-digest/SKILL.md +70 -0
  368. package/.agy/skills/workflow-skill-designer/SKILL.md +506 -0
  369. package/.agy/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
  370. package/.agy/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
  371. package/.agy/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
  372. package/.agy/skills/workflow-skill-designer/phases/04-validation.md +471 -0
  373. package/.claude/commands/maestro-ralph.md +222 -87
  374. package/.claude/commands/maestro.md +13 -11
  375. package/.codex/skills/maestro/SKILL.md +23 -17
  376. package/.codex/skills/maestro-ralph/SKILL.md +177 -67
  377. package/dist/src/commands/install-backend.d.ts +12 -0
  378. package/dist/src/commands/install-backend.d.ts.map +1 -1
  379. package/dist/src/commands/install-backend.js +144 -0
  380. package/dist/src/commands/install-backend.js.map +1 -1
  381. package/dist/src/core/component-defs.d.ts +6 -0
  382. package/dist/src/core/component-defs.d.ts.map +1 -1
  383. package/dist/src/core/component-defs.js +97 -0
  384. package/dist/src/core/component-defs.js.map +1 -1
  385. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts +11 -0
  386. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts.map +1 -0
  387. package/dist/src/tui/install-ui/ExtraMcpConfig.js +61 -0
  388. package/dist/src/tui/install-ui/ExtraMcpConfig.js.map +1 -0
  389. package/dist/src/tui/install-ui/InstallConfirm.d.ts +3 -0
  390. package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
  391. package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
  392. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  393. package/dist/src/tui/install-ui/InstallExecution.d.ts +2 -0
  394. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  395. package/dist/src/tui/install-ui/InstallExecution.js +14 -2
  396. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  397. package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
  398. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  399. package/dist/src/tui/install-ui/InstallFlow.js +16 -3
  400. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  401. package/dist/src/tui/install-ui/InstallHub.d.ts +2 -0
  402. package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
  403. package/dist/src/tui/install-ui/InstallHub.js +8 -0
  404. package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
  405. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
  406. package/dist/src/tui/install-ui/InstallResult.js +3 -1
  407. package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
  408. package/dist/src/utils/update-notices.js +19 -0
  409. package/dist/src/utils/update-notices.js.map +1 -1
  410. package/package.json +7 -2
@@ -21,7 +21,7 @@ Entry points:
21
21
  - **`/maestro-ralph continue`** — Resume via maestro-ralph-execute
22
22
  - **`/maestro-ralph status`** — Display session progress
23
23
 
24
- Initial decomposition (S_DECOMPOSE): broad intents (重构/全面/迁移/重写) are boundary-clarified via ≤3 questions, producing 执行准则 + 子目标清单 written into status.json, plus a `goal-checklist.md` and a copy-paste `/goal` prompt for the user to bind.
24
+ Initial decomposition (S_DECOMPOSE): broad intents (重构/全面/迁移/重写) are boundary-clarified via ≤3 questions, producing 执行准则 + 子目标清单 written into status.json, plus a `goal-checklist.md` (a rendered view of status.json) and a copy-paste `/goal` prompt for the user to bind.
25
25
 
26
26
  Three node types:
27
27
  - **internal**: `Skill()` call (synchronous, lightweight)
@@ -34,6 +34,24 @@ Key difference from maestro coordinator:
34
34
 
35
35
  Session: `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json`
36
36
  Mutual invocation with `/maestro-ralph-execute` forms a self-perpetuating work loop.
37
+
38
+ ### 执行方式 / Execution Flow
39
+
40
+ ```
41
+ /maestro-ralph "intent" ─▶ ralph infer → decompose → build chain
42
+ │ writes status.json (truth)
43
+ │ renders goal-checklist.md (view)
44
+ │ emits /goal prompt
45
+
46
+ ralph-execute ◀─┐ runs next step:
47
+ │ │ internal → Skill()
48
+ │ │ external → delegate (STOP→callback)
49
+ │ │ decision → Skill("maestro-ralph")
50
+ └─────────┘ updates status.json + re-renders checklist
51
+ loop until done | paused
52
+ ```
53
+
54
+ `status.json` 是唯一真源;checklist 是渲染视图。决策节点是链路生长点(`post-goal-audit` 插入按子目标的 mini-loop;`post-verify/review/test` 插入修复 loop)。评估只走 ralph,执行只走 ralph-execute,两者不互相替代。
37
55
  </purpose>
38
56
 
39
57
  <context>
@@ -68,8 +86,9 @@ Remaining → intent
68
86
  S_PARSE_ROUTE — 解析参数、路由入口 PERSIST: —
69
87
  S_STATUS — 显示 session 进度 PERSIST: —
70
88
  S_CONTINUE — 恢复执行 PERSIST: —
71
- S_INFER state.json、推断生命周期位置 PERSIST: session.lifecycle_position
72
- S_RESOLVE_PHASE 解析目标 phase PERSIST: session.phase
89
+ S_RESOLVE_PHASE 解析目标 phase + 标记 phase_is_new PERSIST: session.phase, session.phase_is_new
90
+ S_INFER 基于已解析 phase 推断 lifecycle_position PERSIST: session.lifecycle_position
91
+ S_QUALITY_MODE — 决定质量管线模式 PERSIST: session.quality_mode
73
92
  S_DECOMPOSE — 边界澄清、写执行准则+子目标清单 PERSIST: session.boundary_contract, .execution_criteria, .task_decomposition
74
93
  S_BUILD_CHAIN — 构建步骤链 PERSIST: session.steps[]
75
94
  S_CREATE_SESSION — 写 status.json PERSIST: session (全量)
@@ -86,7 +105,7 @@ S_PARSE_ROUTE:
86
105
  → S_STATUS WHEN: intent == "status"
87
106
  → S_CONTINUE WHEN: intent == "continue"
88
107
  → S_DECISION_EVAL WHEN: running session with decision step in "running" status
89
- S_INFER WHEN: intent is non-empty
108
+ S_RESOLVE_PHASE WHEN: intent is non-empty ← phase 必须先于 position
90
109
  → S_FALLBACK WHEN: no intent AND no running session
91
110
 
92
111
  S_STATUS:
@@ -96,15 +115,18 @@ S_CONTINUE:
96
115
  → S_DISPATCH WHEN: running session found
97
116
  → S_FALLBACK WHEN: no running session DO: display "无运行中的 ralph 会话"
98
117
 
99
- S_INFER:
100
- → S_RESOLVE_PHASE WHEN: position resolved DO: A_INFER_POSITION
101
- → S_FALLBACK WHEN: cannot infer
102
-
103
118
  S_RESOLVE_PHASE:
104
- S_DECOMPOSE WHEN: phase resolved or null DO: A_RESOLVE_PHASE
119
+ S_INFER WHEN: phase resolved or null DO: A_RESOLVE_PHASE
105
120
  → S_FALLBACK WHEN: ambiguous
106
121
  GUARD: auto_confirm does NOT skip phase ambiguity
107
122
 
123
+ S_INFER:
124
+ → S_QUALITY_MODE WHEN: position resolved DO: A_INFER_POSITION
125
+ → S_FALLBACK WHEN: cannot infer
126
+
127
+ S_QUALITY_MODE:
128
+ → S_DECOMPOSE DO: A_DETERMINE_QUALITY_MODE
129
+
108
130
  S_DECOMPOSE:
109
131
  → S_BUILD_CHAIN DO: A_DECOMPOSE_TASKS
110
132
  GUARD: broad intent (重构/全面/重写/迁移/overhaul/migrate/rewrite) → MUST clarify boundary even if auto_confirm
@@ -162,7 +184,36 @@ S_FALLBACK:
162
184
  1. Find latest ralph session (by created_at)
163
185
  2. Display: Session, Status, Position, Progress, Current step
164
186
  3. List steps: [✓] completed, [▸] current, [ ] pending, [◆] decision
165
- 4. If `task_decomposition` present: show `Sub-goals: {done}/{total}` and any unmet G-ids (graceful skip if field absent — backward compat)
187
+ 4. If `task_decomposition` present (graceful skip if absent — backward compat):
188
+ ```
189
+ Sub-goals ({done}/{total}) source: {session_dir}/status.json#/task_decomposition
190
+ [x] G1 done_when={done_when} evidence={evidence}
191
+ [ ] G2 done_when={done_when} evidence={evidence} ◀ unmet
192
+ ...
193
+ Checklist view: {session_dir}/goal-checklist.md (regenerated from status.json)
194
+ ```
195
+ Reads state directly from `status.json.task_decomposition[*].status` — checklist is just a view, status.json wins on conflict.
196
+
197
+ ### A_RESOLVE_PHASE
198
+
199
+ **前置于 A_INFER_POSITION**——position 推断需要先知道 target phase 是否在 state.json 中已存在。
200
+
201
+ **Priority (产出 `phase` + `phase_is_new` 二元组):**
202
+
203
+ | Step | 行为 | phase_is_new |
204
+ |------|------|--------------|
205
+ | 1 | intent 匹配 `phase\s*(\d+)` 正则 → 取 state.json 中对应 phase | false |
206
+ | 2 | intent 派生短语(如 "docs-site-redesign", "auth-refactor")→ 在 state.json.milestones[*].phases / artifacts[*].path 中查找 | false (匹配) / true (无匹配) |
207
+ | 3 | 未派生 → 取最新 in-progress artifact 的 phase | false |
208
+ | 4 | 仍无 → state.json 首个 incomplete phase | false |
209
+ | 5 | position 将是 brainstorm/init/roadmap → phase = null | n/a |
210
+ | 6 | 仍模糊 → `AskUserQuestion`(新 phase / 已存在 phase 二选一) | 由用户回答确定 |
211
+
212
+ **写入 session**: `phase`(字符串或 null)+ `phase_is_new`(bool)。`phase_is_new=true` 表示当前 milestone 下需要为这个 phase 创建全套生命周期(A_INFER_POSITION 据此强制起始位置)。
213
+
214
+ **新派生 phase 时 milestone 处理**:
215
+ - 若 state.json 当前 milestone 仍 active → 沿用当前 milestone,仅新增 phase
216
+ - 若 intent 同时派生了新 milestone 名(如 "M1-visual-replication")→ 写入 session 但**仅作标签**;state.json.milestones 由后续 `maestro-roadmap` / `maestro-milestone-release` 真实创建。session 层面禁止虚构 milestone 直接改 state.json
166
217
 
167
218
  ### A_INFER_POSITION
168
219
 
@@ -175,18 +226,22 @@ S_FALLBACK:
175
226
  | No `.workflow/` + no source files | `brainstorm` |
176
227
  | No `.workflow/` + has source files | `init` |
177
228
  | Has `.workflow/` but no state.json | `init` |
178
- | Has state.json | → artifact-based inference |
229
+ | Has state.json | → phase-aware artifact inference |
179
230
 
180
- **Artifact-based inference:** Filter by current_milestone + target phase:
231
+ **Phase-aware artifact inference** (使用 A_RESOLVE_PHASE 已写入的 `session.phase` + `session.phase_is_new`):
181
232
 
182
- | Latest artifact type | Position |
183
- |---------------------|----------|
233
+ | Condition | Position |
234
+ |-----------|----------|
235
+ | `phase_is_new == true` (intent 派生的新 phase, state.json 中无) | **`analyze`** (强制从头起) |
184
236
  | no milestones or no roadmap.md | `roadmap` |
185
- | none for phase | `analyze` |
186
- | analyze | `plan` |
187
- | plan | `execute` |
188
- | execute | `verify` |
189
- | verify | refine from result files |
237
+ | `phase == null` (brainstorm/init/roadmap 已由 override 决定) | n/a |
238
+ | phase 已存在 + 无任何 artifact | `analyze` |
239
+ | phase 已存在 + 最新 artifact = analyze | `plan` |
240
+ | phase 已存在 + 最新 artifact = plan | `execute` |
241
+ | phase 已存在 + 最新 artifact = execute | `verify` |
242
+ | phase 已存在 + 最新 artifact = verify | → refine from result files |
243
+
244
+ **关键不变量**:artifact 过滤必须用 `session.phase`(A_RESOLVE_PHASE 已写入),而不是 state.json.current_phase。当 `phase_is_new` 时跳过过滤直接走 `analyze`,避免错用其他 phase 的 artifact 推断。
190
245
 
191
246
  **Refine from verify results:**
192
247
 
@@ -199,9 +254,17 @@ S_FALLBACK:
199
254
  | uat.md: all passed | `milestone-audit` |
200
255
  | uat.md: has failures | `test-failed` |
201
256
 
202
- ### A_RESOLVE_PHASE
257
+ ### A_DETERMINE_QUALITY_MODE
203
258
 
204
- Priority: 1) regex from intent 2) latest artifact's phase 3) first incomplete phase 4) null if brainstorm/init/roadmap 5) AskUserQuestion if ambiguous
259
+ 决定下游质量管线长度。读 `session.quality_mode_override`(CLI 标志 `--quality`),无则按规则推断:
260
+
261
+ | Condition | Mode | Pipeline (verify 之后) |
262
+ |-----------|------|-------------------------|
263
+ | Has `specs/REQ-*.md` + 当前 phase 业务范围明确 | `full` | business-test → review → test-gen → test |
264
+ | Default | `standard` | review → test-gen (当 coverage<80%) → test |
265
+ | `--quality quick` | `quick` | review --tier quick |
266
+
267
+ 写入 `session.quality_mode`。A_BUILD_STEPS 据此过滤 stage(见下)。
205
268
 
206
269
  ### A_DECOMPOSE_TASKS
207
270
 
@@ -242,37 +305,52 @@ narrow → derive defaults from intent + codebase, skip questions.
242
305
 
243
306
  ### A_BUILD_STEPS
244
307
 
245
- Generate steps from lifecycle_position to milestone-complete:
246
-
247
- | Stage | Skill | Type | Decision after |
248
- |-------|-------|------|----------------|
249
- | brainstorm | `maestro-brainstorm "{intent}"` | external | — |
250
- | init | `maestro-init` | internal | — |
251
- | roadmap | `maestro-roadmap "{intent}"` | internal | — |
252
- | analyze | `maestro-analyze {phase}` | external | — |
253
- | plan | `maestro-plan {phase}` | internal | — |
254
- | execute | `maestro-execute {phase}` | external | — |
255
- | verify | `maestro-verify {phase}` | internal | `post-verify` |
256
- | business-test | `quality-auto-test {phase}` | internal | `post-business-test` |
257
- | review | `quality-review {phase}` | internal | `post-review` |
258
- | test-gen | `quality-auto-test {phase}` | internal | — |
259
- | test | `quality-test {phase}` | internal | `post-test` |
260
- | milestone-audit | `maestro-milestone-audit` | internal | — |
261
- | goal-audit | *(decision-only, no skill)* | decision | `post-goal-audit` |
262
- | milestone-complete | `maestro-milestone-complete` | internal | `post-milestone` |
263
-
264
- `goal-audit` row is inserted **only when `task_decomposition` present**, immediately before `milestone-complete`. It is a pure decision node (no skill step) — its job is to re-check the goal-checklist and **dynamically grow `steps[]`** for unmet sub-goals.
308
+ Generate steps from `session.lifecycle_position` to `milestone-complete`(终点硬约束)。
309
+
310
+ | Stage | Skill | Type | Decision after | quality_mode |
311
+ |-------|-------|------|----------------|--------------|
312
+ | brainstorm | `maestro-brainstorm "{intent}"` | external | — | all |
313
+ | init | `maestro-init` | internal | — | all |
314
+ | roadmap | `maestro-roadmap "{intent}"` | internal | — | all |
315
+ | analyze | `maestro-analyze {phase}` | external | — | all |
316
+ | plan | `maestro-plan {phase}` | internal | — | all |
317
+ | execute | `maestro-execute {phase}` | external | — | all |
318
+ | verify | `maestro-verify {phase}` | internal | `post-verify` | all |
319
+ | business-test | `quality-auto-test {phase}` | internal | `post-business-test` | **full only** |
320
+ | review | `quality-review {phase}` | internal | `post-review` | all (quick: append `--tier quick`) |
321
+ | test-gen | `quality-auto-test {phase}` | internal | — | full / standard if coverage<80% |
322
+ | test | `quality-test {phase}` | internal | `post-test` | full, standard |
323
+ | milestone-audit | `maestro-milestone-audit` | internal | — | all |
324
+ | goal-audit | *(decision-only, no skill)* | decision | `post-goal-audit` | all (only if decomposed) |
325
+ | milestone-complete | `maestro-milestone-complete` | internal | `post-milestone` | all (chain 终点) |
265
326
 
266
327
  Type rationale: `internal` = Skill(), lightweight/interactive; `external` = delegate --to claude, context-isolated heavy computation
267
328
 
268
- Build rules: start from position, skip completed, insert decision nodes with `{ retry_count: 0, max_retries: 2 }`, args use placeholders resolved at execution time by ralph-execute. Steps dynamically inserted by `post-goal-audit` carry optional `goal_ref: "G{n}"` tracing which sub-goal they serve.
329
+ **Build rules (按顺序应用):**
330
+
331
+ 1. **起点**:从 `session.lifecycle_position` 开始;不读 `state.json.current_phase`
332
+ 2. **跳过已完成**:跳过当前 milestone+phase 下已有 completed artifact 的 stage(artifact 过滤同样按 `session.phase`,不按 state.json 当前 phase)
333
+ 3. **quality_mode 过滤**:按 `session.quality_mode` 排除上表 `quality_mode` 列不包含该模式的 stage(如 standard 不跑 business-test、quick 不跑 test-gen/test)
334
+ 4. **决策节点**:每个 Decision after 非空的 stage 之后插入 `{ type: "decision", decision: "<gate>", retry_count: 0, max_retries: 2 }`
335
+ 5. **goal-audit 插入**:当且仅当 `task_decomposition` 存在 → 在最后一个 evidence-producing stage(verify/review/test)之后、`milestone-complete` 之前插入 `decision:post-goal-audit`
336
+ 6. **终点硬约束**:chain 必须以 `milestone-complete` 步骤结尾(除非 `lifecycle_position` 已是 `milestone-complete` 之后的状态)。生成器在收尾时不论 quality_mode 都必须 append 该 step
337
+ 7. **初始 goal_ref 传播**:若 `task_decomposition` 存在,遍历每个新建 step:
338
+ - 计算 `step.stage`(如 execute/verify/review)
339
+ - 对每个 `g ∈ task_decomposition`:若 `step.stage ∈ g.lifecycle` → `step.goal_ref = g.id`
340
+ - 多 G 匹配 → 取 id 字典序最小者;保证 verify/review 等共用 lifecycle 的 step 也有可追溯标签
341
+ - decision 节点不打 goal_ref(goal-audit 自身除外,它的 verdict 直接修改 task_decomposition)
342
+ 8. **占位符**:args 用 `{phase}` `{intent}` 等,由 ralph-execute 在执行时解析
343
+ 9. **动态插入**:`post-goal-audit` 触发 A_APPLY_GOAL_FIX 时插入的步骤同样按规则 7 打 `goal_ref`(追溯到触发它的子目标 G{n})
269
344
 
270
345
  ### A_CREATE_SESSION
271
346
 
272
- 1. Write `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json` (see Appendix: Session Schema) — include decomposition fields only if produced (additive)
273
- 2. If `task_decomposition` present: write `{session_dir}/goal-checklist.md` (see Appendix: Goal Checklist Template) — stable within session, referenced verbatim by `/goal`
347
+ 1. Write `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json` (Appendix: Session Schema) — decomposition fields included only if produced (additive)
348
+ 2. If `task_decomposition` present:
349
+ - Set `session.goal_checklist_path = "{session_dir}/goal-checklist.md"` in status.json
350
+ - **Render** checklist from status.json (Appendix: Goal Checklist Template + Sync Rule). This is a one-way projection — status.json drives content; the file is never hand-edited
351
+ - Stable filename within session (so `/goal` condition string survives context compaction)
274
352
  3. Display chain overview with step list
275
- 4. If `task_decomposition` present: display the **Goal Prompt block** (Appendix: Goal Prompt Template) — the copy-paste `/goal …` line binding the checklist as a Stop-hook target
353
+ 4. If `task_decomposition` present: display the **Goal Prompt block** (Appendix: Goal Prompt Template) — the copy-paste `/goal …` line binds status.json + checklist as a Stop-hook target
276
354
 
277
355
  ### A_DELEGATE_EVALUATE
278
356
 
@@ -311,20 +389,37 @@ Build rules: start from position, skip completed, insert decision nodes with `{
311
389
 
312
390
  ### A_GOAL_AUDIT_EVALUATE
313
391
 
314
- Re-checks the goal-checklist and decides whether `steps[]` must dynamically grow. Only runs when `task_decomposition` present.
392
+ Re-checks sub-goals against `status.json` (source of truth) and decides whether `steps[]` must dynamically grow. Only runs when `task_decomposition` present.
315
393
 
316
- 1. Read `session.task_decomposition` + `goal_checklist_path`
394
+ 1. Read `session.task_decomposition` from status.json (NOT from checklist — checklist is just a view)
317
395
  2. For each sub-goal `status != "done"`: resolve its `evidence` artifact (verification.json / review.json / uat.md / test path) under the current phase scratch dir
318
396
  3. Delegate read-only audit (run_in_background, STOP, wait):
319
397
  ```
320
- maestro delegate "PURPOSE: 审计子目标达成情况,决定是否需要补充执行步骤
321
- TASK: 逐个读取每个未完成子目标的 evidence 产物 | 对照 done_when 判定 met/unmet | 给出每个 unmet 子目标的差距
322
- CONTEXT: @{goal_checklist_path} @{evidence artifacts} | 执行准则: {execution_criteria} | 边界: {boundary_contract}
323
- EXPECTED: ---VERDICT--- STATUS(all_met|has_unmet) / UNMET=[{id:G2,gap:'...',target_phase:execute}] / CONFIDENCE_SCORE(0-100) ---END---
324
- CONSTRAINTS: 只评估不修改 | 严格按 done_when 判定 | 不得超出 boundary_contract"
398
+ maestro delegate "PURPOSE: 审计未完成子目标,判定哪些已达成、哪些仍需补步骤
399
+ TASK:
400
+ 1. 读取 status.json.task_decomposition 中每个 status!=done 的子目标
401
+ 2. 打开其 evidence 产物,对照 done_when 严格判定
402
+ 3. 输出 met / unmet 分类,unmet 给出差距 + 应回补的 target_phase
403
+ CONTEXT:
404
+ status.json = {session_dir}/status.json
405
+ checklist = {goal_checklist_path} (人类可读视图,仅供参考)
406
+ evidence = {evidence artifacts}
407
+ 执行准则 = {execution_criteria}
408
+ 边界契约 = {boundary_contract}
409
+ EXPECTED (单行 verdict 块,严格遵循):
410
+ ---VERDICT---
411
+ STATUS=all_met|has_unmet
412
+ UNMET=[{id:G2,gap:'...',target_phase:execute}, ...] # 空数组当 STATUS=all_met
413
+ CONFIDENCE_SCORE=0-100
414
+ ---END---
415
+ CONSTRAINTS:
416
+ - 只评估,不修改任何文件
417
+ - 严格按 done_when 判定;evidence 缺失 → 视为 unmet
418
+ - 不得建议超出 boundary_contract 的修改
419
+ "
325
420
  --role analyze --mode analysis
326
421
  ```
327
- 4. On callback: parse UNMET list. For each met sub-goal → set `task_decomposition[i].status="done"` + flip `[ ]→[x]` in goal-checklist.md
422
+ 4. On callback: parse UNMET list. **status.json is the write target** — for each met sub-goal: `task_decomposition[i].status="done"` + `task_decomposition[i].completed_at=now`. Then regenerate checklist view from status.json (see Sync Rule in Appendix).
328
423
  5. **Decision log**: append to `{session_dir}/decisions.ndjson` with `"type": "goal-gate"`, `unmet_count`, `unmet_ids`
329
424
  6. Verdict: `all_met` → A_APPLY_GOAL_DONE; `has_unmet` → A_APPLY_GOAL_FIX
330
425
  GUARD: retry_count >= max_retries AND still unmet → A_APPLY_ESCALATE (insert quality-debug, hand to human)
@@ -357,10 +452,10 @@ Re-checks the goal-checklist and decides whether `steps[]` must dynamically grow
357
452
 
358
453
  ### A_APPLY_GOAL_DONE
359
454
 
360
- 1. Set all `task_decomposition[*].status="done"`, write status.json
361
- 2. Append `ALL_GOALS_DONE` sentinel line to goal-checklist.md (satisfies the user's `/goal` Stop hook)
455
+ 1. Write status.json (source of truth): set every `task_decomposition[*].status="done"`, `completed_at=now`, plus top-level `task_decomposition_all_done=true`
456
+ 2. Regenerate `goal-checklist.md` from status.json (Sync Rule in Appendix) — all boxes flip to `[x]`, sentinel `ALL_GOALS_DONE` appended at file end
362
457
  3. Mark goal-audit decision completed; proceed to `milestone-complete`
363
- 4. Display: ◆ Goal audit: 全部子目标达成 ✓ — checklist 已写入 ALL_GOALS_DONE
458
+ 4. Display: ◆ Goal audit: 全部子目标达成 ✓ — status.json + checklist 已同步 ALL_GOALS_DONE
364
459
 
365
460
  ### A_ADVANCE_MILESTONE
366
461
 
@@ -387,8 +482,9 @@ Re-checks the goal-checklist and decides whether `steps[]` must dynamically grow
387
482
  "session_id": "ralph-{YYYYMMDD-HHmmss}",
388
483
  "source": "ralph", "status": "running",
389
484
  "intent": "", "lifecycle_position": "",
390
- "phase": null, "milestone": "",
391
- "auto_mode": false, "quality_mode": "standard",
485
+ "phase": null, "phase_is_new": false, "milestone": "",
486
+ "auto_mode": false,
487
+ "quality_mode": "standard", // "full" | "standard" | "quick" — 由 A_DETERMINE_QUALITY_MODE 写入
392
488
  "cli_tool": "claude", "passed_gates": [],
393
489
  "context": { "issue_id": null, "scratch_dir": null, "plan_dir": null,
394
490
  "analysis_dir": null, "brainstorm_dir": null },
@@ -404,15 +500,18 @@ Re-checks the goal-checklist and decides whether `steps[]` must dynamically grow
404
500
  "execution_criteria": [],
405
501
  "task_decomposition": [
406
502
  { "id": "G1", "goal": "", "boundary": "", "done_when": "",
407
- "evidence": "", "lifecycle": [], "status": "pending|done" }
503
+ "evidence": "", "lifecycle": [], "status": "pending|done",
504
+ "completed_at": null }
408
505
  ],
409
- "goal_checklist_path": ""
506
+ "task_decomposition_all_done": false,
507
+ "goal_checklist_path": "",
508
+ "goal_checklist_synced_at": null
410
509
  }
411
510
  ```
412
511
 
413
- > **Extensibility contract (two dimensions)**:
414
- > 1. **Schema-additive** decomposition block fields are optional; absence = old behavior.
415
- > 2. **Step-dynamic** `steps[]` is a *living array*: `post-goal-audit` (and existing fix/escalate/milestone decisions) **append/reindex steps at runtime** until sub-goals converge. The JSON "extends" primarily by growing `steps[]`, not by freezing a plan. `goal_ref` (optional, default null) traces dynamically-added steps back to the sub-goal that spawned them.
512
+ **扩展约定**:
513
+ - Schema 加字段 = 可选(缺省 = 旧行为);不删/不改既有字段名。
514
+ - `steps[]` 是活数组:`post-goal-audit` `post-verify/review/test` 等决策节点按需追加+重排,子目标收敛即停。`goal_ref`(可选)回溯每条动态插入步骤所属子目标。
416
515
 
417
516
  ### Fix-Loop Templates
418
517
 
@@ -472,48 +571,76 @@ decision:post-goal-audit {retry+1}
472
571
  ```
473
572
  Notes: only unmet sub-goals' phases are re-run (no full-pipeline replay); inserted steps carry `goal_ref` for traceability; loop exits when audit returns `all_met` (→ A_APPLY_GOAL_DONE) or retry hits max (→ escalate to human). This keeps growth bounded.
474
573
 
475
- ### Goal Checklist Template
574
+ ### Goal Checklist Template (status.json projection)
476
575
 
477
- Written to `{session_dir}/goal-checklist.md`. Stable within the session; never renamed (so the `/goal` condition string stays valid across context compaction).
576
+ `{session_dir}/goal-checklist.md` `status.json` 的只读投影:不要手改,永远从 JSON 重渲染。文件名在 session 内稳定,`/goal` 条件字符串跨上下文压缩仍可用。
478
577
 
479
578
  ```markdown
480
579
  # Ralph Goal Checklist — {session_id}
481
- > Intent: {intent}
580
+ <!-- AUTO-GENERATED from status.json. Source: ../status.json#/task_decomposition -->
581
+
582
+ > Intent : {intent}
583
+ > Source : `{session_dir}/status.json` (authoritative)
584
+ > Last sync : {ISO} Phase: {phase} Milestone: {milestone}
585
+
586
+ ## Resume / 恢复入口
587
+ **不要直接执行 skill,调用入口:**
588
+ ```
589
+ /maestro-ralph continue
590
+ ```
591
+ ralph 评估下一步门控,ralph-execute 跑实际步骤。Stop hook 触发时也走这条路径。
482
592
 
483
593
  ## 执行准则 / Execution Criteria
594
+ <!-- status.json#/execution_criteria -->
484
595
  - {criterion 1}
485
596
  - {criterion 2}
486
597
 
487
598
  ## 边界契约 / Boundary Contract
488
- - In scope: {in_scope}
489
- - Out of scope: {out_of_scope}
490
- - Constraints: {constraints}
491
- - Definition of Done: {definition_of_done}
492
-
493
- ## 子目标 / Sub-goals
494
- - [ ] G1: {goal} — done when: {done_when} (evidence: {evidence})
495
- - [ ] G2: {goal} — done when: {done_when} (evidence: {evidence})
496
- - [ ] G3: ...
497
-
498
- <!-- ralph-execute flips [ ]→[x] when a sub-goal's evidence artifact confirms done;
499
- appends the line `ALL_GOALS_DONE` once every box is [x]. -->
599
+ <!-- status.json#/boundary_contract -->
600
+ - In scope : {in_scope}
601
+ - Out of scope : {out_of_scope}
602
+ - Constraints : {constraints}
603
+ - Definition of Done : {definition_of_done}
604
+
605
+ ## 子目标 / Sub-goals ({done}/{total})
606
+ <!-- status.json#/task_decomposition -->
607
+ - [ ] G1 — {goal}
608
+ done_when : {done_when}
609
+ evidence : {evidence}
610
+ lifecycle : {lifecycle}
611
+ <!-- ref: status.json#/task_decomposition/0 status=pending -->
612
+ - [x] G2 — {goal}
613
+ done_when : {done_when}
614
+ evidence : {evidence}
615
+ <!-- ref: status.json#/task_decomposition/1 status=done completed_at={ISO} -->
616
+ - [ ] G3 — ...
617
+
618
+ <!-- A_APPLY_GOAL_DONE 在全部 status=done 时在文件末尾追加 ALL_GOALS_DONE -->
500
619
  ```
501
620
 
502
- `maestro-ralph-execute` responsibility (additive, optional): after a step whose `lifecycle` covers a sub-goal, re-check that sub-goal's `evidence` artifact; if satisfied, set `task_decomposition[i].status="done"` in status.json AND flip its checkbox in goal-checklist.md. When all done → append `ALL_GOALS_DONE`. If decomposition fields absent → do nothing (old behavior).
621
+ ### Sync Rule (status.json goal-checklist.md)
622
+
623
+ 单向投影;status.json 为真源;冲突时直接重渲染,不合并。
624
+
625
+ 1. 只有 ralph / ralph-execute 写 `task_decomposition[*].status`;markdown 不可写入状态。
626
+ 2. `task_decomposition` / `execution_criteria` / `boundary_contract` 任一变化 → 立即重渲染 checklist。
627
+ 3. 全部 `status="done"` → 在文件末追加 `ALL_GOALS_DONE` 哨兵行。
628
+ 4. 检测到 checklist 缺失或与 JSON 漂移 → 直接重渲染覆盖;视 markdown 为可丢弃产物。
629
+ 5. ralph-execute(可选、向后兼容):完成 `lifecycle` 覆盖某子目标的 step 后,校验 evidence;满足则置 `status="done"` + 重渲染。无 `task_decomposition` 字段 → 不动作。
503
630
 
504
631
  ### Goal Prompt Template
505
632
 
506
- Displayed verbatim after the chain overview (only when decomposition produced):
633
+ 链路概览后逐字显示(仅当 decomposition 已产出):
507
634
 
508
635
  ```
509
- 📋 任务分解完成。可选(推荐):复制下面一行设定目标,让会话在所有子目标达成前不停:
636
+ 📋 任务分解完成。复制下面一行设定目标,会话在子目标全部达成前不停:
510
637
 
511
- /goal {session_dir}/goal-checklist.md 中所有子目标复选框均为 [x] 且文件含 ALL_GOALS_DONE 哨兵时目标达成;否则依据文件内"执行准则"继续推进未完成子目标,不得超出边界契约范围
638
+ /goal 目标达成条件: {session_dir}/status.json 中 task_decomposition[*].status 全部为 "done"(等价: {session_dir}/goal-checklist.md 末尾含 ALL_GOALS_DONE)。未达成时: 阅读 {session_dir}/goal-checklist.md 取得"执行准则/边界契约/子目标"作为行动手册, 然后调用 /maestro-ralph continue 推进下一步; 严禁手动执行 skill 或越界修改 status.json.boundary_contract.out_of_scope。
512
639
 
513
- 然后运行 /maestro-ralph continue 开始执行。
640
+ 随后运行 /maestro-ralph continue 立即开始执行。
514
641
  ```
515
642
 
516
- > `/goal` 是 harness 命令、仅用户可输入 — ralph 只输出此提示词,不能自行注册。这与 status.json 的可扩展约定一致:绑定是用户侧、可选的增量能力。
643
+ `/goal` 是 harness 命令,仅用户能输入;ralph 只能输出此提示词。判据以 status.json 为权威,哨兵为等价信号,避免视图漂移误判。
517
644
 
518
645
  ### Error Codes
519
646
 
@@ -531,14 +658,22 @@ Displayed verbatim after the chain overview (only when decomposition produced):
531
658
 
532
659
  ### Success Criteria
533
660
 
661
+ - [ ] Phase 先于 position 解析(S_RESOLVE_PHASE → S_INFER → S_QUALITY_MODE);phase_is_new 标记写入 session
662
+ - [ ] phase_is_new=true 时 lifecycle_position 强制为 `analyze`(禁止用其他 phase 的 artifact 推断)
663
+ - [ ] artifact 过滤始终按 session.phase(不读 state.json.current_phase)
664
+ - [ ] quality_mode 显式由 A_DETERMINE_QUALITY_MODE 决定(full/standard/quick),过滤 build steps
534
665
  - [ ] State parsed, position inferred from bootstrap + artifacts + result files
535
666
  - [ ] Decomposition runs as initial step; broad intent boundary-clarified via ≤3 questions (ignores auto_confirm); narrow auto-derives
536
667
  - [ ] status.json enriched additively with boundary_contract + execution_criteria + task_decomposition; absent fields = old behavior preserved
537
- - [ ] goal-checklist.md generated with verifiable done_when mapped to ralph evidence + ALL_GOALS_DONE sentinel
538
- - [ ] Goal Prompt emitted for user to bind via /goal
668
+ - [ ] status.json is single source of truth; goal-checklist.md is a regenerated projection (Sync Rule), never hand-edited
669
+ - [ ] goal-checklist.md carries explicit `status.json#/task_decomposition[i]` JSON-pointer refs per entry + last-sync timestamp
670
+ - [ ] Mutations to task_decomposition trigger checklist re-render; ALL_GOALS_DONE sentinel appended only when all entries status=done
671
+ - [ ] Goal Prompt names status.json as the authoritative judgement source, with ALL_GOALS_DONE sentinel as equivalent signal
539
672
  - [ ] post-goal-audit decision node inserted before milestone-complete (only when decomposed)
540
673
  - [ ] Unmet sub-goals DYNAMICALLY grow steps[] via scoped per-goal mini-loops (goal_ref tagged), looping until all_met or max retries → escalate
541
- - [ ] Quality pipeline generated: verify business-test review test-gen → test
674
+ - [ ] Quality pipeline quality_mode 生成(full=全管线 / standard=skip business-test / quick=仅 review --tier quick)
675
+ - [ ] Chain 末端硬约束:必须以 `milestone-complete` 结尾(goal-audit decision 紧前)
676
+ - [ ] 初始构建按 task_decomposition[*].lifecycle 给每个 step 打 goal_ref(verify/review 等共用 lifecycle 的 step 也有标签)
542
677
  - [ ] Decision nodes delegate-evaluated via maestro delegate --role analyze
543
678
  - [ ] Verdict parsed with confidence adjustment
544
679
  - [ ] Fix-loop templates applied with retry tracking
@@ -138,18 +138,20 @@ S_FALLBACK:
138
138
 
139
139
  ### A_DECOMPOSE_TASKS
140
140
 
141
- Shares the decomposition contract with maestro-ralph `A_DECOMPOSE_TASKS` **reference that spec; do not duplicate the table logic here.** Condensed:
142
-
143
- 1. Classify intent breadth (broad: 重构/全面/重写/迁移/overhaul/migrate/rewrite; narrow: single file/function/bug). Skip entirely for narrow / single-step / {status,init,quick} chains
144
- 2. Broad/medium → `AskUserQuestion` ≤3 rounds: Scope (in/out) | Constraints (compat/API/perf/test bar) | Definition of Done
145
- 3. Derive `execution_criteria` (3-6 imperative rules) + `task_decomposition` (outcome sub-goals, each `done_when` objectively verifiable and mapped to a ralph evidence artifact: verification.json / review.json / uat.md / test path)
146
- 4. Write `{session_dir}/goal-checklist.md` (same template as maestro-ralph) with `ALL_GOALS_DONE` sentinel; set `goal_checklist_path`
147
- 5. Append a `{ type: "decision", decision: "post-goal-audit", retry_count: 0, max_retries: 2 }` node as the FINAL node — after the last evidence-producing step (verify/review/test), before a milestone-complete/close-out step if the chain ends with one. (Audit needs evidence artifacts to exist.) ralph-execute then dynamically grows `steps[]` for unmet sub-goals
148
- 6. **Emit the `/goal` bind prompt:**
141
+ maestro-ralph `A_DECOMPOSE_TASKS` 共享分解契约 —— 引用该规范,不重复表格。Condensed:
142
+
143
+ 1. 分类意图广度(broad: 重构/全面/重写/迁移/overhaul/migrate/rewritenarrow: 单文件/函数/bug)。narrow / 单步 / `{status,init,quick}` 链直接跳过
144
+ 2. broad/medium → `AskUserQuestion` ≤3 轮:Scopein/out)| Constraints(兼容/API/perf/test)| Definition of Done
145
+ 3. 派生 `execution_criteria`(3-6 条命令式规则)+ `task_decomposition`(outcome 子目标,`done_when` 客观可校验,绑定到 ralph 产物:verification.json / review.json / uat.md / test path
146
+ 4. **status.json 为唯一真源**:写入 `boundary_contract` / `execution_criteria` / `task_decomposition` / `goal_checklist_path`;从 status.json 投影渲染 `{session_dir}/goal-checklist.md`(同 maestro-ralph Sync Rule,含 Resume 区块指向 `/maestro-ralph continue`)
147
+ 5. 在链路末尾(evidence 产出步骤之后、milestone-complete/close-out 之前)追加 `{ type: "decision", decision: "post-goal-audit", retry_count: 0, max_retries: 2 }`。ralph-execute 在该节点动态生长 `steps[]` 以收敛未达成子目标
148
+ 6. **输出 `/goal` 绑定提示词(参考文档 + 内嵌 ralph 调用):**
149
149
  ```
150
- 📋 任务分解完成。复制下面一行设定目标(推荐):
151
- /goal 当 {session_dir}/goal-checklist.md 中子目标全 [x] 且含 ALL_GOALS_DONE 时达成;否则按执行准则继续推进且不越边界契约
150
+ 📋 任务分解完成。复制下面一行设定目标,会话在子目标全部达成前不停:
151
+
152
+ /goal 目标达成条件: {session_dir}/status.json 中 task_decomposition[*].status 全部为 "done"(等价: {session_dir}/goal-checklist.md 末尾含 ALL_GOALS_DONE)。未达成时: 阅读 {session_dir}/goal-checklist.md 取得"执行准则/边界契约/子目标"作为行动手册, 然后调用 /maestro-ralph continue 推进下一步; 严禁手动执行 skill 或越界。
152
153
  ```
154
+ `/goal` 仅用户可输入;判据以 status.json 为权威,哨兵为等价信号。
153
155
 
154
156
  ### A_CREATE_SESSION
155
157
 
@@ -207,7 +209,7 @@ Unlisted commands have no auto flags.
207
209
 
208
210
  - [ ] Intent classified with task_type, complexity, clarity_score
209
211
  - [ ] Broad lifecycle intents decomposed (S_DECOMPOSE, ≤3 boundary questions) sharing maestro-ralph contract; narrow/single-step skip
210
- - [ ] Decomposition writes additive block + goal-checklist.md + post-goal-audit node; emits /goal bind prompt (no self-call, no phantom create_goal)
212
+ - [ ] status.json 为唯一真源;goal-checklist.md 为投影视图(Resume 区块内嵌 `/maestro-ralph continue`);post-goal-audit 节点追加;/goal 提示词内含"读 checklist + /maestro-ralph continue"双重指引
211
213
  - [ ] Chain selected and confirmed (or auto-confirmed)
212
214
  - [ ] Session dir created with status.json before execution; decomposition fields additive-only
213
215
  - [ ] Tracking via TodoWrite (Claude); status.json steps[] grown dynamically by ralph-execute post-goal-audit
@@ -251,18 +251,18 @@ Read `.workflow/state.json` and route by condition:
251
251
 
252
252
  ### A_DECOMPOSE_TASKS
253
253
 
254
- Shares the decomposition contract with maestro-ralph `A_DECOMPOSE_TASKS` **reference that spec; do not duplicate.** Condensed:
254
+ maestro-ralph `A_DECOMPOSE_TASKS` 共享分解契约 —— 引用该规范,不重复。Condensed:
255
255
 
256
- 1. Classify intent breadth. Skip for narrow / single-step / {status,init,quick} chains
257
- 2. Broad/medium → `AskUserQuestion` ≤3 rounds: Scope (in/out) | Constraints (compat/API/perf/test bar) | Definition of Done
258
- 3. Derive `execution_criteria` (3-6 imperative rules) + `task_decomposition` (outcome sub-goals; each `done_when` objectively verifiable, mapped to a ralph evidence artifact: verification.json / review.json / uat.md / test path)
259
- 4. Write `{session_dir}/goal-checklist.md` (same template as maestro-ralph) with `ALL_GOALS_DONE` sentinel; set `goal_checklist_path`
260
- 5. Append `{ type: "decision", decision: "post-goal-audit", retry_count: 0, max_retries: 2 }` as the FINAL node — after the last evidence-producing step (verify/review/test), before a milestone-complete/close-out step if present (audit needs evidence artifacts) → dynamic step growth for unmet sub-goals
256
+ 1. 分类意图广度。narrow / 单步 / `{status,init,quick}` 链跳过
257
+ 2. broad/medium → `AskUserQuestion` ≤3 轮:Scopein/out)| Constraints(兼容/API/perf/test)| Definition of Done
258
+ 3. 派生 `execution_criteria`(3-6 条命令式规则)+ `task_decomposition`(outcome 子目标,`done_when` 可校验,绑定到 ralph evidence 产物)
259
+ 4. **status.json 为唯一真源**:写入 `boundary_contract` / `execution_criteria` / `task_decomposition` / `goal_checklist_path`;从 status.json 投影渲染 `{session_dir}/goal-checklist.md`(同 maestro-ralph Sync Rule,含 Resume 区块指向 `$maestro --continue`)
260
+ 5. 链路末尾(evidence 产出步骤后、milestone-complete/close-out 前)追加 `{ type: "decision", decision: "post-goal-audit", retry_count: 0, max_retries: 2 }`。S_DECISION_EVAL 在该节点动态生长 `steps[]`
261
261
  6. **Register goal via `create_goal`:**
262
262
  ```
263
263
  create_goal({ objective: "Maestro {chain}: {intent} — converge {N} sub-goals within boundary",
264
264
  success_criteria: task_decomposition.map(g => `${g.id}: ${g.done_when}`),
265
- constraints: [...execution_criteria, "stay within boundary_contract"] })
265
+ constraints: [...execution_criteria, "stay within boundary_contract; resume via $maestro --continue"] })
266
266
  ```
267
267
 
268
268
  ### A_CREATE_SESSION
@@ -277,9 +277,13 @@ Shares the decomposition contract with maestro-ralph `A_DECOMPOSE_TASKS` — **r
277
277
  "steps": [{ "index", "type": "skill|decision", "skill", "args", "status": "pending", "goal_ref": null }],
278
278
  "waves": [], "current_step": 0, "status": "running",
279
279
  "_comment": "↓ OPTIONAL additive block — present only if S_DECOMPOSE ran; absent → flat-chain behavior",
280
- "boundary_contract": {}, "execution_criteria": [], "task_decomposition": [], "goal_checklist_path": "" }
280
+ "boundary_contract": {}, "execution_criteria": [],
281
+ "task_decomposition": [{ "id": "G1", "goal": "", "done_when": "", "evidence": "", "status": "pending|done", "completed_at": null }],
282
+ "task_decomposition_all_done": false,
283
+ "goal_checklist_path": "", "goal_checklist_synced_at": null }
281
284
  ```
282
285
  Decomposition fields written ONLY if A_DECOMPOSE_TASKS produced them (additive)
286
+ 4. goal-checklist.md 是 status.json 的投影:从 task_decomposition 渲染(同 maestro-ralph Sync Rule);Resume 区块写入 `$maestro --continue`
283
287
  4. Initialize tracking:
284
288
  - If decomposed: goal already registered by A_DECOMPOSE_TASKS. Else: `create_goal({ objective: "Maestro {chain}: {N} steps [{skill list}]" })`
285
289
  - `update_plan({ plan: steps.map(step => ({ step, status: "pending" })) })`
@@ -310,13 +314,13 @@ Direct in-context skill invocation — **replaces the old spawn/wave/CSV mechani
310
314
 
311
315
  ### A_GOAL_AUDIT_EVALUATE
312
316
 
313
- Entry action of S_DECISION_EVAL mirrors maestro-ralph `A_GOAL_AUDIT_EVALUATE` (reference that spec; do not duplicate). Condensed:
317
+ S_DECISION_EVAL 入口;镜像 maestro-ralph `A_GOAL_AUDIT_EVALUATE`。Condensed:
314
318
 
315
- 1. Read `session.task_decomposition` + `goal_checklist_path`
316
- 2. For each sub-goal `status != "done"`: resolve its `evidence` artifact under current phase scratch dir
317
- 3. Delegate read-only audit (`maestro delegate --role analyze --mode analysis`): for each unmet sub-goal, read evidence, judge against `done_when`, return `STATUS(all_met|has_unmet) / UNMET=[{id,gap,target_phase}]`
318
- 4. For each met sub-goal → set `task_decomposition[i].status="done"` + flip `[ ]→[x]` in goal-checklist.md; persist
319
- 5. Produce verdict (`all_met` / `has_unmet`) consumed by S_DECISION_EVAL transition. GUARD: retry >= max_retries AND still unmet → escalate
319
+ 1. `session.task_decomposition`(status.json,真源)
320
+ 2. 对每个 `status != "done"` 的子目标:解析 `evidence` 产物
321
+ 3. `maestro delegate --role analyze --mode analysis` 读取 evidence、对照 done_when 判定,返回 `STATUS=all_met|has_unmet / UNMET=[{id,gap,target_phase}] / CONFIDENCE_SCORE`
322
+ 4. status.json 为写入目标:每个达成子目标 `status="done"` + `completed_at=now`;然后从 status.json 重渲染 checklist(Sync Rule)
323
+ 5. Verdict(`all_met` / `has_unmet`)由 S_DECISION_EVAL 消费。GUARD: retry >= max_retries AND still unmet → escalate
320
324
 
321
325
  ### A_APPLY_GOAL_FIX
322
326
 
@@ -324,9 +328,10 @@ Entry action of S_DECISION_EVAL — mirrors maestro-ralph `A_GOAL_AUDIT_EVALUATE
324
328
 
325
329
  ### A_APPLY_GOAL_DONE
326
330
 
327
- 1. Set all `task_decomposition[*].status="done"`, persist; append `ALL_GOALS_DONE` to goal-checklist.md
328
- 2. `update_goal({ status: "complete" })` release decomposition goal
329
- 3. Proceed to chain's terminal step
331
+ 1. status.json(真源):全部 `task_decomposition[*].status="done"` + `completed_at=now` + `task_decomposition_all_done=true`
332
+ 2. status.json 重渲染 `goal-checklist.md`(见 Sync Rule);文件末追加 `ALL_GOALS_DONE`
333
+ 3. `update_goal({ status: "complete" })` —— 释放分解 goal
334
+ 4. 继续到 chain 的终结步骤
330
335
 
331
336
  ### A_FINALIZE
332
337
 
@@ -464,6 +469,7 @@ Entry action of S_DECISION_EVAL — mirrors maestro-ralph `A_GOAL_AUDIT_EVALUATE
464
469
  - [ ] Intent classified and chain resolved
465
470
  - [ ] Broad lifecycle intents decomposed (S_DECOMPOSE, ≤3 boundary questions) sharing maestro-ralph contract; narrow/single-step skip
466
471
  - [ ] Goal registered via built-in `create_goal`; status.json decomposition fields additive-only
472
+ - [ ] status.json 为唯一真源;goal-checklist.md 是从 JSON 重渲染的投影视图(Resume 区块指向 `$maestro --continue`)
467
473
  - [ ] post-goal-audit node appended as final node (after evidence-producing steps); unmet sub-goals dynamically grow steps[] (goal_ref tagged)
468
474
  - [ ] Session dir initialized with status.json before first step
469
475
  - [ ] Every skill invoked DIRECTLY in-context — NO spawn_agents_on_csv, NO wave/CSV/worker