Run a process that takes days, not seconds.

Write down the steps, the waiting, the retries, the failures, and human decisions for the editorial desk. Swirls remembers where the work is and keeps a record of how it got there.

Work that waits needs somewhere to wait.

A process may wait on the clock, another system, or a person who is out until Monday. Swirls holds the sequence and keeps everything already finished, whether the wait is a minute or a month.

The work keeps its place and its history.

You set the order: read the draft, check it, hold it for a person, then send the notice. Swirls runs exactly that and records the path the work took.

Example: An article submission is read by AI, pauses for an editor, and posts to Slack once approved, without scattering the process across cron jobs and callbacks.

Swirls owns the production work behind it.

Keeping the work alive across waits and restarts, retrying as you asked, pausing for the people you authorized, and keeping the history.

Wait

Pause for the clock, another system, or a person, and lose nothing.

Recover

Retry the step that failed without redoing the ones that worked.

Explain

See where the work stopped and which line put it there.

editorial/desk
editorial-desk.swirls
workflow publish_article {
  label: "Publish article"

  root {
    type: code
    label: "Normalize submission"
    inputSchema: submission_input
    code: @ts {
      const { title, body, author_email } = context.nodes.root.input
      return {
        title: title.trim(),
        body: body.trim(),
        author_email: author_email.toLowerCase().trim(),
        word_count: body.split(/\s+/).length,
      }
    }
  }

  node screen {
    type: ai
    kind: object
    label: "Screen draft"
    model: "google/gemini-2.5-flash"
    prompt: @ts {
      const { title, body } = context.nodes.root.output
      return [
        "Summarize this draft in one sentence, then list editorial concerns.",
        "Return an empty flags array when the draft is clean.",
        "",
        "Title: " + title,
        "Body: " + body,
      ].join("\n")
    }
  }

  node editorial_review {
    type: code
    label: "Editor review"
    code: @ts {
      const { summary, flags } = context.nodes.screen.output
      return { summary, flags }
    }
    review: {
      enabled: true
      title: "Editorial review"
      actions: [
        { id: "approve", label: "Approve & publish", outcome: "approve" },
        { id: "revise", label: "Request revisions", outcome: "reject" }
      ]
    }
  }

  flow {
    root -> screen
    screen -> editorial_review
    editorial_review -> publish
    publish -> announce
  }
}
publish_article · exec_9K2mPaused
  1. Normalize submission

    done
  2. Screen draft

    done
  3. Save screened draft

    done
  4. Editor review

    paused

    Waiting on editor

  5. Mark published

    queued
  6. Announce in Slack

    queued

Review

Approve “Shipping the review queue”?

ApproveRequest revisions

Covers

  1. Events and schedules
  2. Waits and retries
  3. Human review
  4. Failure handling
  5. Run history
Read the technical docs

You own

The sequence, business rules, exceptions, approvals, and what finished means.

Describe the process that cannot lose its place.

Name the steps, the waiting, what to do when something fails, and who decides. Swirls carries the rest.