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.
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,.erroradd 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
- Layout and positions: directions, rows, wrapping long processes.
- Timelines when the steps have dates.
