public function add($name, array $dependencies, Spec $node)
    {
        $this->nodes[$name] = $node;
        $this->incomingEdges[$name] = $dependencies;

        if (count($dependencies) === 0) {
            $this->pending[] = $name;
        }
    }