Re-Flow

Model procedural flows as graphs, simulate state over time, and iterate with AI-assisted edits.

Re-Flow

Overview

Re-Flow is a graph-native flow and simulation workbench. You define nodes (steps, states, or agents) and edges (transitions, dependencies, or messaging), then run simulations that propagate signals, resources, or probabilities through the network over ticks. AI assists with generation, refactoring, and targeted edits—without clobbering your model.

AI-Aided Modeling

  • Generate flows from a prompt or source files
  • Chat-apply minimal ops: add/rename/move nodes, wire edges, tweak parameters
  • Guardrails prevent accidental full resets

Deterministic or Stochastic Simulation

  • Tick-based propagation with pluggable update rules
  • Run single path, batch scenarios, or Monte-Carlo
  • Record metrics & compare runs

Composable Graphs

  • Groups & subflows; reusable templates
  • Labels, tags, inputs/outputs, constraints
  • Import/export JSON, SVG/PNG, CSV

Ergonomic UX

  • Drag to pan & zoom; snap-to grid
  • Inline rename & property drawer
  • Keyboard ops and context menus

Interface

Canvas

  • Left-drag to pan; wheel to zoom
  • Right-click → context menu (add node/group, connect, duplicate)
  • Snap grid for precise layout; lane zoom scales nodes & labels

Nodes & Edges

  • Double-click a label to rename in place
  • Drag endpoints to rewire; straight/curved/orthogonal edges
  • Properties drawer: state, rate, capacity, guards

Simulation Controls

  • Transport: Play / Pause / Step / Reset
  • Loop toggle and speed multiplier (ticks/sec)
  • Overlays: active edge highlight, token counters, heatmaps

AI Chat Edits

  • “Add a decision node ‘Gateway A’ after ‘Validate’.”
  • “Wire A→B with a 0.3 probability branch.”
  • “Group the ingest nodes into ‘ETL’ and color them slate.”

Tip: Use Alt/⌥ + drag to duplicate, and Shift while dragging to constrain angles.


Use Cases

Software Delivery Pipelines

  • Map CI/CD stages, QA gates, release trains
  • Run what-if on parallelization & bottlenecks
  • Quantify lead time and deployment frequency

Business Processes

  • Customer onboarding, claims handling, KYC/AML
  • Model SLAs, rework loops, escalation paths
  • Stress-test capacity & staffing

Data / ETL & ML Ops

  • Ingest → validate → transform → serve
  • Backpressure & queue lengths under load
  • A/B rollout, drift checks, retraining schedules

Networks & Protocols

  • Message routing, retries, circuit breakers
  • Latency/throughput envelopes
  • Failure injection scenarios

Creative / Performance Flows

  • Music performance graphs (stems, effects, cues)
  • Lighting/AV cue flows across scenes
  • Interactive shows with branching logic

Simulation Patterns

  • Token-passing: discrete items traverse edges (queues, jobs, packets).
  • Rate-based: continuous flow with capacities and loss.
  • Probabilistic branching: split across edges by weights or guards.
  • Event-driven: external triggers inject or divert flow at runtime.

Technical Overview

System flow: Canvas & Graph → Simulation Engine → Metrics & Runs / AI Edit Path → Exports.

Canvas + Graph Simulation Engine Metrics & Runs AI Edit Path Exports

Stack

  • React + Vite UI with Tailwind utilities
  • Graph layer with pan/zoom, ports, edge routing, and groups
  • Simulation engine (tick loop, deterministic/stochastic updates)
  • OpenAI for generation & chat-edits (op-level diffs with undo/redo)
  • Exporters for JSON/CSV/PNG/SVG

Data Model (sketch)

  • nodes[]: { id, label, type, params, groupId?, position }
  • edges[]: { id, source, target, kind, weight?, guard?, capacity? }
  • sim: { tick, speed, loop, overlays, runs[] }

Academic Framing

Re-Flow spans several established formalisms and keeps the UI close enough to enable validation and reasoning when needed.

  • Directed Graphs / Automata: nodes as states, edges as transitions; useful for workflow correctness and reachability analysis.
  • Petri Nets (token-based): tokens traverse places via transitions, capturing concurrency, synchronization, and resource contention.
  • Markov Chains & DTMCs: probabilistic transitions support stochastic modeling and Monte-Carlo experiments.
  • Queueing Theory: capacities, arrival/service rates, and backpressure can be explored visually and numerically.
  • Systems Dynamics (discrete): rate flows, stocks, and feedback loops approximated on ticks with pluggable update rules.

Note: Practical modeling first, with clear affordances to map to formal analysis when required.