protected function addTasksNode()
    {
        $builder = new TreeBuilder();
        $node    = $builder->root('tasks');

        $node
            ->isRequired()
            ->requiresAtLeastOneElement()
            ->useAttributeAsKey('task')
            ->prototype('array')
                ->children()
                    ->scalarNode('description')->defaultNull()->end()
                    ->arrayNode('requires')
                        ->useAttributeAsKey('task')
                        ->prototype('scalar')->end()
                    ->end()
                    ->append($this->addCommandsNode())
                ->end()
            ->end();

        return $node;
    }