Skip to content

feat: draw bare workflow files with agents workflow diagram - #186

Merged
PaulAsjes merged 1 commit into
mainfrom
feat/diagram-bare-workflow
Nov 4, 2026
Merged

PaulAsjes merged 1 commit into
mainfrom
feat/diagram-bare-workflow

Conversation

@PaulAsjes

@PaulAsjes PaulAsjes commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

agents workflow diagram only found a workflow under an agent config's workflow key. That meant it rejected the bare workflow files the new SDK Workflow builder exports for storing in git, with "no workflow to draw". It now draws those files too, in the terminal or as Mermaid, so a workflow written in code can be checked without wrapping it in an agent config first.

Details
  • workflow_of treats a file with top-level nodes as a workflow by itself. If a workflow key is present it still wins, even when empty, so agent configs and --all behave exactly as before.
  • The argument help text, the error message and the README now mention bare workflow files.
  • Companion SDK PR: feat: Add a Workflow builder for agent workflows as code elevenlabs-js#480. It adds the builder whose toJSONString() output this reads. The two PRs can merge in either order.

Testing

  • cargo test workflow::diagram: 25 passed, including a new test. It checks that a bare workflow draws the same as the same workflow inside an agent config, that a bare file with no nodes is rejected, and that a workflow key is never bypassed.
  • Rendered a workflow built with the SDK, from its exported file, in both --format ascii and --format mermaid.
  • Clippy reports nothing in the changed file. cargo fmt --check fails repo-wide only on the generated cli/elevenlabs/main.rs, which is already unformatted on main.

🤖 Generated with Claude Code

`agents workflow diagram` only read a workflow from an agent config's
`workflow` key, so the bare workflow files that the SDKs' Workflow
builders export were rejected with "no workflow to draw". A file with
top-level `nodes` is now drawn as a workflow by itself; a `workflow`
key, when present, still wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PaulAsjes
PaulAsjes merged commit c291728 into main Nov 4, 2026
16 checks passed
@kraenhansen
kraenhansen deleted the feat/diagram-bare-workflow branch November 5, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants