Workflow authoring is an undocumented raw-JSON textarea with no validation #11

Open
opened 2026-09-08 20:57:22 -04:00 by jared · 0 comments
Owner

Overview

Workflows are created and edited by pasting JSON. The engine supports a rich step vocabulary – execute (targets, condition, timeout, retries, retryDelayMs), prompt (options, key, routes), wait, parse, route (conditions/if/goto/default), goto/end, top-level params (name/label/required/placeholder) – but none of it is documented in the UI or README (README still says "Workflow Creation (Future Feature)").

Nothing validates the definition on save: POST/PUT /api/workflows only checks that definition is truthy. Typos ("type":"exec", a goto to a non-existent id, options missing on a prompt, steps not an array) are only discovered when the run fails.

Where

  • public/index.html create/edit workflow modals.
  • server.js POST /api/workflows, PUT /api/workflows/:id, executeWorkflowSteps().

Suggested fix

  • Server-side schema validation with specific error messages (unknown step type, unresolved goto target, prompt without options, duplicate step ids, invalid condition syntax) returned as 400.
  • In-modal reference panel / link documenting every step type and field, with copy-able examples.
  • Longer term: a step-builder form (add step → pick type → fill fields) generating the JSON, with a "Validate" button.
## Overview Workflows are created and edited by pasting JSON. The engine supports a rich step vocabulary – `execute` (targets, condition, timeout, retries, retryDelayMs), `prompt` (options, key, routes), `wait`, `parse`, `route` (conditions/if/goto/default), `goto`/`end`, top-level `params` (name/label/required/placeholder) – but none of it is documented in the UI or README (README still says "Workflow Creation (Future Feature)"). Nothing validates the definition on save: `POST/PUT /api/workflows` only checks that `definition` is truthy. Typos (`"type":"exec"`, a `goto` to a non-existent id, `options` missing on a prompt, `steps` not an array) are only discovered when the run fails. ## Where - `public/index.html` create/edit workflow modals. - `server.js` `POST /api/workflows`, `PUT /api/workflows/:id`, `executeWorkflowSteps()`. ## Suggested fix - Server-side schema validation with specific error messages (unknown step type, unresolved goto target, prompt without options, duplicate step ids, invalid condition syntax) returned as 400. - In-modal reference panel / link documenting every step type and field, with copy-able examples. - Longer term: a step-builder form (add step → pick type → fill fields) generating the JSON, with a "Validate" button.
jared added the enhancementuxdocumentationfrontendworkflow-enginepriority/high labels 2026-09-08 20:57:22 -04:00
Sign in to join this conversation.