Resolution: Won't Do
There should be a way for users to define and reuse common fragments of code—libraries, probably in source form (perhaps limited to Groovy).
When in sandbox mode, the whole program should run in the same secured GroovyShell.
When using script approval, the administrator should be able to approve the library code independently of any usage.
Would be useful to integrate with the Git Server plugin so libraries can be readily versioned.