The laws of thermodynamics, powerful for countless purposes, are not exact: both their phenomenological and their statistical-mechanical versions are valid only at ‘macroscopic scales’, which are never defined. Here I propose a new, exact and scale-independent formulation of the first and second laws of thermodynamics, using the principles and tools of the recently proposed constructor theory. ...