# Genome record, schema version 2 Scope: schema 2 of the immutable genome record ([genome-v1.md](genome-v1.md), [ADR-0030](../docs/adr/0030-immutable-genome-record.md)). It changes only the units of the two rate capabilities, per [ADR-0099](../docs/adr/0099-time-based-biological-rates.md). Its encoder and decoder are `src/biology/genome.cpp`, which reads schemas 1 and 2. ## Layout The layout is byte for byte that of schema 1, except offset 8, which holds 2. The magic stays `AEVOGEN1`; the schema field, not the magic, selects the capability table. The digest and checksum rules are unchanged. The digest covers the schema field, so a schema 1 record and its schema 2 translation are distinct records with distinct digests. ## Capability table | Kind | Unit (schema 2) | Range | Schema 1 unit and range | |---|---|---|---| | energy conversion | per thousand | 1-1000, required | same | | membrane | micrometres | 1-10,000, required | same | | movement | **micrometres per second** | 0-2,000,000 | um per 50 ms tick, 0-100,000 | | ingestion | **femtograms per second** | 0-20,000,000 | fg per 50 ms tick, 0-1,000,000 | | reproduction | per thousand | 1-1000 | same | | target size | femtograms | 1-1,000,000,000, required | same | | thermal tolerance | millikelvin | 1-100,000 | same | Each rate range is schema 1's times 20, so every schema 1 value has an exact schema 2 equivalent. ## Compatibility - **Schema 1 records** stay valid and are never rewritten. `Genome::per_second` reads a schema 1 rate as exactly 20 times its per-tick value. - **Drafts** default to schema 1, so existing literals keep their meaning. New records name schema 2. - **Mutation** keeps the parent's schema and that schema's adjustment step, one hundredth of the range. - **Lineage archives** name the highest schema they hold. An archive of schema 1 records keeps its exact bytes. - **Unknown schemas** fail closed.