Skip to main content

Conformance and test vectors

Version: V2
View Markdown

You can implement the specification in any language. Decide which conformance class you need, implement the matching chapters and check your code against the published test vectors. A conforming implementation must produce byte-identical results to every other one, because that is the property the whole specification exists to guarantee. IID spec §1.3

Conformance classes​

ClassWhat it doesImplements
ValidatorDecides whether a string is a valid IID. It must reject an unregistered scheme even when the string is otherwise well-formed.Grammar, the scheme registry and each scheme's canonical-form check
CanonicalizerTurns raw input into the canonical value. It must be a pure, idempotent function, with no network, clock or locale, and must match the published vectors exactly.Each scheme's canonicalization algorithm
DeriverChooses the identifier for an entity and computes gen1 values.Identity ladders, NORM-1 and gen1

Consuming IIDs is a deliberately lower bar than producing them. An application that only reads and compares IIDs needs a validator. An importer that mints atoms needs a deriver. IID spec §1.3.3

Run the test vectors​

The test vectors are normative. If a vector and the prose disagree, that is a defect to report. Neither takes automatic precedence. IID spec §1.4

test-vectors.json contains 170 vectors across the 26 schemes: 100 accepted inputs and 70 inputs that must be rejected. Each vector has this shape.

FieldMeaning
schemeThe scheme whose canonicalizer runs.
inputThe raw value to canonicalize.
canonicalThe expected canonical value, or null if the input must be rejected.
reasonPresent on rejections. It explains why the input is invalid.

For each vector, run your canonicalizer on input. Compare the result byte for byte with canonical, or check that your code rejects the input when canonical is null. The file is generated from the scheme documents, which remain normative. Do not edit it by hand. Test vectors · Writing an implementation

registry.json is the machine-readable export of the scheme and entity-type registries. Embed it to obtain each scheme's class, tier, typing and value shape, and each entity type's ladder. Registry export

The gen1 vectors check only the value shape. To check a deriver, also reproduce the worked derivation in The gen1 scheme.

Prompt for your agentImplement and test a canonicalizer for one scheme
Goal: implement a canonicalizer for one IID scheme and prove it against the published test vectors.
Read https://docs.intuition.systems/docs/identifier/conformance.md, https://docs.intuition.systems/docs/identifier/grammar.md and https://docs.intuition.systems/docs/identifier/schemes.md.
Scheme: [for example isrc or doi]. Follow the scheme document linked from the catalog, not memory.
Write a pure function with no network, clock or locale input. It returns the canonical IID or a rejection.
Fetch test-vectors.json from the specification repository at the revision these docs pin, and run every vector for the scheme.
Accepted inputs must match the canonical value byte for byte. Rejected inputs must be rejected.
Report the pass count, any failing vectors and the checks you actually ran.

Paste this into your coding agent. It points the agent at the Markdown version of each page and leaves every signature to you.

How the specification checks itself​

The repository runs node scripts/check.mjs in CI on every push to main and every pull request. The script needs no dependencies. It checks that the registry parses and every scheme rung names a registered scheme, that relative links resolve, that the vectors are current with the scheme documents, that every vector passes against the specification site's canonicalizers, and that counts agree across documents. It does not replace verification against the reference implementation. Check script

Implementations​

ImplementationLanguageConformanceRole
@0xintuition/iidTypeScriptValidator, canonicalizer, deriverReference implementation. Every vector runs against it.
@0xintuition/classificationsTypeScriptDeriverDeclares each entity type's ladder and builds atom data for Intuition.

The specification's implementation notes record any disagreement between the reference implementation and the specification. None is recorded at the pinned revision. Two limits are noted separately: url percent-encoding relies on a WHATWG-conformant URL parser, and some ladder rungs cannot fire until upstream data supplies their fields. To list your implementation, open a pull request against the specification repository. Implementations · Implementation notes

The published @0xintuition/iid-spec package carries a copy of the specification with pre-publication amendments, such as additional provider schemes. Implement the canonical chapters, and use the package documents to predict what the published library accepts. The scheme catalog lists the differences.

Versioning and stability​

The specification uses MAJOR.MINOR.PATCH. IID spec §1.5

ReleaseContains
PATCHEditorial clarifications only.
MINORA new scheme, a new entity type or gen1 rung, a ladder reorder or a tier change.
MAJORA grammar change.
NeverA change to a ratified scheme's canonicalization, or to NORM-1. A replacement ships under a new name.

Five things are frozen permanently: the grammar, each scheme's canonicalization, NORM-1 and its step order, the gen1 preimage and hash, and rung tags. Which schemes and entity types exist, the order of rungs and the openness tiers can change in MINOR releases. A ladder reordering never invalidates an identifier that was already minted. IID spec §1.5.1

The current release is 0.1.0, a draft published on August 11, 2026. Its grammar, class system, NORM-1, gen1 and representation profiles are stable and in production use within Intuition. Changelog

Applies to V2 · @0xintuition/iid 0.1.1 · @0xintuition/iid-spec 0.1.0