@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.
- package/dist/bin/openflow.d.ts +2 -0
- package/dist/bin/openflow.js +8 -0
- package/dist/bin/openflow.js.map +1 -0
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/config.js +38 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/flow.d.ts +1 -0
- package/dist/commands/flow.js +119 -0
- package/dist/commands/flow.js.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.js +1082 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/iteration.d.ts +1 -0
- package/dist/commands/iteration.js +131 -0
- package/dist/commands/iteration.js.map +1 -0
- package/dist/commands/mcp.d.ts +1 -0
- package/dist/commands/mcp.js +12 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/module.d.ts +1 -0
- package/dist/commands/module.js +137 -0
- package/dist/commands/module.js.map +1 -0
- package/dist/commands/plan.d.ts +1 -0
- package/dist/commands/plan.js +111 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/plugin.d.ts +1 -0
- package/dist/commands/plugin.js +246 -0
- package/dist/commands/plugin.js.map +1 -0
- package/dist/commands/preflight.d.ts +8 -0
- package/dist/commands/preflight.js +57 -0
- package/dist/commands/preflight.js.map +1 -0
- package/dist/commands/review.d.ts +1 -0
- package/dist/commands/review.js +145 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/state.d.ts +1 -0
- package/dist/commands/state.js +28 -0
- package/dist/commands/state.js.map +1 -0
- package/dist/commands/validate.d.ts +1 -0
- package/dist/commands/validate.js +310 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/core/artifacts.d.ts +140 -0
- package/dist/core/artifacts.js +809 -0
- package/dist/core/artifacts.js.map +1 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.js +27 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core-artifacts/marketplace.json +14 -0
- package/dist/core-artifacts/modules.json +20 -0
- package/dist/core-artifacts/openflow/.claude-plugin/plugin.json +8 -0
- package/dist/core-artifacts/openflow/.mcp.json +9 -0
- package/dist/core-artifacts/openflow/agents/openflow-artifact-reviewer.md +308 -0
- package/dist/core-artifacts/openflow/agents/openflow-code-reviewer.md +177 -0
- package/dist/core-artifacts/openflow/agents/openflow-executor-deep.md +119 -0
- package/dist/core-artifacts/openflow/agents/openflow-executor-general.md +104 -0
- package/dist/core-artifacts/openflow/agents/openflow-executor-quick.md +93 -0
- package/dist/core-artifacts/openflow/agents/openflow-explorer.md +69 -0
- package/dist/core-artifacts/openflow/agents/openflow-knowledge-curator.md +89 -0
- package/dist/core-artifacts/openflow/commands/knowledge.md +102 -0
- package/dist/core-artifacts/openflow/hooks/hooks.json +33 -0
- package/dist/core-artifacts/openflow/scripts/openflow-drift-guard.cjs +54 -0
- package/dist/core-artifacts/openflow/scripts/openflow-evidence-reminder.cjs +64 -0
- package/dist/core-artifacts/openflow/scripts/openflow-mcp-review.cjs +27 -0
- package/dist/core-artifacts/openflow/scripts/openflow-write-guard.cjs +27 -0
- package/dist/core-artifacts/openflow/scripts/session-start.cjs +12 -0
- package/dist/core-artifacts/openflow/skills/brainstorm/SKILL.md +131 -0
- package/dist/core-artifacts/openflow/skills/cli-reference/SKILL.md +196 -0
- package/dist/core-artifacts/openflow/skills/finalize/SKILL.md +109 -0
- package/dist/core-artifacts/openflow/skills/finalize/references/summary-template.md +39 -0
- package/dist/core-artifacts/openflow/skills/implement/SKILL.md +296 -0
- package/dist/core-artifacts/openflow/skills/implement/references/working-memory.md +49 -0
- package/dist/core-artifacts/openflow/skills/knowledge-retrieval/SKILL.md +78 -0
- package/dist/core-artifacts/openflow/skills/prd/SKILL.md +173 -0
- package/dist/core-artifacts/openflow/skills/prd/references/level-routing.md +94 -0
- package/dist/core-artifacts/openflow/skills/prd/references/prd-template.md +187 -0
- package/dist/core-artifacts/openflow/skills/prd/references/wireframe-template.html +122 -0
- package/dist/core-artifacts/openflow/skills/spec/SKILL.md +341 -0
- package/dist/core-artifacts/openflow/skills/spec/references/context-template.md +38 -0
- package/dist/core-artifacts/openflow/skills/spec/references/plan-template.md +61 -0
- package/dist/core-artifacts/openflow/skills/spec/references/spec-template.md +187 -0
- package/dist/core-artifacts/openflow/skills/spec/references/tasks-template.md +99 -0
- package/dist/core-artifacts/openflow/skills/workflow-governance/SKILL.md +384 -0
- package/dist/core-artifacts/openflow/skills/workflow-governance/references/knowledge-schema.md +241 -0
- package/dist/core-artifacts/openflow/skills/workflow-governance/references/state-files.md +148 -0
- package/dist/core-artifacts/openflow/skills/workflow-governance/references/workflow.md +119 -0
- package/dist/core-artifacts/templates/.gitkeep +0 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/review-mcp-server.d.ts +1 -0
- package/dist/mcp/review-mcp-server.js +191 -0
- package/dist/mcp/review-mcp-server.js.map +1 -0
- package/dist/mcp/review-server.d.ts +33 -0
- package/dist/mcp/review-server.js +340 -0
- package/dist/mcp/review-server.js.map +1 -0
- package/dist/mcp/review-ui/assets/arc-DH58vMfF.js +1 -0
- package/dist/mcp/review-ui/assets/architecture-YZFGNWBL-CW8o5JQi.js +1 -0
- package/dist/mcp/review-ui/assets/architectureDiagram-Q4EWVU46-CH35GquJ.js +36 -0
- package/dist/mcp/review-ui/assets/array-BCJ35G43.js +1 -0
- package/dist/mcp/review-ui/assets/blockDiagram-DXYQGD6D-B1JZnKG_.js +132 -0
- package/dist/mcp/review-ui/assets/c4Diagram-AHTNJAMY-DCAtnxWd.js +10 -0
- package/dist/mcp/review-ui/assets/channel-BgHR4NPf.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-2KRD3SAO-BkEfK915.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-4BX2VUAB-Dn9kswJO.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-4TB4RGXK-DbeI3ZO6.js +206 -0
- package/dist/mcp/review-ui/assets/chunk-55IACEB6-CLBoivXU.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-5FUZZQ4R-DU7La6QA.js +62 -0
- package/dist/mcp/review-ui/assets/chunk-5PVQY5BW-Dy3eUu9a.js +2 -0
- package/dist/mcp/review-ui/assets/chunk-67CJDMHE-BKQ4iYAM.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-7N4EOEYR-CUngSlME.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-AA7GKIK3-BClDbXxt.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-BSJP7CBP-BlpmbHL-.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-CIAEETIT-THpBXcoN.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-Dlc7tRH4.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-EDXVE4YY-DNUlHz7M.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-ENJZ2VHE-fwEKj0pQ.js +10 -0
- package/dist/mcp/review-ui/assets/chunk-FMBD7UC4-Cj8B2TLo.js +15 -0
- package/dist/mcp/review-ui/assets/chunk-FOC6F5B3-BtR_JW_A.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-ICPOFSXX-WTr3HDYE.js +122 -0
- package/dist/mcp/review-ui/assets/chunk-K5T4RW27-vtP3ehR7.js +94 -0
- package/dist/mcp/review-ui/assets/chunk-KGLVRYIC-Di2tkB7O.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-LIHQZDEY-DoHl9hYE.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-ORNJ4GCN-Bff-Vc2X.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-OYMX7WX6-Djey8TrX.js +231 -0
- package/dist/mcp/review-ui/assets/chunk-QZHKN3VN-C4w1Z4n9.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-U2HBQHQK-D8HUikvJ.js +70 -0
- package/dist/mcp/review-ui/assets/chunk-X2U36JSP-CuZ-SN2r.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-YZCP3GAM-D0-dHF3G.js +1 -0
- package/dist/mcp/review-ui/assets/chunk-ZZ45TVLE-C1aIZGDA.js +1 -0
- package/dist/mcp/review-ui/assets/classDiagram-6PBFFD2Q-DHrSK7zx.js +1 -0
- package/dist/mcp/review-ui/assets/classDiagram-v2-HSJHXN6E-ftN8ECVk.js +1 -0
- package/dist/mcp/review-ui/assets/clone-C3rjhi9V.js +1 -0
- package/dist/mcp/review-ui/assets/cose-bilkent-S5V4N54A-szpqu_3d.js +1 -0
- package/dist/mcp/review-ui/assets/cytoscape.esm-DZ22BVwz.js +321 -0
- package/dist/mcp/review-ui/assets/dagre-B4oIQbi5.js +1 -0
- package/dist/mcp/review-ui/assets/dagre-KV5264BT-zDsxU5-B.js +4 -0
- package/dist/mcp/review-ui/assets/defaultLocale-CIS5GEjP.js +1 -0
- package/dist/mcp/review-ui/assets/diagram-5BDNPKRD-UgfFjZ4o.js +10 -0
- package/dist/mcp/review-ui/assets/diagram-G4DWMVQ6-Wh9VCn50.js +24 -0
- package/dist/mcp/review-ui/assets/diagram-MMDJMWI5-xVD3G7_9.js +43 -0
- package/dist/mcp/review-ui/assets/diagram-TYMM5635-AUD291P2.js +24 -0
- package/dist/mcp/review-ui/assets/dist-B51l2n-9.js +1 -0
- package/dist/mcp/review-ui/assets/erDiagram-SMLLAGMA-B83D6NXm.js +85 -0
- package/dist/mcp/review-ui/assets/flatten-B80WBwOJ.js +1 -0
- package/dist/mcp/review-ui/assets/flowDiagram-DWJPFMVM-D3lXOeHD.js +162 -0
- package/dist/mcp/review-ui/assets/ganttDiagram-T4ZO3ILL-CFAN903o.js +292 -0
- package/dist/mcp/review-ui/assets/gitGraph-7Q5UKJZL-BfgkNWmC.js +1 -0
- package/dist/mcp/review-ui/assets/gitGraphDiagram-UUTBAWPF-DxqTOi4I.js +106 -0
- package/dist/mcp/review-ui/assets/graphlib-De-foo_H.js +1 -0
- package/dist/mcp/review-ui/assets/identity-CWMh0UL-.js +1 -0
- package/dist/mcp/review-ui/assets/index-Do0fBEfH.css +2 -0
- package/dist/mcp/review-ui/assets/index-uPMLqduV.js +123 -0
- package/dist/mcp/review-ui/assets/info-OMHHGYJF-DE18zZ5Z.js +1 -0
- package/dist/mcp/review-ui/assets/infoDiagram-42DDH7IO-Bnco1OGr.js +2 -0
- package/dist/mcp/review-ui/assets/init-BMBYmmUa.js +1 -0
- package/dist/mcp/review-ui/assets/ishikawaDiagram-UXIWVN3A-B89fugr9.js +70 -0
- package/dist/mcp/review-ui/assets/journeyDiagram-VCZTEJTY-CMx2w_is.js +139 -0
- package/dist/mcp/review-ui/assets/kanban-definition-6JOO6SKY-YvTOD1Vd.js +89 -0
- package/dist/mcp/review-ui/assets/katex-8mXVa4k3.js +257 -0
- package/dist/mcp/review-ui/assets/line-BCdBO-oK.js +1 -0
- package/dist/mcp/review-ui/assets/linear-d7UHSQqm.js +1 -0
- package/dist/mcp/review-ui/assets/mermaid-parser.core-DI1-3xL2.js +4 -0
- package/dist/mcp/review-ui/assets/mindmap-definition-QFDTVHPH-E_mV-_Fs.js +96 -0
- package/dist/mcp/review-ui/assets/ordinal-BDTCIhXR.js +1 -0
- package/dist/mcp/review-ui/assets/packet-4T2RLAQJ-BLPGKWDX.js +1 -0
- package/dist/mcp/review-ui/assets/path-CIRGLb_6.js +1 -0
- package/dist/mcp/review-ui/assets/pie-ZZUOXDRM-DVV6Yua9.js +1 -0
- package/dist/mcp/review-ui/assets/pieDiagram-DEJITSTG-Ct4JvywP.js +30 -0
- package/dist/mcp/review-ui/assets/quadrantDiagram-34T5L4WZ-BSFYvc1U.js +7 -0
- package/dist/mcp/review-ui/assets/radar-PYXPWWZC-BMkQDLKp.js +1 -0
- package/dist/mcp/review-ui/assets/reduce-C80XcylQ.js +1 -0
- package/dist/mcp/review-ui/assets/requirementDiagram-MS252O5E-Bp7uSYEK.js +84 -0
- package/dist/mcp/review-ui/assets/rough.esm-DtEqI08j.js +1 -0
- package/dist/mcp/review-ui/assets/sankeyDiagram-XADWPNL6-CV38ZpSv.js +10 -0
- package/dist/mcp/review-ui/assets/sequenceDiagram-FGHM5R23-BXN9jl1N.js +157 -0
- package/dist/mcp/review-ui/assets/src-Cxc1bu7b.js +1 -0
- package/dist/mcp/review-ui/assets/stateDiagram-FHFEXIEX-DZduDkIw.js +1 -0
- package/dist/mcp/review-ui/assets/stateDiagram-v2-QKLJ7IA2-xAWOcxSi.js +1 -0
- package/dist/mcp/review-ui/assets/timeline-definition-GMOUNBTQ-CLqXzNm8.js +120 -0
- package/dist/mcp/review-ui/assets/treeView-SZITEDCU-tPcANHUc.js +1 -0
- package/dist/mcp/review-ui/assets/treemap-W4RFUUIX-BGbXISSk.js +1 -0
- package/dist/mcp/review-ui/assets/vennDiagram-DHZGUBPP-gCnd0IYN.js +34 -0
- package/dist/mcp/review-ui/assets/wardley-RL74JXVD-CK3EfklM.js +1 -0
- package/dist/mcp/review-ui/assets/wardleyDiagram-NUSXRM2D-Dd7qMlPS.js +20 -0
- package/dist/mcp/review-ui/assets/xychartDiagram-5P7HB3ND-DXHXO8Zm.js +7 -0
- package/dist/mcp/review-ui/index.html +29 -0
- package/dist/mcp/studio/assets/arc-DH58vMfF.js +1 -0
- package/dist/mcp/studio/assets/architecture-YZFGNWBL-8xrwD39F.js +1 -0
- package/dist/mcp/studio/assets/architectureDiagram-Q4EWVU46-VmcLZTJf.js +36 -0
- package/dist/mcp/studio/assets/array-BCJ35G43.js +1 -0
- package/dist/mcp/studio/assets/blockDiagram-DXYQGD6D-D-1mlLYy.js +132 -0
- package/dist/mcp/studio/assets/c4Diagram-AHTNJAMY-DCAtnxWd.js +10 -0
- package/dist/mcp/studio/assets/channel-BgHR4NPf.js +1 -0
- package/dist/mcp/studio/assets/chunk-2KRD3SAO-CMDQx2WD.js +1 -0
- package/dist/mcp/studio/assets/chunk-4BX2VUAB-Dn9kswJO.js +1 -0
- package/dist/mcp/studio/assets/chunk-4TB4RGXK-aFEYGDkJ.js +206 -0
- package/dist/mcp/studio/assets/chunk-55IACEB6-CLBoivXU.js +1 -0
- package/dist/mcp/studio/assets/chunk-5FUZZQ4R-DU7La6QA.js +62 -0
- package/dist/mcp/studio/assets/chunk-5PVQY5BW-Dy3eUu9a.js +2 -0
- package/dist/mcp/studio/assets/chunk-67CJDMHE-DnkyJt7A.js +1 -0
- package/dist/mcp/studio/assets/chunk-7N4EOEYR-cnJ9dWSC.js +1 -0
- package/dist/mcp/studio/assets/chunk-AA7GKIK3-DjCZnyrT.js +1 -0
- package/dist/mcp/studio/assets/chunk-BSJP7CBP-BlpmbHL-.js +1 -0
- package/dist/mcp/studio/assets/chunk-CIAEETIT-CtvXSBsf.js +1 -0
- package/dist/mcp/studio/assets/chunk-Dlc7tRH4.js +1 -0
- package/dist/mcp/studio/assets/chunk-EDXVE4YY-DNUlHz7M.js +1 -0
- package/dist/mcp/studio/assets/chunk-ENJZ2VHE-fwEKj0pQ.js +10 -0
- package/dist/mcp/studio/assets/chunk-FMBD7UC4-Cj8B2TLo.js +15 -0
- package/dist/mcp/studio/assets/chunk-FOC6F5B3-Ca28VADd.js +1 -0
- package/dist/mcp/studio/assets/chunk-ICPOFSXX-WTr3HDYE.js +122 -0
- package/dist/mcp/studio/assets/chunk-K5T4RW27-pqiOLnBn.js +94 -0
- package/dist/mcp/studio/assets/chunk-KGLVRYIC-DZfGlR-G.js +1 -0
- package/dist/mcp/studio/assets/chunk-LIHQZDEY-6Ygb8Kwt.js +1 -0
- package/dist/mcp/studio/assets/chunk-ORNJ4GCN-DSlr7oSO.js +1 -0
- package/dist/mcp/studio/assets/chunk-OYMX7WX6-8z_2lCb3.js +231 -0
- package/dist/mcp/studio/assets/chunk-QZHKN3VN-C4w1Z4n9.js +1 -0
- package/dist/mcp/studio/assets/chunk-U2HBQHQK-D8HUikvJ.js +70 -0
- package/dist/mcp/studio/assets/chunk-X2U36JSP-CuZ-SN2r.js +1 -0
- package/dist/mcp/studio/assets/chunk-YZCP3GAM-D0-dHF3G.js +1 -0
- package/dist/mcp/studio/assets/chunk-ZZ45TVLE-C1aIZGDA.js +1 -0
- package/dist/mcp/studio/assets/classDiagram-6PBFFD2Q-IZXxqxqM.js +1 -0
- package/dist/mcp/studio/assets/classDiagram-v2-HSJHXN6E-BiJKwTXT.js +1 -0
- package/dist/mcp/studio/assets/clone-g4CuF1Hf.js +1 -0
- package/dist/mcp/studio/assets/cose-bilkent-S5V4N54A-szpqu_3d.js +1 -0
- package/dist/mcp/studio/assets/cytoscape.esm-DZ22BVwz.js +321 -0
- package/dist/mcp/studio/assets/dagre-Be9o0OzC.js +1 -0
- package/dist/mcp/studio/assets/dagre-KV5264BT-iB6PnHLr.js +4 -0
- package/dist/mcp/studio/assets/defaultLocale-CIS5GEjP.js +1 -0
- package/dist/mcp/studio/assets/diagram-5BDNPKRD-BLfWbiEB.js +10 -0
- package/dist/mcp/studio/assets/diagram-G4DWMVQ6-CgcnwgVO.js +24 -0
- package/dist/mcp/studio/assets/diagram-MMDJMWI5-CpkXvs2p.js +43 -0
- package/dist/mcp/studio/assets/diagram-TYMM5635-guxqmxjJ.js +24 -0
- package/dist/mcp/studio/assets/dist-B51l2n-9.js +1 -0
- package/dist/mcp/studio/assets/erDiagram-SMLLAGMA-Lwv-cC2Y.js +85 -0
- package/dist/mcp/studio/assets/flatten-Dv3Z_7XJ.js +1 -0
- package/dist/mcp/studio/assets/flowDiagram-DWJPFMVM-BKnaFfFR.js +162 -0
- package/dist/mcp/studio/assets/ganttDiagram-T4ZO3ILL-CFAN903o.js +292 -0
- package/dist/mcp/studio/assets/gitGraph-7Q5UKJZL-BSdEZNVc.js +1 -0
- package/dist/mcp/studio/assets/gitGraphDiagram-UUTBAWPF-D4z4QWni.js +106 -0
- package/dist/mcp/studio/assets/graphlib-C1IZi4Cg.js +1 -0
- package/dist/mcp/studio/assets/identity-CWMh0UL-.js +1 -0
- package/dist/mcp/studio/assets/index-CyBqHDpB.js +109 -0
- package/dist/mcp/studio/assets/index-Dn_Ujmba.css +2 -0
- package/dist/mcp/studio/assets/info-OMHHGYJF-CoTx64p3.js +1 -0
- package/dist/mcp/studio/assets/infoDiagram-42DDH7IO-QEji23sQ.js +2 -0
- package/dist/mcp/studio/assets/init-BMBYmmUa.js +1 -0
- package/dist/mcp/studio/assets/ishikawaDiagram-UXIWVN3A-lMurmqul.js +70 -0
- package/dist/mcp/studio/assets/journeyDiagram-VCZTEJTY-CMx2w_is.js +139 -0
- package/dist/mcp/studio/assets/kanban-definition-6JOO6SKY-DsOybLrS.js +89 -0
- package/dist/mcp/studio/assets/katex-8mXVa4k3.js +257 -0
- package/dist/mcp/studio/assets/line-BCdBO-oK.js +1 -0
- package/dist/mcp/studio/assets/linear-d7UHSQqm.js +1 -0
- package/dist/mcp/studio/assets/mermaid-parser.core-BZtTt4qJ.js +4 -0
- package/dist/mcp/studio/assets/mindmap-definition-QFDTVHPH-B2yfABR9.js +96 -0
- package/dist/mcp/studio/assets/ordinal-BDTCIhXR.js +1 -0
- package/dist/mcp/studio/assets/packet-4T2RLAQJ-Bi4IG7s8.js +1 -0
- package/dist/mcp/studio/assets/path-CIRGLb_6.js +1 -0
- package/dist/mcp/studio/assets/pie-ZZUOXDRM-DsJRjVcu.js +1 -0
- package/dist/mcp/studio/assets/pieDiagram-DEJITSTG-JeKGFs3r.js +30 -0
- package/dist/mcp/studio/assets/quadrantDiagram-34T5L4WZ-BSFYvc1U.js +7 -0
- package/dist/mcp/studio/assets/radar-PYXPWWZC-cUDYP2Ic.js +1 -0
- package/dist/mcp/studio/assets/reduce-x-wchVXY.js +1 -0
- package/dist/mcp/studio/assets/requirementDiagram-MS252O5E-CGeLKQyn.js +84 -0
- package/dist/mcp/studio/assets/rough.esm-DtEqI08j.js +1 -0
- package/dist/mcp/studio/assets/sankeyDiagram-XADWPNL6-CV38ZpSv.js +10 -0
- package/dist/mcp/studio/assets/sequenceDiagram-FGHM5R23-BbHPv3l1.js +157 -0
- package/dist/mcp/studio/assets/src-Cxc1bu7b.js +1 -0
- package/dist/mcp/studio/assets/stateDiagram-FHFEXIEX-BuBuguzn.js +1 -0
- package/dist/mcp/studio/assets/stateDiagram-v2-QKLJ7IA2-PQA-rl9o.js +1 -0
- package/dist/mcp/studio/assets/timeline-definition-GMOUNBTQ-D5xtyNE9.js +120 -0
- package/dist/mcp/studio/assets/treeView-SZITEDCU-DhRx0eaI.js +1 -0
- package/dist/mcp/studio/assets/treemap-W4RFUUIX-Btsj9DUH.js +1 -0
- package/dist/mcp/studio/assets/vennDiagram-DHZGUBPP-W4g15SMY.js +34 -0
- package/dist/mcp/studio/assets/wardley-RL74JXVD-BTpKsgl7.js +1 -0
- package/dist/mcp/studio/assets/wardleyDiagram-NUSXRM2D-f7wgXdwe.js +20 -0
- package/dist/mcp/studio/assets/xychartDiagram-5P7HB3ND-BWx9swPf.js +7 -0
- package/dist/mcp/studio/index.html +29 -0
- package/dist/review-mcp-server.d.ts +1 -0
- package/dist/review-mcp-server.js +178 -0
- package/dist/review-mcp-server.js.map +1 -0
- package/dist/review-server.d.ts +17 -0
- package/dist/review-server.js +223 -0
- package/dist/review-server.js.map +1 -0
- package/dist/review-ui/assets/arc-DH58vMfF.js +1 -0
- package/dist/review-ui/assets/architecture-YZFGNWBL-ChakYgFO.js +1 -0
- package/dist/review-ui/assets/architectureDiagram-Q4EWVU46-CcJOZCOb.js +36 -0
- package/dist/review-ui/assets/array-BCJ35G43.js +1 -0
- package/dist/review-ui/assets/blockDiagram-DXYQGD6D-H7mMv5Tv.js +132 -0
- package/dist/review-ui/assets/c4Diagram-AHTNJAMY-DCAtnxWd.js +10 -0
- package/dist/review-ui/assets/channel-BgHR4NPf.js +1 -0
- package/dist/review-ui/assets/chunk-2KRD3SAO-BfA3IkPQ.js +1 -0
- package/dist/review-ui/assets/chunk-4BX2VUAB-Dn9kswJO.js +1 -0
- package/dist/review-ui/assets/chunk-4TB4RGXK-CvTeZi33.js +206 -0
- package/dist/review-ui/assets/chunk-55IACEB6-CLBoivXU.js +1 -0
- package/dist/review-ui/assets/chunk-5FUZZQ4R-DU7La6QA.js +62 -0
- package/dist/review-ui/assets/chunk-5PVQY5BW-Dy3eUu9a.js +2 -0
- package/dist/review-ui/assets/chunk-67CJDMHE-BQ1xNHFx.js +1 -0
- package/dist/review-ui/assets/chunk-7N4EOEYR-B1ORNLQP.js +1 -0
- package/dist/review-ui/assets/chunk-AA7GKIK3-D3pS3mnx.js +1 -0
- package/dist/review-ui/assets/chunk-BSJP7CBP-BlpmbHL-.js +1 -0
- package/dist/review-ui/assets/chunk-CIAEETIT-BDZkAY47.js +1 -0
- package/dist/review-ui/assets/chunk-Dlc7tRH4.js +1 -0
- package/dist/review-ui/assets/chunk-EDXVE4YY-DNUlHz7M.js +1 -0
- package/dist/review-ui/assets/chunk-ENJZ2VHE-fwEKj0pQ.js +10 -0
- package/dist/review-ui/assets/chunk-FMBD7UC4-Cj8B2TLo.js +15 -0
- package/dist/review-ui/assets/chunk-FOC6F5B3-DGtCX5Ra.js +1 -0
- package/dist/review-ui/assets/chunk-ICPOFSXX-WTr3HDYE.js +122 -0
- package/dist/review-ui/assets/chunk-K5T4RW27-CWpdECLF.js +94 -0
- package/dist/review-ui/assets/chunk-KGLVRYIC-oI2XKaPz.js +1 -0
- package/dist/review-ui/assets/chunk-LIHQZDEY-Dzp3G35O.js +1 -0
- package/dist/review-ui/assets/chunk-ORNJ4GCN-DsHuVbPU.js +1 -0
- package/dist/review-ui/assets/chunk-OYMX7WX6-fgjoXAXJ.js +231 -0
- package/dist/review-ui/assets/chunk-QZHKN3VN-C4w1Z4n9.js +1 -0
- package/dist/review-ui/assets/chunk-U2HBQHQK-D8HUikvJ.js +70 -0
- package/dist/review-ui/assets/chunk-X2U36JSP-CuZ-SN2r.js +1 -0
- package/dist/review-ui/assets/chunk-YZCP3GAM-D0-dHF3G.js +1 -0
- package/dist/review-ui/assets/chunk-ZZ45TVLE-C1aIZGDA.js +1 -0
- package/dist/review-ui/assets/classDiagram-6PBFFD2Q-D_3LhkJc.js +1 -0
- package/dist/review-ui/assets/classDiagram-v2-HSJHXN6E-DQRUREh5.js +1 -0
- package/dist/review-ui/assets/clone-BZMtGzbS.js +1 -0
- package/dist/review-ui/assets/cose-bilkent-S5V4N54A-szpqu_3d.js +1 -0
- package/dist/review-ui/assets/cytoscape.esm-DZ22BVwz.js +321 -0
- package/dist/review-ui/assets/dagre-BfNtd34y.js +1 -0
- package/dist/review-ui/assets/dagre-KV5264BT-D6PbxORW.js +4 -0
- package/dist/review-ui/assets/defaultLocale-CIS5GEjP.js +1 -0
- package/dist/review-ui/assets/diagram-5BDNPKRD-BNAXBDig.js +10 -0
- package/dist/review-ui/assets/diagram-G4DWMVQ6-CIGS_5yQ.js +24 -0
- package/dist/review-ui/assets/diagram-MMDJMWI5-DJmcU2xZ.js +43 -0
- package/dist/review-ui/assets/diagram-TYMM5635-DW8XzrAz.js +24 -0
- package/dist/review-ui/assets/dist-B51l2n-9.js +1 -0
- package/dist/review-ui/assets/erDiagram-SMLLAGMA-BfUNH8zz.js +85 -0
- package/dist/review-ui/assets/flatten-BHh95bpO.js +1 -0
- package/dist/review-ui/assets/flowDiagram-DWJPFMVM-qgnlSvEC.js +162 -0
- package/dist/review-ui/assets/ganttDiagram-T4ZO3ILL-CFAN903o.js +292 -0
- package/dist/review-ui/assets/gitGraph-7Q5UKJZL-Dn47XunR.js +1 -0
- package/dist/review-ui/assets/gitGraphDiagram-UUTBAWPF-BcG6fDsE.js +106 -0
- package/dist/review-ui/assets/graphlib-Cie4kcbC.js +1 -0
- package/dist/review-ui/assets/identity-CWMh0UL-.js +1 -0
- package/dist/review-ui/assets/index-ByplNhhd.css +2 -0
- package/dist/review-ui/assets/index-S7nbpFp2.js +123 -0
- package/dist/review-ui/assets/info-OMHHGYJF-hAukP1xW.js +1 -0
- package/dist/review-ui/assets/infoDiagram-42DDH7IO-FblTAfC3.js +2 -0
- package/dist/review-ui/assets/init-BMBYmmUa.js +1 -0
- package/dist/review-ui/assets/ishikawaDiagram-UXIWVN3A-BA7dJd-J.js +70 -0
- package/dist/review-ui/assets/journeyDiagram-VCZTEJTY-CMx2w_is.js +139 -0
- package/dist/review-ui/assets/kanban-definition-6JOO6SKY-CFiOZCrT.js +89 -0
- package/dist/review-ui/assets/katex-8mXVa4k3.js +257 -0
- package/dist/review-ui/assets/line-BCdBO-oK.js +1 -0
- package/dist/review-ui/assets/linear-d7UHSQqm.js +1 -0
- package/dist/review-ui/assets/mermaid-parser.core-BHMXLuNx.js +4 -0
- package/dist/review-ui/assets/mindmap-definition-QFDTVHPH-CWO7vDqu.js +96 -0
- package/dist/review-ui/assets/ordinal-BDTCIhXR.js +1 -0
- package/dist/review-ui/assets/packet-4T2RLAQJ-Btz3ryW7.js +1 -0
- package/dist/review-ui/assets/path-CIRGLb_6.js +1 -0
- package/dist/review-ui/assets/pie-ZZUOXDRM-CreBtuDj.js +1 -0
- package/dist/review-ui/assets/pieDiagram-DEJITSTG-X2mFk5I3.js +30 -0
- package/dist/review-ui/assets/quadrantDiagram-34T5L4WZ-BSFYvc1U.js +7 -0
- package/dist/review-ui/assets/radar-PYXPWWZC-BcAPYMpV.js +1 -0
- package/dist/review-ui/assets/reduce-14YNCNxn.js +1 -0
- package/dist/review-ui/assets/requirementDiagram-MS252O5E-CDv1lxdq.js +84 -0
- package/dist/review-ui/assets/rough.esm-DtEqI08j.js +1 -0
- package/dist/review-ui/assets/sankeyDiagram-XADWPNL6-CV38ZpSv.js +10 -0
- package/dist/review-ui/assets/sequenceDiagram-FGHM5R23-DCuV_bhx.js +157 -0
- package/dist/review-ui/assets/src-Cxc1bu7b.js +1 -0
- package/dist/review-ui/assets/stateDiagram-FHFEXIEX-BfE_bGUQ.js +1 -0
- package/dist/review-ui/assets/stateDiagram-v2-QKLJ7IA2-u1yKXWoz.js +1 -0
- package/dist/review-ui/assets/timeline-definition-GMOUNBTQ-Ci0uFxaT.js +120 -0
- package/dist/review-ui/assets/treeView-SZITEDCU-BXg6-7zY.js +1 -0
- package/dist/review-ui/assets/treemap-W4RFUUIX-BToYbgol.js +1 -0
- package/dist/review-ui/assets/vennDiagram-DHZGUBPP-DvOuThac.js +34 -0
- package/dist/review-ui/assets/wardley-RL74JXVD-BAYzkcK-.js +1 -0
- package/dist/review-ui/assets/wardleyDiagram-NUSXRM2D-YxTu6WZw.js +20 -0
- package/dist/review-ui/assets/xychartDiagram-5P7HB3ND-V9j-Dl7t.js +7 -0
- package/dist/review-ui/index.html +29 -0
- package/dist/run-openflow-cli.d.ts +1 -0
- package/dist/run-openflow-cli.js +41 -0
- package/dist/run-openflow-cli.js.map +1 -0
- package/dist/shared/args.d.ts +3 -0
- package/dist/shared/args.js +27 -0
- package/dist/shared/args.js.map +1 -0
- package/dist/shared/browser.d.ts +4 -0
- package/dist/shared/browser.js +17 -0
- package/dist/shared/browser.js.map +1 -0
- package/dist/shared/fs.d.ts +15 -0
- package/dist/shared/fs.js +48 -0
- package/dist/shared/fs.js.map +1 -0
- package/dist/shared/i18n.d.ts +5 -0
- package/dist/shared/i18n.js +65 -0
- package/dist/shared/i18n.js.map +1 -0
- package/dist/shared/locales/en-US.json +88 -0
- package/dist/shared/locales/zh-CN.json +88 -0
- package/dist/shared/plugin-registry.d.ts +36 -0
- package/dist/shared/plugin-registry.js +51 -0
- package/dist/shared/plugin-registry.js.map +1 -0
- package/dist/shared/project-state.d.ts +17 -0
- package/dist/shared/project-state.js +75 -0
- package/dist/shared/project-state.js.map +1 -0
- package/dist/shared/terminal.d.ts +10 -0
- package/dist/shared/terminal.js +110 -0
- package/dist/shared/terminal.js.map +1 -0
- package/package.json +28 -0
- package/templates/archive/.gitkeep +1 -0
- package/templates/config.json +11 -0
- package/templates/current.json +3 -0
- package/templates/iterations/.gitkeep +1 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openflow-implement
|
|
3
|
+
description: Use for the OpenFlow implement phase: implement task slices, validate, review, and record evidence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# OpenFlow Implement
|
|
7
|
+
|
|
8
|
+
Implement the approved spec one task slice at a time. Validate each slice and record evidence.
|
|
9
|
+
|
|
10
|
+
This skill depends on:
|
|
11
|
+
|
|
12
|
+
- `openflow-workflow-governance` for level, stage, and gate rules.
|
|
13
|
+
- `openflow-cli-reference` for exact CLI command syntax and options.
|
|
14
|
+
|
|
15
|
+
## Inputs
|
|
16
|
+
|
|
17
|
+
- `.openflow/current.json`
|
|
18
|
+
- active iteration `flow.json`
|
|
19
|
+
- active iteration `STATE.md`
|
|
20
|
+
- active iteration `SPEC.md`
|
|
21
|
+
- active iteration `TASKS.md`
|
|
22
|
+
- active iteration `CONTEXT.md`
|
|
23
|
+
- active iteration `PLAN.md` when present
|
|
24
|
+
- active iteration `reviews/spec-review.json`
|
|
25
|
+
- active iteration `extensions/**/result.json` when present
|
|
26
|
+
|
|
27
|
+
## Gate Rules
|
|
28
|
+
|
|
29
|
+
See `openflow-workflow-governance` for complete level routing rules and gate requirements.
|
|
30
|
+
|
|
31
|
+
**Key points for implement phase:**
|
|
32
|
+
- Level 0: Not applicable. No OpenFlow artifacts exist.
|
|
33
|
+
- Level 1: No formal gate. Implement directly from SPEC.md.
|
|
34
|
+
- Level 2/3: Approved review required before implementation.
|
|
35
|
+
|
|
36
|
+
**Implement-specific rules:**
|
|
37
|
+
- Do not batch unrelated slices.
|
|
38
|
+
- Do not mark a task complete without validation evidence.
|
|
39
|
+
- If `SPEC.md`, `TASKS.md`, or `PLAN.md` must change materially, stop implementation, increment `flow.json.revision`, reset the gate, and return to `/openflow-spec`.
|
|
40
|
+
|
|
41
|
+
## Pre-flight
|
|
42
|
+
|
|
43
|
+
1. Run `openflow preflight --command implement` and parse the JSON output. If `valid` is `false`, stop and tell the user what went wrong in plain language — do not show the raw preflight error.
|
|
44
|
+
2. Use `language` and `iterationPath` from the output for all subsequent steps.
|
|
45
|
+
3. Determine the execution level from `flow.json` or `STATE.md`:
|
|
46
|
+
- **Level 1**: Read `SPEC.md` only. No `TASKS.md` exists. Implement directly from SPEC.
|
|
47
|
+
- **Level 2/3**: Read `TASKS.md` and `PLAN.md` from `iterationPath`. If either file is missing, stop and return to `/openflow-spec`; do not generate planning artifacts during `/openflow-implement`.
|
|
48
|
+
4. Run `openflow validate --flow <iterationPath>`. Stop if validation fails — do not edit product code until artifacts are valid.
|
|
49
|
+
5. Write generated OpenFlow documents in the resolved `language`; if absent, use `en-US`.
|
|
50
|
+
|
|
51
|
+
## Task Difficulty Assessment
|
|
52
|
+
|
|
53
|
+
See `openflow-workflow-governance` for the canonical difficulty assessment table and executor selection rules.
|
|
54
|
+
|
|
55
|
+
## Executor Context Per Level
|
|
56
|
+
|
|
57
|
+
### Level 1
|
|
58
|
+
|
|
59
|
+
Implement directly from SPEC.md:
|
|
60
|
+
|
|
61
|
+
1. Read SPEC.md for goal, scope, non-goals, and acceptance criteria.
|
|
62
|
+
2. Implement the change described in the spec.
|
|
63
|
+
3. Validate against acceptance criteria.
|
|
64
|
+
4. No TASKS.md or PLAN.md exists -- implement the full scope as a single unit.
|
|
65
|
+
|
|
66
|
+
### Level 2/3
|
|
67
|
+
|
|
68
|
+
Per-task execution:
|
|
69
|
+
|
|
70
|
+
1. Load the current task from TASKS.md.
|
|
71
|
+
2. Load context: Read First files + PLAN.md Key Interfaces section.
|
|
72
|
+
3. Inspect only the source needed for that task.
|
|
73
|
+
4. Implement the smallest complete behavior slice.
|
|
74
|
+
5. Validate against the task's acceptance criteria.
|
|
75
|
+
|
|
76
|
+
## Level 1 Execution
|
|
77
|
+
|
|
78
|
+
1. Read `SPEC.md` Scope and Acceptance Criteria.
|
|
79
|
+
2. Implement the change directly based on the spec.
|
|
80
|
+
3. Run focused validation for the changed behavior.
|
|
81
|
+
4. Record evidence in `STATE.md`.
|
|
82
|
+
5. Run `openflow flow set-gate approved` and `openflow flow set-stage finalize`.
|
|
83
|
+
6. See **Completion Handoff** section for the next step.
|
|
84
|
+
|
|
85
|
+
## Level 2/3 Execution
|
|
86
|
+
|
|
87
|
+
### Per-Task Context Loading
|
|
88
|
+
|
|
89
|
+
For each task, load context from its **Read First** files plus the PLAN.md Key Interfaces section. Do not load unrelated content (other tasks, full SPEC.md, etc.).
|
|
90
|
+
|
|
91
|
+
### Wave Knowledge Injection
|
|
92
|
+
|
|
93
|
+
At the start of each Wave (before executing any task within the Wave), perform knowledge injection:
|
|
94
|
+
|
|
95
|
+
1. Call the `knowledge-retrieval` skill with the current Wave's task descriptions as input text and `phase: implement`.
|
|
96
|
+
2. The retrieval returns at most 3 knowledge entries.
|
|
97
|
+
3. **Hard limit: each Wave injects at most 3 knowledge entries.** If retrieval returns more, keep only the top 3 by relevance.
|
|
98
|
+
4. For each injected entry, use this two-line format:
|
|
99
|
+
```
|
|
100
|
+
summary: <one-sentence summary of the knowledge>
|
|
101
|
+
why_relevant: <one-sentence explanation of why this knowledge is relevant to the current task>
|
|
102
|
+
```
|
|
103
|
+
5. Write the injected entries to the `## Injected Knowledge` section of `WORKING_MEMORY.md`, overwriting any previous Wave's entries. Format:
|
|
104
|
+
```markdown
|
|
105
|
+
- **<knowledge-id>: <title>**
|
|
106
|
+
- summary: <one-sentence summary>
|
|
107
|
+
- why_relevant: <why this is relevant>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Mode A: Main Agent Direct (Trivial Tasks Only)
|
|
111
|
+
|
|
112
|
+
> **Use Mode A only when ALL of these are true**: (1) single file, (2) change is ≤3 lines, (3) no behavior change (e.g., typo fix, comment update, version bump). For everything else — including Simple-difficulty tasks — use Mode B.
|
|
113
|
+
|
|
114
|
+
1. Select the next unchecked task from `.openflow/iterations/<iteration-id>/TASKS.md`.
|
|
115
|
+
2. Run `openflow flow set-task <T-###>`, then update `STATE.md` before editing.
|
|
116
|
+
3. Load per-task context per the six-step cycle (see **② Load Context**).
|
|
117
|
+
4. Implement only that task slice.
|
|
118
|
+
5. Run focused validation for the changed behavior.
|
|
119
|
+
6. Update `TASKS.md` with concrete evidence.
|
|
120
|
+
7. Run `openflow flow set-task -` to clear the active task.
|
|
121
|
+
|
|
122
|
+
### Mode B: Subagent Dispatch (Simple / Medium / Complex Tasks)
|
|
123
|
+
|
|
124
|
+
1. Select the next unchecked task from `TASKS.md`.
|
|
125
|
+
2. Assess task difficulty (Simple / Medium / Complex) based on file scope, change type, and risk level.
|
|
126
|
+
3. Run `openflow flow set-task <T-###>`, then update `STATE.md`.
|
|
127
|
+
4. If this task has unresolved dependencies on other tasks, skip it and process the dependency first.
|
|
128
|
+
5. Select the executor tier and dispatch subagent:
|
|
129
|
+
- **Simple**: dispatch `executor-quick`
|
|
130
|
+
- **Medium**: dispatch `executor-general`
|
|
131
|
+
- **Complex**: dispatch `executor-deep`
|
|
132
|
+
Pass to the executor: full task text from TASKS.md (paste inline), context about dependencies and architecture, working directory.
|
|
133
|
+
6. Handle the executor's status report:
|
|
134
|
+
- **DONE** — proceed to review
|
|
135
|
+
- **DONE_WITH_CONCERNS** — read concerns; if about correctness, address before review; if observations, note and proceed
|
|
136
|
+
- **NEEDS_CONTEXT** — provide missing context and re-dispatch
|
|
137
|
+
- **BLOCKED** — assess: upgrade to higher tier executor / provide more context / break task smaller / escalate to user
|
|
138
|
+
7. Dispatch `code-reviewer` (mode: compliance) subagent with:
|
|
139
|
+
- Task requirements from `TASKS.md`
|
|
140
|
+
- Executor's report
|
|
141
|
+
- File paths that changed
|
|
142
|
+
8. If compliance review finds issues, have the executor fix them, then re-dispatch the reviewer. Repeat until approved.
|
|
143
|
+
9. For complex tasks only: dispatch `code-reviewer` (mode: quality) subagent with:
|
|
144
|
+
- Task description
|
|
145
|
+
- Executor's report
|
|
146
|
+
- Files changed
|
|
147
|
+
10. If quality review finds critical or important issues, have the executor fix them, then re-dispatch the reviewer. Repeat until approved.
|
|
148
|
+
11. Update `TASKS.md` with concrete evidence from the review cycle.
|
|
149
|
+
12. Run `openflow flow set-task -` to clear the active task.
|
|
150
|
+
|
|
151
|
+
### Model Selection
|
|
152
|
+
|
|
153
|
+
See `openflow-workflow-governance` for the canonical model selection table (Simple→executor-quick, Medium→executor-general, Complex→executor-deep).
|
|
154
|
+
|
|
155
|
+
### Post-Task (Both Modes)
|
|
156
|
+
|
|
157
|
+
1. Update `STATE.md`.
|
|
158
|
+
2. Update `flow.json` gate status via `openflow flow set-gate <gate>`.
|
|
159
|
+
3. Run `openflow validate --flow .openflow/iterations/<iteration-id>`.
|
|
160
|
+
4. Continue to the next unchecked task.
|
|
161
|
+
|
|
162
|
+
## Six-Step Slice Loop
|
|
163
|
+
|
|
164
|
+
Each task must follow this fixed order. No skipping or reordering. Mode A (main agent direct) and Mode B (dispatch subagent) both follow this loop — the difference is only in who executes steps ③④⑤: Mode A executes them directly, Mode B delegates them to a dispatched executor subagent.
|
|
165
|
+
|
|
166
|
+
**① Declare Task**
|
|
167
|
+
- Run `openflow flow set-task <T-###>` to set the active task.
|
|
168
|
+
- Update `STATE.md` to record task start.
|
|
169
|
+
- **Discipline**: set-task must precede any code edits. Do not edit code first and then set the task.
|
|
170
|
+
|
|
171
|
+
**② Load Context**
|
|
172
|
+
- Load the task's **Read First** files and PLAN.md Key Interfaces section.
|
|
173
|
+
- Do not load unrelated content (other tasks, full SPEC.md, etc.).
|
|
174
|
+
|
|
175
|
+
**③ Minimal Slice**
|
|
176
|
+
- Implement the smallest complete behavior change.
|
|
177
|
+
- Do not over-build or under-build. Stay strictly within the task scope.
|
|
178
|
+
|
|
179
|
+
**④ Focused Validation**
|
|
180
|
+
- Run the task's specified validation command.
|
|
181
|
+
- Record before/after signals (RED/BEFORE → GREEN/AFTER).
|
|
182
|
+
- Fix on failure. Do not skip.
|
|
183
|
+
|
|
184
|
+
**⑤ Record Evidence**
|
|
185
|
+
- Write validation results to the task's Evidence field in TASKS.md.
|
|
186
|
+
- Evidence format: `VALIDATION: command\nBEFORE: <result>\nAFTER: <result>`
|
|
187
|
+
- **Discipline**: do not clear active task before Evidence is written back to TASKS.md.
|
|
188
|
+
- Run `openflow flow set-task -` to clear the active task.
|
|
189
|
+
|
|
190
|
+
**⑥ Continue or Return to Spec**
|
|
191
|
+
- Check the next task.
|
|
192
|
+
- If a spec mismatch is found (SPEC.md/TASKS.md/PLAN.md must change), follow the drift branch:
|
|
193
|
+
- Stop implementation → run `openflow flow restart-spec --reason "<reason>" --task <T-###>` → return to Spec phase.
|
|
194
|
+
- **Discipline**: branch transitions must be explicit. No silent step skipping.
|
|
195
|
+
|
|
196
|
+
### Drift Detection (Two-Tier Response)
|
|
197
|
+
|
|
198
|
+
When during implementation you find that SPEC/TASKS/PLAN descriptions do not match actual code behavior, respond by severity:
|
|
199
|
+
|
|
200
|
+
**Cosmetic drift** (wording differences, naming inconsistencies, no impact on acceptance criteria):
|
|
201
|
+
- Continue current implementation without interruption.
|
|
202
|
+
- Record the discrepancy in `WORKING_MEMORY.md` under `## Execution Observations`.
|
|
203
|
+
|
|
204
|
+
**Substantive drift** (scope change, approach mismatch, missing prerequisite, or goal unreachable with current spec):
|
|
205
|
+
- Stop the current task immediately.
|
|
206
|
+
- Run `openflow flow restart-spec --reason "<drift reason>" --task <T-###>`.
|
|
207
|
+
- Return to the Spec phase to revise the spec.
|
|
208
|
+
- Never "implement first, fix later" or silently rewrite the spec mid-implementation.
|
|
209
|
+
|
|
210
|
+
### Supplementary Reviews (triggered after step ④ when applicable)
|
|
211
|
+
|
|
212
|
+
- Behavior changes, shared abstractions, risky paths: use `code-reviewer` (mode: compliance).
|
|
213
|
+
- Complex tasks: after compliance review, also run `code-reviewer` (mode: quality).
|
|
214
|
+
- User documentation / API / command changes: use `artifact-reviewer` (mode: docs).
|
|
215
|
+
- Manual / broad / extension-based evidence: use `artifact-reviewer` (mode: validation).
|
|
216
|
+
|
|
217
|
+
## Validation-First Execution
|
|
218
|
+
|
|
219
|
+
For each task slice, choose the validation command before implementation and record a before/after signal:
|
|
220
|
+
|
|
221
|
+
1. **Write the validation command FIRST** (before any implementation).
|
|
222
|
+
2. **Run it before implementation** and record one of:
|
|
223
|
+
- `RED`: the command fails with the expected error because the task is not implemented yet.
|
|
224
|
+
- `BEFORE`: the command establishes a baseline when the check already passes, or when the task is docs, config, or a simple refactor.
|
|
225
|
+
3. **Implement minimal changes** -- the smallest complete change for the task slice.
|
|
226
|
+
4. **Run validation again** and record `GREEN` or `AFTER`.
|
|
227
|
+
5. **Record evidence** in the task's Evidence field with both before and after states.
|
|
228
|
+
|
|
229
|
+
This makes evidence structured and reproducible without forcing artificial failures. Example evidence formats:
|
|
230
|
+
```
|
|
231
|
+
RED: pnpm test -- src/foo.test.ts failed with "Expected 'bar' but got 'baz'"
|
|
232
|
+
GREEN: pnpm test -- src/foo.test.ts passed (3 tests, 0 failures)
|
|
233
|
+
|
|
234
|
+
BEFORE: pnpm build passed before docs-only change
|
|
235
|
+
AFTER: pnpm build passed after docs-only change
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
For non-testable tasks (docs, config, simple refactor), adapt the pattern:
|
|
239
|
+
- **Verification command first** (e.g., `pnpm build`, `grep pattern file`)
|
|
240
|
+
- **Run before** to establish baseline
|
|
241
|
+
- **Implement** then run again to confirm success
|
|
242
|
+
|
|
243
|
+
## Evidence Standard
|
|
244
|
+
|
|
245
|
+
Evidence must be concrete: command names, test results, screenshots, reviewer findings, or exact blocker text. A task is not complete if evidence says only "done".
|
|
246
|
+
|
|
247
|
+
Use `deferred: <reason>`, `blocked: <reason>`, or `waived: <reason>` only when the task is intentionally not completed before archive. Do not check the task box for deferred work.
|
|
248
|
+
|
|
249
|
+
## Supplementary Reviewers
|
|
250
|
+
|
|
251
|
+
After subagent review (if any), also use existing reviewers when triggers apply:
|
|
252
|
+
|
|
253
|
+
- Use `code-reviewer` (mode: compliance) when the task affects behavior, shared code, or risk-bearing paths.
|
|
254
|
+
- Use `artifact-reviewer` (mode: docs) when README, docs, API, commands, or user-facing behavior changed.
|
|
255
|
+
- Use `artifact-reviewer` (mode: validation) when evidence is broad, manual, extension-based, or likely to be overstated.
|
|
256
|
+
|
|
257
|
+
## Guardrails
|
|
258
|
+
|
|
259
|
+
Do not mark a task complete without evidence.
|
|
260
|
+
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`.
|
|
261
|
+
Do not let a subagent make routing or phase-transition decisions.
|
|
262
|
+
Do not dispatch multiple task-executor subagents in parallel for tasks that touch the same files.
|
|
263
|
+
Do not skip spec compliance review before code quality review (strict order).
|
|
264
|
+
|
|
265
|
+
If the approved spec is wrong, stop implementation. Revise `SPEC.md`, `TASKS.md`, or `PLAN.md`, increment `flow.json.revision`, reset the spec gate, and return to `/openflow-spec`.
|
|
266
|
+
|
|
267
|
+
## Completion Handoff
|
|
268
|
+
|
|
269
|
+
When all tasks are complete (all checkboxes checked with evidence) and `openflow validate` passes:
|
|
270
|
+
|
|
271
|
+
1. Run `openflow flow set-stage finalize`.
|
|
272
|
+
2. Update `STATE.md` with completion summary.
|
|
273
|
+
3. **Ask user using `AskUserQuestion`** with the question and exactly 2 options below. Translate the visible text to `config.json.language` (default `en-US`):
|
|
274
|
+
|
|
275
|
+
- Question (en): "All tasks complete and validated. What's next?"
|
|
276
|
+
Question (zh-CN): "所有任务已完成并通过验证。请选择下一步:"
|
|
277
|
+
- Option A (en): "Start finalize now (run /openflow-finalize)"
|
|
278
|
+
Option A (zh-CN): "立即进入归档流程(运行 /openflow-finalize)"
|
|
279
|
+
- Option B (en): "Defer finalize"
|
|
280
|
+
Option B (zh-CN): "暂不归档,稍后处理"
|
|
281
|
+
|
|
282
|
+
4. If user chooses Option A: hand off to `/openflow-finalize`.
|
|
283
|
+
5. If user chooses Option B: tell the user they can run `/openflow-finalize` when ready.
|
|
284
|
+
|
|
285
|
+
For Level 1, after implementation is complete:
|
|
286
|
+
1. Run `openflow flow set-gate approved` and `openflow flow set-stage finalize`.
|
|
287
|
+
2. Use `AskUserQuestion` with the same 2 options above.
|
|
288
|
+
|
|
289
|
+
## User-Facing Output
|
|
290
|
+
|
|
291
|
+
When communicating with the user:
|
|
292
|
+
|
|
293
|
+
- Do not show raw `openflow validate` or `openflow preflight` error codes, field names, or schema rules. Translate errors into plain language (e.g. "There is a formatting issue in TASKS.md").
|
|
294
|
+
- Do not explain internal OpenFlow state machine concepts (gates, stages, revisions, level routing rationale) unless the user asks.
|
|
295
|
+
- Do not output "Insight" blocks about OpenFlow's internal mechanics, validation rules, or artifact schemas.
|
|
296
|
+
- Keep status updates short: which task is being worked on, what changed, and whether validation passed.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# WORKING_MEMORY.md
|
|
2
|
+
|
|
3
|
+
`WORKING_MEMORY.md` is a per-iteration scratchpad that carries injected knowledge and execution observations across waves.
|
|
4
|
+
|
|
5
|
+
Location: `.openflow/iterations/<iteration-id>/WORKING_MEMORY.md`
|
|
6
|
+
|
|
7
|
+
## Structure
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# Working Memory
|
|
11
|
+
|
|
12
|
+
## Injected Knowledge
|
|
13
|
+
> Written at the start of each Wave by the implement command. Maximum 3 entries.
|
|
14
|
+
|
|
15
|
+
- **<knowledge-id>: <title>**
|
|
16
|
+
- summary: <one-sentence summary>
|
|
17
|
+
- why_relevant: <why this is relevant to the current task>
|
|
18
|
+
|
|
19
|
+
## Execution Observations
|
|
20
|
+
> task-executor append-only — records important facts discovered during execution.
|
|
21
|
+
|
|
22
|
+
- [Wave N] <observation>
|
|
23
|
+
|
|
24
|
+
## Knowledge Candidates
|
|
25
|
+
> task-executor append-only — records candidates that may be worth archiving as knowledge entries.
|
|
26
|
+
|
|
27
|
+
- [Wave N] <candidate description>
|
|
28
|
+
|
|
29
|
+
## Blockers and Resolutions
|
|
30
|
+
> task-executor append-only — records blockers encountered and how they were resolved.
|
|
31
|
+
|
|
32
|
+
- [Wave N] ❌ <blocker> → ✅ <resolution>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Sections
|
|
36
|
+
|
|
37
|
+
1. **`## Injected Knowledge`**: Written at the start of each Wave by the implement command. Contains at most 3 entries. Each entry has an ID, title, one-line summary, and a relevance explanation. This section is overwritten each Wave, not appended to.
|
|
38
|
+
|
|
39
|
+
2. **`## Execution Observations`**: task-executor appends observations about important facts discovered during execution. Format: `[Wave N] <observation>`.
|
|
40
|
+
|
|
41
|
+
3. **`## Knowledge Candidates`**: task-executor appends candidates that may be worth archiving as knowledge entries. Format: `[Wave N] <candidate description>`.
|
|
42
|
+
|
|
43
|
+
4. **`## Blockers and Resolutions`**: task-executor appends blockers encountered and how they were resolved. Format: `[Wave N] ❌ <blocker> → ✅ <resolution>`.
|
|
44
|
+
|
|
45
|
+
## Append-Only Rules
|
|
46
|
+
|
|
47
|
+
- The `## Injected Knowledge` section is **replaced** at the start of each Wave by the implement command.
|
|
48
|
+
- The `## Execution Observations`, `## Knowledge Candidates`, and `## Blockers and Resolutions` sections are **append-only** for task-executor. Once written, entries must not be modified or deleted by task-executor.
|
|
49
|
+
- Only the finalize phase may consolidate or prune WORKING_MEMORY.md content.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openflow-knowledge-retrieval
|
|
3
|
+
description: Retrieve project knowledge from .openflow/knowledge/ before spec drafting. Use before writing CONTEXT.md when starting a new iteration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# OpenFlow Knowledge Retrieval
|
|
7
|
+
|
|
8
|
+
Retrieve relevant project knowledge from `.openflow/knowledge/` into the current iteration context.
|
|
9
|
+
|
|
10
|
+
## Trigger Conditions
|
|
11
|
+
|
|
12
|
+
Retrieve knowledge at these points during the workflow:
|
|
13
|
+
|
|
14
|
+
| Phase | Trigger Point | Purpose |
|
|
15
|
+
|-------|---------------|---------|
|
|
16
|
+
| **Spec** | As part of the opening sequence step ① (read repository state), before code exploration | Load relevant project knowledge before code exploration to avoid repeating known decisions and mistakes |
|
|
17
|
+
| **Execute** | At the start of each Wave (batch of related tasks) | Provide relevant context for task implementation |
|
|
18
|
+
| **Archive** | During knowledge extraction | Reference existing knowledge to avoid duplication and ensure consistency |
|
|
19
|
+
|
|
20
|
+
When no knowledge files exist in `.openflow/knowledge/`, skip retrieval entirely. Do not create placeholders or abort the workflow.
|
|
21
|
+
|
|
22
|
+
## Inputs
|
|
23
|
+
|
|
24
|
+
- **Request text**: the user request (Spec), the active task description (Execute), or the knowledge being extracted (Archive)
|
|
25
|
+
- **Current phase**: `spec` / `execute` / `archive`
|
|
26
|
+
- **Context keywords**: extracted from the current task or iteration scope
|
|
27
|
+
- **catalog.json**: the knowledge index at `.openflow/knowledge/catalog.json`
|
|
28
|
+
|
|
29
|
+
## Retrieval Strategy
|
|
30
|
+
|
|
31
|
+
### Step 1 — Filter
|
|
32
|
+
|
|
33
|
+
Read `.openflow/knowledge/catalog.json`. From its `entries` array, keep only entries that:
|
|
34
|
+
|
|
35
|
+
1. Match the current phase's relevant types:
|
|
36
|
+
- **Spec phase**: `decision`, `guideline`, `pitfall`
|
|
37
|
+
- **Execute phase**: `decision`, `guideline`, `pitfall`, `process`
|
|
38
|
+
- **Archive phase**: all types
|
|
39
|
+
2. Have `scope` overlapping with the current iteration's affected packages/files (skip this filter if scope is unknown).
|
|
40
|
+
|
|
41
|
+
### Step 2 — Rank by relevance
|
|
42
|
+
|
|
43
|
+
From the filtered entries, select the most relevant ones by matching keywords from the request text against each entry's `title`, `tags`, and `summary`. Prioritize entries where multiple fields match.
|
|
44
|
+
|
|
45
|
+
### Step 3 — Select and annotate
|
|
46
|
+
|
|
47
|
+
Take at most **3** entries. For each, generate:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
summary: <one-sentence summary of the knowledge>
|
|
51
|
+
why_relevant: <one-sentence explanation of why this knowledge is relevant to the current task>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Injection format for the consuming artifact:**
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
## Retrieved Knowledge
|
|
58
|
+
|
|
59
|
+
- **<ID>: <title>** (type: <type>)
|
|
60
|
+
summary: <one-sentence summary>
|
|
61
|
+
why_relevant: <why this is relevant>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Budget rules:**
|
|
65
|
+
- Maximum 3 entries per retrieval invocation.
|
|
66
|
+
- Maximum 1 retrieval invocation per Spec phase.
|
|
67
|
+
- Maximum 1 retrieval invocation per Execute Wave.
|
|
68
|
+
- Maximum 1 retrieval invocation per Archive knowledge extraction.
|
|
69
|
+
|
|
70
|
+
## Fallback Behavior
|
|
71
|
+
|
|
72
|
+
If `.openflow/knowledge/` does not exist, or `catalog.json` is missing, or no entries pass the metadata filter, skip retrieval silently. Do not abort the workflow or insert placeholder sections.
|
|
73
|
+
|
|
74
|
+
## Constraints
|
|
75
|
+
|
|
76
|
+
- Knowledge files are read-only during retrieval. Do not modify knowledge content during Spec or Implement phases.
|
|
77
|
+
- Do not search outside `.openflow/knowledge/` for retrieval.
|
|
78
|
+
- Do not inject raw knowledge file content. Always use the two-line `summary + why_relevant` format.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openflow-prd
|
|
3
|
+
description: Generate formal PRD documents from drafts or user input.
|
|
4
|
+
depends_on:
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# OpenFlow PRD
|
|
8
|
+
|
|
9
|
+
Generate a structured, detailed PRD document from a brainstorm draft or direct user input. The PRD is product-focused (what, why, for whom) — distinct from SPEC which is implementation-focused (how, when). It serves as a decision log, communication tool, and scope contract across product, engineering, design, and QA.
|
|
10
|
+
|
|
11
|
+
## Input Source
|
|
12
|
+
|
|
13
|
+
1. Check whether a PRD ID parameter was passed:
|
|
14
|
+
- **With parameter**: use the ID to locate the PRD directory.
|
|
15
|
+
- **Without parameter**: use `AskUserQuestion` to prompt the user for a PRD ID in the format `YYYY-MM-DD-short-slug` (e.g., `2025-05-12-user-auth`).
|
|
16
|
+
|
|
17
|
+
2. Determine the input source:
|
|
18
|
+
- If `.openflow/prds/<id>/draft.md` exists, use it as the content basis. Read draft.md and extract section information (including the Decisions section if present).
|
|
19
|
+
- If draft.md does not exist, use the user's text input as the requirements source.
|
|
20
|
+
- In either case, read `.openflow/prds/<id>/prd.json` for metadata.
|
|
21
|
+
|
|
22
|
+
3. Read `.openflow/config.json` and extract the `language` field. Use this language for all generated PRD content and user-facing text. If absent, default to `en-US`.
|
|
23
|
+
|
|
24
|
+
## Level Routing
|
|
25
|
+
|
|
26
|
+
Determine the appropriate PRD Level (L1 / L2 / L3) before generating content. See `references/level-routing.md` for the full routing logic.
|
|
27
|
+
|
|
28
|
+
1. Analyze the input source against Level 3 triggers (cross-module, ≥3 roles, IA/data model changes, external dependencies, lengthy draft).
|
|
29
|
+
2. If no L3 trigger, check Level 1 conditions (single feature, no role split, < 80 lines draft, no external deps).
|
|
30
|
+
3. Default to Level 2.
|
|
31
|
+
4. Inform the user of the routing decision and the section set:
|
|
32
|
+
|
|
33
|
+
> "Based on the requirements, I'll generate a Level <N> PRD (<reason>). Sections to include: <list>. Adjust the Level?"
|
|
34
|
+
|
|
35
|
+
5. Use `AskUserQuestion` to confirm or let the user override the Level.
|
|
36
|
+
|
|
37
|
+
## Open Questions Resolution
|
|
38
|
+
|
|
39
|
+
Before writing the PRD, identify any open questions or ambiguities in the requirements.
|
|
40
|
+
|
|
41
|
+
1. **Identify questions**: Extract unclear points, missing decisions, or ambiguous requirements from the input source.
|
|
42
|
+
2. **Discuss with user**: Present all open questions to the user using `AskUserQuestion` and wait for answers. Do NOT proceed until the user has resolved them.
|
|
43
|
+
3. **Record resolutions in Decision Log**: Each resolved question becomes an entry in the Decision Log section (Level 2+) — capture the options considered, the chosen option, and the rationale.
|
|
44
|
+
4. **No "Open Questions" section in PRD**: The PRD document must not contain unresolved questions. All questions are resolved before writing.
|
|
45
|
+
|
|
46
|
+
## Visual Analysis
|
|
47
|
+
|
|
48
|
+
Determine which visual aids genuinely improve understanding. Do not generate visuals for the sake of visuals — if plain text describes a feature clearly, no diagram is needed.
|
|
49
|
+
|
|
50
|
+
### Visualization Types
|
|
51
|
+
|
|
52
|
+
| Type | Purpose | When to Use |
|
|
53
|
+
|------|---------|-------------|
|
|
54
|
+
| Wireframe HTML | Page layout and element placement | Visual complexity warrants showing structure |
|
|
55
|
+
| Mermaid flowchart | Step-by-step process with branches | Multi-step interaction with decision points |
|
|
56
|
+
| Mermaid sequence diagram | Cross-component message timing | Multi-service or multi-component coordination |
|
|
57
|
+
| Mermaid state diagram | Object lifecycle states | Stateful entities (orders, tasks, users) |
|
|
58
|
+
| Mermaid mindmap | Feature hierarchy overview | Complex feature group bird's-eye view |
|
|
59
|
+
| Mermaid ER diagram | Data entity relationships | Data modeling needed |
|
|
60
|
+
| User Journey map | Cross-touchpoint experience | Full user lifecycle design |
|
|
61
|
+
|
|
62
|
+
### Wireframe Rules (MUST follow)
|
|
63
|
+
|
|
64
|
+
When generating wireframe HTML files, follow `references/wireframe-template.html` and these rules:
|
|
65
|
+
|
|
66
|
+
- **Grayscale only**: use `#fff`, `#f5f5f5`, `#e0e0e0`, `#999`, `#666`, `#333`. No brand colors, no gradients, no decorative backgrounds.
|
|
67
|
+
- **Structure over style**: focus on layout, hierarchy, element placement. No rounded corners > 4px, no shadows, no animations, no icon libraries.
|
|
68
|
+
- **Dashed borders** for placeholder/content areas, **solid borders** for structural boundaries.
|
|
69
|
+
- **Label everything**: all interactive elements must have clear text labels.
|
|
70
|
+
- **Show states**: indicate normal / empty / error / loading states where relevant, either inline or as variants.
|
|
71
|
+
- **System fonts only**: no custom fonts, no Google Fonts, no Iconify.
|
|
72
|
+
- **Max width 960px**: keep the canvas simple and readable.
|
|
73
|
+
- **One wireframe per feature/page**: name files `<feature-name>-wireframe.html`.
|
|
74
|
+
- **Skip if simple**: if a feature can be described clearly in 2-3 sentences, do not generate a wireframe for it.
|
|
75
|
+
|
|
76
|
+
### Selection Principles
|
|
77
|
+
|
|
78
|
+
- For **L1 PRDs**: usually no wireframes needed; rely on text descriptions.
|
|
79
|
+
- For **L2 PRDs**: generate wireframes for core interaction pages only.
|
|
80
|
+
- For **L3 PRDs**: each major UI feature gets its own wireframe; complex flows get flowcharts; stateful objects get state diagrams.
|
|
81
|
+
|
|
82
|
+
### Output Planning
|
|
83
|
+
|
|
84
|
+
List planned visualizations with rationale before generating. Determine file names and store all in `.openflow/prds/<id>/assets/`.
|
|
85
|
+
|
|
86
|
+
## Content Generation
|
|
87
|
+
|
|
88
|
+
Based on the resolved Level, input source, and visualization plan, generate the formal PRD document.
|
|
89
|
+
|
|
90
|
+
1. **Write prd.md**:
|
|
91
|
+
- Path: `.openflow/prds/<id>/prd.md`
|
|
92
|
+
- Structure follows `references/prd-template.md`
|
|
93
|
+
- Generate only the sections required (`*`) or recommended (`+`) for the determined Level. Skip `?` and `–` sections unless the input source has rich content for them.
|
|
94
|
+
- **Functional Design is the core**: organize by feature or feature group. Each feature gets Purpose, User Story, Detailed Behavior, UI/Interaction (if applicable), Edge Cases, and per-feature Acceptance Criteria.
|
|
95
|
+
- Information from draft.md must be fully reflected. Do not lose details from the discussion.
|
|
96
|
+
- Reference visualization assets using relative links (e.g., `./assets/feature-x-wireframe.html`).
|
|
97
|
+
- **Do NOT include an "Open Questions" section** — all questions should be resolved.
|
|
98
|
+
|
|
99
|
+
2. **Create visualization assets**:
|
|
100
|
+
- Create files in `.openflow/prds/<id>/assets/`
|
|
101
|
+
- HTML wireframes follow `references/wireframe-template.html`
|
|
102
|
+
- Mermaid diagrams can be embedded in prd.md or stored as standalone `.md` files in `assets/`
|
|
103
|
+
- Verify all asset files referenced in prd.md actually exist after generation
|
|
104
|
+
|
|
105
|
+
3. **Update prd.json**:
|
|
106
|
+
- Set `status` to `"reviewing"`
|
|
107
|
+
- Update `assets` to include all generated asset file paths
|
|
108
|
+
- Increment `revision` by 1
|
|
109
|
+
- Update `updatedAt` to ISO 8601 current time
|
|
110
|
+
- Add a `level` field with the determined Level (1, 2, or 3)
|
|
111
|
+
|
|
112
|
+
## AI Self-Review (Optional, Recommended for L2+)
|
|
113
|
+
|
|
114
|
+
For Level 2 and Level 3 PRDs, dispatch `artifact-reviewer` (mode: prd) for AI self-review:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Agent(subagent_type="openflow:artifact-reviewer", prompt="Review PRD document. mode: prd. Level: <N>. PRD directory: .openflow/prds/<id>/")
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Revision loop**:
|
|
121
|
+
- If artifact-reviewer returns `changes_required` or finds BLOCKERs:
|
|
122
|
+
- Revise prd.md and assets based on findings
|
|
123
|
+
- Re-invoke artifact-reviewer
|
|
124
|
+
- Maximum 3 revision rounds
|
|
125
|
+
- After 3 rounds with unresolved issues, present remaining issues to the user via `AskUserQuestion` for resolution, then update the PRD accordingly
|
|
126
|
+
|
|
127
|
+
After revisions, update `revision` and `updatedAt` in prd.json.
|
|
128
|
+
|
|
129
|
+
## Studio Review
|
|
130
|
+
|
|
131
|
+
Submit the PRD to Studio for human review.
|
|
132
|
+
|
|
133
|
+
1. **Initiate review**:
|
|
134
|
+
- Use MCP tool `openflow_review_start` with parameters:
|
|
135
|
+
- `flowPath`: pointing to `.openflow/prds/<id>`
|
|
136
|
+
- `mode`: `"prd"`
|
|
137
|
+
- Show the review URL to the user
|
|
138
|
+
|
|
139
|
+
2. **Wait for review result**:
|
|
140
|
+
- Use MCP tool `openflow_review_wait` to wait for the human review result
|
|
141
|
+
|
|
142
|
+
3. **Process review result**:
|
|
143
|
+
- If `changes_requested`:
|
|
144
|
+
- Read review annotations
|
|
145
|
+
- Revise prd.md and assets based on annotations
|
|
146
|
+
- Update prd.json: increment `revision` by 1, update `updatedAt`
|
|
147
|
+
- Re-submit for review (return to step 1)
|
|
148
|
+
- If `approved`:
|
|
149
|
+
- Update prd.json `status` to `"approved"`
|
|
150
|
+
- Proceed to "Completion Handoff"
|
|
151
|
+
|
|
152
|
+
## Completion Handoff
|
|
153
|
+
|
|
154
|
+
After the PRD passes review:
|
|
155
|
+
|
|
156
|
+
1. Update prd.json: confirm `status` is `"approved"`.
|
|
157
|
+
|
|
158
|
+
2. Inform the user with an actionable command:
|
|
159
|
+
> PRD approved. To start implementation, run:
|
|
160
|
+
> `/openflow-spec prd <prd-id>`
|
|
161
|
+
|
|
162
|
+
3. Do not automatically execute subsequent commands. Only provide the actionable command above.
|
|
163
|
+
|
|
164
|
+
## Subagent Dispatch
|
|
165
|
+
|
|
166
|
+
- **Recommended for L2+**: dispatch `artifact-reviewer` (mode: prd) for AI self-review. See "AI Self-Review" section.
|
|
167
|
+
- The main flow is executed directly by the main agent.
|
|
168
|
+
|
|
169
|
+
## References
|
|
170
|
+
|
|
171
|
+
- `references/prd-template.md` — full PRD template with Level annotations
|
|
172
|
+
- `references/level-routing.md` — Level routing rules and section sets
|
|
173
|
+
- `references/wireframe-template.html` — wireframe HTML base
|