Hub / stratt / stratt-001

Packet Structure & Envelope Format

intermediate ⏱ 3 min ● medium stratt protocol-mechanics

ELI5

STRATT packets are like envelopes with a rigid format. There’s a header (who it’s from, where it’s going), a body (the actual message), and a checksum (to make sure nothing got mangled in transit).

Technical Deep Dive

Envelope Layout

+--------+--------+----------+----------+-------+
| Magic | Flags | Src ID | Dst ID | Body |
| 4B | 2B | 16B | 16B | var |
+--------+--------+----------+----------+-------+
  • Magic (4 bytes): 0x5354_4154 — “STAT” in ASCII. Identifies the stream.
  • Flags (2 bytes): Bitfield controlling compression, encryption, and priority.
  • Src/Dst ID (16 bytes each): Blake3 hash of the council + unit identifier.
  • Body (variable): CBOR-encoded payload.

Checksum

Blake3 hash of the entire packet excluding the checksum field itself. This gives us 32 bytes of integrity verification with ~1GB/s verification speed on modern CPUs.

Key Terms

  • Council: A logical grouping of prompt units within STRATT.
  • Unit: An atomic, schema-validated prompt with a Blake3 fingerprint.
  • Envelope: The wire-format wrapper around a unit payload.

Q&A

Q: Why Blake3 and not SHA-256? A: Blake3 is faster on modern hardware and provides the same 256-bit security margin. STRATT’s philosophy is “verify cheaply, trust nothing.”

Examples

Minimal packet (empty body):

5354 4154 0001 ... 0000 0000 (38 bytes total)