Theme
Lesson 28 — Dependency readiness
Outcome
Compute which Tasks are eligible to run from dependencies and Task state without adding a new orchestration language.
Why this comes now
Planning can now create dependency edges. The scheduler needs one trustworthy answer: “is this Ready Task eligible?”
Understand
A dependency is simple: Task C cannot be assigned until every required predecessor satisfies the chosen completion/integration condition. Early Forge uses Done (or a clearly documented integrated state if introduced later). Eligibility is derived; do not store a second mutable “is_unblocked” flag that can drift.
Build the real project
- Add repository/query for dependency satisfaction.
- Validate cycles on every edge insertion path, not only decomposition.
- Define
EligibleTaskquery: status Ready + dependencies satisfied + no incompatible active Run/Operation + environment/provider available as needed. - Surface blocked-by information in Task UI.
- Add tests for diamond graph, no dependencies, unfinished predecessor, and cycle rejection.
Completion gate
Eligibility changes automatically when predecessor state changes; no manual unblocking update is required.
Pitfalls to avoid
Do not use dependency graph as branch stacking yet. Do not persist derived eligibility unless profiling proves a need and invalidation is explicit.
References
DOMAIN_MODEL.md, topological sorting.
Checkpoint
Only proceed to scheduler when eligibility logic is readable and heavily tested.