cyberneticlibrary

Event emitter workflow

emitterworkflowsetup L234
wellingfeng/FreeUltraCode
What it does

Emit executable Claude Code workflow from IR graph

Best for

Compiling high-level workflow IR specifications into executable Claude Code scripts with automatic phase ordering and schema declaration emission.

Inputs
  • · [object Object]
Outputs
  • · [object Object]
Requires
  • · IR schema types (IRGraph, IRNode, IREdge, IRPort)
  • · Topo order computation (topoOrderScope)
Preconditions
  • · IRGraph is well-formed (nodes, edges, no dangling references)
  • · Each node has a unique key and label
  • · Phases declared before nodes are scheduled to them
  • · Agent specs include model and agentType (or schema identifier)
Failure modes
  • · Cyclic edge (DAG invariant violated) → topo sort fails, emission aborted
  • · Orphaned node (no incoming edges, not in a phase) → emission includes it but may cause runtime error
  • · Invalid schema reference (schema not defined) → emitted with placeholder reference
  • · Agent prompt is null or empty → emitted but agent call will fail at runtime
  • · Model specified but not available (e.g. gpt-5) → emitted as-is (runtime catches)
Trust signals
  • · Output is actually executable (runs through phase/agent/parallel DSL)
  • · Topo order enforced (no data dependency violations)
  • · Schema identifiers emitted as @schema declarations (machine-readable)
  • · Source annotations (@node, @phase) enable debugging and visualization
  • · Prompt text preserved exactly (no LLM alteration)