|
| 1 | +# ADR: Shared CNCF Workflow Specification Editor & Multi-Maintainer Collaboration Model |
| 2 | + |
| 3 | +## Status |
| 4 | + |
| 5 | +Proposed |
| 6 | + |
| 7 | +## Context |
| 8 | + |
| 9 | +There is a need for a shared editor for the CNCF Workflow Specification that |
| 10 | +can be used consistently by multiple implementations (e.g. Quarkus Flow, |
| 11 | +SonataFlow, Zigflow, Synapse, Lemline), as different tools provide inconsistent |
| 12 | +authoring and visualisation experiences, leading to duplicated effort and fragmented tooling. |
| 13 | + |
| 14 | +Today we have: |
| 15 | + |
| 16 | +- An existing (but aging) VS Code extension for Serverless Workflow |
| 17 | +- Several product-specific editors embedded in consoles or IDEs |
| 18 | +- Fragmented UX and duplicated effort around: |
| 19 | + - YAML/JSON authoring |
| 20 | + - Visual diagramming |
| 21 | + - Validation against the spec schema |
| 22 | + |
| 23 | +We want to converge on a single core editor stack driven by the CNCF |
| 24 | +Serverless Workflow Specification, with a collaboration model that allows |
| 25 | +multiple vendors/maintainers to contribute and embed it. |
| 26 | + |
| 27 | +This ADR formalises the decision to build a shared editor, with a strictly |
| 28 | +scoped MVP, aligned with the proposal outlined in |
| 29 | +[specification#1131](https://github.com/serverlessworkflow/specification/issues/1131) and further refined through MVP |
| 30 | +scoping discussions. |
| 31 | + |
| 32 | +## Decision |
| 33 | + |
| 34 | +After evaluating existing solutions, potential approaches, and their |
| 35 | +associated dependencies, we decided to build the editor from scratch to |
| 36 | +retain full ownership of the architecture and release process, prioritise |
| 37 | +architectural simplicity, enable CNCF hosting and long-term sustainability, |
| 38 | +at the cost of slower initial delivery. |
| 39 | + |
| 40 | +## Licensing |
| 41 | + |
| 42 | +- Apache 2.0. |
| 43 | +- All dependencies must be CNCF compatible. |
| 44 | +- React Flow is MIT licensed and acceptable. |
| 45 | + |
| 46 | +## Governance & Community Alignment |
| 47 | + |
| 48 | +We want a multi-maintainer editor project that does not belong to a single |
| 49 | +vendor. |
| 50 | + |
| 51 | +### Proposed model |
| 52 | + |
| 53 | +- Repository ownership |
| 54 | + - New repo under CNCF Workflow org, e.g. `workflow-spec-editor` (name TBD). |
| 55 | + |
| 56 | +- Maintainers |
| 57 | + |
| 58 | + - Initial maintainers: representatives from at least: |
| 59 | + - CNCF Workflow Spec maintainers |
| 60 | + - Quarkus Flow / SonataFlow |
| 61 | + - Other interested engine maintainers (e.g. Zigflow / Synapse / Lemline etc.). |
| 62 | + |
| 63 | +- Decision process |
| 64 | + |
| 65 | + - Use the spec’s existing governance as a reference (PR review rules, approvals). |
| 66 | + |
| 67 | + - Editor decisions should: |
| 68 | + - Respect the spec as the single source of truth |
| 69 | + - Avoid baking in engine-specific opinions by default |
| 70 | + |
| 71 | +- Integration responsibilities |
| 72 | + |
| 73 | + - Core editor project provides: |
| 74 | + |
| 75 | + - NPM package(s) |
| 76 | + - Reference VS Code extension |
| 77 | + - Docs and examples |
| 78 | + |
| 79 | + - Each implementation (Quarkus Flow, Synapse, etc.) owns: |
| 80 | + |
| 81 | + - Their integration/embedding |
| 82 | + - Optional extension/profile configuration |
| 83 | + |
| 84 | +- Release strategy |
| 85 | + - Align with spec releases when possible (e.g. new spec fields -> new editor release). |
| 86 | + - Support at least the latest minor and one previous minor version of the spec. |
| 87 | + |
| 88 | +## Initial Scope (v1.0) |
| 89 | + |
| 90 | +### 1. In Scope |
| 91 | + |
| 92 | +- Read-only visual representation of YAML / JSON workflow definitions |
| 93 | +- Visualise all task types and transitions |
| 94 | +- Fully expanded nested task visualisation |
| 95 | +- Indication of basic validation issues |
| 96 | +- Editor available via NPM package |
| 97 | +- A simple demo app showing how to embed the editor as a component |
| 98 | +- Documentation for integrators |
| 99 | + |
| 100 | +### 2. UX & Design Decisions |
| 101 | + |
| 102 | +- Light and dark theme support |
| 103 | +- Localisation infrastructure in place, English only content for MVP |
| 104 | +- Rely on out-of-the-box accessibility from React Flow |
| 105 | +- Responsiveness is not a focus for MVP, as the editor is intended for |
| 106 | + desktop usage rather than mobile devices |
| 107 | + |
| 108 | +### 3. Diagram Semantics & Representation |
| 109 | + |
| 110 | +- Support all task types defined by the Serverless Workflow specification. |
| 111 | +- Twelve task types represented visually. |
| 112 | +- Task types differentiated using icons, custom node shapes are avoided for MVP due to layout complexity. |
| 113 | + |
| 114 | +### 4. Validation |
| 115 | + |
| 116 | +- The editor assumes workflows provided by the backend are valid. |
| 117 | + - Edge cases to handle: validation discrepancies between the TypeScript SDK and the backend (runtime implementation). |
| 118 | +- If rendering is possible, display warnings as needed. |
| 119 | +- If rendering is not possible, provide clear error feedback to user. |
| 120 | + |
| 121 | +### 5. Nested Tasks & Layout Strategy |
| 122 | + |
| 123 | +- All nested tasks are fully expanded in the diagram. |
| 124 | +- No collapsing or layered presentation in MVP. Collapsible or hierarchical views are deferred due to layout and UX complexity. |
| 125 | +- Nested workflow UX will be revisited post MVP. |
| 126 | + |
| 127 | +### 6. Development & Tooling Decisions Overview (MVP) |
| 128 | + |
| 129 | +- Web based implementation |
| 130 | +- React/TypeScript based architecture |
| 131 | +- Diagram rendering via React Flow |
| 132 | +- Webpack for application bundling |
| 133 | +- Jest for unit testing |
| 134 | +- Playwright for end-to-end testing |
| 135 | +- Storybook for component development and documentation |
| 136 | +- Node.js for development and build tooling |
| 137 | +- pnpm for dependency management |
| 138 | +- GitHub Dependabot for dependency security and updates |
| 139 | + |
| 140 | +## Consequences |
| 141 | + |
| 142 | +### Positive |
| 143 | + |
| 144 | +- CNCF aligned ownership |
| 145 | +- Lowers the entry barrier to the CNCF Serverless Workflow spec |
| 146 | +- Encourages understanding and usage of workflow semantics |
| 147 | +- Reduces duplicated tooling effort across runtimes |
| 148 | +- Provides a shared, consistent user experience |
| 149 | +- Enables incremental evolution without over engineering MVP |
| 150 | +- Clear architectural simplicity and long term maintainability |
| 151 | +- Full control over release cadence and scope |
| 152 | + |
| 153 | +### Trade-Offs |
| 154 | + |
| 155 | +- Slower initial feature delivery compared to reuse-based approaches |
| 156 | +- Temporary feature gap relative to existing editors, as the initial scope |
| 157 | + must remain conservative while the editor is built from the ground up |
| 158 | +- Increased upfront engineering investment |
| 159 | +- Limited UX sophistication in MVP |
| 160 | +- Requires ongoing coordination to keep the editor aligned with evolving |
| 161 | + specification versions |
| 162 | + |
| 163 | +## Milestones |
| 164 | + |
| 165 | +### Milestone 1 (August 2026) - MVP Editor |
| 166 | + |
| 167 | +- Editor available via NPM package |
| 168 | +- Read-only visual representation of workflows |
| 169 | +- Light/dark theme support |
| 170 | +- English only locale setup |
| 171 | +- Basic error feedback when rendering fails |
| 172 | +- Demo web app |
| 173 | + |
| 174 | +### Milestone 2 (December 2026) - Dual Visual/Text Editor for YAML/JSON workflows |
| 175 | + |
| 176 | +- Dual visual and text editor |
| 177 | +- Text and visual toggles |
| 178 | +- The editor should be able to write back to disk, and users should be able |
| 179 | + to have complete freedom to create, update, and delete nodes - including |
| 180 | + creating a new workflow from the ground up |
| 181 | +- Syntax highlighting and validation |
| 182 | +- VS Code and Chrome extensions |
| 183 | + |
| 184 | +### Milestone 3 (TBD/2027) - External Catalogs and Messaging Support |
| 185 | + |
| 186 | +- Add every OpenAPI spec available in the context to ease creation of |
| 187 | + OpenAPI-based tasks |
| 188 | +- Connect to external catalogs such as Apicurio (others to evaluate and |
| 189 | + explore at the time) to ease creation of OpenAPI and HTTP-based tasks |
| 190 | +- Interfaces to start workflows with CloudEvents – support for events data |
| 191 | + structure (pluggable via HTTP to connect to any backend) |
| 192 | +- Mock services from the OpenAPI catalog, so users won't need to have all the |
| 193 | + services available to test their workflows while editing |
0 commit comments