Skip to content

Edge ​

An edge connects a source node or enter port to an executable node, exit port, or failure port. Its conditions constrain the source feature state; its effects constrain a Feature node's candidate state. An edge entering an executable node selects that arrival path's visit.

Countdown example ​

The Countdown graph contains these six edges:

Edge IDConnectionConditionEffect
enter__initialize_counterenter → initialize_counter——
initialize_counter__check_counterinitialize_counter → check_counter—counter? permits its first value
check_counter__decrementcheck_counter → decrementcounter > 0—
decrement__update_counterdecrement → update_counter——
update_counter__check_counterupdate_counter → check_counter—counter decreases
check_counter__exitcheck_counter → exitcounter = 0—

Conditions ​

A condition enables an edge only when the current feature state satisfies every listed observation.

Here b denotes a Boolean feature, z a numerical feature, c an enum feature, and d one of that enum's declared values.

Feature kindNotationRequired current value
Booleanbtrue
Boolean¬bfalse
Integer or floatz=0zero
Integer or floatz>0greater than zero
Enumc=dequal to d

The generated declaration for an edge with conditions imports the scope's FEATURE_IDS and stores typed condition objects in conditions. Conditions observe the feature state from before the source node runs; effects inspect a Feature node's proposed state.

Effects ​

Explicit effects describe how feature state may change across a Feature node. They are allowed only when that node is the edge's source.

Feature kindNotationRequired next value
Booleanb:=⊤true
Booleanb:=⊥false
Booleanb=unchanged
Booleanb?unconstrained
Integer or floatz↑strictly greater than the current value
Integer or floatz↓strictly smaller than the current value
Integer or floatz=unchanged
Integer or floatz?unconstrained
Enumc:=dequal to d
Enumc?unconstrained

The runtime evaluates every outgoing edge against the source and candidate states. It commits the candidate state only when exactly one edge satisfies both its conditions and effects; zero or multiple compatible edges cause a routing error. An arrow denotes a strict comparison, not a change of exactly one. A question mark permits any initialized value in the feature's domain. A feature omitted from the effect list must remain unchanged, including when its value is None.

Editing an effect regenerates the edge's ◆ edges/<edge>/__init__.py declaration.

Parallel edges ​

Edge identity is independent of endpoint identity; multiple edges may therefore connect the same pair of nodes. Each edge retains its own declaration, conditions, effects, and visit.

The first automatically derived ID is <source>__<target>. A parallel edge receives a distinct ID such as <source>__<target>__2. Because the edge ID names both its generated declaration directory and the visit directory below the target, parallel edges cannot collide. A custom edge ID uses lowercase snake_case and remains independent of its endpoints.

Authored files ​

Edges have no authored files. When an edge targets an executable node, it selects a visit whose generated and authored files are stored below that target node. Edges into exit or failure create no visit files.

Files ​

Each edge has its own generated package beside the generated edge registry:

General edge structure

edges/
├── ◆ __init__.py
└── <edge>/
    └── ◆ __init__.py
FileRole
◆ edges/<edge>/__init__.pyDeclares one edge's ID, name, endpoints, conditions, effects, and optional visit.
◆ edges/__init__.pyImports every directly owned EDGE declaration and exports the ordered EDGES tuple.

Generated files ​

See the generated declaration reference for the Python declarations and registries maintained by generation.