Currently, scripts and CSS are injected into widgets on request using Features; however, the set of scripts injected by default is coded into a number of strings within the StartPageProcessor class.
This makes it more difficult to modify the default scripts injected.
I suggest to remedy this we make a "default" feature that specifies the core scripts. You can then modify /features/default/feature.xml to add whatever scripts you like as part of the default setup for new widgets.
For example, you could add a live debugging js during testing, or a HTML5 shim library, or some monitoring tools.