Repository navigation
v0.8.1
flowfig 0.8.1 makes figures easier to read, and an agent needs fewer steps to draw one.
npx flowfig spec.json docs/login.svg
# 0 errors, 0 warnings
# figure: 8 boxes, 0 groups, 8 edges, 2 steps, 17 messages
# client -> limiter: log in
# limiter -> redis: count tries
# ...
# docs/login.svg: 4 of 4 boxes defined; edges: 6 found, 0 not found, 1 unsure, 1 not checkedNew
- One command per try. A render now prints one line per edge and per step, and the
verifycounts when the figure
has asourceor avia. You do not need a separateverifyor--speccall to read the figure back.
--no-verifyskips the verify part.flowfig verifystays for CI. - Code on hover. If a box, an edge or a hop has a
source, the SVG and the<Flow />player show it on hover.
The label can be plain words, and the code name stays one hover away. - Check rule
plain-text(warning). It reports a label that looks like code (findUserByEmail,validate_rows,
run()), a label that is a database or cache command (SELECT,SET sess:1 EX 3600), asayline or a caption
over 20 words, and filler words such as "seamless" or "robust". An HTTP request line such asGET /userpasses. If the
word is a product name, keep it. - Short guide.
flowfig docsprints a core guide of about half the old length.flowfig docs <topic>prints one
topic:lanes,timeline,rail,marksorverify. The MCPdocstool takes the sametopic.
Improvements
- Edges go around boxes. If a straight edge would cross a box, the edge goes around it with an arc or a right-angle
path. - Labels find free space. An edge label moves along its edge to a spot clear of boxes and other labels.
- Gaps fit the labels. The space between boxes grows to hold the edge labels between them. A
gapthat you set is
now the smallest gap, not a fixed one. - Long box labels wrap to two lines before the text gets smaller.
verifygives fewer wrong "not found" results. If the caller calls a function that it receives, such as Express
next(), the edge is "unsure" with the reason. If the caller is a variable such asconst router = Router(), the check
also reads the statements on it, such asrouter.post(...), in TypeScript, JavaScript and Python.flowfig diffnow reports a change tovia, a hop'ssourceorvia, a removed repeat of the same hop, and a
step caption change.
Requirements
- Node 18 or later.
- React 18 or later, only for the
<Flow />player.
Upgrade
- Figures can change their layout when you render them again: edges route around boxes, and gaps grow to fit labels.
Render your figures again and look at them. - If your figures use code names as labels, the new
plain-textwarning reports them. Put the code name insource
and write the label in plain words. Under--strictthe warning is an error. - If your GitHub workflow uses the flowfig Action, change it to
iamalvisng/flowfig@v0.8.1.
Full Changelog: v0.8.0...v0.8.1