Public API
The primary entry points are:
run/3 executes a pipeline from its start node. resume/3 restores execution from a checkpoint map, struct, or checkpoint.json path.
DOT Model
The parser converts DOT into these runtime structs:
This model is intentionally smaller than full Graphviz DOT. It prioritizes the subset needed to execute Attractor-style workflows reliably.
Handler Mapping
Node execution is determined by either an explicit type attribute or the node shape:
| Shape | Default handler type |
|---|---|
Mdiamond | start |
Msquare | exit |
diamond | conditional |
component | parallel |
tripleoctagon | parallel.fan_in |
hexagon | wait.human |
parallelogram | tool |
house | stack.manager_loop |
box | codergen |
You can override this with type="...", and you can register new handler modules through AttractorEx.HandlerRegistry.
Routing Rules
The engine selects the next edge in this order:
- Matching
condition=... - Matching
status=... - Matching the handler outcome's
preferred_label - Matching the handler outcome's
suggested_next_ids - Unconditional edge by weight
- Lexical fallback
This is implemented in AttractorEx.Engine and matches the spec-driven behavior documented in the local compliance notes.
Retries And Goal Gates
AttractorEx.Engine supports:
- Node retry policies with exponential backoff.
- Graph-level and node-level retry targets.
- Goal-gate nodes that must end in success or partial success.
- Loop restart semantics via edge metadata.
Outcomes are represented as AttractorEx.Outcome values and serialized through AttractorEx.StatusContract.
Styling And Transforms
Before validation and execution, the engine applies:
- Model stylesheet resolution through
AttractorEx.ModelStylesheet - Variable expansion through
AttractorEx.Transforms.VariableExpansion - Any custom graph transforms passed in
opts
At runtime, codergen stages may also receive synthesized context carryover text based on fidelity settings.
Recommended Reading
For the precise implementation details:
AttractorEx.Enginefor orchestrationAttractorEx.Validatorfor lint rulesAttractorEx.Handlers.*for node behaviorAttractorEx.StatusContractfor artifact payloads