maestro-flow 0.3.45 → 0.3.47

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 (289) hide show
  1. package/.claude/agents/ui-design-agent.md +1 -0
  2. package/.claude/agents/workflow-executor.md +3 -0
  3. package/.claude/commands/learn-decompose.md +91 -146
  4. package/.claude/commands/learn-follow.md +102 -137
  5. package/.claude/commands/learn-investigate.md +102 -167
  6. package/.claude/commands/learn-retro.md +100 -243
  7. package/.claude/commands/learn-second-opinion.md +95 -135
  8. package/.claude/commands/maestro-amend.md +95 -232
  9. package/.claude/commands/maestro-analyze.md +1 -6
  10. package/.claude/commands/maestro-collab.md +104 -265
  11. package/.claude/commands/maestro-composer.md +113 -293
  12. package/.claude/commands/maestro-execute.md +11 -17
  13. package/.claude/commands/maestro-impeccable.md +89 -0
  14. package/.claude/commands/maestro-plan.md +1 -6
  15. package/.claude/commands/maestro-player.md +111 -340
  16. package/.claude/commands/maestro-quick.md +9 -0
  17. package/.claude/commands/maestro-ralph-execute.md +167 -210
  18. package/.claude/commands/maestro-ralph.md +245 -426
  19. package/.claude/commands/maestro-tools-register.md +28 -7
  20. package/.claude/commands/maestro-ui-codify.md +13 -0
  21. package/.claude/commands/maestro-ui-craft.md +364 -0
  22. package/.claude/commands/maestro-ui-design.md +12 -1
  23. package/.claude/commands/maestro-verify.md +12 -13
  24. package/.claude/commands/maestro.md +142 -72
  25. package/.claude/commands/manage-knowhow-capture.md +45 -161
  26. package/.claude/commands/quality-auto-test.md +9 -0
  27. package/.claude/commands/quality-debug.md +11 -24
  28. package/.claude/commands/quality-refactor.md +9 -0
  29. package/.claude/commands/quality-review.md +5 -13
  30. package/.claude/commands/quality-test.md +5 -0
  31. package/.claude/commands/spec-add.md +1 -1
  32. package/.claude/commands/spec-load.md +3 -2
  33. package/.claude/skills/maestro-help/SKILL.md +264 -0
  34. package/.claude/skills/maestro-help/index/catalog.json +182 -0
  35. package/.claude/skills/maestro-help/phases/01-parse-intent.md +122 -0
  36. package/.claude/skills/maestro-help/phases/02-search-present.md +181 -0
  37. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +186 -0
  38. package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
  39. package/.codex/agents/team-supervisor.toml +40 -0
  40. package/.codex/agents/team-worker.toml +63 -0
  41. package/.codex/skills/learn-decompose/SKILL.md +1 -1
  42. package/.codex/skills/learn-investigate/SKILL.md +2 -1
  43. package/.codex/skills/maestro/SKILL.md +278 -313
  44. package/.codex/skills/maestro-analyze/SKILL.md +126 -417
  45. package/.codex/skills/maestro-brainstorm/SKILL.md +129 -451
  46. package/.codex/skills/maestro-collab/SKILL.md +134 -547
  47. package/.codex/skills/maestro-execute/SKILL.md +4 -2
  48. package/.codex/skills/maestro-help/SKILL.md +213 -0
  49. package/.codex/skills/maestro-help/catalog.json +182 -0
  50. package/.codex/skills/maestro-impeccable/SKILL.md +112 -0
  51. package/.codex/skills/maestro-plan/SKILL.md +88 -437
  52. package/.codex/skills/maestro-player/SKILL.md +191 -333
  53. package/.codex/skills/maestro-quick/SKILL.md +2 -0
  54. package/.codex/skills/maestro-ralph/SKILL.md +307 -710
  55. package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
  56. package/.codex/skills/maestro-tools-register/SKILL.md +29 -7
  57. package/.codex/skills/maestro-ui-codify/SKILL.md +1 -0
  58. package/.codex/skills/maestro-ui-craft/SKILL.md +341 -0
  59. package/.codex/skills/maestro-ui-design/SKILL.md +10 -0
  60. package/.codex/skills/maestro-verify/SKILL.md +116 -409
  61. package/.codex/skills/manage-knowhow-capture/SKILL.md +18 -3
  62. package/.codex/skills/quality-auto-test/SKILL.md +145 -443
  63. package/.codex/skills/quality-debug/SKILL.md +2 -1
  64. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  65. package/.codex/skills/quality-review/SKILL.md +1 -1
  66. package/.codex/skills/quality-test/SKILL.md +229 -507
  67. package/.codex/skills/spec-add/SKILL.md +1 -1
  68. package/README.md +4 -1
  69. package/README.zh-CN.md +3 -1
  70. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +3 -0
  71. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  72. package/dashboard/dist-server/dashboard/src/server/index.js +5 -3
  73. package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
  74. package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js +3 -3
  75. package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js.map +1 -1
  76. package/dashboard/dist-server/dashboard/src/server/routes/index.js +14 -5
  77. package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
  78. package/dashboard/dist-server/dashboard/src/server/routes/install.js +110 -1
  79. package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
  80. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.d.ts +2 -0
  81. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js +181 -0
  82. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js.map +1 -0
  83. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +56 -0
  84. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  85. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -0
  86. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  87. package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +2 -0
  88. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +2 -0
  89. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
  90. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.d.ts +2 -0
  91. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +58 -0
  92. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
  93. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +2 -2
  94. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
  95. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +2 -0
  96. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  97. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +3 -1
  98. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.d.ts +7 -2
  99. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js +7 -1
  100. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js.map +1 -1
  101. package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
  102. package/dashboard/dist-server/dashboard/src/shared/constants.js +9 -9
  103. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  104. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.d.ts +113 -0
  105. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js +6 -0
  106. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js.map +1 -0
  107. package/dashboard/dist-server/dashboard/src/shared/types.d.ts +4 -3
  108. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
  109. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  110. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  111. package/dist/src/agents/cli-agent-runner.js +1 -3
  112. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  113. package/dist/src/agents/cli-history-store.d.ts +5 -0
  114. package/dist/src/agents/cli-history-store.d.ts.map +1 -1
  115. package/dist/src/agents/cli-history-store.js +65 -13
  116. package/dist/src/agents/cli-history-store.js.map +1 -1
  117. package/dist/src/cli.js +13 -0
  118. package/dist/src/cli.js.map +1 -1
  119. package/dist/src/commands/command-help.d.ts +3 -0
  120. package/dist/src/commands/command-help.d.ts.map +1 -0
  121. package/dist/src/commands/command-help.js +60 -0
  122. package/dist/src/commands/command-help.js.map +1 -0
  123. package/dist/src/commands/config.d.ts.map +1 -1
  124. package/dist/src/commands/config.js +17 -0
  125. package/dist/src/commands/config.js.map +1 -1
  126. package/dist/src/commands/delegate.d.ts.map +1 -1
  127. package/dist/src/commands/delegate.js +12 -2
  128. package/dist/src/commands/delegate.js.map +1 -1
  129. package/dist/src/commands/impeccable.d.ts +10 -0
  130. package/dist/src/commands/impeccable.d.ts.map +1 -0
  131. package/dist/src/commands/impeccable.js +181 -0
  132. package/dist/src/commands/impeccable.js.map +1 -0
  133. package/dist/src/commands/knowhow.d.ts.map +1 -1
  134. package/dist/src/commands/knowhow.js +7 -4
  135. package/dist/src/commands/knowhow.js.map +1 -1
  136. package/dist/src/commands/spec.js +1 -1
  137. package/dist/src/commands/spec.js.map +1 -1
  138. package/dist/src/commands/wiki.d.ts.map +1 -1
  139. package/dist/src/commands/wiki.js +5 -1
  140. package/dist/src/commands/wiki.js.map +1 -1
  141. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  142. package/dist/src/config/cli-tools-config.js +10 -7
  143. package/dist/src/config/cli-tools-config.js.map +1 -1
  144. package/dist/src/core/addon-registry.d.ts +31 -0
  145. package/dist/src/core/addon-registry.d.ts.map +1 -0
  146. package/dist/src/core/addon-registry.js +28 -0
  147. package/dist/src/core/addon-registry.js.map +1 -0
  148. package/dist/src/hooks/plugins/spec-injection-plugin.js +9 -4
  149. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  150. package/dist/src/hooks/spec-injector.js +2 -2
  151. package/dist/src/hooks/spec-injector.js.map +1 -1
  152. package/dist/src/index.d.ts +2 -0
  153. package/dist/src/index.d.ts.map +1 -1
  154. package/dist/src/index.js +1 -0
  155. package/dist/src/index.js.map +1 -1
  156. package/dist/src/tools/impeccable/critique-storage.d.ts +28 -0
  157. package/dist/src/tools/impeccable/critique-storage.d.ts.map +1 -0
  158. package/dist/src/tools/impeccable/critique-storage.js +120 -0
  159. package/dist/src/tools/impeccable/critique-storage.js.map +1 -0
  160. package/dist/src/tools/impeccable/design-parser.d.ts +90 -0
  161. package/dist/src/tools/impeccable/design-parser.d.ts.map +1 -0
  162. package/dist/src/tools/impeccable/design-parser.js +696 -0
  163. package/dist/src/tools/impeccable/design-parser.js.map +1 -0
  164. package/dist/src/tools/impeccable/detect-csp.d.ts +6 -0
  165. package/dist/src/tools/impeccable/detect-csp.d.ts.map +1 -0
  166. package/dist/src/tools/impeccable/detect-csp.js +130 -0
  167. package/dist/src/tools/impeccable/detect-csp.js.map +1 -0
  168. package/dist/src/tools/impeccable/is-generated.d.ts +4 -0
  169. package/dist/src/tools/impeccable/is-generated.d.ts.map +1 -0
  170. package/dist/src/tools/impeccable/is-generated.js +56 -0
  171. package/dist/src/tools/impeccable/is-generated.js.map +1 -0
  172. package/dist/src/tools/impeccable/live/accept.d.ts +50 -0
  173. package/dist/src/tools/impeccable/live/accept.d.ts.map +1 -0
  174. package/dist/src/tools/impeccable/live/accept.js +556 -0
  175. package/dist/src/tools/impeccable/live/accept.js.map +1 -0
  176. package/dist/src/tools/impeccable/live/bootstrap.d.ts +2 -0
  177. package/dist/src/tools/impeccable/live/bootstrap.d.ts.map +1 -0
  178. package/dist/src/tools/impeccable/live/bootstrap.js +244 -0
  179. package/dist/src/tools/impeccable/live/bootstrap.js.map +1 -0
  180. package/dist/src/tools/impeccable/live/complete.d.ts +7 -0
  181. package/dist/src/tools/impeccable/live/complete.d.ts.map +1 -0
  182. package/dist/src/tools/impeccable/live/complete.js +67 -0
  183. package/dist/src/tools/impeccable/live/complete.js.map +1 -0
  184. package/dist/src/tools/impeccable/live/completion.d.ts +24 -0
  185. package/dist/src/tools/impeccable/live/completion.d.ts.map +1 -0
  186. package/dist/src/tools/impeccable/live/completion.js +26 -0
  187. package/dist/src/tools/impeccable/live/completion.js.map +1 -0
  188. package/dist/src/tools/impeccable/live/inject.d.ts +41 -0
  189. package/dist/src/tools/impeccable/live/inject.d.ts.map +1 -0
  190. package/dist/src/tools/impeccable/live/inject.js +394 -0
  191. package/dist/src/tools/impeccable/live/inject.js.map +1 -0
  192. package/dist/src/tools/impeccable/live/poll.d.ts +24 -0
  193. package/dist/src/tools/impeccable/live/poll.d.ts.map +1 -0
  194. package/dist/src/tools/impeccable/live/poll.js +180 -0
  195. package/dist/src/tools/impeccable/live/poll.js.map +1 -0
  196. package/dist/src/tools/impeccable/live/resume.d.ts +5 -0
  197. package/dist/src/tools/impeccable/live/resume.d.ts.map +1 -0
  198. package/dist/src/tools/impeccable/live/resume.js +30 -0
  199. package/dist/src/tools/impeccable/live/resume.js.map +1 -0
  200. package/dist/src/tools/impeccable/live/server.d.ts +6 -0
  201. package/dist/src/tools/impeccable/live/server.d.ts.map +1 -0
  202. package/dist/src/tools/impeccable/live/server.js +867 -0
  203. package/dist/src/tools/impeccable/live/server.js.map +1 -0
  204. package/dist/src/tools/impeccable/live/session-store.d.ts +72 -0
  205. package/dist/src/tools/impeccable/live/session-store.d.ts.map +1 -0
  206. package/dist/src/tools/impeccable/live/session-store.js +281 -0
  207. package/dist/src/tools/impeccable/live/session-store.js.map +1 -0
  208. package/dist/src/tools/impeccable/live/static/live-browser-session.js +123 -0
  209. package/dist/src/tools/impeccable/live/static/live-browser.js +4860 -0
  210. package/dist/src/tools/impeccable/live/static/modern-screenshot.umd.js +14 -0
  211. package/dist/src/tools/impeccable/live/status.d.ts +2 -0
  212. package/dist/src/tools/impeccable/live/status.d.ts.map +1 -0
  213. package/dist/src/tools/impeccable/live/status.js +52 -0
  214. package/dist/src/tools/impeccable/live/status.js.map +1 -0
  215. package/dist/src/tools/impeccable/live/wrap.d.ts +33 -0
  216. package/dist/src/tools/impeccable/live/wrap.d.ts.map +1 -0
  217. package/dist/src/tools/impeccable/live/wrap.js +572 -0
  218. package/dist/src/tools/impeccable/live/wrap.js.map +1 -0
  219. package/dist/src/tools/impeccable/load-context.d.ts +13 -0
  220. package/dist/src/tools/impeccable/load-context.d.ts.map +1 -0
  221. package/dist/src/tools/impeccable/load-context.js +79 -0
  222. package/dist/src/tools/impeccable/load-context.js.map +1 -0
  223. package/dist/src/tools/impeccable/paths.d.ts +34 -0
  224. package/dist/src/tools/impeccable/paths.d.ts.map +1 -0
  225. package/dist/src/tools/impeccable/paths.js +102 -0
  226. package/dist/src/tools/impeccable/paths.js.map +1 -0
  227. package/dist/src/tools/spec-entry-parser.d.ts +1 -1
  228. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  229. package/dist/src/tools/spec-entry-parser.js +1 -1
  230. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  231. package/dist/src/tools/spec-init.d.ts.map +1 -1
  232. package/dist/src/tools/spec-init.js +26 -1
  233. package/dist/src/tools/spec-init.js.map +1 -1
  234. package/dist/src/tools/spec-loader.d.ts +1 -1
  235. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  236. package/dist/src/tools/spec-loader.js +2 -0
  237. package/dist/src/tools/spec-loader.js.map +1 -1
  238. package/dist/src/tools/store-knowhow.d.ts.map +1 -1
  239. package/dist/src/tools/store-knowhow.js +15 -6
  240. package/dist/src/tools/store-knowhow.js.map +1 -1
  241. package/package.json +5 -3
  242. package/workflows/claude-instructions.md +17 -5
  243. package/workflows/cli-tools-usage.md +10 -3
  244. package/workflows/delegate-usage.md +3 -2
  245. package/workflows/impeccable/adapt.md +190 -0
  246. package/workflows/impeccable/animate.md +175 -0
  247. package/workflows/impeccable/audit.md +133 -0
  248. package/workflows/impeccable/bolder.md +113 -0
  249. package/workflows/impeccable/brand.md +118 -0
  250. package/workflows/impeccable/clarify.md +174 -0
  251. package/workflows/impeccable/codex.md +105 -0
  252. package/workflows/impeccable/cognitive-load.md +106 -0
  253. package/workflows/impeccable/color-and-contrast.md +105 -0
  254. package/workflows/impeccable/colorize.md +154 -0
  255. package/workflows/impeccable/craft.md +123 -0
  256. package/workflows/impeccable/critique.md +261 -0
  257. package/workflows/impeccable/delight.md +302 -0
  258. package/workflows/impeccable/distill.md +111 -0
  259. package/workflows/impeccable/document.md +439 -0
  260. package/workflows/impeccable/extract.md +69 -0
  261. package/workflows/impeccable/harden.md +347 -0
  262. package/workflows/impeccable/heuristics-scoring.md +234 -0
  263. package/workflows/impeccable/interaction-design.md +195 -0
  264. package/workflows/impeccable/layout.md +141 -0
  265. package/workflows/impeccable/live.md +622 -0
  266. package/workflows/impeccable/motion-design.md +109 -0
  267. package/workflows/impeccable/onboard.md +234 -0
  268. package/workflows/impeccable/optimize.md +258 -0
  269. package/workflows/impeccable/overdrive.md +130 -0
  270. package/workflows/impeccable/personas.md +179 -0
  271. package/workflows/impeccable/polish.md +242 -0
  272. package/workflows/impeccable/product.md +62 -0
  273. package/workflows/impeccable/quieter.md +99 -0
  274. package/workflows/impeccable/responsive-design.md +114 -0
  275. package/workflows/impeccable/shape.md +165 -0
  276. package/workflows/impeccable/spatial-design.md +100 -0
  277. package/workflows/impeccable/teach.md +168 -0
  278. package/workflows/impeccable/typeset.md +124 -0
  279. package/workflows/impeccable/typography.md +159 -0
  280. package/workflows/impeccable/ux-writing.md +107 -0
  281. package/workflows/impeccable.md +164 -0
  282. package/workflows/maestro.md +7 -3
  283. package/workflows/skill-authoring.md +265 -0
  284. package/workflows/specs-add.md +3 -2
  285. package/workflows/specs-load.md +2 -1
  286. package/workflows/specs-setup.md +21 -1
  287. package/workflows/tools-spec.md +20 -13
  288. package/.claude/commands/maestro-link-coordinate.md +0 -71
  289. package/.codex/skills/maestro-link-coordinate/SKILL.md +0 -257
@@ -0,0 +1,265 @@
1
+ # SKILL.md Authoring Standard
2
+
3
+ <purpose>
4
+ SKILL.md 的编写规范。核心原则:SKILL.md 是给 LLM agent 执行的状态机定义,不是给人读的操作手册。
5
+ </purpose>
6
+
7
+ ---
8
+
9
+ ## 1. Architecture: Hybrid State Machine
10
+
11
+ 采用"骨架状态机 + 肉身散文"的混合架构。顶层用显式状态转移定义控制流,ACTIONS 内部用结构化散文指导具体操作。
12
+
13
+ ### File Structure
14
+
15
+ ```
16
+ ---
17
+ frontmatter (name, description, argument-hint, allowed-tools)
18
+ ---
19
+
20
+ <purpose> <!-- 1-5 行:目标 + 拓扑图 + 入口点 -->
21
+ <context> <!-- 用法示例、flag 说明 -->
22
+ <invariants> <!-- 全局底线规则,独立于状态转移 -->
23
+
24
+ <state_machine>
25
+ <states> <!-- 显式声明所有状态节点 -->
26
+ <transitions> <!-- 每个状态的转移规则 -->
27
+ <actions> <!-- 具体操作逻辑,结构化散文 -->
28
+ </state_machine>
29
+
30
+ <appendix> <!-- 查阅型内容:schema、error codes、examples、success criteria -->
31
+ ```
32
+
33
+ ### Why Hybrid
34
+
35
+ - **纯状态机**(6.5/10):过度缩写导致 LLM 卡死或幻觉操作,丢失执行语境
36
+ - **纯散文**(5/10):LLM 需"阅读理解"提取转移条件,注意力分散,上下文寻址迷失
37
+ - **混合**(8.5/10):状态机路由 + 散文动作,兼顾确定性和可理解性
38
+
39
+ ---
40
+
41
+ ## 2. Section Specifications
42
+
43
+ ### `<invariants>` — Global Guard Rails
44
+
45
+ 保留为独立段落,不打散到 transitions 中。这些是 LLM 的系统级底线指令,无论处于哪个状态都必须遵守。
46
+
47
+ ```markdown
48
+ <invariants>
49
+ 1. CSV is Source of Truth — 所有状态持久化在 CSV/JSON,不在内存
50
+ 2. Wave Order is Sacred — 永远不执行 wave N+1 直到 wave N 完成
51
+ 3. Coordinator Never Executes — 只组装 prompt + spawn,不直接执行 skill 逻辑
52
+ </invariants>
53
+ ```
54
+
55
+ **规则**:
56
+ - 只放跨状态的全局约束
57
+ - 绑定到特定转移的条件放 `<transitions>` 的 GUARD 中
58
+ - 每条 invariant 必须可验证(有明确的违反判定条件)
59
+
60
+ ### `<states>` — Explicit State Declaration
61
+
62
+ 显式声明所有状态节点,每个节点含 1 行 rationale + PERSIST 字段。
63
+
64
+ ```markdown
65
+ <states>
66
+ S_INIT — 解析参数、路由入口 PERSIST: session.status
67
+ S_INFER — 推断生命周期位置 PERSIST: session.lifecycle_position
68
+ S_BUILD_CHAIN — 构建步骤链 PERSIST: session.steps[]
69
+ S_CONFIRM — 用户确认(auto_mode 跳过) PERSIST: —
70
+ S_WAVE_LOOP — 构建并执行下一波 PERSIST: session.waves[], session.current_step
71
+ S_DECISION — 委托评估 + 应用裁决 PERSIST: session.passed_gates[], step.retry_count
72
+ S_FIX_LOOP — 插入修复步骤并重索引 PERSIST: session.steps[] (expanded)
73
+ S_COMPLETE — 标记完成、释放目标 PERSIST: session.status = "completed"
74
+ S_PAUSED — 暂停等待人工介入 PERSIST: session.status = "paused"
75
+ S_FALLBACK — 兜底:条件不匹配时请求输入 PERSIST: session.status = "paused"
76
+ </states>
77
+ ```
78
+
79
+ **规则**:
80
+ - 每个 state 必须有 `PERSIST` 字段,明确写哪些 session/status/csv 字段
81
+ - `S_FALLBACK` 必须存在——当所有 WHEN 条件不满足时进入此状态,调用 `request_user_input`
82
+ - Rationale 限 1 行,不展开
83
+
84
+ ### `<transitions>` — State Transition Rules
85
+
86
+ 每个状态列出所有出边,格式:`→ TARGET WHEN: condition [GUARD: constraint] DO: action_ref`
87
+
88
+ ```markdown
89
+ <transitions>
90
+
91
+ S_INIT:
92
+ → S_INFER WHEN: intent is non-empty
93
+ → S_WAVE_LOOP WHEN: intent == "execute" | "continue"
94
+ → S_FALLBACK WHEN: no intent AND no running session
95
+
96
+ S_INFER:
97
+ → S_BUILD_CHAIN WHEN: position resolved
98
+ → S_FALLBACK WHEN: cannot infer position DO: show raw state
99
+
100
+ S_WAVE_LOOP:
101
+ → S_DECISION WHEN: next_step.type == "decision"
102
+ → S_WAVE_LOOP WHEN: next_step.type == "external" DO: A_BUILD_AND_SPAWN_WAVE
103
+ → S_COMPLETE WHEN: no pending steps
104
+ → S_PAUSED WHEN: step failed
105
+ GUARD: auto_mode → retry once then pause
106
+
107
+ S_DECISION:
108
+ → S_WAVE_LOOP WHEN: verdict == "proceed" DO: add to passed_gates
109
+ → S_FIX_LOOP WHEN: verdict == "fix" DO: A_INSERT_FIX_LOOP
110
+ → S_PAUSED WHEN: verdict == "escalate"
111
+ → S_WAVE_LOOP WHEN: structural(post-milestone) + has next milestone
112
+ DO: A_ADVANCE_MILESTONE
113
+ GUARD: retry_count >= max_retries → force escalate
114
+ GUARD: confidence_score < 60 + proceed → override to fix
115
+
116
+ </transitions>
117
+ ```
118
+
119
+ **规则**:
120
+ - 转移条件用 `WHEN`,绑定到特定转移的约束用 `GUARD`
121
+ - 动作引用 `DO: A_XXX`,具体逻辑在 `<actions>` 中定义
122
+ - 每个 state 必须有到 `S_FALLBACK` 或 `S_PAUSED` 的兜底路径
123
+ - 条件必须互斥且穷尽(覆盖所有可能)
124
+
125
+ ### `<actions>` — Operation Definitions
126
+
127
+ 每个 ACTION 独立定义,内部使用结构化散文 + 伪代码。不压缩为纯 DSL。
128
+
129
+ ```markdown
130
+ <actions>
131
+
132
+ ### A_BUILD_AND_SPAWN_WAVE
133
+
134
+ 1. buildNextWave: barrier → solo CSV; non-barrier → batch until decision node
135
+ 2. buildSkillCall per step: resolve placeholders, apply enrichment table, append auto flags
136
+ 3. Write wave-{N}.csv
137
+ 4. spawn_agents_on_csv({ csv_path, instruction, max_workers, output_csv_path })
138
+ 5. Merge results into master, delete wave CSV
139
+ 6. Update session: current_step, waves[], context fields
140
+
141
+ Enrichment table:
142
+ | Skill | Args | Source |
143
+ |-------|------|--------|
144
+ | maestro-plan | --dir {analyze_artifact_path} | state.json artifacts |
145
+ | maestro-execute | --dir {plan_artifact_path} | state.json artifacts |
146
+ | quality-debug | "{gap_summary}" | decision verdict |
147
+
148
+ ### A_INSERT_FIX_LOOP
149
+
150
+ 1. Clear passed_gates (code will change)
151
+ 2. Select fix-loop template by decision type (see Appendix: Fix-Loop Templates)
152
+ 3. Insert steps after current position
153
+ 4. Reindex all steps
154
+ 5. Write status.json
155
+
156
+ </actions>
157
+ ```
158
+
159
+ **规则**:
160
+ - ACTION 名称以 `A_` 前缀,与 transitions 中的 `DO:` 引用对应
161
+ - 内部用编号步骤,不用散文段落
162
+ - 数据映射用表格,不用散文描述
163
+ - 每个 ACTION 必须明确输入/输出和副作用(写了什么文件)
164
+
165
+ ---
166
+
167
+ ## 3. Shared Primitives
168
+
169
+ ### MACRO: RUN_CSV_WAVE
170
+
171
+ 三个 skill(ralph、plan、execute)共享的 CSV 波执行逻辑,抽为标准子程序:
172
+
173
+ ```markdown
174
+ ### MACRO: RUN_CSV_WAVE(wave_rows, session_folder, instruction_builder)
175
+
176
+ 1. Filter pending rows for target wave
177
+ 2. Build prev_context from completed predecessor findings
178
+ 3. Write wave-{N}.csv with prev_context column
179
+ 4. spawn_agents_on_csv({
180
+ csv_path: wave-{N}.csv,
181
+ instruction: instruction_builder(context),
182
+ output_csv_path: wave-{N}-results.csv
183
+ })
184
+ 5. Merge results into master CSV
185
+ 6. Delete wave-{N}.csv
186
+ 7. Return: updated master CSV rows
187
+ ```
188
+
189
+ 各 skill 通过不同的 `instruction_builder` 和上下文参数调用此 MACRO,不重复描述流程。
190
+
191
+ ---
192
+
193
+ ## 4. `<appendix>` — Reference-Only Content
194
+
195
+ 以下内容移出主流程,放入 appendix 供按需查阅:
196
+
197
+ | Section | Content |
198
+ |---------|---------|
199
+ | CSV Schema | 列定义、示例行 |
200
+ | Worker Contract | 子 agent instruction 模板、output schema |
201
+ | Fix-Loop Templates | 各 decision type 的修复步骤链 |
202
+ | Discovery Board Protocol | 类型定义、去重规则 |
203
+ | Error Codes | 错误码 + 恢复策略 |
204
+ | Success Criteria | 验收检查项 |
205
+ | Golden Examples | 典型执行路径的完整示例 |
206
+
207
+ ---
208
+
209
+ ## 5. Implementation Plan
210
+
211
+ ### Order
212
+
213
+ 1. **Pilot**: `maestro-ralph/SKILL.md` — 本质是 adaptive state machine,收益最大
214
+ 2. **Extract**: 抽 `MACRO: RUN_CSV_WAVE` 共享子程序
215
+ 3. **Rollout**: `maestro-plan` 和 `maestro-execute` 用 Phase Cards 轻量整理(不必完整状态机化)
216
+
217
+ ### Phase Cards(适用于 plan/execute)
218
+
219
+ 对于线性 pipeline 型 skill,用 Phase Cards 代替完整状态机:
220
+
221
+ ```markdown
222
+ <phases>
223
+
224
+ PHASE P1_RESOLVE_INPUT:
225
+ DO: parse args, resolve phase dir, load context
226
+ NEXT: P2_BUILD_CSV
227
+ FAIL: abort with error
228
+
229
+ PHASE P2_BUILD_CSV:
230
+ DO: generate tasks.csv from plan/exploration angles
231
+ NEXT: P3_RUN_WAVES
232
+ FAIL: abort
233
+
234
+ PHASE P3_RUN_WAVES:
235
+ DO: MACRO:RUN_CSV_WAVE per wave (sequential)
236
+ NEXT: P4_AGGREGATE
237
+ FAIL: mark failed, pause
238
+
239
+ PHASE P4_AGGREGATE:
240
+ DO: export results, update state, generate report
241
+ NEXT: END
242
+
243
+ </phases>
244
+ ```
245
+
246
+ ### Safety Protocol
247
+
248
+ - 第一版将原散文移入 `<appendix>`,不删除
249
+ - 跑 3-5 次真实 skill 调用后评估效果,再压缩 appendix
250
+ - 每条原 invariant 必须能映射到 global invariant 或 transition GUARD
251
+ - 每条原 error code 必须在 appendix 中保留
252
+
253
+ ---
254
+
255
+ ## 6. Anti-Patterns
256
+
257
+ | Anti-Pattern | Correct |
258
+ |---|---|
259
+ | 在散文中嵌入隐式状态转移 | 所有转移在 `<transitions>` 中显式声明 |
260
+ | ACTION 内只写 2-3 个单词 | ACTION 内用编号步骤 + 表格,保留足够细节 |
261
+ | 用 GUARD 完全替代 invariants | 全局约束留在 `<invariants>`,只有绑定到特定转移的条件用 GUARD |
262
+ | 在主流程中内联 CSV schema | Schema 放 `<appendix>`,主流程只引用 |
263
+ | 每个 skill 重写 wave 执行逻辑 | 引用 `MACRO: RUN_CSV_WAVE` |
264
+ | 状态没有兜底路径 | 每个 state 必须有到 `S_FALLBACK` 的出边 |
265
+ | PERSIST 字段缺失 | 每个 state 声明写入哪些持久化字段 |
@@ -9,7 +9,7 @@ $ARGUMENTS: "[--scope <scope>] [--uid <uid>] <category> <content>"
9
9
 
10
10
  --scope -- target scope: project (default) | global | team | personal
11
11
  --uid -- user id for personal scope (auto-detected from git if omitted)
12
- category -- one of: coding, arch, quality, debug, test, review, learning
12
+ category -- one of: coding, arch, quality, debug, test, review, learning, ui
13
13
  content -- free-text description of the entry
14
14
  ```
15
15
 
@@ -33,6 +33,7 @@ content -- free-text description of the entry
33
33
  | `test` | `test-conventions.md` |
34
34
  | `review` | `review-standards.md` |
35
35
  | `learning` | `learnings.md` |
36
+ | `ui` | `ui-conventions.md` |
36
37
 
37
38
  ## Prerequisites
38
39
 
@@ -54,7 +55,7 @@ Parse $ARGUMENTS:
54
55
  4. content = remaining text
55
56
  Validate:
56
57
  - scope ∈ {project, global, team, personal}
57
- - category ∈ {coding, arch, quality, debug, test, review, learning}
58
+ - category ∈ {coding, arch, quality, debug, test, review, learning, ui}
58
59
  - content non-empty
59
60
  - personal scope requires uid (resolve from `maestro collab whoami` if --uid not given)
60
61
  On failure: show usage `/spec-add [--scope <scope>] <category> <content>`, exit
@@ -9,7 +9,7 @@ $ARGUMENTS: "[--scope <scope>] [--uid <uid>] [--category <category>] [keyword]"
9
9
 
10
10
  --scope -- load scope: project (default) | global | team | personal
11
11
  --uid -- user id for personal scope (auto-detected from git if omitted)
12
- --category -- filter by category: coding | arch | test | review | debug | quality | learning
12
+ --category -- filter by category: coding | arch | test | review | debug | quality | learning | ui
13
13
  Loads category's primary doc in full + cross-file entries with matching category attr
14
14
  keyword -- optional, grep within loaded specs for matching sections
15
15
  ```
@@ -29,6 +29,7 @@ Each category loads exactly one file per layer. Same mapping as spec-add.
29
29
  | `debug-notes.md` | debug |
30
30
  | `quality-rules.md` | quality |
31
31
  | `learnings.md` | learning |
32
+ | `ui-conventions.md` | ui |
32
33
 
33
34
  ## Layer Order by Scope
34
35
 
@@ -180,7 +180,27 @@ Auto-generated from project analysis. Update manually as patterns evolve.
180
180
  {empty section for spec-add entries}
181
181
  ```
182
182
 
183
- #### 5c: debug-notes.md and review-standards.md
183
+ #### 5c: ui-conventions.md (when frontend framework detected)
184
+
185
+ Scan for frontend frameworks (React, Vue, Angular, Svelte, etc.) and UI libraries.
186
+
187
+ Output: `.workflow/specs/ui-conventions.md`
188
+
189
+ ```markdown
190
+ ---
191
+ title: "UI Conventions"
192
+ category: ui
193
+ ---
194
+ # UI Conventions
195
+
196
+ Auto-generated from project analysis. Update manually as patterns evolve.
197
+
198
+ ## Entries
199
+
200
+ {empty section for spec-add entries}
201
+ ```
202
+
203
+ #### 5d: debug-notes.md and review-standards.md
184
204
 
185
205
  These are NOT created during setup. They are created on demand when `spec-add debug` or `spec-add review` is first used.
186
206
 
@@ -4,7 +4,7 @@ Shared reference for tool spec registration and execution commands.
4
4
 
5
5
  ## Storage
6
6
 
7
- Tool specs are stored as knowhow documents in `.workflow/knowhow/` with `tool: true` in YAML frontmatter. Tool registration creates knowhow files, not spec entries. The `category` field determines which `spec load --category` queries match this tool.
7
+ Tool specs are stored as knowhow documents in `.workflow/knowhow/` with `tool: true` in YAML frontmatter. Tool registration creates new knowhow files or promotes existing ones (via frontmatter update). The `category` field determines which `spec load --category` queries match this tool.
8
8
 
9
9
  ## Entry Format
10
10
 
@@ -35,30 +35,37 @@ category: coding
35
35
  ## Discovery Path
36
36
 
37
37
  ```
38
- Register tools.md → spec load --category <category> / spec-injector auto-inject → agent discovers tool
38
+ Register (knowhow/ + tool: true) → spec load --category / spec-injector auto-inject → agent discovers tool
39
39
  ```
40
40
 
41
41
  Agents discover tool specs via:
42
- - `spec load --category <category>` — returns entries matching the category
43
- - `spec-injector` hook — auto-injects at Agent launch based on agent type
44
- - `spec load --keyword <word>` — keyword search across all entries
42
+ - `spec load --category <category>` — scans knowhow/ for `category + tool: true` matches
43
+ - `spec-injector` hook — auto-injects at Agent launch based on agent type → category mapping
44
+ - `spec load --keyword <word>` — keyword search across all entries (cross-category)
45
45
 
46
46
  ## Category Reference
47
47
 
48
- | Category | Agent types | Tool examples |
49
- |----------|-------------|---------------|
50
- | coding | code-developer, workflow-executor | Build, deploy, integrate |
51
- | test | tdd-developer, test-fix-agent | Test flows, verification steps |
52
- | review | workflow-reviewer | Checklists, audit standards |
53
- | arch | workflow-planner | Design flows, analysis steps |
54
- | debug | debug-explore-agent | Diagnostic flows, investigation |
48
+ `category` = **who consumes** (agent type), not what the content is about.
49
+
50
+ | Category | Consumer Agent | Decision Question | Signal Words |
51
+ |---|---|---|---|
52
+ | coding | code-developer, workflow-executor | 开发者实现时需要? | build, deploy, integrate, configure, api-contract |
53
+ | test | tdd-developer, test-fix-agent | 测试者验证时需要? | verify, validate, e2e, regression, idempotency |
54
+ | review | workflow-reviewer | 审查者检查时需要? | audit, checklist, compliance, quality-gate |
55
+ | arch | workflow-planner | 规划者设计时需要? | design, architecture, decompose, blueprint |
56
+ | debug | debug-explore-agent | 调试者排查时需要? | diagnose, trace, root-cause, reproduce |
57
+
58
+ **Multi-consumer**: If tool serves multiple agents, split into separate docs with different categories.
55
59
 
56
60
  ## CLI Commands
57
61
 
58
62
  ```bash
59
- # Register tool as knowhow document
63
+ # Register new tool as knowhow document
60
64
  maestro knowhow add "knowhow/RCP-<slug>.md" --type recipe --tool
61
65
 
66
+ # Promote existing knowhow to tool (in place)
67
+ maestro wiki update <id> --frontmatter '{"tool": true, "category": "<cat>", "summary": "..."}'
68
+
62
69
  # Load specs by category
63
70
  maestro spec load --category <category>
64
71
  maestro spec load --category <category> --keyword <word>
@@ -1,71 +0,0 @@
1
- ---
2
- name: maestro-link-coordinate
3
- description: Execute command chain nodes step by step
4
- argument-hint: "\"intent text\" [--list] [-c [sessionId]] [--chain <name>] [--tool <tool>] [-y]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Agent
13
- ---
14
- <purpose>
15
- Step-mode workflow coordinator using `maestro coordinate` CLI subcommands (start/next/status).
16
- Walks chain graphs node by node — each command node executed via `maestro delegate` internally.
17
- Decision/gate/eval nodes auto-resolve between steps. Session persisted for resume.
18
- </purpose>
19
-
20
- <required_reading>
21
- @~/.maestro/workflows/maestro-link-coordinate.md
22
- </required_reading>
23
-
24
- <context>
25
- $ARGUMENTS — user intent text, or flags.
26
-
27
- **Flags:**
28
- - `--list` — List all available chain graphs
29
- - `-c` / `--continue [sessionId]` — Resume step_paused session via `coordinate next`
30
- - `--chain <name>` — Force a specific chain graph
31
- - `--tool <tool>` — CLI tool override (default: claude)
32
- - `-y` / `--yes` — Auto mode
33
-
34
- **CLI endpoints used:**
35
- - `maestro coordinate list` — enumerate chains
36
- - `maestro coordinate start "intent" --chain X` — begin step-mode session
37
- - `maestro coordinate next [sessionId]` — advance one step
38
- - `maestro coordinate status [sessionId]` — query state
39
- - `maestro coordinate run "intent"` — autonomous full run
40
- - `maestro coordinate watch <sessionId> [--follow]` — read-only event tail (separate from driver loop)
41
- - `maestro coordinate report` — agent-invoked command-node result writer (authoritative result channel)
42
-
43
- **Internal walker capabilities (invisible to driver loop):**
44
- - Prompt assembly owned by the walker (main flow) for both command and decision nodes
45
- - Decision nodes auto-resolve via `strategy: 'expr'` (fast path) with LLM decider fallback when expr has no match and no default edge, or explicit `strategy: 'llm'`
46
- - Walker events published to a file/SQLite broker for `watch` observers
47
- - LLM decision in step mode is synchronous — avoid tight per-step deadlines
48
- </context>
49
-
50
- <execution>
51
- Follow '~/.maestro/workflows/maestro-link-coordinate.md' completely.
52
- </execution>
53
-
54
- <error_codes>
55
- | Code | Severity | Description | Recovery |
56
- |------|----------|-------------|----------|
57
- | E001 | error | No intent and no --list/--chain | Suggest --list |
58
- | E002 | error | Chain graph not found | Show list output |
59
- | E003 | error | Step execution failed | Check status, retry next |
60
- | E004 | error | Resume session not found | List sessions |
61
- | E005 | error | CLI endpoint unavailable | Check maestro installation |
62
- </error_codes>
63
-
64
- <success_criteria>
65
- - [ ] Chain graph loaded via `maestro coordinate start`
66
- - [ ] Each step executed via `maestro coordinate next` loop
67
- - [ ] JSON output parsed for session tracking
68
- - [ ] Decision nodes auto-resolved between steps
69
- - [ ] Session persisted and resumable via `-c`
70
- - [ ] Completion summary displayed
71
- </success_criteria>