refactor(automation): remove Workflow Rules; reclaim workflow for state machines#1398
Merged
Conversation
…tate machines Workflow Rules (`WorkflowRuleSchema` + its 7 action sub-schemas) was a spec-only paradigm with no runtime, squatting on the `workflow` metadata-type slot. Meanwhile the `workflow` *core service* contract is the State Machine Engine + approval state management — so the slot was mis-bound. - Delete `automation/workflow.zod.ts`, `workflow.form.ts`, `workflow.test.ts`. - Repoint the `workflow` metadata type, `Stack.workflows`, and `GetWorkflowConfigResponse.workflows` to `StateMachineSchema`, matching the service contract. Core service / `/api/v1/workflow` routes / client SDK unchanged. - Drop the now-inapplicable workflow→object cross-reference check (state machines carry no `objectName`); approval/hook cross-ref coverage retained. - Add ADR-0018 (Unified Node/Action Registry) documenting the direction: one registry-backed node/action contract across Flow / Workflow-Rule / Approval, with Workflow Rules compiled down to Flow rather than run as a separate engine. Verified: spec tsc clean, full spec suite (234 files / 6598 tests) green, spec build OK, client + objectql typecheck clean, zero dangling references.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 2, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What & why
Workflow Rules (
WorkflowRuleSchema+ its 7 action sub-schemas:field_update,email_alert,http_call,task_creation,push_notification,custom_script,connector_action) was a spec-only paradigm with no runtime — nothing ever executed it. It also squatted on theworkflowmetadata-type slot, even though theworkflowcore service contract is the State Machine Engine + approval state management (getWorkflowConfig/workflowTransition/workflowApprove/workflowReject). The slot was mis-bound.As a next-gen low-code platform, a separate declarative rule engine is redundant with Flow (Flow is a strict superset; this mirrors Salesforce retiring Workflow Rules in favor of Flow). The low-altitude authoring experience it served is better delivered as a simplified entry over the one Flow engine (and via NL→Flow, ADR-0010).
Changes
Removed
packages/spec/src/automation/workflow.zod.ts,workflow.form.ts,workflow.test.tsReclaimed
workflow→StateMachineSchema(matches the service contract; core service //api/v1/workflowroutes / client SDK unchanged)kernel/metadata-type-schemas.ts—workflow: StateMachineSchemastack.zod.ts—Stack.workflows: StateMachineSchema[]api/protocol.zod.ts—GetWorkflowConfigResponse.workflows: StateMachineSchema[]objectName; approval/hook cross-ref coverage retained)Cleanup — barrel exports, form registry, skill-reference build list, a stale comment
Docs — adds ADR-0018: Unified Node/Action Registry documenting the broader direction: one registry-backed node/action contract across Flow / Workflow-Rule / Approval, Workflow Rules compiled down to Flow rather than run as a separate engine, and the duplicated outbound verbs (
http_request/http_call/webhook/notify) consolidated onto the ADR-0012 outbox.Verification
tsc --noEmiton spec — cleanclient+objectqltypecheck cleanNotes
WorkflowDesigner(separate repo) corresponds to this deleted paradigm; it converges once ADR-0018's registry-driven palette lands.workflowstate-machine/approval service is preserved.