cyberneticlibrary
rworkflowsetup L22
WHQ25/super-one
What it does

Replay workflow DAG from recorded agent results

Best for

Reconstructing workflow execution DAGs from recorded results for visualization, audit, and re-execution without re-running agents; handles data-dependent fan-out and sub-workflows.

Inputs
  • · [object Object]
Outputs
  • · [object Object]
Requires
  • · Script parser (JS/TS AST)
  • · Topo order computation
  • · Sub-workflow loader (via scriptPath references)
Preconditions
  • · Script is valid JS (export const meta, phase(), agent() calls, parallel() calls)
  • · records array contains real results from prior execution (or null if missing)
  • · Data-dependent agent calls (fan-out from parallel results) are reconstructed from labels
  • · Sub-workflows loaded recursively if scriptPath references present
Failure modes
  • · Script syntax error → returns null (fail closed)
  • · Unbounded agent loop → capped at ~5000 calls (prevents hang)
  • · Recorded result missing for an agent → undefined agent result, node still recorded
  • · Phase declared but spawned zero agents → placeholder phase kept (not dropped)
  • · Sub-workflow reference broken (missing scriptPath) → child node recorded with subworkflow=undefined
Trust signals
  • · Script is actually executable (not just inferred from AST)
  • · Data-dependent fan-out reconstructed from recorded labels (not guessed)
  • · Sub-workflows tagged with their name (subworkflow field)
  • · Phase order preserved from script source
  • · Unbounded loop protection prevents hang (call cap enforced)