Are OS X shutdown cause and sleep cause numbers listed/explained anywhere?
The precise meaning of the codes is not publicly documented, although according to @grgarside's website for Shutdown Causes, the causes for the ones listed in the question are:


5


  Correct Shut Down. Shutdown was initiated, from the OS X Shut Down menu or other shutdown command. This normally does not indicate an issue with your system.

3  


  Hard shutdown. Check power button.

0  


  Power disconnected. Check power supply/battery.

-2


  vTypErr = -2, /*invalid queue element*/


Most likely it's a hardware issue such as faulty logic board, a video card or RAM.

Related:


Previous Shutdown Cause: -2
macOs Sierra "previous shutdown cause: -2"?



For a full up-to-date list, see Shutdown Causes.

See also: List Of Mac OS X Error Codes.



Here on Ask Different, there have been a number of questions about shutdown causes:


-60: What is shutdown cause -60?


  Bad master directory block (badMDBErr).

-62: Kernel: &quot;Previous shutdown cause: -62&quot;


  Watchdog timer detected unresponsive application, restarting the system.

-64: Random Kernel Panics with Shutdown Cause: -64
-104: Shutdown cause: -104


  Possibly linked to battery issue.

-108: What is Shutdown Cause -108?


  Likely memory issue.

-112: Shutdown cause -112


  Restart cause logged when it freezes in a hard manner.

-128:


Tracking down hard shutdown cause—software? hardware? overheat?
Shutdown Cause -128


In general, -128 is unknown hardware problem, but commonly it can be related either to memory issue or to the battery time span (at the end of its useful life).




If you've got negative numbers very often, Apple is more keen to get your Mac to the repair, as it usually indicates problem with your hardware.



General suggestions in case of further problems:


Reset the SMC and Reset NVRAM (which you did).
Run an Apple Hardware Test.
Log a kernel panic.
Install EtreCheck app to find serious problems on your Mac.