Skip to main content

Workflows — Studio canvas

A workflow is what a loop does with an issue: the stages it goes through — understanding the issue, planning, writing the change, building, testing, reviewing — and the decisions that route it between them. The Workflow Studio at /workflows is where you read and change workflows, on a canvas. Every issue a loop works on runs under one workflow, at one published version.

The Workflow Studio: every workflow in the rail, the selected one on the canvas, and the inspector beside it.
The Workflow Studio open on standard-fix, with Browse templates, Dry run and Publish v15 buttons, Visual, Code and Copilot tabs, a rail listing standard-fix, feature-loop, deps-refresh, docs-loop, hotfix-p0 (paused) and security-patch (not published) above + New workflow, the canvas with the first stages, and an empty inspector asking you to select a stage or an edge.The Workflow Studio open on standard-fix, with Browse templates, Dry run and Publish v15 buttons, Visual, Code and Copilot tabs, a rail listing standard-fix, feature-loop, deps-refresh, docs-loop, hotfix-p0 (paused) and security-patch (not published) above + New workflow, the canvas with the first stages, and an empty inspector asking you to select a stage or an edge.

The Studio at a glance​

  • The rail on the left lists every workflow in the workspace, each with a caption: how many stages it has and how it ends — 12 stages · draft PR, 5 stages · needs review — or paused, or not published for a workflow that has never been published. Choose one to open it at /workflows/<slug>; /workflows opens the first.
  • The page head names the workflow and says, in one line, when it runs (for example Runs when a sized issue with effort ≤ M is queued.), when it was last edited, the version in force (v14), draft edits when the draft differs from that version, and how many runs use it.
  • Visual, Code and Copilot are three views of the open workflow's draft: the canvas, the workflow as code — see Workflows as code — and the Workflow Copilot.
  • Dry run and Publish vN act on the open workflow; see Dry runs and Publishing a version.
  • Browse templates is not available yet; the template library has not arrived.

Owners and admins create, edit and publish workflows. Everyone else sees the Studio read-only, with a note saying so — you can read every stage and run a dry run, but nothing can be changed.

Creating a workflow​

Choose + New workflow at the foot of the rail. Give it a Name and a Slug — lower-case words joined by hyphens, like standard-fix, unique in the workspace — and choose Create workflow. It starts as a blank draft: nothing runs it until you publish it. The slug is what queued issues are tagged with, and it cannot be changed afterwards.

Start with decides where the new workflow opens: Canvas, the blank canvas to build stage by stage, or Copilot, to describe it in a conversation.

The canvas​

The standard-fix canvas: stages as cards, edges between them, and labelled branches and loops.
The whole standard-fix canvas at 50%: the trigger Issue queued, Understand & scope, the Effort re-check decision branching ≤ M to Write attack plan and > M to Split into subtasks and Back to queue, then Code the change, Build farm · pool A, Run test suite, Self-review diff and the Checks green? gate, which passes to Open PR & auto-merge or loops back on fail; the toolbar below holds zoom, Auto-layout, Add stage and Undo/Redo.The whole standard-fix canvas at 50%: the trigger Issue queued, Understand & scope, the Effort re-check decision branching ≤ M to Write attack plan and > M to Split into subtasks and Back to queue, then Code the change, Build farm · pool A, Run test suite, Self-review diff and the Checks green? gate, which passes to Open PR & auto-merge or loops back on fail; the toolbar below holds zoom, Auto-layout, Add stage and Undo/Redo.

Each card on the canvas is a stage; each arrow is an edge a run follows from one stage to the next. A run starts at the trigger and follows edges until it reaches a terminal.

Stage kinds​

KindOn the canvasWhat it does
Trigger▸Where a run starts. A workflow has exactly one; its condition (such as effort ≤ M) is the workflow's own trigger, described in the page head
Model stage◆A model does the work — analyse, plan, implement, review — from a prompt or a skill, on a routed or pinned model
Build or test▣A command run on your build farm, on a runner pool — building, or running the test suite
Decision or gate◇Chooses the next edge from a condition: effort, labels, source, paths, or whether checks passed
Terminal●Where a run ends: open a draft pull request, open a draft pull request and hand it over for review, or send the issue back to the queue

The chips on a card summarise its settings: the skill or prompt template, the model or routed by task, the runner pool and command, or the condition.

How a run ends​

Both pull-request terminals push the run's branch and open a draft pull request for it:

  • Open draft PR leaves the run in review.
  • Hand it over for review also files a Take over a loop that needs a human? card in the Needs-you inbox, tagged with the draft pull request (for example loop #1851 · PR #42), so you review the work from there. Nothing merges until you say so.

All four shipped templates open a draft pull request. Quick fixes and Docs & chores end at Open draft PR. Feature builder ends at Ask you, and Deep refactor at Open PRs for review, both of which hand the run over for review.

Since ouroboros-rest 0.43.10

The pull request is always opened as a draft, whatever your workspace's dry-run policy says. If the branch cannot be pushed or the pull request cannot be opened, the run fails and says why; its work is kept for a retry. A dry run pushes and opens nothing.

Edges​

  • A default edge is always taken.
  • A branch edge is one outcome of a decision, and carries a condition — the label beside it, such as ≤ M ↓, > M ↘ or pass →.
  • A loop edge, drawn dashed, goes back up the graph — such as fail ↺ from a failed check back to the stage that writes the change. How many times a loop can come round is the retry bound of the stage it returns to.

A gate that tests whether checks passed — gate({require: ["build", "test", "review"], onFail: "implement"}) in the code view — decides on what this round of the run actually produced. A build or test stage's check is its build's exit code on the farm: 0 passes, anything else fails. A model stage that finished is a passed check. When a build fails, the run skips straight to the gate that requires it, and the gate's loop edge sends it back. A check the round has not produced yet leaves the gate undecided, and the run fails saying which. See Build stages for how a run shows its builds.

Editing the canvas​

Owners and admins edit the canvas directly:

  • Add stage ▾ adds a stage of any kind; options that cannot be added say why — A workflow can only have one trigger.
  • Drag from the side of one stage to another to connect them. Double-click an edge to insert a stage in the middle of it.
  • Drag a stage to move it, or Tab to it and use the arrow keys. Delete removes the selection, after asking.
  • Auto-layout tidies the graph; −, the percentage and + zoom; hold ⌥ (Alt) or Space and drag to pan.
  • Undo and Redo — or ⌘/Ctrl+Z and ⌘/Ctrl+Shift+Z — step through your edits.

Your changes save themselves. Each edit is saved to the workflow's draft a moment later — the toolbar says Edited — saving shortly., then All changes saved. The draft is not what runs: runs use the latest published version until you publish again.

The inspector​

Select a stage or an edge — click it, or Tab to it and press Enter — and the inspector beside the canvas shows its settings.

A link can open the canvas on one stage: /workflows/<slug>?node=<stage id> opens with that stage selected, centred and shown in the inspector. Each edit link in the Copilot's stage list is one. A stage id the draft does not have is ignored.

Select a stage and the inspector beside the canvas configures it — here the model stage Code the change.
The Workflow Studio with the Code the change stage selected: the inspector on the right shows its kind, Implement, its title and description, Mode set to Skill with zephyr-conventions, the prompt template with its variable palette, and the start of Model routing.The Workflow Studio with the Code the change stage selected: the inspector on the right shows its kind, Implement, its title and description, Mode set to Skill with zephyr-conventions, the prompt template with its variable palette, and the start of Model routing.

For a model stage:

  • Mode — Direct prompt (the stage's own prompt) or Skill (a skill from Knowledge loaded into context before the prompt).
  • Prompt template — what the model is asked. Insert a variable adds placeholders such as {{issue.title}}, {{issue.body}}, {{diff}} and the output of earlier stages.
  • Model routing — Inherit route for task "…" (recommended) uses the model your workspace routes that kind of task to (see Models), and shows which one that is; Pin model fixes a model alias for this stage.
  • Limits — Max retries and Token budget (shorthand works: 400k, 1.5m).
  • Permissions — May push fixup commits and May touch CI config. They are enforced when a run executes, at every tool call the stage makes. A stage without May touch CI config cannot write CI configuration — .github/workflows/, for example: the write is refused and the stage fails. A stage without May push fixup commits cannot push one.

A build or test stage takes a Runner pool and a Command. A live run (one that needs live execution switched on — it is off by default) builds on the named pool and fails the stage if none is set; with no Command, the pool's default command runs. The command is split into arguments the way a shell would, with nothing expanded. If neither the stage nor its pool has a command, the Ready to run? check build_command fails before the run starts — see Live execution § Prerequisites.

Runner pool is a list of your workspace's pools, each with how many of its runners are online right now — for example pool-b · 2 online, or macos · none online · disabled for a pool that is switched off. The first entry, Workspace default, stores $default and names the pool it resolves to today: Workspace default (pool-a · 2 online). $default means the workspace's default pool — every build and test stage of the shipped templates says $default, so a workflow made from a template needs no pool picked. A run builds every $default stage on the pool that was the default when its first such stage started. Choose — to name no pool.

A build or test stage's Runner pool is picked from the workspace's pools, each with its online runner count — or Workspace default.
The inspector for the Run test suite stage: its kind, Test, its title and description, the Runner pool select set to pool-a · none online, the Command field holding twister -p native_sim, and the Apply footer.The inspector for the Run test suite stage: its kind, Test, its title and description, the Runner pool select set to pool-a · none online, the Command field holding twister -p native_sim, and the Apply footer.

A stage that already names a pool your workspace does not have — a typo, or a pool that was deleted — shows it as pool-typo (unknown) with This workspace has no runner pool named "pool-typo". Pick a pool or Workspace default. under the field, and Apply stays off until you pick another. If the Build Farm could not be read, Runner pool is a plain text field instead, and nothing is checked.

A decision or gate takes its Kind and the condition it tests; a terminal takes its Action and, for merging, the merge method. An edge takes its Kind, a Label printed beside it (never evaluated), and — for a branch — its Condition. Settings that the form does not cover say Edit this value in the code view.

Changes in the inspector are yours alone until you choose Apply — the footer says Unapplied changes until then. Apply puts them on the canvas, and the draft saves them like any other edit.

Validation​

Ouroboros checks a workflow at three moments.

As you fill in a field, the inspector marks a value it cannot accept, and Apply stays off — Fix the fields marked in red before applying.

A field the inspector refuses: an empty prompt is marked, and the stage cannot be applied until it is fixed.
The Prompt template field of the Code the change stage, emptied and outlined, with Write the stage prompt. in red below it and the Insert a variable palette.The Prompt template field of the Code the change stage, emptied and outlined, with Write the stage prompt. in red below it and the Insert a variable palette.

As you edit the canvas, an edit that would break the graph is refused on the spot, with the reason: A stage cannot connect to itself., Nothing can arrive at the trigger — it is where a run starts., Nothing can leave a terminal — it is where a run ends., A branch edge needs a condition — choose what it tests., or A loop edge must return upstream — to a stage that leads back to where the loop starts.

When you publish or dry-run, the whole draft is checked against the workflow rules, the model registry and the engine. Each finding names its source — DSL, Registry or Engine — and a Select … button that takes you to the stage it is about. The structural rules are:

RuleMessage
One triggerA workflow needs exactly one trigger node; this one has none.
A way to finishA workflow needs at least one terminal node; no path through this one ends.
Every stage reachableNo path of edges reaches this stage from the trigger.
Branches decideA branch edge needs a condition; nothing decides whether this one is taken.
Defaults do notA default edge is always taken, so its condition would never be read. Make it a branch edge, or drop the condition.
Loops go backA loop edge must go back up the graph to a stage that leads to it
No duplicatesAn earlier edge already joins these two stages.

A model stage that pins an alias the model registry does not have is refused too — with a suggestion when the name is close to one that exists. So is a build or test stage whose Runner pool names a pool your workspace does not have: a DSL finding names the pool and asks you to pick one, as the inspector does, whether the draft was edited on the canvas or in the code view. A stage that names a skill or a task route that does not exist yet gets a warning in the inspector, which does not stop a publish.

Dry runs​

Dry run walks the draft as if one of your issues had been queued under it — without calling a model, running anything or recording anything. Anyone in the workspace can run one.

  1. Choose Dry run, pick a sized issue from the backlog — for example #485 · Watchdog reset on I²C bus lockup · effort M — and choose Run dry run.
  2. The inspector shows Dry run with issue #485: each stage the walk reached, marked Trigger fires, Reached, Halts here or Ends here, and each edge Taken or Not taken. The path it took is highlighted on the canvas.
  3. Loops are reported, not walked: Loops back at most N times — the retry bound of the stage it returns to. Gates that test checks assume them, since a dry run has no check results.
  4. A build or test stage names the runner pool a live run would build on — A build stage: runs make all on the pool-a runner pool; a live run's gate decides on its exit code. — or says that it names none, which a live run fails on.

If the draft does not validate, nothing is walked and the findings are listed instead. The walk describes the draft as it was; edit the graph and it clears. Close dry run returns to the inspector.

This dry run checks the graph only. A dry run that calls the draft's models on an issue, with a budget, is described in Workflow Copilot.

Publishing a version​

Publishing freezes the draft as the next version — the one runs use.

Publishing: the draft is checked, then frozen as the next version; runs queued from now on use it.
The Publish v15 dialog explaining that the draft is checked by both validators and frozen as the next version, that runs queued from now on use it and the draft stays open, with an optional Change note field and Publish v15 and Cancel buttons.The Publish v15 dialog explaining that the draft is checked by both validators and frozen as the next version, that runs queued from now on use it and the draft stays open, with an optional Change note field and Publish v15 and Cancel buttons.
  1. Choose Publish vN — the button names the version you are about to create, such as Publish v15.
  2. Optionally write a Change note: what changed, in your words. It is kept with the version.
  3. Choose Publish vN. The draft is checked; if it passes, it becomes the new version and you see Published v15. Runs queued from now on use it. The draft stays open for your next edit.

If the check finds problems, nothing is published and the dialog lists the findings — choose one to go to its stage. Only owners and admins can publish.

Which version runs​

  • An issue is pinned to the workflow's published version when it is queued. Runs queued after you publish use the new version; issues already queued or running keep the version they were queued with. The run console shows the pin, for example standard-fix v14.
  • A run executes exactly the version it is pinned to. Editing the workflow and publishing a new version while the run is going does not change it, and neither does an engine restart part-way through.
  • A workflow that has never been published runs nothing.
  • Versions count up from v1 and are never edited. There is no version history or roll-back in the Studio yet: to go back, change the draft and publish it as a new version.

What can go wrong​

  • "Autosave paused — this draft changed elsewhere. Reload to keep editing." Someone else — or you, in another tab or in the code view — changed the draft. Choose Reload the draft; your unsaved edit is not kept, and nothing was overwritten.
  • "Not saved — …" The last edit could not be saved; the next edit tries again. Until it saves, Publish and Dry run refuse, so they never act on an older draft.
  • "This definition cannot be published yet." The draft has findings; select each one and fix its stage.
  • "The draft changed while it was being published, so nothing was published." Reload and publish again.
  • A run used the old version. It was queued before you published. Only issues queued after the publish use the new version.
  • The Publish button is missing. You are not an owner or admin of the workspace.