Templates naming convention documentation : http://drupal.org/node/1089656
Writing environment dependent scripts
We haven't found a suitable way yet to write environment dependent scripts. We can easily write site-dependent scripts (by setting a variable like site_id in each subsite module) but we're still looking for a solution to be able to differentiate dev/staging/prod environments. That would allow us to do things like setting the error reporting level to a different value depending on the environment on which the site is installed.