Mechanical codes are a set of regulations that govern the installation, operation, and maintenance of heating, ventilation, and air conditioning (HVAC) systems in a building. These regulations ensure that HVAC systems are designed and installed correctly, operate safely, and maintain indoor air quality.