When to Use
When encoding/decoding STRATT prompt units for wire transfer between CLI, R2, and MERIDIAN. Every prompt unit in transit is wrapped with a 128-bit SPUH header.Bit Layout (16 bytes)
Enum Bit Values
Type: role=0001, rule=0010, task=0011, chain=0100, fragment=0101 Domain: dev=0001, neuro=0010, finance=0011, nutrition=0100, legal=0101, film=0110, artist=0111, core=1000, shared=1001 Status: draft=0001, review=0010, stable=0011, deprecated=0100, tampered=0101, tombstoned=0110Flag Bits (Byte 7)
| Bit | Name | Meaning |
|---|---|---|
| b0 | gate_present | Chain contains gate checkpoints |
| b1 | protected | Unit is protected (cannot be removed from chains) |
| b2 | core_injected | Core rules were auto-injected at execution |
| b3 | crdt_dirty | Unresolved CRDT merge pending |
| b4-b7 | reserved | Must be 0 |
Usage
Gotcha: BigInt Not JSON-Serializable
ThefingerprintPrefix field is a bigint. Calling JSON.stringify() on SpuhFields will throw. Convert to hex string first:
Gotcha: Byte Order
All multi-byte fields use big-endian (network byte order).SchemaVer bytes 5-6: high byte first. Fingerprint prefix bytes 8-15: most significant byte first.