The gen1 scheme
gen1 produces an identifier when no registry or natural key covers a thing. It hashes a small, fixed set of facts chosen by an entity type's recipe. A gen1 identifier does not identify an entity. It identifies the facts it was derived from. Two films called Inception from 2010 would receive the same gen1 IID, and that is intended. IID spec §6.1
Value format
A gen1 IID looks like int:gen1:movie:r4:fb681afe7d438cad73ae90a70f1cc55a.
| Part | Example | Purpose |
|---|---|---|
gen1 | gen1 | Names the normalization and derivation version. A future gen2 would coexist with it. |
| Slug | movie | The entity type. It namespaces the hash, so a movie and a book with the same title get different identifiers. |
| Rung tag | r4 | The frozen recipe that fired. It shows which fields were used. |
| Hash | fb681afe…cc55a | The first 16 bytes of the Keccak-256 digest, as 32 lowercase hex characters. |
The value grammar is slug ":" "r" tag ":" hash16. The tag is a positive integer without leading zeros. IID spec §6.2
Derive an identifier
Follow the five steps exactly. Every implementation must produce the same bytes. IID spec §6.3
- Resolve the recipe fields. Collect every field the rung names. Fields are scalars. If any field is missing or empty after normalization, the rung does not fire and the ladder moves on.
- Normalize each value. Apply NORM-1 to text. Format dates and numbers as NORM-1 specifies.
- Build the preimage. Serialize
{"c":"<slug>","f":{...}}as UTF-8. Putcbeforef. Sort the keys insidefby UTF-16 code units. Use no whitespace anywhere and RFC 8785 (JCS) string escaping.fcontains only the rung's fields, and at least one. - Hash. Compute Keccak-256 of the preimage and keep the first 16 bytes, as lowercase hex without
0x. - Assemble. Concatenate
int:gen1:, the slug,:r, the tag,:and the hash. The rung tag is not part of the preimage.
Worked example
The movie ladder's r4 recipe uses name and yearPublished. For Inception, released in 2010, the preimage and result are shown below. IID spec §6.5
name "Inception" → "inception"
yearPublished 2010 → "2010"
preimage {"c":"movie","f":{"name":"inception","yearPublished":"2010"}}
keccak256 fb681afe7d438cad73ae90a70f1cc55a… (first 16 bytes kept)
IID int:gen1:movie:r4:fb681afe7d438cad73ae90a70f1cc55a
You can reproduce the hash with any Keccak-256 tool. With Foundry, cast keccak '{"c":"movie","f":{"name":"inception","yearPublished":"2010"}}' returns a digest beginning with fb681afe7d438cad73ae90a70f1cc55a. The film's director is not part of the recipe, because identity inputs must be intrinsic to the entity. Tenet 3
Prompt for your agentImplement gen1 and reproduce the worked example
Goal: implement gen1 derivation and reproduce the published worked example exactly.
Read https://docs.intuition.systems/docs/identifier/gen1.md, https://docs.intuition.systems/docs/identifier/normalization.md and https://docs.intuition.systems/docs/identifier/entity-types.md.
Implement NORM-1 in its frozen step order, with full Unicode case folding instead of simple lowercasing.
Build the preimage exactly as specified: c before f, keys in f sorted by UTF-16 code units, no whitespace and JCS string escaping.
Hash with Keccak-256 and keep the first 16 bytes as lowercase hex. The rung tag is not part of the preimage.
Test that movie r4 with name Inception and yearPublished 2010 gives int:gen1:movie:r4:fb681afe7d438cad73ae90a70f1cc55a.
Add NORM-1 tests from the worked examples on the normalization page.
Report the checks you actually ran and anything you could not verify.
Paste this into your coding agent. It points the agent at the Markdown version of each page and leaves every signature to you.
Rung tags are frozen
A rung tag identifies a recipe permanently. It is not the rung's position in the ladder. A new recipe receives the next unused tag and existing tags are never renumbered, so tags can be non-contiguous or appear out of order. For example, the book ladder's fourth rung is tagged r3. Reordering a ladder therefore never changes an identifier that was already minted. IID spec §6.4
Store gen1 atoms at P1
A gen1 identifier must not be minted as a bare P0 anchor. Its atom payload must include the recipe fields, so that anyone can re-run the derivation and a reader can see which facts it stands for. See Representation profiles. IID spec §6.6
Collisions
Semantic collisions are common and intended: different entities that share the same recipe facts get one identifier. Cryptographic collisions are negligible, roughly 1 in 2^64 with 2^32 entities of one type. Implementations must not detect or repair semantic collisions by changing the identifier, for example by adding a timestamp. A stronger identifier contributed later separates the entities through an equivalence claim. IID spec §6.7
Validate a gen1 value
A validator can check only the shape of a gen1 value. After trimming, it accepts a value matching ^[a-z0-9-]+:r[1-9][0-9]*:[0-9a-f]{32}$ and rejects uppercase hex rather than folding it. It cannot check the hash without the original facts, which is another reason the payload carries them. gen1 scheme document
gen1 itself is frozen. An improved derivation would ship as NORM-2 and gen2, alongside gen1, bridged by equivalence claims. IID spec §6.8
Related
- Entity types and identity ladders lists the
gen1recipes for every type. - The identity ladder shows when a name-only recipe fires for a recording.
- Derive IDs computes identifiers and atom IDs with the packages.
Applies to V2 · @0xintuition/iid 0.1.1 · @0xintuition/iid-ladder 0.1.1