nextTask method
Returns the highest-priority ready task, or null if none are ready.
Implementation
AgentTask? nextTask(ExecutionDAG dag) {
final ready = dag.ready;
if (ready.isEmpty) return null;
// Highest estimatedComplexity first (harder tasks benefit most from early start)
return ready.first;
}