Menu

Process and pipeline diagrams

A delivery pipeline, a data flow or a business process reads from left to right: stages are zones, steps are cards, and the arrows between them fork and join on their own.

{"skemo":1,"name":"pipeline.skemo","source":"//- A delivery pipeline, left to right, with a manual gate\ndiagram(dir=\"right\")\n\n card#push.trigger(icon=\"git-branch\") Push to main\n to(build)\n\n zone#ci.step Continuous integration\n card#build.job Build\n | cargo build --release\n to(test lint)\n card#test.job Unit tests\n | 1,240 tests\n to(image)\n card#lint.job Lint and audit\n | clippy · cargo-deny\n to(image)\n card#image.job Container image\n | signed, pushed to the registry\n to(staging)\n\n zone#cd.step Delivery\n card#staging.env Staging\n | smoke tests\n to(approve)\n card#approve.gate(icon=\"user-check\") Approval\n | release manager\n to(prod) approved\n card#prod.env.ok Production\n | canary 10 % → 100 %\n","css":[{"name":"pipeline.css","content":".trigger { --c: #6B7280; --label: \"Trigger\"; }\n.job { --c: #3E6FC4; --label: \"Job\"; }\n.env { --c: #2F9E44; --label: \"Environment\"; }\n.gate { --c: #E8590C; --label: \"Manual gate\"; }\n"}],"theme":"light"}TRIGGERPush to mainCONTINUOUS INTEGRATIONJOBBuildcargo build --releaseJOBUnit tests1,240 testsJOBLint and auditclippy · cargo-denyJOBContainer imagesigned, pushed to the registryDELIVERYENVIRONMENTStagingsmoke testsMANUAL GATEApprovalrelease managerENVIRONMENTProductioncanary 10 % → 100 %approved
{"skemo":1,"name":"pipeline.skemo","source":"//- A delivery pipeline, left to right, with a manual gate\ndiagram(dir=\"right\")\n\n card#push.trigger(icon=\"git-branch\") Push to main\n to(build)\n\n zone#ci.step Continuous integration\n card#build.job Build\n | cargo build --release\n to(test lint)\n card#test.job Unit tests\n | 1,240 tests\n to(image)\n card#lint.job Lint and audit\n | clippy · cargo-deny\n to(image)\n card#image.job Container image\n | signed, pushed to the registry\n to(staging)\n\n zone#cd.step Delivery\n card#staging.env Staging\n | smoke tests\n to(approve)\n card#approve.gate(icon=\"user-check\") Approval\n | release manager\n to(prod) approved\n card#prod.env.ok Production\n | canary 10 % → 100 %\n","css":[{"name":"pipeline.css","content":".trigger { --c: #6B7280; --label: \"Trigger\"; }\n.job { --c: #3E6FC4; --label: \"Job\"; }\n.env { --c: #2F9E44; --label: \"Environment\"; }\n.gate { --c: #E8590C; --label: \"Manual gate\"; }\n"}],"theme":"dark"}TRIGGERPush to mainCONTINUOUS INTEGRATIONJOBBuildcargo build --releaseJOBUnit tests1,240 testsJOBLint and auditclippy · cargo-denyJOBContainer imagesigned, pushed to the registryDELIVERYENVIRONMENTStagingsmoke testsMANUAL GATEApprovalrelease managerENVIRONMENTProductioncanary 10 % → 100 %approved
pipeline.skemo
//- A delivery pipeline, left to right, with a manual gate
diagram(dir="right")

  card#push.trigger(icon="git-branch") Push to main
    to(build)

  zone#ci.step Continuous integration
    card#build.job Build
      | cargo build --release
      to(test lint)
    card#test.job Unit tests
      | 1,240 tests
      to(image)
    card#lint.job Lint and audit
      | clippy · cargo-deny
      to(image)
    card#image.job Container image
      | signed, pushed to the registry
      to(staging)

  zone#cd.step Delivery
    card#staging.env Staging
      | smoke tests
      to(approve)
    card#approve.gate(icon="user-check") Approval
      | release manager
      to(prod) approved
    card#prod.env.ok Production
      | canary 10 % → 100 %
pipeline.css
.trigger { --c: #6B7280; --label: "Trigger"; }
.job     { --c: #3E6FC4; --label: "Job"; }
.env     { --c: #2F9E44; --label: "Environment"; }
.gate    { --c: #E8590C; --label: "Manual gate"; }

How it is written

  • diagram(dir="right") lays the steps from left to right; cards of one stage stay in their zone, in the order you wrote them.
  • to(test lint) starts two steps in parallel: their arrows share a fork. Two steps that lead to the same next step meet there.
  • A state class marks an outcome: .ok, .warn, .error add a ring and a mark to the card (Rich cards).
  • A label on an arrow names the condition: to(prod) approved, to(screen).dashed no.

Loops and decisions

An arrow may go back to an earlier step: it is routed around the row instead of through it. Give a decision its own type and label its outgoing arrows:

card#decision.choice Decision
  to(send).ok yes
  to(screen).ko.dashed no

skemo draws boxes, not flowchart symbols: a decision is a card with its own colour, not a diamond.

Show it step by step

Add @1, @2… at the end of lines and the same file plays as an animation in HTML, GIF or animated PNG, one stage at a time (Step-by-step animations). Or keep the drawing still and let dots run along the arrows (Animated flows).

See also