-
Notifications
You must be signed in to change notification settings - Fork 174
Add ADR for Shared CNCF Workflow Specification Editor #1144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lornakelly
wants to merge
3
commits into
serverlessworkflow:main
Choose a base branch
from
lornakelly:adr-shared-editor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,194 @@ | ||
| # ADR: Shared CNCF Workflow Specification Editor & Multi-Maintainer Collaboration Model | ||
|
|
||
| ## Status | ||
|
|
||
| Proposed | ||
|
|
||
| ## Context | ||
|
|
||
| There is a need for a shared editor for the CNCF Serverless Workflow Specification that | ||
| can be used consistently by multiple implementations (e.g. Quarkus Flow, | ||
| SonataFlow, ZigFlow, Synapse, Lemline), as different tools provide inconsistent | ||
| authoring and visualization experiences, leading to duplicated effort and fragmented tooling. | ||
|
|
||
| Today we have: | ||
|
|
||
| - An existing (but aging) VS Code extension for Serverless Workflow | ||
| - Several product-specific editors embedded in consoles or IDEs | ||
| - Fragmented UX and duplicated effort around: | ||
| - YAML/JSON authoring | ||
| - Visual diagramming | ||
| - Validation against the spec schema | ||
|
|
||
| We want to converge on a single core editor stack driven by the CNCF | ||
| Serverless Workflow Specification, with a collaboration model that allows | ||
| multiple vendors/maintainers to contribute and embed it. | ||
|
|
||
| This ADR formalizes the decision to build a shared editor, with a strictly | ||
| scoped MVP, aligned with the proposal outlined in | ||
| [serverlessworkflow/specification#1131](https://github.com/serverlessworkflow/specification/issues/1131) and further refined through MVP | ||
| scoping discussions. | ||
|
|
||
| ## Decision | ||
|
|
||
| After evaluating existing solutions, potential approaches, and their | ||
| associated dependencies, we decided to build the editor from scratch to | ||
| retain full ownership of the architecture and release process, prioritize | ||
| architectural simplicity, enable CNCF hosting and long-term sustainability, | ||
| at the cost of slower initial delivery. | ||
|
|
||
| ## Licensing | ||
|
|
||
| - Apache 2.0. | ||
| - All dependencies must be CNCF compatible. | ||
| - React Flow is MIT licensed and acceptable. | ||
|
|
||
| ## Governance & Community Alignment | ||
|
|
||
| We want a multi-maintainer editor project that does not belong to a single | ||
| vendor. | ||
|
|
||
| ### Proposed model | ||
|
|
||
| - Repository ownership | ||
| - New repo under the CNCF Serverless Workflow Specification org, e.g. `workflow-spec-editor` (name TBD). | ||
|
|
||
| - Maintainers | ||
|
|
||
| - Initial maintainers: representatives from at least: | ||
| - CNCF Serverless Workflow Specification maintainers | ||
| - Quarkus Flow / SonataFlow | ||
| - Other interested engine maintainers (e.g. ZigFlow / Synapse / Lemline etc.). | ||
|
|
||
lornakelly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Decision process | ||
|
|
||
| - Use the spec’s existing governance as a reference (PR review rules, approvals). | ||
|
|
||
| - Editor decisions should: | ||
| - Respect the spec as the single source of truth | ||
| - Avoid baking in engine-specific opinions by default | ||
|
|
||
| - Integration responsibilities | ||
|
|
||
| - Core editor project provides: | ||
|
|
||
| - NPM package(s) | ||
| - Reference VS Code extension | ||
| - Docs and examples | ||
|
|
||
| - Each implementation (Quarkus Flow, Synapse, etc.) owns: | ||
|
|
||
| - Their integration/embedding | ||
| - Optional extension/profile configuration | ||
|
|
||
| - Release strategy | ||
| - Align with spec releases when possible (e.g. new spec fields -> new editor release). | ||
| - Support at least the latest minor and one previous minor version of the spec. | ||
|
|
||
| ## Initial Scope (v1.0) | ||
|
|
||
| ### 1. In Scope | ||
|
|
||
| - Read-only visual representation of YAML / JSON workflow definitions | ||
| - Visualize all task types and transitions | ||
| - Fully expanded nested task visualization | ||
| - Indication of basic validation issues | ||
lornakelly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Editor available via NPM package | ||
| - A simple demo app showing how to embed the editor as a component | ||
| - Documentation for integrators | ||
|
|
||
| ### 2. UX & Design Decisions | ||
|
|
||
| - Light and dark theme support | ||
| - Localization infrastructure in place, English only content for MVP | ||
| - Rely on out-of-the-box accessibility from React Flow | ||
lornakelly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Responsiveness is not a focus for MVP, as the editor is intended for | ||
| desktop usage rather than mobile devices | ||
|
|
||
| ### 3. Diagram Semantics & Representation | ||
|
|
||
| - Support all task types defined by the Serverless Workflow specification. | ||
| - Twelve task types represented visually. | ||
| - Task types differentiated using icons, custom node shapes are avoided for MVP due to layout complexity. | ||
|
|
||
| ### 4. Validation | ||
|
|
||
| - The editor performs lightweight client-side schema/structural validation to determine whether the workflow can be rendered. | ||
| - The backend (runtime implementation) remains the source of truth for full specification conformance and advanced validation rules. | ||
| - Edge cases to handle: validation discrepancies between the TypeScript SDK and the backend (runtime implementation). | ||
| - If structural validation passes and rendering is possible, render the workflow. | ||
| - If structural validation fails and rendering is not possible, do not attempt to render a partial/invalid diagram; provide clear, actionable error feedback to the user instead. | ||
|
|
||
| ### 5. Nested Tasks & Layout Strategy | ||
|
|
||
| - All nested tasks are fully expanded in the diagram. | ||
| - No collapsing or layered presentation in MVP. Collapsible or hierarchical views are deferred due to layout and UX complexity. | ||
| - Nested workflow UX will be revisited post MVP. | ||
|
|
||
| ### 6. Development & Tooling Decisions Overview (MVP) | ||
|
|
||
| - Web-based implementation | ||
| - React/TypeScript-based architecture | ||
| - Diagram rendering via React Flow | ||
| - Webpack for application bundling | ||
| - Jest for unit testing | ||
| - Playwright for end-to-end testing | ||
| - Storybook for component development and documentation | ||
| - Node.js for development and build tooling | ||
| - pnpm for dependency management | ||
| - GitHub Dependabot for dependency security and updates | ||
|
|
||
| ## Consequences | ||
|
|
||
| ### Positive | ||
|
|
||
| - CNCF-aligned ownership | ||
| - Lowers the entry barrier to the CNCF Serverless Workflow Specification | ||
| - Encourages understanding and usage of workflow semantics | ||
| - Reduces duplicated tooling effort across runtimes | ||
| - Provides a shared, consistent user experience | ||
| - Enables incremental evolution without over-engineering MVP | ||
| - Clear architectural simplicity and long-term maintainability | ||
| - Full control over release cadence and scope | ||
lornakelly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### Trade-Offs | ||
|
|
||
| - Slower initial feature delivery compared to reuse-based approaches | ||
| - Temporary feature gap relative to existing editors, as the initial scope | ||
| must remain conservative while the editor is built from the ground up | ||
| - Increased upfront engineering investment | ||
| - Limited UX sophistication in MVP | ||
| - Requires ongoing coordination to keep the editor aligned with evolving | ||
| specification versions | ||
|
|
||
| ## Milestones | ||
|
|
||
| ### Milestone 1 (August 2026) - MVP Editor | ||
|
|
||
| - Editor available via NPM package | ||
| - Read-only visual representation of workflows | ||
| - Light/dark theme support | ||
| - English only locale setup | ||
| - Basic error feedback when rendering fails | ||
| - Demo web app | ||
|
|
||
| ### Milestone 2 (December 2026) - Dual Visual/Text Editor for YAML/JSON workflows | ||
|
|
||
| - Dual visual and text editor | ||
| - Text and visual toggles | ||
| - The editor should be able to write back to disk, and users should be able | ||
| to have complete freedom to create, update, and delete nodes - including | ||
| creating a new workflow from the ground up | ||
| - Syntax highlighting and validation | ||
| - VS Code and Chrome extensions | ||
|
|
||
| ### Milestone 3 (TBD/2027) - External Catalogs and Messaging Support | ||
|
|
||
| - Add every OpenAPI spec available in the context to ease creation of | ||
| OpenAPI-based tasks | ||
| - Connect to external catalogs such as Apicurio (others to evaluate and | ||
| explore at the time) to ease creation of OpenAPI and HTTP-based tasks | ||
| - Interfaces to start workflows with CloudEvents – support for events data | ||
| structure (pluggable via HTTP to connect to any backend) | ||
| - Mock services from the OpenAPI catalog, so users won't need to have all the | ||
| services available to test their workflows while editing | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.