The js is not minified so it is readable. See tree-builder.js.
See also the source code of the widget ../lib/GeoExt.ux/widgets/tree/LayerTreeBuilder.js.
The widget is not fully completed. There should be support to automatically add LayerParamNode objects when a WMS layer with more than one layers in its param property is set.
Nodes are automatically created with the 'group' layer property. It also supports 'hideInLegend' property to set the according layer record property.