# ADR 0005 — UUIDv7 + slug entity identity Status: accepted (2026-07-07) · Plan: rev 3, R3-5 (resolves audit D1) ## Context Rev 2 used TEXT primary keys ('host:hubris') — renames break FKs, and date-string signal IDs are race-prone. ## Decision Primary keys are UUIDv7 (time-ordered, generated in Go). Every entity also carries a unique human slug ('host:hubris'); (type, name) is unique too. The API accepts UUID or slug everywhere; slugs may change (rename), UUIDs never do. ## Consequences - Renames are metadata updates; history and edges survive. - UUIDv7's time-ordering keeps B-tree inserts append-mostly. - Seeds and exports use slugs (human-diffable); ingest resolves to UUIDs.