Skip to content

v0.8.1

Choose a tag to compare

@iamalvisng iamalvisng released this 05 Oct 12:34
· 167 commits to main since this release
2f4a53e

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 checked

New

  • One command per try. A render now prints one line per edge and per step, and the verify counts when the figure
    has a source or a via. You do not need a separate verify or --spec call to read the figure back.
    --no-verify skips the verify part. flowfig verify stays 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), a say line or a caption
    over 20 words, and filler words such as "seamless" or "robust". An HTTP request line such as GET /user passes. If the
    word is a product name, keep it.
  • Short guide. flowfig docs prints a core guide of about half the old length. flowfig docs <topic> prints one
    topic: lanes, timeline, rail, marks or verify. The MCP docs tool takes the same topic.

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 gap that you set is
    now the smallest gap, not a fixed one.
  • Long box labels wrap to two lines before the text gets smaller.
  • verify gives 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 as const router = Router(), the check
    also reads the statements on it, such as router.post(...), in TypeScript, JavaScript and Python.
  • flowfig diff now reports a change to via, a hop's source or via, 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-text warning reports them. Put the code name in source
    and write the label in plain words. Under --strict the 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