Just in case anyone else is interested, I've now finished implementing these entanglement metrics in complexity-report [1].
Briefly, the approach I took was to statically analyse calls to CommonJS and AMD require within a project and then construct design structure matrices (DSMs). From those DSMs, three metrics are calculated:
* first-order density, the percentage of all possible internal dependencies that are actually realised in the project;
* change cost, the percentage of modules affected, on average, when one module in the project is changed;
* core size, the percentage of modules that are both widely depended on and themselves depend on other modules.
If you're interested in the research behind these metrics, there are two excellent papers at [2] and [3], which are referenced by the Firefox complexity analysis [4] that Zach pointed me at elsewhere in this thread (thanks again for that btw).
Cheers,
Phil.