Flows YAML — autocomplete, multi-layer validation, side panel #1072

Closed
opened 2026-05-10 15:38:54 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As a flow author, I want IntelliSense-grade autocomplete, schema squiggles, semantic checks (unknown step refs, duplicate ids, broken expressions), and a side panel that lists errors and renders schema docs, so that authoring flows feels as polished as editing CI YAML in VS Code.

Acceptance criteria

Autocomplete provider

  • Top-level keys: name, on, if, priority, concurrency, steps, env.
  • on: value list: trigger kinds; on.<kind> array list: subtypes filtered by kind.
  • steps[].uses: — registered op names from schema discriminator.
  • steps[].with: — required + optional args for the chosen uses:, with type hints + Zod .describe() text.
  • Inside ${{ }} and if:: event.*, steps.<id>.outputs.<key>, env.*, built-in functions, operators.

Custom diagnostics provider

  • Duplicate step.id within a flow.
  • ${{ steps.X.outputs.Y }} references an unknown step or output key (uses outputsSchema).
  • if: expression fails to parse (mini-AST round-trip).
  • uses: not in registered ops list.
  • concurrency.group template references unknown variable.

Side panel — Validation tab

  • Lists Monaco markers grouped by severity, click → jump-to-line.
  • Live updates as the user types (web worker, < 50ms p95).

Side panel — Help tab

  • Renders schema docs auto-generated from Zod .describe(): per op, per trigger, per built-in.
  • Searchable.

Server round-trip on save

  • Validate button calls POST /flows/:name?validate=1 (server returns 422 with the same diagnostics shape if invalid).
  • Save blocks on server validation failures even if client-side reports clean (defence in depth).

Tests

  • Vitest browser mode: typing triggers each diagnostic class.
  • Autocomplete suggestions appear in expected positions (snapshot of completion items).
  • Validation tab updates count as errors are introduced and fixed.

Out of scope

  • Dry-run + run-trace tabs (covered by #flows-13).

References

  • Spec: docs/specs/flows-yaml.md §10.3.3, §10.3.4, §10.3.6.
## User story As a flow author, I want IntelliSense-grade autocomplete, schema squiggles, semantic checks (unknown step refs, duplicate ids, broken expressions), and a side panel that lists errors and renders schema docs, so that authoring flows feels as polished as editing CI YAML in VS Code. ## Acceptance criteria ### Autocomplete provider - [ ] Top-level keys: `name`, `on`, `if`, `priority`, `concurrency`, `steps`, `env`. - [ ] `on:` value list: trigger kinds; `on.<kind>` array list: subtypes filtered by kind. - [ ] `steps[].uses:` — registered op names from schema discriminator. - [ ] `steps[].with:` — required + optional args for the chosen `uses:`, with type hints + Zod `.describe()` text. - [ ] Inside `${{ }}` and `if:`: `event.*`, `steps.<id>.outputs.<key>`, `env.*`, built-in functions, operators. ### Custom diagnostics provider - [ ] Duplicate `step.id` within a flow. - [ ] `${{ steps.X.outputs.Y }}` references an unknown step or output key (uses `outputsSchema`). - [ ] `if:` expression fails to parse (mini-AST round-trip). - [ ] `uses:` not in registered ops list. - [ ] `concurrency.group` template references unknown variable. ### Side panel — Validation tab - [ ] Lists Monaco markers grouped by severity, click → jump-to-line. - [ ] Live updates as the user types (web worker, < 50ms p95). ### Side panel — Help tab - [ ] Renders schema docs auto-generated from Zod `.describe()`: per op, per trigger, per built-in. - [ ] Searchable. ### Server round-trip on save - [ ] Validate button calls `POST /flows/:name?validate=1` (server returns 422 with the same diagnostics shape if invalid). - [ ] Save blocks on server validation failures even if client-side reports clean (defence in depth). ### Tests - [ ] Vitest browser mode: typing triggers each diagnostic class. - [ ] Autocomplete suggestions appear in expected positions (snapshot of completion items). - [ ] Validation tab updates count as errors are introduced and fixed. ## Out of scope - Dry-run + run-trace tabs (covered by #flows-13). ## References - Spec: `docs/specs/flows-yaml.md` §10.3.3, §10.3.4, §10.3.6.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#1072
No description provided.