@openflowjs/cli 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (403) hide show
  1. package/dist/bin/openflow.d.ts +2 -0
  2. package/dist/bin/openflow.js +8 -0
  3. package/dist/bin/openflow.js.map +1 -0
  4. package/dist/commands/config.d.ts +2 -0
  5. package/dist/commands/config.js +38 -0
  6. package/dist/commands/config.js.map +1 -0
  7. package/dist/commands/flow.d.ts +1 -0
  8. package/dist/commands/flow.js +119 -0
  9. package/dist/commands/flow.js.map +1 -0
  10. package/dist/commands/init.d.ts +2 -0
  11. package/dist/commands/init.js +1082 -0
  12. package/dist/commands/init.js.map +1 -0
  13. package/dist/commands/iteration.d.ts +1 -0
  14. package/dist/commands/iteration.js +131 -0
  15. package/dist/commands/iteration.js.map +1 -0
  16. package/dist/commands/mcp.d.ts +1 -0
  17. package/dist/commands/mcp.js +12 -0
  18. package/dist/commands/mcp.js.map +1 -0
  19. package/dist/commands/module.d.ts +1 -0
  20. package/dist/commands/module.js +137 -0
  21. package/dist/commands/module.js.map +1 -0
  22. package/dist/commands/plan.d.ts +1 -0
  23. package/dist/commands/plan.js +111 -0
  24. package/dist/commands/plan.js.map +1 -0
  25. package/dist/commands/plugin.d.ts +1 -0
  26. package/dist/commands/plugin.js +246 -0
  27. package/dist/commands/plugin.js.map +1 -0
  28. package/dist/commands/preflight.d.ts +8 -0
  29. package/dist/commands/preflight.js +57 -0
  30. package/dist/commands/preflight.js.map +1 -0
  31. package/dist/commands/review.d.ts +1 -0
  32. package/dist/commands/review.js +145 -0
  33. package/dist/commands/review.js.map +1 -0
  34. package/dist/commands/state.d.ts +1 -0
  35. package/dist/commands/state.js +28 -0
  36. package/dist/commands/state.js.map +1 -0
  37. package/dist/commands/validate.d.ts +1 -0
  38. package/dist/commands/validate.js +310 -0
  39. package/dist/commands/validate.js.map +1 -0
  40. package/dist/core/artifacts.d.ts +140 -0
  41. package/dist/core/artifacts.js +809 -0
  42. package/dist/core/artifacts.js.map +1 -0
  43. package/dist/core/index.d.ts +12 -0
  44. package/dist/core/index.js +27 -0
  45. package/dist/core/index.js.map +1 -0
  46. package/dist/core-artifacts/marketplace.json +14 -0
  47. package/dist/core-artifacts/modules.json +20 -0
  48. package/dist/core-artifacts/openflow/.claude-plugin/plugin.json +8 -0
  49. package/dist/core-artifacts/openflow/.mcp.json +9 -0
  50. package/dist/core-artifacts/openflow/agents/openflow-artifact-reviewer.md +308 -0
  51. package/dist/core-artifacts/openflow/agents/openflow-code-reviewer.md +177 -0
  52. package/dist/core-artifacts/openflow/agents/openflow-executor-deep.md +119 -0
  53. package/dist/core-artifacts/openflow/agents/openflow-executor-general.md +104 -0
  54. package/dist/core-artifacts/openflow/agents/openflow-executor-quick.md +93 -0
  55. package/dist/core-artifacts/openflow/agents/openflow-explorer.md +69 -0
  56. package/dist/core-artifacts/openflow/agents/openflow-knowledge-curator.md +89 -0
  57. package/dist/core-artifacts/openflow/commands/knowledge.md +102 -0
  58. package/dist/core-artifacts/openflow/hooks/hooks.json +33 -0
  59. package/dist/core-artifacts/openflow/scripts/openflow-drift-guard.cjs +54 -0
  60. package/dist/core-artifacts/openflow/scripts/openflow-evidence-reminder.cjs +64 -0
  61. package/dist/core-artifacts/openflow/scripts/openflow-mcp-review.cjs +27 -0
  62. package/dist/core-artifacts/openflow/scripts/openflow-write-guard.cjs +27 -0
  63. package/dist/core-artifacts/openflow/scripts/session-start.cjs +12 -0
  64. package/dist/core-artifacts/openflow/skills/brainstorm/SKILL.md +131 -0
  65. package/dist/core-artifacts/openflow/skills/cli-reference/SKILL.md +196 -0
  66. package/dist/core-artifacts/openflow/skills/finalize/SKILL.md +109 -0
  67. package/dist/core-artifacts/openflow/skills/finalize/references/summary-template.md +39 -0
  68. package/dist/core-artifacts/openflow/skills/implement/SKILL.md +296 -0
  69. package/dist/core-artifacts/openflow/skills/implement/references/working-memory.md +49 -0
  70. package/dist/core-artifacts/openflow/skills/knowledge-retrieval/SKILL.md +78 -0
  71. package/dist/core-artifacts/openflow/skills/prd/SKILL.md +173 -0
  72. package/dist/core-artifacts/openflow/skills/prd/references/level-routing.md +94 -0
  73. package/dist/core-artifacts/openflow/skills/prd/references/prd-template.md +187 -0
  74. package/dist/core-artifacts/openflow/skills/prd/references/wireframe-template.html +122 -0
  75. package/dist/core-artifacts/openflow/skills/spec/SKILL.md +341 -0
  76. package/dist/core-artifacts/openflow/skills/spec/references/context-template.md +38 -0
  77. package/dist/core-artifacts/openflow/skills/spec/references/plan-template.md +61 -0
  78. package/dist/core-artifacts/openflow/skills/spec/references/spec-template.md +187 -0
  79. package/dist/core-artifacts/openflow/skills/spec/references/tasks-template.md +99 -0
  80. package/dist/core-artifacts/openflow/skills/workflow-governance/SKILL.md +384 -0
  81. package/dist/core-artifacts/openflow/skills/workflow-governance/references/knowledge-schema.md +241 -0
  82. package/dist/core-artifacts/openflow/skills/workflow-governance/references/state-files.md +148 -0
  83. package/dist/core-artifacts/openflow/skills/workflow-governance/references/workflow.md +119 -0
  84. package/dist/core-artifacts/templates/.gitkeep +0 -0
  85. package/dist/index.d.ts +4 -0
  86. package/dist/index.js +5 -0
  87. package/dist/index.js.map +1 -0
  88. package/dist/mcp/review-mcp-server.d.ts +1 -0
  89. package/dist/mcp/review-mcp-server.js +191 -0
  90. package/dist/mcp/review-mcp-server.js.map +1 -0
  91. package/dist/mcp/review-server.d.ts +33 -0
  92. package/dist/mcp/review-server.js +340 -0
  93. package/dist/mcp/review-server.js.map +1 -0
  94. package/dist/mcp/review-ui/assets/arc-DH58vMfF.js +1 -0
  95. package/dist/mcp/review-ui/assets/architecture-YZFGNWBL-CW8o5JQi.js +1 -0
  96. package/dist/mcp/review-ui/assets/architectureDiagram-Q4EWVU46-CH35GquJ.js +36 -0
  97. package/dist/mcp/review-ui/assets/array-BCJ35G43.js +1 -0
  98. package/dist/mcp/review-ui/assets/blockDiagram-DXYQGD6D-B1JZnKG_.js +132 -0
  99. package/dist/mcp/review-ui/assets/c4Diagram-AHTNJAMY-DCAtnxWd.js +10 -0
  100. package/dist/mcp/review-ui/assets/channel-BgHR4NPf.js +1 -0
  101. package/dist/mcp/review-ui/assets/chunk-2KRD3SAO-BkEfK915.js +1 -0
  102. package/dist/mcp/review-ui/assets/chunk-4BX2VUAB-Dn9kswJO.js +1 -0
  103. package/dist/mcp/review-ui/assets/chunk-4TB4RGXK-DbeI3ZO6.js +206 -0
  104. package/dist/mcp/review-ui/assets/chunk-55IACEB6-CLBoivXU.js +1 -0
  105. package/dist/mcp/review-ui/assets/chunk-5FUZZQ4R-DU7La6QA.js +62 -0
  106. package/dist/mcp/review-ui/assets/chunk-5PVQY5BW-Dy3eUu9a.js +2 -0
  107. package/dist/mcp/review-ui/assets/chunk-67CJDMHE-BKQ4iYAM.js +1 -0
  108. package/dist/mcp/review-ui/assets/chunk-7N4EOEYR-CUngSlME.js +1 -0
  109. package/dist/mcp/review-ui/assets/chunk-AA7GKIK3-BClDbXxt.js +1 -0
  110. package/dist/mcp/review-ui/assets/chunk-BSJP7CBP-BlpmbHL-.js +1 -0
  111. package/dist/mcp/review-ui/assets/chunk-CIAEETIT-THpBXcoN.js +1 -0
  112. package/dist/mcp/review-ui/assets/chunk-Dlc7tRH4.js +1 -0
  113. package/dist/mcp/review-ui/assets/chunk-EDXVE4YY-DNUlHz7M.js +1 -0
  114. package/dist/mcp/review-ui/assets/chunk-ENJZ2VHE-fwEKj0pQ.js +10 -0
  115. package/dist/mcp/review-ui/assets/chunk-FMBD7UC4-Cj8B2TLo.js +15 -0
  116. package/dist/mcp/review-ui/assets/chunk-FOC6F5B3-BtR_JW_A.js +1 -0
  117. package/dist/mcp/review-ui/assets/chunk-ICPOFSXX-WTr3HDYE.js +122 -0
  118. package/dist/mcp/review-ui/assets/chunk-K5T4RW27-vtP3ehR7.js +94 -0
  119. package/dist/mcp/review-ui/assets/chunk-KGLVRYIC-Di2tkB7O.js +1 -0
  120. package/dist/mcp/review-ui/assets/chunk-LIHQZDEY-DoHl9hYE.js +1 -0
  121. package/dist/mcp/review-ui/assets/chunk-ORNJ4GCN-Bff-Vc2X.js +1 -0
  122. package/dist/mcp/review-ui/assets/chunk-OYMX7WX6-Djey8TrX.js +231 -0
  123. package/dist/mcp/review-ui/assets/chunk-QZHKN3VN-C4w1Z4n9.js +1 -0
  124. package/dist/mcp/review-ui/assets/chunk-U2HBQHQK-D8HUikvJ.js +70 -0
  125. package/dist/mcp/review-ui/assets/chunk-X2U36JSP-CuZ-SN2r.js +1 -0
  126. package/dist/mcp/review-ui/assets/chunk-YZCP3GAM-D0-dHF3G.js +1 -0
  127. package/dist/mcp/review-ui/assets/chunk-ZZ45TVLE-C1aIZGDA.js +1 -0
  128. package/dist/mcp/review-ui/assets/classDiagram-6PBFFD2Q-DHrSK7zx.js +1 -0
  129. package/dist/mcp/review-ui/assets/classDiagram-v2-HSJHXN6E-ftN8ECVk.js +1 -0
  130. package/dist/mcp/review-ui/assets/clone-C3rjhi9V.js +1 -0
  131. package/dist/mcp/review-ui/assets/cose-bilkent-S5V4N54A-szpqu_3d.js +1 -0
  132. package/dist/mcp/review-ui/assets/cytoscape.esm-DZ22BVwz.js +321 -0
  133. package/dist/mcp/review-ui/assets/dagre-B4oIQbi5.js +1 -0
  134. package/dist/mcp/review-ui/assets/dagre-KV5264BT-zDsxU5-B.js +4 -0
  135. package/dist/mcp/review-ui/assets/defaultLocale-CIS5GEjP.js +1 -0
  136. package/dist/mcp/review-ui/assets/diagram-5BDNPKRD-UgfFjZ4o.js +10 -0
  137. package/dist/mcp/review-ui/assets/diagram-G4DWMVQ6-Wh9VCn50.js +24 -0
  138. package/dist/mcp/review-ui/assets/diagram-MMDJMWI5-xVD3G7_9.js +43 -0
  139. package/dist/mcp/review-ui/assets/diagram-TYMM5635-AUD291P2.js +24 -0
  140. package/dist/mcp/review-ui/assets/dist-B51l2n-9.js +1 -0
  141. package/dist/mcp/review-ui/assets/erDiagram-SMLLAGMA-B83D6NXm.js +85 -0
  142. package/dist/mcp/review-ui/assets/flatten-B80WBwOJ.js +1 -0
  143. package/dist/mcp/review-ui/assets/flowDiagram-DWJPFMVM-D3lXOeHD.js +162 -0
  144. package/dist/mcp/review-ui/assets/ganttDiagram-T4ZO3ILL-CFAN903o.js +292 -0
  145. package/dist/mcp/review-ui/assets/gitGraph-7Q5UKJZL-BfgkNWmC.js +1 -0
  146. package/dist/mcp/review-ui/assets/gitGraphDiagram-UUTBAWPF-DxqTOi4I.js +106 -0
  147. package/dist/mcp/review-ui/assets/graphlib-De-foo_H.js +1 -0
  148. package/dist/mcp/review-ui/assets/identity-CWMh0UL-.js +1 -0
  149. package/dist/mcp/review-ui/assets/index-Do0fBEfH.css +2 -0
  150. package/dist/mcp/review-ui/assets/index-uPMLqduV.js +123 -0
  151. package/dist/mcp/review-ui/assets/info-OMHHGYJF-DE18zZ5Z.js +1 -0
  152. package/dist/mcp/review-ui/assets/infoDiagram-42DDH7IO-Bnco1OGr.js +2 -0
  153. package/dist/mcp/review-ui/assets/init-BMBYmmUa.js +1 -0
  154. package/dist/mcp/review-ui/assets/ishikawaDiagram-UXIWVN3A-B89fugr9.js +70 -0
  155. package/dist/mcp/review-ui/assets/journeyDiagram-VCZTEJTY-CMx2w_is.js +139 -0
  156. package/dist/mcp/review-ui/assets/kanban-definition-6JOO6SKY-YvTOD1Vd.js +89 -0
  157. package/dist/mcp/review-ui/assets/katex-8mXVa4k3.js +257 -0
  158. package/dist/mcp/review-ui/assets/line-BCdBO-oK.js +1 -0
  159. package/dist/mcp/review-ui/assets/linear-d7UHSQqm.js +1 -0
  160. package/dist/mcp/review-ui/assets/mermaid-parser.core-DI1-3xL2.js +4 -0
  161. package/dist/mcp/review-ui/assets/mindmap-definition-QFDTVHPH-E_mV-_Fs.js +96 -0
  162. package/dist/mcp/review-ui/assets/ordinal-BDTCIhXR.js +1 -0
  163. package/dist/mcp/review-ui/assets/packet-4T2RLAQJ-BLPGKWDX.js +1 -0
  164. package/dist/mcp/review-ui/assets/path-CIRGLb_6.js +1 -0
  165. package/dist/mcp/review-ui/assets/pie-ZZUOXDRM-DVV6Yua9.js +1 -0
  166. package/dist/mcp/review-ui/assets/pieDiagram-DEJITSTG-Ct4JvywP.js +30 -0
  167. package/dist/mcp/review-ui/assets/quadrantDiagram-34T5L4WZ-BSFYvc1U.js +7 -0
  168. package/dist/mcp/review-ui/assets/radar-PYXPWWZC-BMkQDLKp.js +1 -0
  169. package/dist/mcp/review-ui/assets/reduce-C80XcylQ.js +1 -0
  170. package/dist/mcp/review-ui/assets/requirementDiagram-MS252O5E-Bp7uSYEK.js +84 -0
  171. package/dist/mcp/review-ui/assets/rough.esm-DtEqI08j.js +1 -0
  172. package/dist/mcp/review-ui/assets/sankeyDiagram-XADWPNL6-CV38ZpSv.js +10 -0
  173. package/dist/mcp/review-ui/assets/sequenceDiagram-FGHM5R23-BXN9jl1N.js +157 -0
  174. package/dist/mcp/review-ui/assets/src-Cxc1bu7b.js +1 -0
  175. package/dist/mcp/review-ui/assets/stateDiagram-FHFEXIEX-DZduDkIw.js +1 -0
  176. package/dist/mcp/review-ui/assets/stateDiagram-v2-QKLJ7IA2-xAWOcxSi.js +1 -0
  177. package/dist/mcp/review-ui/assets/timeline-definition-GMOUNBTQ-CLqXzNm8.js +120 -0
  178. package/dist/mcp/review-ui/assets/treeView-SZITEDCU-tPcANHUc.js +1 -0
  179. package/dist/mcp/review-ui/assets/treemap-W4RFUUIX-BGbXISSk.js +1 -0
  180. package/dist/mcp/review-ui/assets/vennDiagram-DHZGUBPP-gCnd0IYN.js +34 -0
  181. package/dist/mcp/review-ui/assets/wardley-RL74JXVD-CK3EfklM.js +1 -0
  182. package/dist/mcp/review-ui/assets/wardleyDiagram-NUSXRM2D-Dd7qMlPS.js +20 -0
  183. package/dist/mcp/review-ui/assets/xychartDiagram-5P7HB3ND-DXHXO8Zm.js +7 -0
  184. package/dist/mcp/review-ui/index.html +29 -0
  185. package/dist/mcp/studio/assets/arc-DH58vMfF.js +1 -0
  186. package/dist/mcp/studio/assets/architecture-YZFGNWBL-8xrwD39F.js +1 -0
  187. package/dist/mcp/studio/assets/architectureDiagram-Q4EWVU46-VmcLZTJf.js +36 -0
  188. package/dist/mcp/studio/assets/array-BCJ35G43.js +1 -0
  189. package/dist/mcp/studio/assets/blockDiagram-DXYQGD6D-D-1mlLYy.js +132 -0
  190. package/dist/mcp/studio/assets/c4Diagram-AHTNJAMY-DCAtnxWd.js +10 -0
  191. package/dist/mcp/studio/assets/channel-BgHR4NPf.js +1 -0
  192. package/dist/mcp/studio/assets/chunk-2KRD3SAO-CMDQx2WD.js +1 -0
  193. package/dist/mcp/studio/assets/chunk-4BX2VUAB-Dn9kswJO.js +1 -0
  194. package/dist/mcp/studio/assets/chunk-4TB4RGXK-aFEYGDkJ.js +206 -0
  195. package/dist/mcp/studio/assets/chunk-55IACEB6-CLBoivXU.js +1 -0
  196. package/dist/mcp/studio/assets/chunk-5FUZZQ4R-DU7La6QA.js +62 -0
  197. package/dist/mcp/studio/assets/chunk-5PVQY5BW-Dy3eUu9a.js +2 -0
  198. package/dist/mcp/studio/assets/chunk-67CJDMHE-DnkyJt7A.js +1 -0
  199. package/dist/mcp/studio/assets/chunk-7N4EOEYR-cnJ9dWSC.js +1 -0
  200. package/dist/mcp/studio/assets/chunk-AA7GKIK3-DjCZnyrT.js +1 -0
  201. package/dist/mcp/studio/assets/chunk-BSJP7CBP-BlpmbHL-.js +1 -0
  202. package/dist/mcp/studio/assets/chunk-CIAEETIT-CtvXSBsf.js +1 -0
  203. package/dist/mcp/studio/assets/chunk-Dlc7tRH4.js +1 -0
  204. package/dist/mcp/studio/assets/chunk-EDXVE4YY-DNUlHz7M.js +1 -0
  205. package/dist/mcp/studio/assets/chunk-ENJZ2VHE-fwEKj0pQ.js +10 -0
  206. package/dist/mcp/studio/assets/chunk-FMBD7UC4-Cj8B2TLo.js +15 -0
  207. package/dist/mcp/studio/assets/chunk-FOC6F5B3-Ca28VADd.js +1 -0
  208. package/dist/mcp/studio/assets/chunk-ICPOFSXX-WTr3HDYE.js +122 -0
  209. package/dist/mcp/studio/assets/chunk-K5T4RW27-pqiOLnBn.js +94 -0
  210. package/dist/mcp/studio/assets/chunk-KGLVRYIC-DZfGlR-G.js +1 -0
  211. package/dist/mcp/studio/assets/chunk-LIHQZDEY-6Ygb8Kwt.js +1 -0
  212. package/dist/mcp/studio/assets/chunk-ORNJ4GCN-DSlr7oSO.js +1 -0
  213. package/dist/mcp/studio/assets/chunk-OYMX7WX6-8z_2lCb3.js +231 -0
  214. package/dist/mcp/studio/assets/chunk-QZHKN3VN-C4w1Z4n9.js +1 -0
  215. package/dist/mcp/studio/assets/chunk-U2HBQHQK-D8HUikvJ.js +70 -0
  216. package/dist/mcp/studio/assets/chunk-X2U36JSP-CuZ-SN2r.js +1 -0
  217. package/dist/mcp/studio/assets/chunk-YZCP3GAM-D0-dHF3G.js +1 -0
  218. package/dist/mcp/studio/assets/chunk-ZZ45TVLE-C1aIZGDA.js +1 -0
  219. package/dist/mcp/studio/assets/classDiagram-6PBFFD2Q-IZXxqxqM.js +1 -0
  220. package/dist/mcp/studio/assets/classDiagram-v2-HSJHXN6E-BiJKwTXT.js +1 -0
  221. package/dist/mcp/studio/assets/clone-g4CuF1Hf.js +1 -0
  222. package/dist/mcp/studio/assets/cose-bilkent-S5V4N54A-szpqu_3d.js +1 -0
  223. package/dist/mcp/studio/assets/cytoscape.esm-DZ22BVwz.js +321 -0
  224. package/dist/mcp/studio/assets/dagre-Be9o0OzC.js +1 -0
  225. package/dist/mcp/studio/assets/dagre-KV5264BT-iB6PnHLr.js +4 -0
  226. package/dist/mcp/studio/assets/defaultLocale-CIS5GEjP.js +1 -0
  227. package/dist/mcp/studio/assets/diagram-5BDNPKRD-BLfWbiEB.js +10 -0
  228. package/dist/mcp/studio/assets/diagram-G4DWMVQ6-CgcnwgVO.js +24 -0
  229. package/dist/mcp/studio/assets/diagram-MMDJMWI5-CpkXvs2p.js +43 -0
  230. package/dist/mcp/studio/assets/diagram-TYMM5635-guxqmxjJ.js +24 -0
  231. package/dist/mcp/studio/assets/dist-B51l2n-9.js +1 -0
  232. package/dist/mcp/studio/assets/erDiagram-SMLLAGMA-Lwv-cC2Y.js +85 -0
  233. package/dist/mcp/studio/assets/flatten-Dv3Z_7XJ.js +1 -0
  234. package/dist/mcp/studio/assets/flowDiagram-DWJPFMVM-BKnaFfFR.js +162 -0
  235. package/dist/mcp/studio/assets/ganttDiagram-T4ZO3ILL-CFAN903o.js +292 -0
  236. package/dist/mcp/studio/assets/gitGraph-7Q5UKJZL-BSdEZNVc.js +1 -0
  237. package/dist/mcp/studio/assets/gitGraphDiagram-UUTBAWPF-D4z4QWni.js +106 -0
  238. package/dist/mcp/studio/assets/graphlib-C1IZi4Cg.js +1 -0
  239. package/dist/mcp/studio/assets/identity-CWMh0UL-.js +1 -0
  240. package/dist/mcp/studio/assets/index-CyBqHDpB.js +109 -0
  241. package/dist/mcp/studio/assets/index-Dn_Ujmba.css +2 -0
  242. package/dist/mcp/studio/assets/info-OMHHGYJF-CoTx64p3.js +1 -0
  243. package/dist/mcp/studio/assets/infoDiagram-42DDH7IO-QEji23sQ.js +2 -0
  244. package/dist/mcp/studio/assets/init-BMBYmmUa.js +1 -0
  245. package/dist/mcp/studio/assets/ishikawaDiagram-UXIWVN3A-lMurmqul.js +70 -0
  246. package/dist/mcp/studio/assets/journeyDiagram-VCZTEJTY-CMx2w_is.js +139 -0
  247. package/dist/mcp/studio/assets/kanban-definition-6JOO6SKY-DsOybLrS.js +89 -0
  248. package/dist/mcp/studio/assets/katex-8mXVa4k3.js +257 -0
  249. package/dist/mcp/studio/assets/line-BCdBO-oK.js +1 -0
  250. package/dist/mcp/studio/assets/linear-d7UHSQqm.js +1 -0
  251. package/dist/mcp/studio/assets/mermaid-parser.core-BZtTt4qJ.js +4 -0
  252. package/dist/mcp/studio/assets/mindmap-definition-QFDTVHPH-B2yfABR9.js +96 -0
  253. package/dist/mcp/studio/assets/ordinal-BDTCIhXR.js +1 -0
  254. package/dist/mcp/studio/assets/packet-4T2RLAQJ-Bi4IG7s8.js +1 -0
  255. package/dist/mcp/studio/assets/path-CIRGLb_6.js +1 -0
  256. package/dist/mcp/studio/assets/pie-ZZUOXDRM-DsJRjVcu.js +1 -0
  257. package/dist/mcp/studio/assets/pieDiagram-DEJITSTG-JeKGFs3r.js +30 -0
  258. package/dist/mcp/studio/assets/quadrantDiagram-34T5L4WZ-BSFYvc1U.js +7 -0
  259. package/dist/mcp/studio/assets/radar-PYXPWWZC-cUDYP2Ic.js +1 -0
  260. package/dist/mcp/studio/assets/reduce-x-wchVXY.js +1 -0
  261. package/dist/mcp/studio/assets/requirementDiagram-MS252O5E-CGeLKQyn.js +84 -0
  262. package/dist/mcp/studio/assets/rough.esm-DtEqI08j.js +1 -0
  263. package/dist/mcp/studio/assets/sankeyDiagram-XADWPNL6-CV38ZpSv.js +10 -0
  264. package/dist/mcp/studio/assets/sequenceDiagram-FGHM5R23-BbHPv3l1.js +157 -0
  265. package/dist/mcp/studio/assets/src-Cxc1bu7b.js +1 -0
  266. package/dist/mcp/studio/assets/stateDiagram-FHFEXIEX-BuBuguzn.js +1 -0
  267. package/dist/mcp/studio/assets/stateDiagram-v2-QKLJ7IA2-PQA-rl9o.js +1 -0
  268. package/dist/mcp/studio/assets/timeline-definition-GMOUNBTQ-D5xtyNE9.js +120 -0
  269. package/dist/mcp/studio/assets/treeView-SZITEDCU-DhRx0eaI.js +1 -0
  270. package/dist/mcp/studio/assets/treemap-W4RFUUIX-Btsj9DUH.js +1 -0
  271. package/dist/mcp/studio/assets/vennDiagram-DHZGUBPP-W4g15SMY.js +34 -0
  272. package/dist/mcp/studio/assets/wardley-RL74JXVD-BTpKsgl7.js +1 -0
  273. package/dist/mcp/studio/assets/wardleyDiagram-NUSXRM2D-f7wgXdwe.js +20 -0
  274. package/dist/mcp/studio/assets/xychartDiagram-5P7HB3ND-BWx9swPf.js +7 -0
  275. package/dist/mcp/studio/index.html +29 -0
  276. package/dist/review-mcp-server.d.ts +1 -0
  277. package/dist/review-mcp-server.js +178 -0
  278. package/dist/review-mcp-server.js.map +1 -0
  279. package/dist/review-server.d.ts +17 -0
  280. package/dist/review-server.js +223 -0
  281. package/dist/review-server.js.map +1 -0
  282. package/dist/review-ui/assets/arc-DH58vMfF.js +1 -0
  283. package/dist/review-ui/assets/architecture-YZFGNWBL-ChakYgFO.js +1 -0
  284. package/dist/review-ui/assets/architectureDiagram-Q4EWVU46-CcJOZCOb.js +36 -0
  285. package/dist/review-ui/assets/array-BCJ35G43.js +1 -0
  286. package/dist/review-ui/assets/blockDiagram-DXYQGD6D-H7mMv5Tv.js +132 -0
  287. package/dist/review-ui/assets/c4Diagram-AHTNJAMY-DCAtnxWd.js +10 -0
  288. package/dist/review-ui/assets/channel-BgHR4NPf.js +1 -0
  289. package/dist/review-ui/assets/chunk-2KRD3SAO-BfA3IkPQ.js +1 -0
  290. package/dist/review-ui/assets/chunk-4BX2VUAB-Dn9kswJO.js +1 -0
  291. package/dist/review-ui/assets/chunk-4TB4RGXK-CvTeZi33.js +206 -0
  292. package/dist/review-ui/assets/chunk-55IACEB6-CLBoivXU.js +1 -0
  293. package/dist/review-ui/assets/chunk-5FUZZQ4R-DU7La6QA.js +62 -0
  294. package/dist/review-ui/assets/chunk-5PVQY5BW-Dy3eUu9a.js +2 -0
  295. package/dist/review-ui/assets/chunk-67CJDMHE-BQ1xNHFx.js +1 -0
  296. package/dist/review-ui/assets/chunk-7N4EOEYR-B1ORNLQP.js +1 -0
  297. package/dist/review-ui/assets/chunk-AA7GKIK3-D3pS3mnx.js +1 -0
  298. package/dist/review-ui/assets/chunk-BSJP7CBP-BlpmbHL-.js +1 -0
  299. package/dist/review-ui/assets/chunk-CIAEETIT-BDZkAY47.js +1 -0
  300. package/dist/review-ui/assets/chunk-Dlc7tRH4.js +1 -0
  301. package/dist/review-ui/assets/chunk-EDXVE4YY-DNUlHz7M.js +1 -0
  302. package/dist/review-ui/assets/chunk-ENJZ2VHE-fwEKj0pQ.js +10 -0
  303. package/dist/review-ui/assets/chunk-FMBD7UC4-Cj8B2TLo.js +15 -0
  304. package/dist/review-ui/assets/chunk-FOC6F5B3-DGtCX5Ra.js +1 -0
  305. package/dist/review-ui/assets/chunk-ICPOFSXX-WTr3HDYE.js +122 -0
  306. package/dist/review-ui/assets/chunk-K5T4RW27-CWpdECLF.js +94 -0
  307. package/dist/review-ui/assets/chunk-KGLVRYIC-oI2XKaPz.js +1 -0
  308. package/dist/review-ui/assets/chunk-LIHQZDEY-Dzp3G35O.js +1 -0
  309. package/dist/review-ui/assets/chunk-ORNJ4GCN-DsHuVbPU.js +1 -0
  310. package/dist/review-ui/assets/chunk-OYMX7WX6-fgjoXAXJ.js +231 -0
  311. package/dist/review-ui/assets/chunk-QZHKN3VN-C4w1Z4n9.js +1 -0
  312. package/dist/review-ui/assets/chunk-U2HBQHQK-D8HUikvJ.js +70 -0
  313. package/dist/review-ui/assets/chunk-X2U36JSP-CuZ-SN2r.js +1 -0
  314. package/dist/review-ui/assets/chunk-YZCP3GAM-D0-dHF3G.js +1 -0
  315. package/dist/review-ui/assets/chunk-ZZ45TVLE-C1aIZGDA.js +1 -0
  316. package/dist/review-ui/assets/classDiagram-6PBFFD2Q-D_3LhkJc.js +1 -0
  317. package/dist/review-ui/assets/classDiagram-v2-HSJHXN6E-DQRUREh5.js +1 -0
  318. package/dist/review-ui/assets/clone-BZMtGzbS.js +1 -0
  319. package/dist/review-ui/assets/cose-bilkent-S5V4N54A-szpqu_3d.js +1 -0
  320. package/dist/review-ui/assets/cytoscape.esm-DZ22BVwz.js +321 -0
  321. package/dist/review-ui/assets/dagre-BfNtd34y.js +1 -0
  322. package/dist/review-ui/assets/dagre-KV5264BT-D6PbxORW.js +4 -0
  323. package/dist/review-ui/assets/defaultLocale-CIS5GEjP.js +1 -0
  324. package/dist/review-ui/assets/diagram-5BDNPKRD-BNAXBDig.js +10 -0
  325. package/dist/review-ui/assets/diagram-G4DWMVQ6-CIGS_5yQ.js +24 -0
  326. package/dist/review-ui/assets/diagram-MMDJMWI5-DJmcU2xZ.js +43 -0
  327. package/dist/review-ui/assets/diagram-TYMM5635-DW8XzrAz.js +24 -0
  328. package/dist/review-ui/assets/dist-B51l2n-9.js +1 -0
  329. package/dist/review-ui/assets/erDiagram-SMLLAGMA-BfUNH8zz.js +85 -0
  330. package/dist/review-ui/assets/flatten-BHh95bpO.js +1 -0
  331. package/dist/review-ui/assets/flowDiagram-DWJPFMVM-qgnlSvEC.js +162 -0
  332. package/dist/review-ui/assets/ganttDiagram-T4ZO3ILL-CFAN903o.js +292 -0
  333. package/dist/review-ui/assets/gitGraph-7Q5UKJZL-Dn47XunR.js +1 -0
  334. package/dist/review-ui/assets/gitGraphDiagram-UUTBAWPF-BcG6fDsE.js +106 -0
  335. package/dist/review-ui/assets/graphlib-Cie4kcbC.js +1 -0
  336. package/dist/review-ui/assets/identity-CWMh0UL-.js +1 -0
  337. package/dist/review-ui/assets/index-ByplNhhd.css +2 -0
  338. package/dist/review-ui/assets/index-S7nbpFp2.js +123 -0
  339. package/dist/review-ui/assets/info-OMHHGYJF-hAukP1xW.js +1 -0
  340. package/dist/review-ui/assets/infoDiagram-42DDH7IO-FblTAfC3.js +2 -0
  341. package/dist/review-ui/assets/init-BMBYmmUa.js +1 -0
  342. package/dist/review-ui/assets/ishikawaDiagram-UXIWVN3A-BA7dJd-J.js +70 -0
  343. package/dist/review-ui/assets/journeyDiagram-VCZTEJTY-CMx2w_is.js +139 -0
  344. package/dist/review-ui/assets/kanban-definition-6JOO6SKY-CFiOZCrT.js +89 -0
  345. package/dist/review-ui/assets/katex-8mXVa4k3.js +257 -0
  346. package/dist/review-ui/assets/line-BCdBO-oK.js +1 -0
  347. package/dist/review-ui/assets/linear-d7UHSQqm.js +1 -0
  348. package/dist/review-ui/assets/mermaid-parser.core-BHMXLuNx.js +4 -0
  349. package/dist/review-ui/assets/mindmap-definition-QFDTVHPH-CWO7vDqu.js +96 -0
  350. package/dist/review-ui/assets/ordinal-BDTCIhXR.js +1 -0
  351. package/dist/review-ui/assets/packet-4T2RLAQJ-Btz3ryW7.js +1 -0
  352. package/dist/review-ui/assets/path-CIRGLb_6.js +1 -0
  353. package/dist/review-ui/assets/pie-ZZUOXDRM-CreBtuDj.js +1 -0
  354. package/dist/review-ui/assets/pieDiagram-DEJITSTG-X2mFk5I3.js +30 -0
  355. package/dist/review-ui/assets/quadrantDiagram-34T5L4WZ-BSFYvc1U.js +7 -0
  356. package/dist/review-ui/assets/radar-PYXPWWZC-BcAPYMpV.js +1 -0
  357. package/dist/review-ui/assets/reduce-14YNCNxn.js +1 -0
  358. package/dist/review-ui/assets/requirementDiagram-MS252O5E-CDv1lxdq.js +84 -0
  359. package/dist/review-ui/assets/rough.esm-DtEqI08j.js +1 -0
  360. package/dist/review-ui/assets/sankeyDiagram-XADWPNL6-CV38ZpSv.js +10 -0
  361. package/dist/review-ui/assets/sequenceDiagram-FGHM5R23-DCuV_bhx.js +157 -0
  362. package/dist/review-ui/assets/src-Cxc1bu7b.js +1 -0
  363. package/dist/review-ui/assets/stateDiagram-FHFEXIEX-BfE_bGUQ.js +1 -0
  364. package/dist/review-ui/assets/stateDiagram-v2-QKLJ7IA2-u1yKXWoz.js +1 -0
  365. package/dist/review-ui/assets/timeline-definition-GMOUNBTQ-Ci0uFxaT.js +120 -0
  366. package/dist/review-ui/assets/treeView-SZITEDCU-BXg6-7zY.js +1 -0
  367. package/dist/review-ui/assets/treemap-W4RFUUIX-BToYbgol.js +1 -0
  368. package/dist/review-ui/assets/vennDiagram-DHZGUBPP-DvOuThac.js +34 -0
  369. package/dist/review-ui/assets/wardley-RL74JXVD-BAYzkcK-.js +1 -0
  370. package/dist/review-ui/assets/wardleyDiagram-NUSXRM2D-YxTu6WZw.js +20 -0
  371. package/dist/review-ui/assets/xychartDiagram-5P7HB3ND-V9j-Dl7t.js +7 -0
  372. package/dist/review-ui/index.html +29 -0
  373. package/dist/run-openflow-cli.d.ts +1 -0
  374. package/dist/run-openflow-cli.js +41 -0
  375. package/dist/run-openflow-cli.js.map +1 -0
  376. package/dist/shared/args.d.ts +3 -0
  377. package/dist/shared/args.js +27 -0
  378. package/dist/shared/args.js.map +1 -0
  379. package/dist/shared/browser.d.ts +4 -0
  380. package/dist/shared/browser.js +17 -0
  381. package/dist/shared/browser.js.map +1 -0
  382. package/dist/shared/fs.d.ts +15 -0
  383. package/dist/shared/fs.js +48 -0
  384. package/dist/shared/fs.js.map +1 -0
  385. package/dist/shared/i18n.d.ts +5 -0
  386. package/dist/shared/i18n.js +65 -0
  387. package/dist/shared/i18n.js.map +1 -0
  388. package/dist/shared/locales/en-US.json +88 -0
  389. package/dist/shared/locales/zh-CN.json +88 -0
  390. package/dist/shared/plugin-registry.d.ts +36 -0
  391. package/dist/shared/plugin-registry.js +51 -0
  392. package/dist/shared/plugin-registry.js.map +1 -0
  393. package/dist/shared/project-state.d.ts +17 -0
  394. package/dist/shared/project-state.js +75 -0
  395. package/dist/shared/project-state.js.map +1 -0
  396. package/dist/shared/terminal.d.ts +10 -0
  397. package/dist/shared/terminal.js +110 -0
  398. package/dist/shared/terminal.js.map +1 -0
  399. package/package.json +28 -0
  400. package/templates/archive/.gitkeep +1 -0
  401. package/templates/config.json +11 -0
  402. package/templates/current.json +3 -0
  403. package/templates/iterations/.gitkeep +1 -0
@@ -0,0 +1,341 @@
1
+ ---
2
+ name: openflow-spec
3
+ description: Use for the OpenFlow spec phase: route level, clarify requirements, write iteration spec artifacts, run spec review, and hand off to implement.
4
+ ---
5
+
6
+ # OpenFlow Spec
7
+
8
+ Create a reviewable spec for one concrete change. The output must let a future agent execute the work without relying on chat history. This skill owns the spec-stage boundary — it must produce a reviewable iteration, not product code.
9
+
10
+ This skill depends on:
11
+
12
+ - `openflow-workflow-governance` for level, stage, and gate rules, directory contract, ID conventions, and artifact write order.
13
+ - `openflow-cli-reference` for exact CLI command syntax and options.
14
+ - `openflow-knowledge-retrieval` for knowledge search during spec writing.
15
+
16
+ ## Inputs
17
+
18
+ - User request and follow-up answers.
19
+ - `.openflow/config.json`
20
+ - `.openflow/current.json`
21
+ - Active iteration files under `.openflow/iterations/<iteration-id>/` when present.
22
+ - Relevant repository source files, tests, docs, and conventions.
23
+ - Review feedback from `reviews/spec-review.json` and `reviews/spec-reviewer.md` when present.
24
+
25
+ Use `.openflow/config.json.language` for generated OpenFlow documents and final handoff text. If the value is absent, use `en-US`.
26
+
27
+ ## Preflight
28
+
29
+ 1. Run `openflow preflight --command spec` and parse the JSON output.
30
+ 2. Use `language` and `defaultLevel` from the output for all subsequent document generation.
31
+ 3. If `action` is `"continue"`, resume the iteration at `iterationPath`.
32
+ 4. If `action` is `"create"`, derive a slug from the user's request and run:
33
+ ```bash
34
+ openflow iteration create YYYY-MM-DD-short-slug
35
+ ```
36
+ Then use the new `iterationPath` returned by a follow-up `openflow state` call.
37
+
38
+ Use an iteration id shaped like `YYYY-MM-DD-short-slug`. Keep all durable spec artifacts inside that iteration folder.
39
+ Write generated OpenFlow documents in the resolved `language`; if absent, use `en-US`.
40
+
41
+ ## Level 0 Guard
42
+
43
+ Before entering any spec flow, check whether the request meets **Level 0** criteria:
44
+
45
+ - Single file change
46
+ - Fewer than 10 lines affected
47
+ - Zero risk (no API, no data, no permissions, no cross-boundary impact)
48
+ - No ambiguity in the request
49
+
50
+ If all four conditions are true: **Skip OpenFlow entirely.** Execute the change directly. Do not create an iteration, do not write artifacts, do not enter any level flow. Tell the user what was done and move on.
51
+
52
+ If any condition is false, proceed to level routing below.
53
+
54
+ ## Level Routing
55
+
56
+ See `openflow-workflow-governance` for complete level routing rules, selection criteria, and gate requirements.
57
+
58
+ **Key points for spec phase:**
59
+ - Route before writing the spec. Revise the route if exploration reveals more risk.
60
+ - Level 0: Skip OpenFlow entirely for single-file, <10 lines, zero-risk changes.
61
+ - Level 1: SPEC only (no PLAN/TASKS), conversational confirm.
62
+ - Level 2: SPEC + PLAN + TASKS, single review gate (SPEC primary, PLAN/TASKS as reference).
63
+ - Level 3: Full artifacts, single review gate (SPEC only; PLAN+TASKS reviewed by AI only).
64
+
65
+ Routing belongs to the main agent using governance rules. A subagent may review the route but must not own the decision.
66
+
67
+ ## Clarification Loop
68
+
69
+ Ask **exactly ONE** high-signal question at a time when unknowns would change:
70
+
71
+ - scope or non-goals
72
+ - acceptance criteria
73
+ - platform/runtime boundaries
74
+ - data shape, permissions, or migration
75
+ - risk tolerance
76
+ - review or validation requirements
77
+
78
+ For each question:
79
+ 1. **Research the codebase FIRST** — most answers can be found by reading existing code, tests, or docs
80
+ 2. Only ask if the answer truly requires user judgment or preference
81
+ 3. Provide a recommended answer with rationale when applicable
82
+
83
+ For Claude Code, use the exact tool `AskUserQuestion` for that single question. Do not ask blocking clarification questions as plain prose when the tool is available.
84
+
85
+ Do not ask questions that can be answered by reading the repository. When you can proceed with a reasonable assumption, record it in `SPEC.md` or `CONTEXT.md` instead of interrupting the user.
86
+
87
+ Continue the loop until the spec can state the goal, scope, non-goals, acceptance criteria, and risks without hand-waving.
88
+
89
+ ## Exploration Rules
90
+
91
+ Read enough code and docs to avoid writing an abstract spec. Prefer narrow inspection:
92
+
93
+ - existing modules and ownership boundaries
94
+ - nearby tests and validation commands
95
+ - existing UI/API/CLI patterns
96
+ - prior OpenFlow iteration artifacts if they affect continuity
97
+ - reference material only when it changes the spec
98
+
99
+ Capture durable findings in `CONTEXT.md`. Do not dump raw notes that will not help execution.
100
+
101
+ ## Artifact Rules
102
+
103
+ Write all spec-stage artifacts inside the active iteration folder:
104
+
105
+ ```text
106
+ .openflow/iterations/<iteration-id>/
107
+ flow.json
108
+ STATE.md
109
+ SPEC.md
110
+ CONTEXT.md
111
+ TASKS.md # Level 2+ only
112
+ PLAN.md # Level 2+ only
113
+ reviews/
114
+ ```
115
+
116
+ Use `SPEC.md` as the default human review surface. It should reduce reviewer burden, not expose every exploration note.
117
+
118
+ Use `CONTEXT.md`, `TASKS.md`, and `PLAN.md` for AI-facing detail. Human-visible content may still be AI-readable, but the files have different jobs.
119
+
120
+ > **⛔ Strict ordering constraint**: `PLAN.md` and `TASKS.md` must NEVER be generated before SPEC is approved by human review. SPEC is the single source of truth — PLAN/TASKS must be derived only from the approved SPEC. Violating this rule means the implement phase would act on unreviewed specifications.
121
+
122
+ ### Level-Conditional Artifacts
123
+
124
+ | Artifact | Level 0 | Level 1 | Level 2 | Level 3 | When Written |
125
+ |----------|---------|---------|---------|---------|----------|
126
+ | SPEC.md | No | Yes | Yes | Yes | Start of spec phase |
127
+ | CONTEXT.md | No | Optional | Yes | Yes | Start of spec phase (Level 1: only when exploration produces valuable findings) |
128
+ | TASKS.md | No | No | Yes | Yes | **Only after SPEC is approved** |
129
+ | PLAN.md | No | No | Yes | Yes | **Only after SPEC is approved** |
130
+
131
+ ## Level 1 Flow
132
+
133
+ 1. Create iteration via `openflow iteration create`.
134
+ 2. Write `SPEC.md` (simplified format only):
135
+ - One-Sentence Goal
136
+ - Scope (include mindmap diagram for clarity)
137
+ - Non-Goals
138
+ - Acceptance Criteria
139
+ > **Important**: Write SPEC.md in clear, accessible language. Prefer mermaid mindmaps to show feature structure. Ensure content is easy for humans to quickly understand and approve.
140
+ 3. **Ask user for confirmation** using `AskUserQuestion`. Translate visible text to `config.json.language`:
141
+
142
+ Question text: "SPEC is ready. Goal: [one-sentence goal]. Choose next step:"
143
+
144
+ Options:
145
+ - "Open website to review SPEC (in browser)"
146
+ - "I have issues, need revision"
147
+ - "Approved, but don't execute yet"
148
+ - "Approved, start execution now"
149
+
150
+ 4. Handle user choice:
151
+ - **"Open website to review SPEC"**: Call `openflow_review_start` with `flowPath=<iterationPath>` and `mode=spec`. Show the URL. Call `openflow_review_wait` with `closeOnSubmit=true`. Read `reviews/spec-review.json` and handle as approved/changes_requested.
152
+ - **"I have issues, need revision"**: Ask `AskUserQuestion` "Describe what needs to change:" (freeform), revise `SPEC.md`, then repeat step 3.
153
+ - **"Approved, but don't execute yet"**: Run `openflow flow set-gate approved`. Tell the user SPEC is approved and they can run `/openflow-implement` when ready.
154
+ - **"Approved, start execution now"**: Run `openflow flow set-gate approved`. Run `openflow flow set-stage implement`. Tell the user the iteration is ready and handoff to `/openflow-implement`.
155
+
156
+ 5. If approved: `flow.json.gate` must be `approved` before handing off.
157
+
158
+ Do not write `PLAN.md` or `TASKS.md` for Level 1. `CONTEXT.md` is optional for Level 1 — write it only if exploration produces findings worth preserving.
159
+
160
+ ## Level 2 Flow
161
+
162
+ 1. Create iteration via `openflow iteration create`.
163
+ 2. **Opening Sequence (see `openflow-workflow-governance` Spec Phase Opening Sequence):**
164
+ - **â‘  Read repository state (includes knowledge retrieval)**: Call `openflow-knowledge-retrieval` skill to retrieve relevant knowledge from `.openflow/knowledge/`. Then explore the codebase to understand current project state.
165
+ - **â‘¡ Write explicit assumptions**: Write exploration results and retrieved knowledge into `CONTEXT.md` (including Assumptions section).
166
+ - **â‘¢ At most ONE question**: Ask only when assumptions cannot cover critical information (max 1 question).
167
+ - **â‘£ Continue if not blocked**: Proceed directly to SPEC writing.
168
+ 3. Write `SPEC.md` with sections:
169
+ - One-Sentence Goal
170
+ - Scope (include mindmap diagram for clarity)
171
+ - Non-Goals
172
+ - Context
173
+ - Constraints
174
+ - Acceptance Criteria
175
+ - Risks
176
+
177
+ > **Important**:
178
+ > - Write SPEC.md in clear, accessible language. Avoid excessive technical jargon.
179
+ > - Prefer mermaid mindmaps to show feature structure and relationships.
180
+ > - Every section should be human-readable and easy to understand.
181
+ > - Use tables and diagrams to make content clearer.
182
+
183
+ Do **not** include "Decisions Needed" or "AI Execution Summary" sections.
184
+
185
+ 4. Run `openflow validate --flow .openflow/iterations/<iteration-id>`.
186
+
187
+ 5. **Ask user for SPEC confirmation** using `AskUserQuestion`. Translate visible text to `config.json.language`:
188
+
189
+ Question text: "SPEC is ready. Goal: [one-sentence goal]. Choose next step:"
190
+
191
+ Options:
192
+ - "Open website to review SPEC (in browser)"
193
+ - "I have issues, need revision"
194
+ - "Approved, but don't execute yet"
195
+ - "Approved, start execution now"
196
+
197
+ 6. Handle user choice:
198
+ - **"Open website to review SPEC"**: Call `openflow_review_start` with `flowPath=<iterationPath>` and `mode=spec`. Show the URL. Call `openflow_review_wait` with `closeOnSubmit=true`. Read `reviews/spec-review.json`.
199
+ - If `changes_requested`: run `openflow flow inc-revision`, revise `SPEC.md`, re-run validate, repeat from step 5.
200
+ - If `approved`: continue to step 7.
201
+ - **"I have issues, need revision"**: Ask `AskUserQuestion` "Describe what needs to change:" (freeform), run `openflow flow inc-revision`, revise `SPEC.md`, re-run validate, repeat from step 5.
202
+ - **"Approved, but don't execute yet"**: Set approved, write PLAN+TASKS (step 7), then stop — do NOT run `set-stage implement`.
203
+ - **"Approved, start execution now"**: Set approved, write PLAN+TASKS (step 7), then run `set-stage implement` and handoff.
204
+
205
+ 7. **After SPEC is approved** (gate confirmed in step 6), write `PLAN.md` and `TASKS.md`.
206
+ > **⛔ Do not generate early**: before entering this step, `flow.json.gate` must be `approved`. Do not create any content for `PLAN.md` or `TASKS.md` before steps 5–6.
207
+ - `PLAN.md` sections: Context, Decisions, File Map, Key Interfaces, Spec Coverage, Dependencies
208
+ - `TASKS.md`: per-task entries with stable T-### IDs, Files, Dependencies, Read First, Detailed Action, Acceptance Criteria, Evidence placeholder
209
+
210
+ 8. Run `openflow validate --flow .openflow/iterations/<iteration-id>`.
211
+
212
+ 9. Run `openflow flow set-gate approved`.
213
+
214
+ 10. If user chose "Approved, start execution now" (or review was approved and user intent was to execute):
215
+ - Run `openflow flow set-stage implement`.
216
+ - Tell the user the iteration is ready for `/openflow-implement`.
217
+ Otherwise tell the user SPEC+PLAN+TASKS are ready and they can run `/openflow-implement` when ready.
218
+
219
+ ## Level 3 Flow
220
+
221
+ 1. Create iteration via `openflow iteration create`.
222
+ 2. **Opening Sequence (see `openflow-workflow-governance` Spec Phase Opening Sequence):**
223
+ - **â‘  Read repository state (includes knowledge retrieval)**: Call `openflow-knowledge-retrieval` skill to retrieve relevant knowledge from `.openflow/knowledge/`. Then explore the codebase to understand current project state.
224
+ - **â‘¡ Write explicit assumptions**: Write exploration results and retrieved knowledge into `CONTEXT.md` (required, include Related Knowledge section + Assumptions section).
225
+ - **â‘¢ At most ONE question**: Ask only when assumptions cannot cover critical information (max 1 question).
226
+ - **â‘£ Continue if not blocked**: Proceed directly to SPEC writing.
227
+ 3. Write `SPEC.md` with emphasis on human readability:
228
+ - One-Sentence Goal (clear and concise)
229
+ - Scope with mindmap diagram for visual understanding
230
+ - Non-Goals (explicit boundaries)
231
+ - Context (business background, code paths, design decisions, references)
232
+ - Constraints (boundaries, tests, tools/permissions)
233
+ - Acceptance Criteria (observable outcomes with verification methods)
234
+ - Risks (probability, impact, mitigation)
235
+
236
+ > **Important**:
237
+ > - Use clear, accessible language that non-technical stakeholders can understand.
238
+ > - Prefer mermaid diagrams (mindmap, flowchart) to show complex relationships.
239
+ > - Keep structure clear for quick human approval.
240
+ > - Every section should serve "help the reader quickly understand what to do, what not to do, and how to verify."
241
+
242
+ 4. **AI Revision Loop (SPEC)**: Run `artifact-reviewer` (AI subagent, mode: spec). Save output to `reviews/spec-reviewer.md`.
243
+ - If blockers are found, revise `SPEC.md` and re-run `artifact-reviewer` (mode: spec).
244
+ - Maximum 3 iterations of the revision loop.
245
+ - After 3 iterations, proceed with remaining blockers explicitly documented.
246
+
247
+ 5. Run `openflow validate --flow .openflow/iterations/<iteration-id>`.
248
+
249
+ 6. **Ask user for SPEC confirmation** using `AskUserQuestion` with the following text and exactly these 4 options:
250
+
251
+ Question text: "SPEC is ready (passed AI pre-review). Goal: [one-sentence goal]. Choose next step:"
252
+
253
+ Options:
254
+ - "Open website to review SPEC (in browser)"
255
+ - "I have issues, need revision"
256
+ - "Approved, but don't execute yet"
257
+ - "Approved, start execution now"
258
+
259
+ 7. Handle user choice:
260
+ - **"Open website to review SPEC"**: Call `openflow_review_start` with `flowPath=<iterationPath>` and `mode=spec`. Show the URL. Call `openflow_review_wait` with `closeOnSubmit=true`. Read `reviews/spec-review.json`.
261
+ - If `changes_requested`: run `openflow flow inc-revision`, revise, re-run AI loop + validate, repeat from step 6.
262
+ - If `approved`: continue to step 8.
263
+ - **"I have issues, need revision"**: Ask `AskUserQuestion` "Describe what needs to change:" (freeform), run `openflow flow inc-revision`, revise `SPEC.md`, re-run AI loop + validate, repeat from step 6.
264
+ - **"Approved, but don't execute yet"** or **"Approved, start execution now"**: Continue to step 8.
265
+
266
+ 8. **After SPEC approval**, write `PLAN.md` and `TASKS.md`.
267
+ > **⛔ Do not generate early**: before entering this step, `flow.json.gate` must be `approved`. Do not create any content for `PLAN.md` or `TASKS.md` before steps 6–7.
268
+
269
+
270
+ 9. **AI Revision Loop (PLAN)**: Run `artifact-reviewer` (AI subagent, mode: plan). Save output to `reviews/plan-reviewer.md`.
271
+ - If blockers are found, revise `PLAN.md`/`TASKS.md` and re-run `artifact-reviewer` (mode: plan).
272
+ - Maximum 3 iterations of the revision loop.
273
+ - After 3 iterations, proceed with remaining blockers explicitly documented.
274
+
275
+ 10. Run `openflow validate --flow .openflow/iterations/<iteration-id>`.
276
+
277
+ 11. Run `openflow flow set-gate approved`.
278
+ 12. If user chose "Approved, start execution now" (or review status was approved with implement intent):
279
+ - Run `openflow flow set-stage implement`.
280
+ - Tell the user the iteration is ready for `/openflow-implement`.
281
+ Otherwise tell the user SPEC+PLAN+TASKS are ready and they can run `/openflow-implement` when ready.
282
+
283
+ ## Required Spec Quality
284
+
285
+ `SPEC.md` must make these clear:
286
+
287
+ - What are we doing?
288
+ - What are we not doing?
289
+ - How will we know this is correct?
290
+ - What is the background and context?
291
+ - What constraints and boundaries apply?
292
+
293
+ Avoid vague phrases such as "improve", "handle edge cases", or "make it better" unless the spec defines observable outcomes.
294
+
295
+ SPEC.md does NOT include "Decisions Needed" or "AI Execution Summary" sections. Decisions belong in PLAN.md. Execution details belong in TASKS.md.
296
+
297
+ ## Task Quality
298
+
299
+ `TASKS.md` (Level 2+ only) must contain executable task slices with stable IDs.
300
+
301
+ Each task needs:
302
+
303
+ - **Files**: which files to create or modify
304
+ - **Read First**: files to read before implementing
305
+ - **Action**: concrete implementation steps
306
+ - **Acceptance Criteria**: observable condition proving completion
307
+ - **Validation**: command or check to verify correctness
308
+ - **Evidence**: placeholder for execution results
309
+
310
+ Tasks should be small enough for `/openflow-implement` to complete and validate independently. Do not create a single task named "implement everything".
311
+
312
+ ## Done State
313
+
314
+ The spec phase is done when:
315
+
316
+ - `flow.json.stage` is `spec`.
317
+ - `flow.json.gate` is `approved` for Level 2+.
318
+ - For Level 1: conversational confirm received.
319
+ - `SPEC.md`, `CONTEXT.md` are current for the same revision.
320
+ - `PLAN.md` and `TASKS.md` exist and are current for Level 2+ iterations.
321
+ - `reviews/spec-review.json` records approval when review is required (Level 2+).
322
+ - The final response tells the user the iteration id and that `/openflow-implement` can start.
323
+
324
+ ## Guardrails
325
+
326
+ - Do not implement product code in this phase.
327
+ - Do not scatter files directly under `.openflow/` except project-level control files such as `config.json` and `current.json`.
328
+ - Do not use OpenFlow MCP for workflow state management. MCP is only for Review UI interaction; write `.openflow` artifacts directly and validate them with `openflow validate`.
329
+ - When clarification is required in Claude Code, research the repository first, then use the exact tool name `AskUserQuestion` with exactly one high-signal question. Include a recommended answer with rationale when applicable. Do not ask blocking questions as plain prose.
330
+ - Do not generate an HTML spec as the source of truth. Write `SPEC.md`; the Review UI owns HTML rendering, styling, comments, and approval state.
331
+ - Do not let a subagent make routing or phase-transition decisions. Subagents can review and recommend only.
332
+ - Do not proceed to `/openflow-implement` for Level 2 or Level 3 without an approved review, unless the user explicitly overrides the gate and the override is recorded in `flow.json` and `STATE.md`.
333
+
334
+ ## User-Facing Output
335
+
336
+ When communicating with the user:
337
+
338
+ - Do not show raw `openflow validate` or `openflow preflight` error codes, field names, or schema rules (e.g. `tasks.checkbox`, `markdown.heading`, `flow.gate`). Translate errors into plain language (e.g. "There is a formatting issue in TASKS.md" instead of "tasks.checkbox: TASKS.md must include at least one checkbox task with a stable T-### id").
339
+ - Do not explain internal OpenFlow state machine concepts (gates, stages, revisions, level routing rationale) unless the user asks.
340
+ - Do not output "Insight" blocks about OpenFlow's internal mechanics, validation rules, or artifact schemas.
341
+ - Keep status updates short: iteration id, what changed, and what the user should do next.
@@ -0,0 +1,38 @@
1
+ # CONTEXT.md
2
+
3
+ `CONTEXT.md` stores AI-facing exploration context for execution.
4
+
5
+ Location:
6
+
7
+ ```text
8
+ .openflow/iterations/<iteration-id>/CONTEXT.md
9
+ ```
10
+
11
+ Template:
12
+
13
+ ```markdown
14
+ # Context
15
+
16
+ ## Repository Findings
17
+
18
+ - `<path>`: <Relevant pattern, constraint, or behavior.>
19
+
20
+ ## Assumptions
21
+
22
+ - <Assumption that allowed the spec to proceed.>
23
+
24
+ ## Constraints
25
+
26
+ - <Technical, product, platform, or policy constraint.>
27
+
28
+ ## References
29
+
30
+ - <Reference material used, only when it affected the spec.>
31
+ ```
32
+
33
+ Rules:
34
+
35
+ - Write only context that helps future execution.
36
+ - Prefer exact file paths and concise notes over pasted source.
37
+ - If an assumption could change scope, surface it in `SPEC.md` instead.
38
+ - Decisions belong in `PLAN.md`, not here.
@@ -0,0 +1,61 @@
1
+ # PLAN.md
2
+
3
+ Technical execution plan for Level 2+ iterations. Location: `.openflow/iterations/<iteration-id>/PLAN.md`
4
+
5
+ ## Sections
6
+
7
+ - **`# Plan: <title>`** — Title matching SPEC.md.
8
+ - **`## Context`** — Why this plan exists and current state.
9
+ - **`## Decisions`** — Technical decisions in D-NNN table: `| ID | Decision | Choice | Reason | Alternatives |`
10
+ - **`## File Map`** — Every file touched: `| File | Action | Description |`
11
+ - **`## Spec Coverage`** — REQ→Task mapping: `| Requirement | Task(s) |`. Optional **Multi-Source Audit**: `| GOAL | REQ | CONTEXT | Task(s) |`
12
+ - **`## Must Haves`** — Verifiable claims: `truths` (observable behaviors), `artifacts` (required files), `key_links` (file connections).
13
+ - **`## Key Interfaces`** — Public APIs/contracts affected: `| Interface | Change | Impact |`
14
+ - **`## Dependencies`** — Task DAG: `T-001 → T-002, T-003`. Optional **Wave** format: `Wave 1: T-001` / `Wave 2: T-002, T-003 (parallel)`
15
+ - **`## Risks`** — Implementation risks: `| Risk | Mitigation |`
16
+
17
+ ## Level-Conditional Requirements
18
+
19
+ | Section | Level 2 | Level 3 |
20
+ |---------|---------|---------|
21
+ | `# Plan: <title>` | Required | Required |
22
+ | `## Context` | Required | Required |
23
+ | `## Decisions` | Required | Required |
24
+ | `## File Map` | Required | Required |
25
+ | `## Spec Coverage` | Required | Required |
26
+ | `## Must Haves` | Optional | Required |
27
+ | `## Key Interfaces` | Optional | Required |
28
+ | `## Dependencies` | Optional | Required |
29
+ | `## Risks` | Optional | Required |
30
+ | `## Must NOT Have` | Optional | Optional |
31
+ | `## Wave Dependencies` | Optional | Optional |
32
+ | `## Multi-Source Audit` | Optional | Optional |
33
+
34
+ Target 50-200 lines. Over 200 → split iteration.
35
+
36
+ ## Example
37
+
38
+ ```markdown
39
+ # Plan: Add Level Routing
40
+
41
+ ## Context
42
+ Replace three-tier routing with four-level model (Level 0-3).
43
+
44
+ ## Decisions
45
+ | ID | Decision | Choice | Reason | Alternatives |
46
+ |----|----------|--------|--------|-------------|
47
+ | D-001 | Level storage | `level: 0-3` | Simple | String enum |
48
+
49
+ ## File Map
50
+ | File | Action | Description |
51
+ |------|--------|-------------|
52
+ | `src/flow/schema.ts` | Modify | Add `level` field |
53
+
54
+ ## Spec Coverage
55
+ | Requirement | Task(s) |
56
+ |-------------|---------|
57
+ | R-001 | T-001 |
58
+
59
+ ## Dependencies
60
+ T-001 → T-002, T-003
61
+ ```
@@ -0,0 +1,187 @@
1
+ # SPEC.md
2
+
3
+ `SPEC.md` is the default human review surface and the main statement of what the iteration should deliver.
4
+
5
+ Location:
6
+
7
+ ```text
8
+ .openflow/iterations/<iteration-id>/SPEC.md
9
+ ```
10
+
11
+ ## Required Headings
12
+
13
+ The validator requires these exact headings (in English). Content below each heading may be in any language.
14
+
15
+ 1. `# Spec: <title>`
16
+ 2. `## One-Sentence Goal`
17
+ 3. `## Scope`
18
+ 4. `## Non-Goals`
19
+ 5. `## Context`
20
+ 6. `## Constraints`
21
+ 7. `## Acceptance Criteria`
22
+
23
+ ### Optional Per Level
24
+
25
+ | Heading | Level 0 | Level 1 | Level 2 | Level 3 |
26
+ |---------|---------|---------|---------|---------|
27
+ | `## One-Sentence Goal` | N/A | Required | Required | Required |
28
+ | `## Scope` | N/A | Required | Required | Required |
29
+ | `## Non-Goals` | N/A | Required | Required | Required |
30
+ | `## Context` | N/A | Optional | Required | Required |
31
+ | `## Constraints` | N/A | Optional | Required | Required |
32
+ | `## Acceptance Criteria` | N/A | Required | Required | Required |
33
+ | `## Risks` | N/A | Optional | Required | Required |
34
+
35
+ ### Removed Sections
36
+
37
+ The following sections are NO LONGER part of SPEC.md:
38
+
39
+ - `## Decisions Needed` -- Decisions belong in PLAN.md.
40
+ - `## AI Execution Summary` -- Execution details belong in TASKS.md.
41
+
42
+ Do not include these headings in SPEC.md.
43
+
44
+ ## Template
45
+
46
+ ```markdown
47
+ # Spec: <title>
48
+
49
+ ## One-Sentence Goal
50
+
51
+ <One sentence describing the outcome and its significance>
52
+
53
+ ## Scope
54
+
55
+ ### Mindmap
56
+
57
+ ```mermaid
58
+ mindmap
59
+ root((Feature Topic))
60
+ Sub-feature 1
61
+ Implementation 1
62
+ Implementation 2
63
+ Sub-feature 2
64
+ Implementation 3
65
+ ```
66
+
67
+ > 💡 **Tip**: Use mindmaps to visually show feature structure and relationships. Recommended mermaid types: mindmap, flowchart, or sequenceDiagram.
68
+
69
+ ### Feature Scope
70
+
71
+ | ID | Requirement | Description |
72
+ |----|------------|-------------|
73
+ | R-001 | <Short name> | <Observable outcome> |
74
+ | R-002 | <Short name> | <Observable outcome> |
75
+
76
+ ## Non-Goals
77
+
78
+ | Excluded | Reason |
79
+ |-----------|--------|
80
+ | <Work not being done> | <Why> |
81
+
82
+ ## Context
83
+
84
+ <Optional for Level 1, required for Level 2+>
85
+
86
+ ### Business Background
87
+ <Why this change is needed, what problem it solves>
88
+
89
+ ### Relevant Code
90
+ <Related files, directories, and modules. Use code formatting, e.g. `packages/core/src/agents/`>
91
+
92
+ ### Design Decisions
93
+ <Related historical design decisions>
94
+
95
+ ### References
96
+ <Reference implementations, related resources, or similar features>
97
+
98
+ ## Constraints
99
+
100
+ <Optional for Level 1, required for Level 2+>
101
+
102
+ ### Boundaries
103
+ <Parts that must not be modified or affected>
104
+
105
+ ### Test Requirements
106
+ <Existing tests that must pass after implementation>
107
+
108
+ ### Tools and Permissions
109
+ <Allowed tools, libraries, frameworks, or special permissions>
110
+
111
+ ## Acceptance Criteria
112
+
113
+ | ID | Acceptance Criterion | Verification Method |
114
+ |----|---------------------|-------------------|
115
+ | A-001 | <Observable completion condition> | <How to check> |
116
+ | A-002 | <Observable completion condition> | <How to check> |
117
+
118
+ ## Risks
119
+
120
+ <Required for Level 2+, optional for Level 1>
121
+
122
+ | Risk | Probability | Impact | Mitigation |
123
+ |------|------------|--------|------------|
124
+ | <Potential issue> | High/Medium/Low | High/Medium/Low | <How to handle> |
125
+ ```
126
+
127
+ ## Formatting Guidelines
128
+
129
+ ### Prioritize Human Readability
130
+
131
+ SPEC.md's primary reader is a human reviewer. Ensure:
132
+
133
+ - **Clear language**: Use concise, accessible language. Avoid jargon overload.
134
+ - **Clear structure**: Use headings, tables, and diagrams for quick scanning.
135
+ - **Highlight key info**: Place critical information prominently. Use formatting (bold, blockquotes) for emphasis.
136
+
137
+ ### Diagrams First
138
+
139
+ Text suits details; diagrams suit big-picture understanding. Prefer diagrams:
140
+
141
+ 1. **Mindmap** (`mindmap`): Show feature structure and hierarchy
142
+ 2. **Flowchart** (`flowchart`): Show workflows and decision logic
143
+ 3. **Sequence diagram** (`sequenceDiagram`): Show component interactions
144
+
145
+ Each SPEC should include at least one mindmap to help quickly understand overall scope.
146
+
147
+ ### Mermaid Diagrams
148
+
149
+ Use `mermaid` code blocks. The Review UI renders them as SVG:
150
+
151
+ ```mermaid
152
+ mindmap
153
+ root((Topic))
154
+ Branch 1
155
+ Item 1
156
+ Item 2
157
+ Branch 2
158
+ Item 3
159
+ ```
160
+
161
+ Supported diagram types:
162
+ - `mindmap` - Concept hierarchy and feature structure (recommended for Scope)
163
+ - `flowchart` - Workflows and decision trees
164
+ - `sequenceDiagram` - Component interactions
165
+ - `gantt` - Timelines (less common)
166
+
167
+ Keep diagrams simple (fewer than 15 nodes). Split complex diagrams into multiple focused ones.
168
+
169
+ ### Tables
170
+
171
+ Use GFM tables for structured data: requirements, acceptance criteria, risks. Tables are easier to scan than prose and align well in the Review UI.
172
+
173
+ ### ASCII Trees
174
+
175
+ Tree characters (`├──`, `└──`) in `text` code blocks can show directory structures or simple hierarchies. These render well in any markdown viewer.
176
+
177
+ ## Rules
178
+
179
+ **Human-first principle**:
180
+ - Optimize for quick human approval and scope understanding
181
+ - Use clear, accessible language; avoid over-engineering the prose
182
+ - Use diagrams to aid understanding; prefer mermaid mindmaps for overall structure
183
+ - Keep it concise: do not expose implementation details in SPEC.md unless they affect scope, risk, or acceptance
184
+ - Do not embed HTML, scripts, CSS, or UI directives
185
+ - For richer rendering, use stable headings and IDs for the Review UI to parse
186
+ - Each acceptance criterion should map to at least one task in `TASKS.md`
187
+ - Use table format for requirements, acceptance criteria, and risks