intermediate

Dependency graph

Model package and task dependencies so builds, tests, ownership, and deploys run in the correct order.

A monorepo dependency graph connects packages and tasks: package A importing package B, task `test` depending on `build`. Topological order ensures upstream artifacts exist before downstream work runs.

					shared ──► ui ──► app
         └──► admin
				

Cycles in package imports signal design problems. Graph data powers affected testing, ownership review, and deploy impact analysis.

On interviews: explicit vs implicit dependencies, task edges, cycle detection, and how graph-aware CI reduces work.

Common pitfalls: runtime-only coupling invisible to static graph; shared env files not declared as inputs; root tsconfig paths bypassing package boundaries.

The trade-off is automation precision versus modeling cost for implicit contracts.

Checklist:

  • Detect import cycles early.
  • Declare task dependencies in orchestration config.
  • Model config files as graph inputs when needed.
  • Use affected runs instead of full-matrix CI when safe.