Skip to main content
Version: Next

Validation

Kanoniq checks a model against the rules of the metamodel and reports what it finds. This page lists every rule, each linking to a page of its own with what it means and how to fix it.

Where it runs​

In VS Code, as you type. Every finding shows in the Problems panel and under the text, across every file of the model.

On the command line, with kq validate, and on every kq build (see kq validate). An error makes either exit with 1, so a CI job running one of them stops an invalid model. A lint fails only kq validate --strict.

Six rules read your repository's settings: KQ058 and KQ059, the open properties, from properties, KQ090, the policy preset, from policies, and KQ123 and KQ268, the end-of-support periods, from end-of-support-warning and end-of-support-error, and KQ275, the confidentiality levels, from confidentiality-levels. Those two also read today's date, so a model that passed can fail on a later day. The rest depend on the model alone.

Build errors come before validation: a file that doesn't parse, or a reference that names nothing, has no model to check, so those are reported instead, each under a KB code of its own rather than a KQ one. See Build errors.

Quick fixes​

In VS Code, some findings come with a fix. Put the cursor on the underlined text and press Ctrl+. (Cmd+. on a Mac), or click the light bulb. A fix is offered only where the right edit is certain:

FindingFix
A path segment that names nothing, such as ordresChange to the closest Code that can be named there, up to three, closest first
A misspelt keyword, such as bakend, or over htppChange to the closest keyword that fits there
KQ022, a connection over a protocol landing on a componentChange target to its one interface of that protocol's kind
KQ024, a protocol to a channel, or none to an interfaceRemove the protocol, or Add the one the interface's kind implies
KQ026, a relationship written twiceRemove the repeated statement
KQ030, a count on a user interface's environmentRemove the count

Every other rule has no fix, because putting it right is a modeling choice: which element is wrong, or a Code, a name or a number only you can give. A fix never edits <name>.g.kq, and it is offered only if the model, checked with it applied, has no new error. Accepting a lint is not possible yet.

Errors and lints​

SeverityCodesMeansYou
ErrorKQ001–KQ099, KQ200–KQ299The model is invalid: a rule is broken and nothing reading it can trust itMust fix it
LintKQ100–KQ199The model is valid but suspectMay leave it

Neither is configurable. A lint describes something a real, in-progress landscape can legitimately be; an error describes a model that can't be acted on.

An assumption is never a finding, neither an error nor a lint, and --strict does not read it.

A code is permanent: it always means the same rule, and a retired rule's code is never reused.

Every rule runs and reports everything it finds, so you see all the problems at once rather than one per run. Some rules stay quiet while another rule's problem would make their answer meaningless; fix the first one and they will speak up if there is anything left.

A finding names each element by its name and its path, Channel "Orders" (shop/events/orders), or by its path alone where nothing gave it a name.

A model with plateaus is checked at every plateau. Each plateau's landscape is checked as a whole model, and a finding names the plateaus it holds in, once however many there are. A model with one plateau names none. The rules under Plateaus check the timeline itself and its data migrations. Findings are sorted by rule code, so two runs over the same model print the same lines in the same order, and a diff of them shows only what changed.

Every rule​

Each rule has a page of its own, with what it reports and how to put it right. Narrow the lists below by severity, area or quick fix:

Motivation and strategy​

CodeRuleSeverityQuick fix
KQ052a Goal or a value stream stage is realized from the function side
Only a Domain, a Function Group or a Function realizes a Goal or an impact, and only a Function Group a value stream stage.
ErrorNo
KQ053an influence and a value delivery join a legal pair
An influence runs from an Assessment or a Value to a Driver, or from a Driver or an impact to a Goal, and a value stream delivers a Value.
ErrorNo
KQ054an influence and a value delivery stay in one Ecosystem
An influence and a value delivery stay inside one Ecosystem.
ErrorNo
KQ055a value stream's stages are numbered from 1
A value stream's stages are numbered 1, 2, 3 and on, each number once.
ErrorNo
KQ056an element holds at most one purpose
An element's motivation holds at most one purpose.
ErrorNo
KQ057a value stream stage is realized by a Function Group
A value stream stage is realized by a Function Group, never by a Domain or a Function.
ErrorNo
KQ094an impact's actor is a Stakeholder of its own Ecosystem
An impact's actor is a Stakeholder in the impact's own Ecosystem.
ErrorNo

Domains​

CodeRuleSeverityQuick fix
KQ025only a top-level Domain is an enabler
Only a Domain directly in an Ecosystem is marked enabler.
ErrorNo
KQ095contexts do not nest
A Component is in at most one bounded context, and no Domain marked bounded-context sits inside another.
ErrorNo
KQ096an Enabler Domain states no subdomain type
An Enabler Domain, and every Domain under one, is generic and states no subdomain type of its own.
ErrorNo
KQ112a core Domain is not only bought
A core Domain is realized by at least some custom-built software, not by SaaS or off-the-shelf products alone.
LintNo
KQ113a generic Domain is not custom-built
A generic Domain, an Enabler Domain aside, is realized by SaaS or off-the-shelf products, not by custom-built software.
LintNo

Processes​

A business process orders the work under a value stream stage, in lanes that are job roles. These rules keep its flows inside it, its lanes in reach of the screens its tasks use, and its messages on the connections they name.

CodeRuleSeverityQuick fix
KQ119a flow node is reached from a start event
A flow node of a process is reached by then from one of its start events.
LintNo
KQ221a flow node is in a lane of its process
Every flow node but an external step sits in one of its process's lanes.
ErrorNo
KQ222a lane is a job role of the process's Ecosystem
A process's lane names a job role of the process's own Ecosystem.
ErrorNo
KQ223a sequence flow joins two flow nodes of one process
A then joins two flow nodes of one process, neither an external step, never into a start event or out of an end event.
ErrorNo
KQ224a message flow joins a lane to an external party
A message flow joins a node in a lane to a pool or one of its external steps, received by a start event or a task and sent by an end event or a task.
ErrorNo
KQ225a task's screen is of an application realizing its Function
A task's on names a user-facing Interface of an application that realizes the Function the task performs.
ErrorNo
KQ226a task's lane holds a Role using its screen
A task done on a screen sits in the lane of a job role holding a Role in that screen's application that uses it.
ErrorNo
KQ227a message's connections are in the model
Every connection a message flow travels over is a connection of the model.
ErrorNo
KQ228a message's chain is unbroken
Each connection a message travels over starts where the one before it landed.
ErrorNo
KQ229a message's chain starts or lands at its task's systems
A message a task sends starts, and one it receives lands, at one of the task's systems.
ErrorNo
KQ230a message's chain reaches its pool's systems
A message to a pool that says where its systems are lands there, and one from it starts there.
ErrorNo
KQ231a process stays within the stage it details
Every Function a task performs lies under a Function Group realizing the stage its process details.
ErrorNo
KQ232a pool is an external party
A pool's persona is external, and its site names an Ecosystem, a Platform or a monolith.
ErrorNo
KQ237a data action names its own data
Every Domain Object a data mark names is in its node's Data: a task's, of the Domains holding its Function; a start event's, of the stage its process details.
ErrorNo
KQ238a data action's Domain Object has one holding
Every Domain Object a data mark names is held, not as a replica, in exactly one Storage of its node's systems.
ErrorNo
KQ239a data mark sits on a task or a receiving start event
Only a task, or a start event receiving a message over a chain, is marked data.
ErrorNo

Context map​

The context map's lines are derived from what crosses between two bounded contexts: a call, a message through a channel, a copy of the other's data. Its patterns are stated. These rules catch a stated pattern the model contradicts.

CodeRuleSeverityQuick fix
KQ204conforms-to and customer-of name an upstream
A context states conforms-to or customer-of only toward a context the edges put upstream of it.
ErrorNo
KQ205a downstream conforms or is a customer
A context does not state both conforms-to and customer-of toward one context.
ErrorNo
KQ206a conformist does not translate
A context does not state conforms-to toward a context whose every crossing to it goes through an anticorruption layer.
ErrorNo
KQ207a relationship has an integration
A relationship other than separate-ways joins two contexts something crosses between.
ErrorNo
KQ208separate ways cross nothing
Nothing crosses between two contexts stated separate-ways.
ErrorNo
KQ209a symmetric relationship is stated once
A partnership, a shared kernel or separate ways is stated in one of its two contexts, not both.
ErrorNo
KQ210a relationship joins two contexts
A context relationship is written in an element marked bounded-context and names another one.
ErrorNo
KQ211published language beside an open host
An Interface or a Channel marked published-language is marked open-host.
ErrorNo
KQ212acl is not stated through an integration Component
A crossing whose downstream end is an integration Component states no acl.
ErrorNo
KQ213a Big Ball of Mud is a context
An element marked big-ball-of-mud is marked bounded-context.
ErrorNo

Realization​

CodeRuleSeverityQuick fix
KQ007realization target
Only a Domain, a Function Group, a Function, a Goal, a value stream stage or an impact is realized.
ErrorNo
KQ008realization stays in one Ecosystem
A realization stays inside one Ecosystem.
ErrorNo
KQ009a Domain holds one altitude
A Domain holds either sub-domains or Function Groups and Functions, never both, and a Domain with sub-domains is not realized itself.
ErrorNo
KQ045a primary mark is on one realization of a Component
Only a Component, or a monolith with nothing inside it, marks a realization primary, and on one realization at most.
ErrorNo
KQ046a Component marks its primary Domain where it realizes into several
A Component that realizes into several Domains marks the realization into its own primary, and one that realizes into one Domain marks none.
ErrorNo
KQ101a Platform realizes its Domain
A Domain Object sits in a Platform that realizes the Domain owning it.
LintNo
KQ104a Component realizes something
A Component realizes a Domain, Function Group or Function, or sits in something that does, wherever its Ecosystem has Domains.
LintNo

Monoliths​

CodeRuleSeverityQuick fix
KQ027a module sits in a monolith
A Module sits in a monolith, never in a Platform or another Module.
ErrorNo
KQ028an in-process call stays in its monolith
An in-process call joins two Components of one monolith.
ErrorNo

Jobs, robots and screens​

CodeRuleSeverityQuick fix
KQ079a job holds no Interface
A job holds no Interface, declared or created by a connection.
ErrorNo
KQ080no delivery out of a Channel lands on a job
No delivery out of a Channel lands on a job.
ErrorNo
KQ081a schedule is well formed
A schedule names a known time zone, a time of day, a day of the month from 1 to 31, each weekday once, and a cron expression of five standard fields.
ErrorNo
KQ082a robot holds no Interface
A robot holds no Interface, declared or created by a connection.
ErrorNo
KQ083ui comes only from a robot or a Role
A connection over ui comes only from a robot or a Role.
ErrorNo
KQ084ui lands only on a declared user-facing Interface
A connection over ui lands only on a declared user-facing Interface.
ErrorNo
KQ085a Role's ui stays in its own application
A Role's connection over ui lands only on a user-facing Interface of the Role's own application.
ErrorNo
KQ111a robot's Identity holds a Role where its ui goes
Where a robot uses an application's screens, the Identity it runs as holds a Role in that application.
LintNo

Connections​

CodeRuleSeverityQuick fix
KQ022a connection names its target
A connection lands on an Interface or a Channel, not on a Component or monolith, unless it is in-process.
ErrorYes
KQ023protocol matches the Interface
A connection's protocol matches the kind of Interface it lands on, and no call lands on a user interface.
ErrorNo
KQ024a Channel is reached through its broker
A Channel is reached through its broker with no protocol, an Interface always with one, and no connection joins two Channels.
ErrorYes
KQ102a Channel has both sides
A Channel has both a sender and a receiver.
LintNo
KQ121an Interface's version is called
Some call names each version of a software-facing Interface.
LintNo
KQ248only a software-facing Interface has a contract
A user-facing Interface states no schema and no versions.
ErrorNo
KQ249a call names a declared version
A call names a version its Interface declares, calls a versioned Interface with its version, and an unversioned one with none.
ErrorNo

Events, commands and queries​

CodeRuleSeverityQuick fix
KQ097a delivery carries what is published
A delivery out of a Channel carries only events, and versions of them, that a leg into that Channel carries.
ErrorNo
KQ098a publishing leg carries its publisher's events
A leg into a Channel carries only events its sending Component declares.
ErrorNo
KQ099a carried event names a declared version
A leg names a version an event declares, names a versioned event with its version, and an unversioned event with none.
ErrorNo
KQ114a publisher holds what its event is about
The Component publishing an event holds a Data Entity of the Domain Object the event is about.
LintNo
KQ115an event is delivered
Some delivery out of a Channel or some sync carries each event, and each version of one.
LintNo
KQ116a handler holds what its command or query is about
The Component handling a command or a query holds a Data Entity of the Domain Object it is about.
LintNo
KQ117a command or a query is carried
Some connection or some sync carries each command and query, and each version of one.
LintNo
KQ200an event is about a Domain Object
What an event is about is a Domain Object.
ErrorNo
KQ201a command or a query reaches its handler
A call or a delivery carries only commands and queries the Component it reaches declares, and a leg into a Channel only those some Component declares.
ErrorNo
KQ202a carried command or query names a declared version
A connection names a version a command or a query declares, names a versioned one with its version, and an unversioned one with none.
ErrorNo
KQ203a command or a query is about a Domain Object
What a command or a query is about is a Domain Object.
ErrorNo

Scenarios​

A scenario walks over connections already declared, in order. These rules keep each step on a connection the model has, the walk in one piece, its messages ones the connections carry, and the scenario where it starts. Each holds at every plateau: a step whose connection is gone at a plateau is an error there.

CodeRuleSeverityQuick fix
KQ240a scenario's connections are in the model
Every connection a scenario's step walks over, and both legs of a hop through a Channel, is a connection of the model.
ErrorNo
KQ241a scenario's walk is unbroken
Each step of a scenario starts where the scenario starts or where an earlier step arrived.
ErrorNo
KQ242a scenario's step names a message its connection carries
A step's message is carried by its connection, or by both legs of a hop, under a version the message declares.
ErrorNo
KQ243a scenario starts at its task's screen or systems
A scenario for a task starts at the task's screen or at one of its systems.
ErrorNo
KQ244a scenario sits in the Ecosystem where it starts
A scenario sits directly in the Ecosystem of its first step's source.
ErrorNo
KQ245a scenario is for a task of a process
What a scenario is for is a task, a user task or a service task of a process.
ErrorNo

Data​

CodeRuleSeverityQuick fix
KQ010representation cardinality
Every Data Entity holds exactly one Domain Object.
ErrorNo
KQ011authoritative cardinality
Every Domain Object has exactly one authoritative holding across the whole model.
ErrorNo
KQ012a replica has a source
A replica syncs from the authoritative holding or from another replica, never from a transient one.
ErrorNo
KQ013transient is local
A transient holding neither syncs in nor syncs out.
ErrorNo
KQ014structure stays local
part of and references stay inside one Component.
ErrorNo
KQ015no orphan entity
Every Data Entity is a root or part of another.
ErrorNo
KQ016part of is a tree
part of forms a tree: each Data Entity is part of at most one other, with no circle.
ErrorNo
KQ021a Domain Object has an origin
Every Domain Object has a holding marked origin, where the data is first created.
ErrorNo
KQ118a sync carries messages about its entity
A message a sync carries is about the Domain Object its replica represents.
LintNo
KQ124a Domain Object with a property marked personal states its personal data
A Domain Object one of whose Data Entities marks a property personal states personal-data, personal or special-category.
LintNo
KQ126a Domain Object a data use names states its personal data
A Domain Object a data use names states personal-data, personal or special-category.
LintNo
KQ127personal data is held for a stated purpose
In an Ecosystem with a data use, every Data Entity of personal or special-category data is a holding or a copy of a data use.
LintNo
KQ128a data use states its legal basis
A data use states its basis, one of GDPR Art. 6(1)'s lawful bases.
LintNo
KQ137personal data leaves a transfer regime on a ground
Personal data a call, a leg, a sync or a holding's own hop moves out of a residency stating adequate, to a country outside that list, goes where a contract covering what receives it states a transfer ground.
LintNo
KQ138personal data does not leave a transfer regime for a place not stated
Personal data moved from inside a residency stating adequate goes to a place whose country is stated.
LintNo
KQ214a synced event is its source's
A sync carries only events its source Component declares.
ErrorNo
KQ215a synced command is its holder's
A sync carries only commands the Component holding the replica declares.
ErrorNo
KQ216a synced query is its source's
A sync carries only queries its source Component declares.
ErrorNo
KQ217a pulled sync goes over a protocol
A sync carrying a query goes over a protocol, never through a Channel.
ErrorNo
KQ218a sync carries messages or one mechanism
A sync carries messages or one mechanism, never both, and never two mechanisms.
ErrorNo
KQ219an entity's syncs have one main feed
Of the syncs into an entity, exactly one is not marked reconcile.
ErrorNo
KQ220two syncs into one entity differ
No two syncs into one entity have the same source, the same route and the same carries.
ErrorNo
KQ246an access stays in its monolith
An access joins a Component of a monolith to a data entity in a Storage the same monolith holds itself.
ErrorNo
KQ247an access names an aggregate
An access names the root of an aggregate, or a data entity in no aggregate, never a part.
ErrorNo
KQ275a confidentiality is one of the repository's levels
A Domain Object's confidentiality is one of the levels the repository's confidentiality-levels setting lists.
ErrorNo
KQ276no property is personal on data that is not personal
No property is marked personal on a Data Entity of a Domain Object stated personal-data none.
ErrorNo
KQ277a data use names personal data
No Domain Object a data use names is stated personal-data none.
ErrorNo
KQ278a data use's data is held in its systems
Every Domain Object a data use names is represented by a Data Entity in a Storage of a system realizing what its via names.
ErrorNo
KQ279special-category data has a condition
A data use naming special-category data states special, the condition it is processed under.
ErrorNo
KQ280a condition goes with special-category data
A data use states special only where it names special-category data.
ErrorNo
KQ281a data use covers its own Ecosystem's work
What a data use's via names is in the data use's own Ecosystem.
ErrorNo
KQ282a joint controller is another Ecosystem
A data use's joint names other Ecosystems, never its own.
ErrorNo
KQ297a regulated scope is one the repository lists
A Domain Object's or a significant property's regulated scope is one the repository's regulated-scopes setting lists.
ErrorNo

Authentication​

CodeRuleSeverityQuick fix
KQ060a scheme its transport accepts
A connection's authentication scheme is one its protocol or broker accepts.
ErrorNo
KQ061via only on a token scheme
via goes only with a scheme whose token someone issues.
ErrorNo
KQ062via names an Identity Provider
via names an Identity Provider: a Component or monolith marked idp.
ErrorNo
KQ063a leg states one scheme
Two statements of one leg into or out of a Channel state the same scheme.
ErrorNo

People​

CodeRuleSeverityQuick fix
KQ040a Role is in a user-facing application
A Role sits in a Component or monolith that holds a user interface of its own.
ErrorNo
KQ041a Role names an Identity Provider
A Role names an Identity Provider: a Component or monolith marked idp.
ErrorNo
KQ042a Role has holders
A Role's Identity Provider holds an Identity of the Role's persona, so someone can hold the Role.
ErrorNo
KQ043an Identity is in an Identity Provider
An Identity sits in a Component or monolith marked idp.
ErrorNo
KQ071a Role is never in an anonymous application
A Component or monolith marked anonymous holds no Role.
ErrorNo
KQ072anonymous marks a user-facing application
Only a Component or monolith that holds a user interface of its own is marked anonymous.
ErrorNo
KQ073an Identity Provider is never anonymous
An Identity Provider is never marked anonymous.
ErrorNo
KQ120an internal Role is held by a job role
In an Ecosystem with job roles, every Role of an internal persona in its applications and its Identity Providers is held by a job role.
LintNo
KQ233a job role's persona is internal
A job role's persona is an employee or a freelancer.
ErrorNo
KQ234a held Role is of the job role's persona
A job role holds only Roles of its own persona.
ErrorNo

Workload identity​

CodeRuleSeverityQuick fix
KQ064a workload identity names an Identity Provider
A workload identity names an Identity Provider: a Component or monolith marked idp.
ErrorNo
KQ065a role sits in a server workload identity
App roles and scopes are declared in a server workload identity, never a client one.
ErrorNo
KQ066a credential sits on a client workload identity
Only a client workload identity states a credential.
ErrorNo
KQ067stored-in names a vault
A credential is stored in a vault element.
ErrorNo
KQ068a federated credential names its issuer
A federated credential comes from an Identity Provider: a Component marked idp.
ErrorNo
KQ069a scheme the caller's credential carries
A call's authentication scheme is one the caller's credential can produce.
ErrorNo
KQ070on-behalf-of rests on a scope
A call on behalf of a user rests on a delegated scope granted on the API it calls.
ErrorNo
KQ106a Component holds one kind of workload identity
A Component holds a client or a server workload identity, not both.
LintNo
KQ107a workload identity is one workload's, in one environment
A workload identity is the identity of one Component, in one Environment.
LintNo
KQ108people and workloads do not share an identity
Components do not run as people's accounts, and people do not sign in as a service.
LintNo
KQ109a grant has a call behind it
A client is granted a role only on an API it calls.
LintNo
KQ110a credential is read from its vault
A credential is stored in a vault the service connects to.
LintNo

Environments and database servers​

CodeRuleSeverityQuick fix
KQ029an environment line names a stage
An environment line names a stage its Ecosystem declares and sits on something that runs on its own.
ErrorNo
KQ030a client's environment line has no count
A user interface's environment line states no number of instances; the device it runs on is a host that states its count.
ErrorYes
KQ031a replica is in its primary's environment
A database server replica is of a database server in its own Environment.
ErrorNo
KQ032a Storage is on a database server
A Storage is hosted on a database server or a storage account, if on anything.
ErrorNo
KQ086an environment line states its count
The environment line of a part that runs, other than a client, a workload identity, a network, a DNS record or a certificate, states its number of instances.
ErrorNo
KQ087a held Component runs where its holder runs
A Component or deployable module held by one that states environments states only stages its holder states.
ErrorNo
KQ088a client runs where its backend runs
A user interface declared in its backend Component states only stages that Component runs in.
ErrorNo
KQ089a Storage is hosted where its owner runs
A database server hosting a Storage runs only in stages the Storage's owner runs in.
ErrorNo

Infrastructure​

CodeRuleSeverityQuick fix
KQ122a private endpoint has a private DNS record
A provider-run service reached in a network by a private endpoint has a private DNS record pointing at it, unless its provider resolves the name itself.
LintNo
KQ250a network-only product is in a network
A provider-run service of a product that cannot be public states the network it is in.
ErrorNo
KQ251a product's required parts are named
Every part a product word requires is named: its network with in, its storage account with uses, its origin with forwards-to, its certificate by served-by.
ErrorNo
KQ252a call's gateway publishes its target
The gateway a call goes via publishes the Interface the call lands on, unless it is a NAT the call leaves by.
ErrorNo
KQ253a Storage's pool is in its server
The pool a Storage names is inside the database server it is hosted on.
ErrorNo
KQ254a vault holds what is stored in it
A credential or a certificate is stored in a vault whose kind holds secrets or certificates.
ErrorNo
KQ255an infrastructure clause names what it takes
Via names a gateway, backup a backup vault, covers a stage of the service's own Ecosystem, and a certificate's stored-in a vault and served-by what can serve one.
ErrorNo
KQ256a bucket holds one Storage
A storage account of a bucket product holds exactly one Storage.
ErrorNo
KQ257a Storage is of a kind its account holds
A Storage on a storage account is of a kind that account's product holds.
ErrorNo
KQ258only a client runs on a storage account
Only a user-facing client is deployed on a storage account, a static site served from it.
ErrorNo
KQ259infrastructure stays in its stage
What a part runs on, and what an infrastructure element runs on, is in and uses, is in the same stage, a registry aside, and a link joins two networks of one stage.
ErrorNo
KQ260a private DNS zone is in a network
A DNS record in a private zone states the network its zone is linked to.
ErrorNo
KQ261a platform service states how it runs
A platform service of a generic kind states paas or on the host it runs on.
ErrorNo
KQ262a product word fixes how it runs
A platform service of a provider's product word states no paas, states on only after a self-run word, and states it after one.
ErrorNo
KQ269an endpoint stated plaintext is not proven encrypted
A software-facing Interface or a Broker stated in-transit plaintext does not serve a certificate, is not of a transport that takes no plaintext, and is not reached with auth certificate.
ErrorNo
KQ270only a network endpoint states in-transit
in-transit is stated on a software-facing Interface other than an ipc-api, or on a Broker, and nowhere else.
ErrorNo
KQ292a location is stated once
An element in a network that states its location states none of its own: it is where its network is.
ErrorNo
KQ293a zone its location has
Each zone an element names is one its location has: one its region's registry entry names, or one its data center declares.
ErrorNo
KQ294zones or zone-redundant
An element names the zones it spans or says its provider spreads it with zone-redundant, never both.
ErrorNo
KQ295a stage on several lines is on different hosts
A part that states one stage on several environment lines names what it runs on on each, a different host or platform on each.
ErrorNo

Life cycle​

CodeRuleSeverityQuick fix
KQ123support does not end within the warning period
A run element that is not retired, phasing out or meant to be replaced, migrated or retired does not reach the end of its extended support or its contract within the repository's warning period, nor does a contract unless all it covers is so answered.
LintNo
KQ263nothing live depends on a retired element
Nothing that is not retired is deployed, hosted or installed on a retired element, uses it or calls it, and no Component that is not retired is held in a retired monolith.
ErrorNo
KQ264a phasing-out element is not invested in
An element that is phasing out does not have a future of invest.
ErrorNo
KQ265a successor is of the element's type and its future
A successor is named only with a future of replace or migrate, is of the same type as the element, or a Component for a monolith and a monolith for a Component, and is not the element itself.
ErrorNo
KQ266an installation is on a Host
An installation names the Host it is installed on, and only a Host.
ErrorNo
KQ267extended support ends after mainstream support
An element's end of extended support is not before its end of mainstream support.
ErrorNo
KQ268support does not end within the error period
A run element that is not retired, phasing out or meant to be replaced, migrated or retired does not reach the end of its extended support or its contract within the repository's error period, nor past it, nor does a contract unless all it covers is so answered.
ErrorNo

Suppliers and contracts​

CodeRuleSeverityQuick fix
KQ129bought software has a supplier
In an Ecosystem with a contract, every saas or cots Component or monolith is covered by a contract, a Component in a covered monolith counting as covered.
LintNo
KQ130a critical contract has a way out
A contract supporting a critical Function states its ends and its notice.
LintNo
KQ131a contract supports a Function
A contract supports a Function: something it covers realizes one, or it names one with via.
LintNo
KQ134a Platform says whose work it does
In an Ecosystem with two or more legal entities, every Platform and monolith names with for the entities or branches whose work it does.
LintNo
KQ135a supplier is one company
A supplier's is names an Ecosystem holding at most one legal entity; where it holds several, is names the legal entity by path.
LintNo
KQ136a branch is abroad
A branch is in another country than its legal entity's headquarters.
LintNo
KQ284a contract covers its own Ecosystem's elements
What a contract covers is in its own Ecosystem, or in the Ecosystem its supplier is, directly or through a legal entity.
ErrorNo
KQ285a contract supports its own Ecosystem's work
What a contract's via names is in the contract's own Ecosystem.
ErrorNo
KQ286a covered element states no contract end
An element a contract covers states no contract-end; it reads its contracts' ends.
ErrorNo
KQ287a contract ends after it starts
A contract's ends is not before its starts.
ErrorNo
KQ288a contract's subcontractors form one chain
Each subcontractor names another supplier of the Ecosystem than the contract's own, once, under its supplier or one in its chain, and the chain reaches the contract's supplier.
ErrorNo
KQ289a supplier's parent is another supplier
A supplier's parent is another supplier of its Ecosystem, and parents form no cycle.
ErrorNo
KQ290a supplier is another Ecosystem
A supplier's is names another Ecosystem than the one it is declared in, or a legal entity of another.
ErrorNo
KQ291an LEI is well formed
A supplier's or a legal entity's lei is 18 capitals or digits and two check digits valid under ISO 7064 MOD 97-10.
ErrorNo
KQ298a legal entity's parent is another legal entity
A legal entity's parent is another legal entity, in any Ecosystem, and parents form no cycle.
ErrorNo
KQ299an LEI names one legal entity
No two legal entities of the model state one lei.
ErrorNo
KQ400for names an entity of its Ecosystem
What a Platform's or a monolith's for names is a legal entity or a branch of its own Ecosystem.
ErrorNo
KQ401a contract is signed in its Ecosystem
A contract's signed-by names a legal entity of the Ecosystem it is declared in.
ErrorNo
KQ402a contract names its signer
In an Ecosystem with two or more legal entities, every contract states signed-by.
ErrorNo
KQ403a supplier that is a legal entity states no LEI
A supplier whose is names a legal entity states no lei and no headquarters: it reads both from the entity.
ErrorNo
KQ405a contract states each transfer ground once
A ground a contract's transfer clause lists is listed once.
ErrorNo

Plateaus​

CodeRuleSeverityQuick fix
KQ033plateaus form one sequence
Plateaus line up one after another, in a single sequence.
ErrorNo
KQ034plateau dates rise
Each dated plateau is later than the dated plateaus before it.
ErrorNo
KQ035the initial plateau changes nothing
The first plateau adds, removes, moves and restates nothing.
ErrorNo
KQ036a change names what the plateau before holds
A removal or a move names something the plateau before holds.
ErrorNo
KQ037a path is one element's
A path that once was an element's is never another element's in a later plateau.
ErrorNo
KQ038a move lands on a free path
A move puts an element where no other element has its Code.
ErrorNo
KQ039a relationship's end is alive
A plateau removes nothing a remaining relationship still uses.
ErrorNo
KQ047a data migration follows a plateau
A data migration is declared in a plateau after the initial one.
ErrorNo
KQ048a change of authority is covered once
Each change of a Domain Object's authoritative holding is covered by exactly one data migration of its plateau.
ErrorNo
KQ049covers names a change
A data migration covers only Data Entities its plateau adds, removes or restates.
ErrorNo
KQ050a data migration falls within its window
A data migration starts and is due between the dates of the plateau before and the plateau it delivers, and starts before it is due.
ErrorNo
KQ051a link names a page
A data migration's link is an absolute http or https URL, or the path of a page file in the repository.
ErrorNo
KQ404memberships form runs
A subject's memberships are runs that neither overlap nor touch, and only a relationship whose Id is its ends has more than one.
ErrorNo
KQ406a constant is alive where it is used
A constant a use names is alive in every plateau the policy, the element or the relationship holding the use is alive in.
ErrorNo

Policies​

These check that a policy makes sense, never whether your landscape follows it: a model that breaks its own policies is still valid.

CodeRuleSeverityQuick fix
KQ074a policy's clause is an aspect or a selector, with its values
Every clause of a policy names an aspect or a selector Kanoniq knows, or a property the repository declares, and lists only values that clause takes.
ErrorNo
KQ075a clause appears once in a policy
A policy names each clause once, listing several values in one clause.
ErrorNo
KQ076a policy's clauses apply to one subject type
Some subject, a call, a leg, a sync, a grant or a workload identity, can match every clause of a policy.
ErrorNo
KQ077an exemption lifts a policy from a subject
An exemption lifts a policy from an element, a call, a leg, a sync or a grant.
ErrorNo
KQ078an Ecosystem's policy set shares no Code with the model's
No policy set of an Ecosystem shares its Code with a policy set of the model, the two default sets aside.
ErrorNo
KQ090a preset's set is written out only where no other preset is judged
No policy set has a preset's Code while the repository sets a preset of its kind, and no two presets of one kind are both written out.
ErrorNo
KQ091a reserved policy set is of its own kind
A policy set coded as a default set, a preset or a package's set is of the kind its Code names: default-model, the baseline-model presets and threats-stated model sets, default-architecture, the baseline-architecture presets and threats-stride architecture sets.
ErrorNo
KQ092a model policy denies what is unstated
A policy in a model set is a deny whose tested clause lists only unstated, and no other clause lists it.
ErrorNo
KQ093an architecture policy judges what is stated
A policy in an architecture set lists unstated in no clause.
ErrorNo
KQ132a requirement the model can check is served
In a framework the repository's frameworks setting follows, every requirement the model can check is served by a policy in effect, a preset the settings name included.
LintNo
KQ271a constant is used where it is seen
A name used in a value's place is a constant written on the model, or on the element the value is written on or in, or on one that holds it.
ErrorNo
KQ272a constant's type fits where it is used
A constant used in a bound is a period or a number in the unit its clause takes; as quoted text, a string; in a period's place, a period; as an open property's value, its declared type's.
ErrorNo
KQ273a constant's name is defined once
A constant's name is defined once in the whole model, never again at another level.
ErrorNo
KQ274a constant's name is neither a stage nor a period
A constant's name is capitals, digits and underscores, starting with a capital, and is neither a stage nor shaped as a period, so a value is never ambiguous.
ErrorNo
KQ296a requirement is listed once
A policy or a policy set lists each requirement it serves once.
ErrorNo

Structure​

CodeRuleSeverityQuick fix
KQ001unresolved endpoint
Every relationship names elements that are in the model.
ErrorNo
KQ002duplicate identity
No two elements share an Id, and no two elements under one parent share a Code.
ErrorNo
KQ003Ecosystem presence
A model has an Ecosystem, and every Ecosystem sits at the top level.
ErrorNo
KQ004parent cardinality
Every element but an Ecosystem has exactly one parent.
ErrorNo
KQ005containment reaches an Ecosystem
Following parents upward from any element reaches an Ecosystem, never a circle.
ErrorNo
KQ006owner cardinality
A Data Entity sits in a Storage, and a Storage sits in the Component or monolith that owns it.
ErrorNo
KQ103an orphaned derived element
A derived element is still named by something in the model.
LintNo

Splitting a model​

CodeRuleSeverityQuick fix
KQ026a relationship is stated once
A relationship is written once, in one file or across the files of a split model.
ErrorYes

Open properties​

CodeRuleSeverityQuick fix
KQ058a property is declared
An open property is declared in the repository's settings, for the element type it is written on.
ErrorNo
KQ059a property's value is of its declared type
An open property's value, and each value of a list, is of the type its declaration gives it.
ErrorNo

Page rules​

Page rules are checked by kq portal:build on the portal's pages, not on the model, and are reported under a KQP code. See What kq portal:build reports.

Page files​

CodeRuleSeverity
KQP001well-formed YAML
A page file, a Markdown page's or a decision record's frontmatter, and a view block are well-formed YAML: one document, no key repeated.
Error
KQP002page shape
A page file, a Markdown page's or a decision record's frontmatter, and a view block have every field they need and only those they take, each with a value it can take.
Error
KQP003page name
A page file's name is the canonical encoding of the page's name.
Error
KQP004one file per page
A page has one file: no two sibling files for names that differ only in case or composition, or for one name under two extensions.
Error
KQP009a known icon
An icon is named as Lucide names one of its icons.
Error
CodeRuleSeverity
KQP005one home page
portal/ holds exactly one page file directly: the home page.
Error
KQP006every page is reachable
Every page file and decision record sits in a directory that mirrors a page.
Error
KQP101published under unpublished
A published page sits under a published parent, since it is not rendered otherwise.
Lint

Tiles​

CodeRuleSeverity
KQP007a tile names a child
A page tile names a child page or decision record in the page's mirror directory.
Error
KQP008a child is listed once
A page's tiles list each child once.
Error
KQP102an unlisted child
A page's tiles list every child page, so their order is chosen rather than by name.
Lint

Views​

CodeRuleSeverity
KQP010a known plateau
A view tile's or view block's at and to name plateaus of the model, its to later than its at.
Error
KQP019a known view path
A path that decides which view opens, a view's domain, focus or anchor, names an element of the model of a type the parameter takes.
Error
KQP106a view's selected and collapsed paths
A view's selected path and collapsed entries name elements of the model.
Lint

Decision records​

CodeRuleSeverity
KQP011a known element
A decision record's element Id names an element of the model.
Error
KQP012a known successor
A superseded decision record's superseded-by names another decision record's file, by its path from portal/.
Error
KQP013a chain of successors that ends
Following superseded-by from record to record never comes back to a record already passed.
Error
KQP103the element's path
A decision record's element path is the path its element Id is at in the model.
Lint
KQP104a successor in force
A superseded decision record's successor is not proposed or rejected, since then nothing has replaced the decision yet.
Lint

Page text​

CodeRuleSeverity
KQP014an image path
An image in a page's text is named by a relative path to a file inside portal/.
Error
KQP015an image that exists
An image in a page's text names a file that exists.
Error
KQP016an image type
An image in a page's text is a PNG, JPEG, GIF, WebP or SVG file, as its extension says and its first bytes agree.
Error
KQP017an image's size
An image in a page's text is at most 5 MiB.
Error
KQP018a link's target
A link in a page's text names a page file or decision record by a relative path, or is a fragment or an http, https or mailto address.
Error
KQP105a link to an unrendered page
A rendered page links only to rendered pages, since a link to any other is written as its text.
Lint

© 2026 Extenza Works. All rights reserved.