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

  1. Acyclic: no path leads from a node back to itself.
  2. Edges are directed.
  3. Rooted: exactly one node has no predecessor, named by `root_id`.
  4. Nodes with no directed path between them may run concurrently.

Risks

Failure modes

  1. 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.

  2. False precedence

    an edge asserts a dependency that does not exist, serialising work that could have run concurrently.

Relationships

Builds on

References

Mind

Parallelize

Run subtasks simultaneously and aggregate

Topology

Interface for reasoning structures

Used by

Composes with

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"
    }
  }
}

Identity

Ref
DAG#ed5b
Sema ID
sema:DAG#mh:SHA-256:ed5b6bdbe8d785f1dceb6cc1c7020d9c2340be7b507a3678da2da58211e455aa
Ring
2
Tier
1
Updated
2026-11-11
Supersedes
  • sema:DAG#mh:SHA-256:ed37a1e0310857feba371491e4652f9a142905af341adbc67e6386c5b3c1672f
  • sema:DAG#mh:SHA-256:ed81568cef305d3f4f39c7ef157bfc4c74ef721c8ad1e9001a2d11793ce936df
  • sema:DAG#mh:SHA-256:cb54c9360f063d839412e33158dc205c02af684d85132f6a982caba17274f253