Infrastructure · Data Structures
DAG
Directed acyclic dependency graph
Definition
Mechanism
A directed acyclic graph Topology that allows branching (Parallelize) and merging, but forbids cycles. It models complex dependency chains where tasks can run concurrently but must respect precedence.
Invariants
- Acyclic: no path leads from a node back to itself.
- Edges are directed.
- Rooted: exactly one node has no predecessor, named by `root_id`.
- Nodes with no directed path between them may run concurrently.
Risks
Failure modes
Cycle on insert
an added edge closes a loop, which the acyclicity invariant forbids and which must be detected at insertion rather than at traversal.
False precedence
an edge asserts a dependency that does not exist, serialising work that could have run concurrently.
Relationships
Builds on
References
Mind
Run subtasks simultaneously and aggregate
Interface for reasoning structures
Used by
Composes with
Mind
Graph-structured reasoning (Macro for Think(DAG))
Reference
Data schema
{
"type": "object",
"required": [
"nodes",
"edges",
"root_id"
],
"properties": {
"nodes": {
"type": "array",
"description": "List of task nodes"
},
"edges": {
"type": "array",
"description": "Dependency arrows (Task A -> Task B)"
},
"root_id": {
"type": "string",
"description": "Entry point(s) for execution"
}
}
}