||This work addresses an emerging topic of smart garments, namely how to decouple the application development from the underlying sensing hardware. The idea of a dedicated operating system, introduced in previous work, is further elaborated by proposing a Garment OS architecture. In order to hide hardware-specific issues from the application developer, the Garment OS has to provide with a certain functionality. For example, sensor signals in garments are often affected by different types of artefacts, such as motion artefact or sensor displacement. Therefore, an important functionality of the Garment OS is to reduce the effects of said artefacts. As part of the Garment OS architecture, this paper proposes a hierarchical approach for artefact compensation in smart garments. This method is applied for motion artefact reduction, demonstrated on an example of activity recognition with a capacitive neckband. Results show a promising improvement of recognition accuracy compared to a baseline without artefact detection and compensation.