Names, Codes and paths
Every element has a Code and a name:
- The name, in quotes, is what a reader sees. Any text.
- The Code,
order-service, is how statements refer to the element. Lowercase letters, digits and single hyphens. It needs to be unique only among its siblings.
A reference is a Code, or a path of Codes joined by /, resolved from where it is written:
- an element under the same parent:
order-service; - under a different parent: the path from the nearest shared ancestor,
platform-orders/order-service; - in another ecosystem: start with that ecosystem's Code,
carrier/platform-a/component-a; - from the root, when an inner Code hides the one you mean:
/shop/platform-a/component-a.
The first segment is looked up outward. Kanoniq looks for it among the children of the element the statement is written in, then of that element's parent, and so on up to the root; the nearest match wins, so an inner Code hides an outer one. Every further segment is looked up only among the children of what the segment before it named.
Where the lookup starts depends on the statement:
| Reference | Looked up from |
|---|---|
Both ends of a connection or a realization, and a broker path after over | The platform or monolith it is written in |
The domain after an object's : | The platform or monolith the object is declared in |
The identity provider after a role's in | The platform or monolith the role is in |
| The domain object an entity holds | The platform, monolith or module around the component holding the storage, or the monolith itself where it holds the storage |
part of and references | The storage the entity is in |
from <component>, and a broker path after its over | The component or monolith holding the storage |
A reference that finds nothing, finds two siblings, or finds the wrong kind of element is an error, KB003, that says which: where a bare Code was looked for, which element a later segment was missing from, or what it named instead. The one exception is the last segment of an API or a channel a statement names, which Kanoniq creates when it is missing (see What kq build adds).
The formatter rewrites every reference to its shortest form that still resolves.
Next
- Identity: an Id that never changes.
- Skip to install, and come back to the concepts when you need them.
© 2026 Extenza Works. All rights reserved.