One thing missing from this documentation is that you can get your system setting from Utilities • getRuleSystemSetting function.
I would recommend away from referencing either system name or production level directly in your code. If possible, use Application Settings (aka System Settings not Dynamic System Settings) and reference the outcome of that.
If you actually want to have different logic and processing between different environments, I'm very concerned about your Quality Assurance process. There will be no real way to test your code until after it is in production.