What Is a Dependency Directed Acyclic Graph in a Software Factory?
Software factories process work in stages. Code moves from spec to plan to change-set to evidence to deployment. But not all work is sequential. Some tasks depend on others. Some tasks are independent. The dependency DAG is the structure that models this, ensuring nothing runs before its inputs are ready and nothing waits on work it does not need.
What a DAG Is
A DAG is a Directed Acyclic Graph. It is made of nodes and edges. Each node is a task. Each edge is a dependency: an arrow from one task to another, meaning the first task must finish before the second task can start. The graph is directed, meaning the arrows go one way. The graph is acyclic, meaning there are no loops. No task can depend on itself, directly or through a chain of other tasks. This is not an arbitrary constraint. It is the property that makes task ordering computable.
Why Acyclic Matters
A cycle in a dependency graph means task A depends on B, B depends on C, and C depends on A. There is no valid execution order. No task can start because its prerequisite has not finished, and that prerequisite is waiting for the original task. The factory cannot make progress. Acyclic graphs guarantee that a topological ordering exists. There is always at least one sequence of tasks that respects all dependencies. The factory can compute this ordering deterministically and execute it without deadlock.
Task Ordering in the Factory
The factory's control plane sequences tasks according to the DAG. When a spec enters the pipeline, the gate engine validates it. If it passes, the next task is to create a plan. The plan task depends on the spec being validated. The change-set task depends on the plan being approved. The evidence task depends on the change-set being built and tested. Each dependency is explicit in the DAG. The control plane reads the DAG, finds the next executable tasks whose dependencies are all satisfied, and dispatches them. It does not guess. It follows the graph.
Parallel Execution
The DAG enables parallelism. If two tasks have no dependency path between them, they can run at the same time. While the build task is compiling code, the test-infrastructure task can provision environments. While the critic station scores one change, the lint station can scan another. The DAG makes parallelism safe. A task never runs before its prerequisites because the dependency edges enforce order. The control plane can dispatch independent tasks to different stations, different containers, or different machines. The DAG is the authority on what can run in parallel.
DAGs in the Factory Architecture
The factory uses the DAG as a core data structure, not just a diagram. The control plane implementation reads a DAG definition to determine task flow. The gate engine uses the DAG to verify that all required preceding gates have fired. The provenance store records which tasks ran and in what order, building a record of execution. The DAG also supports conditional execution. A task can have a guard condition that checks whether a prior task produced a specific outcome. If the condition fails, the downstream task is skipped. This makes the DAG a full workflow definition, not just a dependency map.
Ready to put these ideas into practice?
Book a free 30-minute consultation to discuss how AI-driven delivery engineering can transform your organisation.
Book a Strategy Call