--- layout: home title: Forma for Workflows description: Zapier and Workato-style automations in a typed Lisp prelude. Checked step-to-step dataflow, closed capability and error sets, and reviewable agent-authored workflows. sidebar: false aside: false pageClass: forma-index forma-workflows ---

Forma for Workflows · pre-alpha exploration

Typed automations you can review before they run.

Business automations wire billing, support, and chat together—and increasingly, AI agents author or edit them. @forma/workflows is a pre-alpha Forma prelude for Zapier and Workato-style flows with typed step-to-step dataflow and closed capability and error sets, so every Stripe refund or Slack alert is visible in the contract. Prelude checking runs live in the browser sandbox today; durable execution and live Preview Portal runs are planned.

trigger: refund-requested (RefundEvent)
   │
   ▼  [Stripe]  errors: [RefundFailed]
step: issue-refund  → RefundReceipt
   │
   ▼  [Slack]   errors: [SlackUnavailable]
step: notify-ops    → NotificationId
   │
   │  read → project → check → IR
   ▼
Closed capability & error contract

Pre-alpha exploration · editable prelude in the sandbox

00 The problem

Automations fail quietly when capabilities are invisible.

Visual workflow tools store logic in sprawling JSON blobs; hand-written glue scripts import arbitrary SDKs and swallow errors. When a human—or an AI agent—edits a refund automation, reviewers cannot tell at a glance what external services the flow can touch or which failures are handled. Forma makes triggers, steps, capabilities, and error sets part of the checked source.

  1. webhook.tsapp.post("/stripe/refund", …)← entry eventtrigger
  2. steps.tsawait stripe.refunds.create(…)← typed stepstep
  3. errors.tstry { … } catch (e: unknown)← closed errorserrors
  4. flow.jsonnodes + edges + credentials← contractworkflow

Workflow contracts

(workflow / trigger / step)

Sandbox · Checked prelude

Every capability and failure is declared up front.

@forma/workflows defines workflow, trigger, and step as prelude forms. Each step names the capability it uses (such as Stripe or Slack), the typed value it expects from earlier steps, and the errors it can raise.

A workflow cannot call an undeclared connector or pass an unverified payload into the next step. If a step adds a new service or error, the workflow's contract must reflect it, making privilege escalation impossible to hide in a diff.

src/refund-flow.lispexploratory prelude sketch
```lisp fragment (workflow refund-and-notify :capabilities [Stripe Slack] :errors [RefundFailed SlackUnavailable] (trigger refund-requested :source :stripe-webhook :payload RefundEvent) (step issue-refund :uses Stripe :input refund-requested :output RefundReceipt :errors [RefundFailed]) (step notify-ops :uses Slack :input issue-refund :output NotificationId :errors [SlackUnavailable])) ```

Agent-authored automations

Small enough to diff. Strict enough to gate.

Exploration

Review the contract, not a thousand lines of glue.

When an AI agent proposes a new Zapier-style automation, the hardest part is trusting what it can touch. Because Forma has no ambient HTTP or arbitrary npm imports inside workflow logic, the declared capability list is an honest boundary. Reviewers see the entire trigger-to-step dataflow in a single short file.

Today, the sandbox checks the prelude descriptors and starter flow live in your browser. Durable execution, connector adapters, live Preview Portal flow runs, and dry-run replay journals (proposed in RFC 0012 and RFC 0016) are planned rather than shipped.

03 Architecture

Checked orchestration as a prelude.

The workflow vocabulary lives in a package prelude, separate from whatever durable runner executes the IR.

Closed capability sets

Every connector—Stripe, Slack, or an internal API—is an explicit capability. Undeclared calls are rejected at check time.

Step-to-step dataflow

Triggers and steps declare typed inputs and outputs so payload mismatches fail at the offending step rather than mid-run.

Canonical Workflow IR

Verified workflows project to structured IR suitable for static policy checks, approval gates, or future Effect-based runners.

Copy-on-write sandbox

Inspect and edit @forma/workflows directly in the browser sandbox to prototype your own triggers, connectors, or error policies.

04 Limits

What you give up, and what is not built yet.

This is a pre-alpha exploration of workflow contracts. The runtime and connector ecosystem are not built yet.

Trade-offs

  • No drag-and-drop canvas. Workflows are authored and reviewed as typed Lisp source rather than a visual node editor.
  • Closed connector surface. Calling a new SaaS API requires declaring its capability and implementing its adapter in host code.
  • Exploratory syntax. The @forma/workflows prelude is a prototype and will evolve as branching, retries, and compensation are designed.

Missing today

  • No durable execution engine. Forma does not schedule webhooks, persist step state, enforce idempotency keys, or run retries yet.
  • No TypeScript emitter or live connectors. The sandbox checks the prelude and projects IR; Stripe and Slack adapters are not generated or executed.
  • Preview Portal runs are planned. Interactive flow visualization and dry-run stepping in the Preview Portal are not implemented yet.

05 Fit

When to try it.

Worth trying

  • Exploring typed, capability-bounded workflow specs for agent-authored automations.
  • Prototyping custom trigger and step descriptors in the browser sandbox.
  • Comparing pure workflow IR against hand-written Effect operations or email rules.

Not yet

  • Replacing Zapier, Workato, Temporal, or Inngest in production today.
  • Running live webhooks, OAuth token refreshes, or durable retries.
  • Teams that need generated connector code or visual monitoring now.

Inspect the contract, then try to widen it.

Open the Workflows sandbox to edit src/refund-flow.lisp alongside the mounted @forma/workflows prelude and watch how capability and step checks behave.