ADR-0053: A QR code is a representation by default, a resource by exception
- Status: Accepted
- Date: 2026-08-23
- Deciders: Repository owner, via decision 002 of
001-renaissance/decisions.station/jobs/001-renaissance/decisions/README.md(answered 2026-08-14); recorded here as the descriptor forqr-codeenterspackages/product-model(track 003 phase 00, ADR-0030)
Context
qr_codes.link_id is nullable, so the schema has always allowed a QR code to
be two different things: a representation of an existing resource (the FK
set) or a standalone resource in its own right (the FK null). Audit 04 found
one list mixing both with nothing to distinguish them, and the catalogue could
not write the product's descriptor without knowing which the create card
offers. The question was decision 002, answered by the operator in
001-renaissance's decisions log; per that log's own rule, an answered decision
of architectural consequence graduates to an ADR. This is that ADR, written
when the answer stopped being prose and became a registry entry.
Decision
Both — representation by default, resource by exception.
- Every resource has a QR code without being asked for one. Attachment is
not an action the user performs; it is a property every resource already
has, surfaced as a View QR code option on the resource. The default QR
is derived on demand, not materialised as a
qr_codesrow per resource — a row exists only when the user has said something about this QR that the default does not say (custom or default is what the nullable FK now distinguishes, not resource or representation). - Creating a QR code is therefore only ever an act of making a standalone
or custom one. That is what the
/qr-codes/createbuilder is for, and it is the only thing the catalogue card offers.
Consequences
qr-codemoves intopackages/product-modelwith the descriptor the decision implies: category Resources (the standalone QR the card creates is a thing the user publishes),createPath: '/qr-codes/create',opens: 'page'— the builder is the create surface, the patternopensgained its second value for.- The QR list remains the list of authored rows only. No backfill row per existing resource; reversing derived-on-demand changes a migration, not this model.
- A future View QR code affordance on resources renders the default
representation; it must not create
qr_codesrows as a side effect. - Decision 002 no longer blocks anything: the catalogue's
PENDING_IDENTITYnote now names only decision 003 (pwa), the last declared product.
Source: docs/decisions/0053-a-qr-code-is-a-representation-by-default-a-resource-by-exception.md