Encodes the structs of design notes §14.1 as JSON-ready maps with string keys, and decodes them back.
Decoding never uses keys: :atoms. Enumerated values (statuses, lanes, operators, ...)
are matched against their known lists; an unknown value fails the decode. Module and
function names are atoms created from our own run files, which only ever name modules
and functions of the project under test.
decode/2 returns {:error, reason} instead of raising, for a missing field, an unknown
value or a value of the wrong type alike, so a reader can skip or rebuild what it cannot
read (§7: never crash on old data). Every field is checked against its §14.1 type (a
string, a non-negative or positive integer, a number, a list or map of those), so a
decoded struct always matches the typespecs the views code against.