"매 DAG = nodes (tasks) + directed edges (must-run-before) + 매 cycle 금지". 매 1960s Make 의 build graph 부터 매 2026 Airflow/Dagster pipelines, Bazel/Turborepo monorepo, Spark physical plan, Git commit history, React fiber tree 까지 — 매 dependency resolution 의 universal data structure.
매 핵심
매 핵심 연산
Topological Sort: 매 valid execution order. Kahn's O(V+E) or DFS.
Cycle Detection: 매 DAG validity check.
Transitive Reduction: 매 minimal edge set with same reachability.
Critical Path: 매 longest path = makespan lower bound.
언제: 매 multi-step agent plan 의 dependency 표현, 매 RAG indexing pipeline orchestration.
언제 X: 매 cyclic feedback loop 가 본질적 (RL, gradient descent) — 매 DAG 외 unrolled iteration.
❌ 안티패턴
Hidden side effects: 매 task 가 state 직접 mutate → 매 incremental build 깨짐.
Ignoring transitive dependencies: 매 missing edge → race condition.
Single-task megasinks: 매 fan-in bottleneck — 매 break into shards.
Cycle by feature flag: 매 conditional dependencies 가 implicit cycle 만들 수 있음.
Over-fine granularity: 매 nano-tasks → scheduler overhead > work.