@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,99 @@
1
+ # TASKS.md
2
+
3
+ Execution checklist for `/openflow-implement`.
4
+
5
+ Location: `.openflow/iterations/<iteration-id>/TASKS.md`
6
+
7
+ Required for Level 2+ only. Level 0 and Level 1 do not produce TASKS.md.
8
+
9
+ ## Task Template
10
+
11
+ ```markdown
12
+ # Tasks
13
+
14
+ ## Slice 1: <name>
15
+
16
+ - [ ] T-001: <task outcome>
17
+ - **Files:** <files to create or modify>
18
+ - **Dependencies:** <T-### or "none">
19
+ - **Read First:** <files to read before starting>
20
+ - **Action:** <specific implementation steps>
21
+ - **Acceptance Criteria:** <observable condition proving completion>
22
+ - **Validation:** <command, check, or review signal expected>
23
+ - Evidence: pending
24
+
25
+ ## Slice 2: <name>
26
+
27
+ - [ ] T-002: <task outcome>
28
+ - **Files:** <files to create or modify>
29
+ - **Dependencies:** T-001
30
+ - **Read First:** <files to read before starting>
31
+ - **Action:** <specific implementation steps>
32
+ - **Acceptance Criteria:** <observable condition>
33
+ - **Validation:** <command or check>
34
+ - Evidence: pending
35
+ ```
36
+
37
+ ## Field Definitions
38
+
39
+ - **Files:** Files the task will create or modify. Enables file-level dependency detection.
40
+ - **Dependencies:** Task IDs that must complete first. Use "none" for independent tasks.
41
+ - **Read First:** Files the executor should read before starting implementation.
42
+ - **Action:** Concrete steps specific enough that an agent can implement without chat history.
43
+ - **Acceptance Criteria:** Observable condition proving completion. Must be binary-checkable (yes/no). Maps to SPEC.md acceptance criteria.
44
+ - **Validation:** Command, check, or review signal that verifies correctness.
45
+ - **Evidence:** Filled during `/openflow-implement`. Must remain `pending` during spec phase.
46
+
47
+ ## Anti-Pattern Rules (Banned Phrases)
48
+
49
+ Tasks must NOT contain these vague phrases:
50
+
51
+ - "Implement the feature" (without specifying what)
52
+ - "Handle edge cases" (without listing which cases)
53
+ - "Update relevant files" (without naming them)
54
+ - "Fix issues" (without describing what is broken)
55
+ - "Make it work" (without defining "work")
56
+ - "Refactor as needed" (without stating what and why)
57
+ - "Add appropriate tests" (without specifying test cases)
58
+ - "Ensure proper handling" (without defining proper)
59
+
60
+ Any task using these phrases without concrete detail fails the specificity test.
61
+
62
+ ## Specificity Test
63
+
64
+ Every task must pass:
65
+
66
+ 1. Can an agent implement without reading chat history?
67
+ 2. Are target files named explicitly?
68
+ 3. Is the action concrete enough to start coding immediately?
69
+ 4. Is the validation check unambiguous?
70
+ 5. Does acceptance criteria map to SPEC.md?
71
+
72
+ ## Example Task
73
+
74
+ ```markdown
75
+ ## Slice 1: Add level field to flow.json
76
+
77
+ - [ ] T-001: Add `level` field to flow.json schema and CLI
78
+ - **Files:** `src/flow/schema.ts`, `src/flow/create.ts`, `src/cli/flow-set.ts`
79
+ - **Dependencies:** none
80
+ - **Read First:** `src/flow/schema.ts`, `src/flow/create.ts`
81
+ - **Action:**
82
+ 1. Add `level: 0 | 1 | 2 | 3` field to FlowSchema in `src/flow/schema.ts`
83
+ 2. Set default `level: 1` in `src/flow/create.ts` createFlow function
84
+ 3. Add `openflow flow set-level <0|1|2|3>` command in `src/cli/flow-set.ts`
85
+ - **Acceptance Criteria:** `flow.json` contains a `level` field; CLI accepts `set-level` with values 0-3; `npm test -- --grep "level"` passes
86
+ - **Validation:** `npm test -- --grep "level"` passes; `openflow flow set-level 2` succeeds
87
+ - Evidence: pending
88
+ ```
89
+
90
+ ## Rules
91
+
92
+ - Use stable task IDs (T-001, T-002, etc.).
93
+ - Group tasks by vertical slice rather than by abstract layer when possible.
94
+ - Each task must have validation defined before execution starts.
95
+ - Evidence stays `pending` until `/openflow-implement` runs validation.
96
+ - Do not mark tasks complete during spec phase.
97
+ - A checked task must include concrete evidence: command output, test result, screenshot, reviewer signal, extension result, or exact blocker text.
98
+ - Evidence must not be only `done`, `complete`, `yes`, `pending`, `todo`, or similar status words.
99
+ - Archive can leave a task unchecked only when Evidence starts with or clearly includes `deferred:`, `blocked:`, or `waived:` plus rationale.
@@ -0,0 +1,384 @@
1
+ ---
2
+ name: openflow-workflow-governance
3
+ description: Use with OpenFlow commands to decide level, stage, gate, review, and routing behavior.
4
+ ---
5
+
6
+ # OpenFlow Workflow Governance
7
+
8
+ Use this skill whenever an OpenFlow command needs to decide what workflow path is allowed.
9
+
10
+ This skill owns durable rules. Commands should stay thin. Stage skills should use these rules instead of redefining them.
11
+
12
+ ## Core Model
13
+
14
+ OpenFlow has three user-facing AI-tool commands:
15
+
16
+ - `/openflow-spec`
17
+ - `/openflow-implement`
18
+ - `/openflow-finalize`
19
+
20
+ The shell CLI is auxiliary. It installs assets, validates artifacts, starts the Review UI, and runs extensions. It does not own spec, implement, or finalize behavior.
21
+
22
+ ## Durable Unit
23
+
24
+ One delivery effort lives in one folder:
25
+
26
+ ```text
27
+ .openflow/iterations/<iteration-id>/
28
+ ```
29
+
30
+ Only project-level control files live directly under `.openflow/`, such as:
31
+
32
+ - `config.json`
33
+ - `current.json`
34
+ - `knowledge/` -- project-level durable knowledge store (decisions, guidelines, pitfalls, processes)
35
+
36
+ Do not scatter iteration files at `.openflow/STATE.md` or `.openflow/SPEC.md`.
37
+
38
+ ## Directory Contract
39
+
40
+ Project-level files:
41
+
42
+ ```text
43
+ .openflow/
44
+ config.json
45
+ current.json
46
+ iterations/
47
+ archive/
48
+ knowledge/
49
+ decisions/
50
+ guidelines/
51
+ pitfalls/
52
+ processes/
53
+ archive/
54
+ catalog.json
55
+ CATALOG.md
56
+ decisions/index.json
57
+ guidelines/index.json
58
+ pitfalls/index.json
59
+ processes/index.json
60
+ ```
61
+
62
+ Iteration files:
63
+
64
+ ```text
65
+ .openflow/iterations/<iteration-id>/
66
+ flow.json
67
+ STATE.md
68
+ SPEC.md
69
+ CONTEXT.md
70
+ TASKS.md
71
+ PLAN.md
72
+ WORKING_MEMORY.md
73
+ reviews/
74
+ spec-reviewer.md
75
+ spec-review.json
76
+ plan-reviewer.md
77
+ history.jsonl
78
+ extensions/
79
+ ```
80
+
81
+ `PLAN.md`, review outputs, and extensions are created only when useful or required by the stage.
82
+
83
+ `config.json.language` controls the language for generated OpenFlow documents. Use the configured tag, such as `en-US` or `zh-CN`; if absent, default to `en-US`. SPEC.md is the only artifact whose body language follows `config.language` — all other artifacts and templates use English by default.
84
+
85
+ ## Source Of Truth
86
+
87
+ - `flow.json` is the machine-readable state source — read-only for AI; modify only via openflow CLI commands. See `references/state-files.md`.
88
+ - `config.json` is the project-level settings source.
89
+ - `STATE.md` is a human-readable summary mirroring `flow.json`.
90
+ - `SPEC.md` is the default human review document.
91
+ - `PLAN.md` is the technical execution plan for Level 2+ iterations.
92
+ - `CONTEXT.md`, `TASKS.md` are primarily AI execution support.
93
+ - Review approval state belongs in `reviews/*.json`, not in comments inside `SPEC.md` or `PLAN.md`.
94
+ - `WORKING_MEMORY.md` is per-iteration scratchpad. See `implement/references/working-memory.md`.
95
+
96
+ For complete state file schemas and editing rules, see `references/state-files.md`.
97
+
98
+ OpenFlow MCP is only for Review UI interaction. Do not use it as a config, current pointer, or flow-state API.
99
+
100
+ Do not generate an HTML spec as the canonical artifact. The Review UI renders `SPEC.md` into HTML with consistent styling and interaction. HTML export can exist later as a derived artifact, not as source of truth.
101
+
102
+ ## ID Conventions
103
+
104
+ Use stable IDs so Review UI, tasks, and future evidence can point to the same concepts:
105
+
106
+ - Requirements: `R-001`, `R-002`
107
+ - Decisions: `D-001`, `D-002`
108
+ - Acceptance criteria: `A-001`, `A-002`
109
+ - Tasks: `T-001`, `T-002`
110
+ - Knowledge entries: `D-NNN` (decisions), `G-NNN` (guidelines), `P-NNN` (pitfalls), `PR-NNN` (processes)
111
+
112
+ Do not renumber existing IDs during a revision unless the item was removed and the change is clearly noted.
113
+
114
+ ## Artifact Write Order
115
+
116
+ Write order is level-conditional. Validate after writing with `openflow validate --flow .openflow/iterations/<iteration-id>` before crossing a stage boundary.
117
+
118
+ ### Level 0
119
+
120
+ No OpenFlow artifacts. Skip entirely.
121
+
122
+ ### Level 1
123
+
124
+ 1. Iteration directory and `flow.json` are created by `openflow iteration create`.
125
+ 2. Write `CONTEXT.md` **only** when exploration produced findings worth preserving (optional for Level 1).
126
+ 3. Write `SPEC.md` (Goal + Scope + Non-Goals + Acceptance only). Use the template in `spec/references/spec-template.md`.
127
+ 4. Update `STATE.md` last so it summarizes the files actually written.
128
+
129
+ ### Level 2
130
+
131
+ 1. Iteration directory and `flow.json` are created by `openflow iteration create`.
132
+ 2. Write `CONTEXT.md` from confirmed exploration and assumptions. Use `spec/references/context-template.md`.
133
+ 3. Write `SPEC.md` for human review. Use `spec/references/spec-template.md`.
134
+ 4. After SPEC gate is approved: write `PLAN.md` (`spec/references/plan-template.md`) and `TASKS.md` (`spec/references/tasks-template.md`).
135
+ 5. Update `STATE.md` last so it summarizes the files actually written.
136
+
137
+ ### Level 3
138
+
139
+ 1. Iteration directory and `flow.json` are created by `openflow iteration create`.
140
+ 2. Write `CONTEXT.md` from confirmed exploration and assumptions.
141
+ 3. Write `SPEC.md` for human review.
142
+ 4. Submit SPEC for `artifact-reviewer` (mode: spec) AI review, then Human Review UI (Gate 1).
143
+ 5. After SPEC gate passes (`flow.json.gate` must be `approved`): write `PLAN.md` and `TASKS.md`.
144
+ 6. Submit PLAN+TASKS for `artifact-reviewer` (mode: plan) AI review only (no second human gate). Save output to `reviews/plan-reviewer.md`.
145
+ 7. Update `STATE.md` last so it summarizes the files actually written.
146
+
147
+ When revising after feedback, preserve useful history and only change artifacts affected by the requested change.
148
+
149
+ ## Level Routing
150
+
151
+ Choose the correct level based on scope, risk, and complexity.
152
+
153
+ | Level | Name | Criteria | Artifacts | Gate |
154
+ | --- | --- | --- | --- | --- |
155
+ | 0 | Skip | Single file, <10 lines, zero risk | None -- skip OpenFlow entirely | No gate |
156
+ | 1 | Simple | 1-3 files, no tech decisions | SPEC only (Goal + Scope + Non-Goals + Acceptance) | No formal gate (conversational confirm) |
157
+ | 2 | Standard | 3+ files, needs tech decisions | SPEC + PLAN + TASKS | Single review gate (SPEC only, via Review UI) |
158
+ | 3 | Deep | Architecture, security, migration, cross-boundary, data model, or high ambiguity | Full set (SPEC + PLAN + TASKS + reviews) | Single review gate (SPEC only, AI reviewer + Review UI) |
159
+
160
+ ### Level Selection Rules
161
+
162
+ - Start at Level 1 by default. Move up or down based on evidence.
163
+ - Downgrade to Level 0 only when the change is single file, under 10 lines, and zero risk.
164
+ - Escalate to Level 2 when the work affects 3+ files, needs technical decisions, or involves shared components.
165
+ - Escalate to Level 3 when the work changes architecture, package boundaries, public contracts, data models, security-sensitive behavior, performance-critical paths, or requires a migration/rollout strategy.
166
+
167
+ Routing is performed by the main agent. Subagents may review routing rationale but cannot decide the stage or gate.
168
+
169
+ ## Stage Rules
170
+
171
+ Valid stages:
172
+
173
+ - `spec`: clarify and approve what should be built.
174
+ - `implement`: implement approved tasks and collect evidence.
175
+ - `blocked`: stop because a decision, dependency, permission, or failing gate prevents progress.
176
+ - `finalize`: prepare final summary, validation, durable knowledge, and archive.
177
+ - `archived`: closed. Do not resume except by creating a new iteration or explicitly reopening by user request.
178
+
179
+ Do not cross stages silently. A command may prepare the next handoff, but it must not perform the next command's work.
180
+
181
+ ## Spec Phase Opening Sequence (Four Steps)
182
+
183
+ At the start of the Spec phase for Level 2+ (after iteration is created, before writing SPEC.md), the agent must follow this opening sequence. Level 1 does not require this sequence — write SPEC.md directly.
184
+
185
+ 1. **Read repository state** (includes knowledge retrieval):
186
+ - First call the `knowledge-retrieval` skill to retrieve relevant project knowledge from `.openflow/knowledge/`.
187
+ - Then explore the codebase to understand current project state, architectural patterns, technical constraints, and prior decisions.
188
+ - Write exploration results and retrieved knowledge into CONTEXT.md.
189
+ - Do not skip this step and ask the user directly.
190
+
191
+ 2. **Write explicit assumptions**: in the Assumptions section of CONTEXT.md, record:
192
+ - Confirmed facts (from code exploration).
193
+ - Reasonable assumptions about unknowns (based on experience and context).
194
+ - Rationale and confidence level for each assumption.
195
+
196
+ 3. **At most ONE question**: only ask the user when:
197
+ - Assumptions cannot cover a critical information gap.
198
+ - The missing information would significantly affect implementation correctness.
199
+ - The information cannot be obtained through code exploration or reasonable inference.
200
+
201
+ Limit to at most ONE question per Spec phase.
202
+
203
+ 4. **Continue if not blocked**: if assumptions cover all necessary information, continue writing SPEC.md without asking. Do not ask just to "feel more certain".
204
+
205
+ **Core principle**: prefer code exploration and explicit assumptions over user interaction. Ask only when assumptions truly cannot cover critical information, and at most one question.
206
+
207
+ ## Gate Rules
208
+
209
+ Gate requirements are level-conditional:
210
+
211
+ - **Level 0**: No gate. No OpenFlow artifacts.
212
+ - **Level 1**: No formal gate. Conversational confirm with the user is sufficient.
213
+ - **Level 2**: Single review gate. SPEC.md is reviewed via Review UI. PLAN/TASKS/CONTEXT are shown as reference material. Approved review required before implement.
214
+ - **Level 3**: Single review gate. SPEC.md is reviewed by `artifact-reviewer` (mode: spec) AI then Human Review UI. PLAN+TASKS are reviewed by `artifact-reviewer` (mode: plan) AI only (no separate human gate).
215
+
216
+ Changing `SPEC.md`, `TASKS.md`, or `PLAN.md` after approval increments `flow.json.revision` and resets the gate to `draft` or `changes_requested`.
217
+
218
+ Completed implement tasks require evidence. A checked task with weak evidence is not complete.
219
+
220
+ Finalize requires all required tasks, reviews, and extension results to be complete, passed, or explicitly deferred with rationale.
221
+
222
+ ## User Interaction Rules
223
+
224
+ Ask questions only when the answer changes scope, acceptance, boundaries, platform, data, permissions, or risk.
225
+
226
+ Prefer repository exploration and explicit assumptions over low-value questions.
227
+
228
+ For Claude Code, blocking clarification must use the exact tool `AskUserQuestion`. Research the repository first, then use one call with exactly one high-signal question. Include a recommended answer with rationale when applicable, and do not replace that tool call with plain prose.
229
+
230
+ Use short review loops:
231
+
232
+ 1. ask or revise
233
+ 2. update artifacts
234
+ 3. validate
235
+ 4. review
236
+ 5. repeat only while the gate is not satisfied
237
+
238
+ ## Reference
239
+
240
+ For the detailed state machine and routing checklist, read `references/workflow.md`.
241
+
242
+ For state file schemas (flow.json, current.json, STATE.md, review files) and editing rules, read `references/state-files.md`.
243
+
244
+ For knowledge file schemas (decisions, guidelines, pitfalls, processes) and index structure, read `references/knowledge-schema.md`.
245
+
246
+ ## Subagent Scheduling Strategy
247
+
248
+ This section defines how the main agent decides whether to use subagents during execution and how to schedule them in PLAN.md.
249
+
250
+ ### Difficulty Assessment
251
+
252
+ Before executing each task, the main agent assesses difficulty:
253
+
254
+ | Difficulty | Indicators | Executor | Review |
255
+ |------------|-----------|----------|--------|
256
+ | Simple | Single file, clear logic, 1-2 steps, config/docs | Dispatch `executor-quick` | None or `code-reviewer` (mode: compliance) |
257
+ | Medium | Multi-file coordination, context understanding, 3-5 steps | Dispatch `executor-general` | `code-reviewer` (mode: compliance) |
258
+ | Complex | Cross-module, architectural judgment, >5 steps | Dispatch `executor-deep` | `code-reviewer` (mode: compliance), then `code-reviewer` (mode: quality) |
259
+
260
+ Difficulty assessment dimensions:
261
+ - **File scope**: 1 file → Simple, 2-5 files → Medium, 6+ or cross-module → Complex
262
+ - **Change type**: config/docs → Simple, feature/fix → Medium, architecture/security → Complex
263
+ - **Risk level**: low → Simple, medium → Medium, high → Complex
264
+
265
+ ### Subagent Roles
266
+
267
+ | Role | Agent File | Model | Tools | When Used |
268
+ |------|-----------|-------|-------|-----------|
269
+ | Executor (Deep) | `agents/openflow-executor-deep.md` | opus | Read, Write, Edit, Glob, Grep, Bash | Complex tasks: architecture, cross-module, security |
270
+ | Executor (General) | `agents/openflow-executor-general.md` | sonnet | Read, Write, Edit, Glob, Grep, Bash | Standard tasks: features, bug fixes, integration |
271
+ | Executor (Quick) | `agents/openflow-executor-quick.md` | haiku | Read, Write, Edit, Glob, Grep, Bash | Simple tasks: config, docs, single-file changes |
272
+ | Code Reviewer | `agents/openflow-code-reviewer.md` | opus | Read, Glob, Grep, Bash | After executor completes (mode: compliance, quality) |
273
+ | Artifact Reviewer | `agents/openflow-artifact-reviewer.md` | opus | Read, Glob, Grep, Bash | Spec/plan/evidence/docs review |
274
+ | Explorer | `agents/openflow-explorer.md` | haiku | Read, Glob, Grep, Bash | Code search, file discovery, codebase exploration |
275
+ | Knowledge Curator | `agents/openflow-knowledge-curator.md` | sonnet | Read, Glob, Grep, Bash, Write, Edit | Knowledge dedup, validation, indexing |
276
+
277
+ ### Review Level Decision
278
+
279
+ | Difficulty | Compliance Review (code-reviewer mode: compliance) | Quality Review (code-reviewer mode: quality) |
280
+ |-----------|------------------------------------------------------|------------------------------------------------|
281
+ | Simple | Optional (if behavior changed) | No |
282
+ | Medium | Yes | No |
283
+ | Complex | Yes | Yes |
284
+
285
+ ### Model Selection
286
+
287
+ | Task Complexity | Executor | Recommended Model |
288
+ |----------------|----------|-------------------|
289
+ | Simple (1-2 files, config/docs) | executor-quick | haiku |
290
+ | Standard (multi-file, features/fixes) | executor-general | sonnet |
291
+ | Complex (architecture, security) | executor-deep | opus |
292
+
293
+ ### Constraints
294
+
295
+ - Subagents cannot make routing or phase-transition decisions.
296
+ - Each executor subagent is fresh -- no inherited session context.
297
+ - Spec compliance review must complete before code quality review (strict order).
298
+ - Do not dispatch parallel executors for tasks that touch the same files.
299
+ - Subagent usage is dynamic and based on difficulty -- it is not mandatory for all tasks.
300
+ - `executor-quick` may BLOCK if task exceeds 1-2 file scope -- upgrade to `executor-general`.
301
+
302
+ ## Shared Reviewer Output Format
303
+
304
+ All OpenFlow reviewers should follow this consistent output format for clarity and tool compatibility:
305
+
306
+ ```markdown
307
+ ## <Reviewer Type> Review
308
+
309
+ Status: approved | changes_required
310
+
311
+ ### Findings
312
+
313
+ - [BLOCKER] <issue>
314
+ - Evidence: <file/path and section or line if available>
315
+ - Fix: <specific change needed>
316
+
317
+ ### Coverage Notes
318
+
319
+ - <brief notes on what was reviewed and coverage level>
320
+
321
+ ### Residual Risk
322
+
323
+ - <remaining risk or "None identified.">
324
+ ```
325
+
326
+ **Status values:**
327
+ - `approved` - No blocking findings. Proceed.
328
+ - `changes_required` - Blocking issues found. Fix and resubmit.
329
+
330
+ **Severity levels:**
331
+ - `BLOCKER` - Must fix before proceeding.
332
+ - `WARNING` - Should fix but not blocking.
333
+ - `INFO` - Observational, no action required.
334
+
335
+ When no findings exist, use:
336
+ ```markdown
337
+ ### Findings
338
+
339
+ No blocking findings.
340
+ ```
341
+
342
+ ## Knowledge Directory
343
+
344
+ OpenFlow maintains a project-level knowledge store for cross-iteration learning:
345
+
346
+ ```text
347
+ .openflow/
348
+ knowledge/
349
+ decisions/ # D-NNN
350
+ guidelines/ # G-NNN
351
+ pitfalls/ # P-NNN
352
+ processes/ # PR-NNN
353
+ archive/
354
+ catalog.json
355
+ CATALOG.md
356
+ ```
357
+
358
+ For complete file schemas and index structure, see `references/knowledge-schema.md`.
359
+
360
+ ### Type Disambiguation: Guideline vs Pitfall
361
+
362
+ - **Guideline** describes **what to do** -- a recommended practice, a proven pattern, a preferred approach.
363
+ - **Pitfall** describes **what goes wrong** -- a known failure mode, a common mistake, a subtle bug. This includes both known traps to avoid (preventive) and problems that were encountered and resolved (reactive).
364
+
365
+ If a knowledge entry could be either, prefer **guideline** when the primary value is showing the right way, and prefer **pitfall** when the primary value is warning about a specific failure that is hard to diagnose.
366
+
367
+ ### Extraction Criteria
368
+
369
+ Not every iteration produces knowledge files. Only extract when:
370
+
371
+ - **Decisions**: Affects multiple iterations, non-obvious architecture choice, involves a trade-off.
372
+ - **Guidelines**: Reusable recommended practices that have been validated in at least one iteration, patterns that generalise beyond the current scope.
373
+ - **Pitfalls**: Root cause was non-trivial to diagnose, fix pattern is reusable, the lesson prevents future mistakes.
374
+ - **Processes**: Multi-step business workflows that require consistent adherence, operational procedures where deviation causes defects.
375
+
376
+ ### Numbering
377
+
378
+ Use zero-padded sequential numbers: `001-`, `002-`, `003-`. Each knowledge type has its own ID prefix (D-NNN, G-NNN, P-NNN, PR-NNN).
379
+
380
+ ## Knowledge Index Structure
381
+
382
+ Knowledge indexes provide fast lookup without scanning all files. They are maintained by the `knowledge-curator` during the archive phase. For complete index schemas, see `references/knowledge-schema.md`.
383
+
384
+ Indexes must never be modified outside of the archive phase.