create [link] & [script] tags, append them to head & body for [plugins] & [app] CSS & JS respectively, conditionally loading minified or debuggable versions of the files i.e. [{plugins,app}.min.{css,jpg}] depending on the query string [?debug=true]. Should produce the desired result as shown in the commented out code inside [head] & [body] tags.