kq audit
Checks the model against its policies and prints every finding, however kanoniq.repository.json sets them: every policy set is checked, those it turns off included, even with "enabled": false. Use it to see what your policies would say before you turn them on. It writes nothing.
kq audit [options] <path>...
Arguments
| Argument | Is |
|---|---|
<path>... | A file or folder of each model to audit. |
Options
| Option | Does |
|---|---|
--enforce | Report every finding as an error and fail on any, an exempted breach aside. |
--format <format> | How findings are written: a text line each, a GitHub Actions workflow command each, or one SARIF 2.1.0 log on standard output. One of text, github, sarif. Default text. |
--as-of <yyyy-mm-dd> | Judge policies as of this day instead of today, to reproduce a past run or see what a later date breaks: an exemption past its until lifts nothing. |
--require-license | Fail with exit 3 where a policy set needs a feature no license grants, instead of skipping it with a warning. |
Environment
| Variable | Does |
|---|---|
KANONIQ_TELEMETRY | off, 0 or false stops kq reporting the run; so does DO_NOT_TRACK=1. |
Exit codes
| Code | Means |
|---|---|
0 | Done |
1 | Failed: the model has an error, a check found a change, or a file could not be read or written |
2 | Usage error: an unknown command or option, a missing or extra argument, a path that does not exist, or an output folder kq will not clear |
3 | A paid feature that no license found grants |
Every finding is reported as info, and it exits with 0. With --enforce, every finding is an error and it exits with 1 on any, except a breach you have exempted, which never fails it. A model with errors is not checked: it prints them, as kq validate does, and exits with 1. It takes --format and --as-of as kq validate does.
After its findings it lists the model's assumptions, where it has any, under a line assumptions:: each subject's path and its reason, sorted by path. The list is not findings and changes no exit code, --enforce included.
kq audit models/my-model # what would my policies report?
kq audit --enforce --as-of 2027-07-01 models/my-model # fail on anything that breaks them that day
Output for CI
kq audit takes --format as kq validate does: github for a pull request's lines, sarif for code scanning. See kq validate in GitHub Actions and SARIF in code scanning.
© 2026 Extenza Works. All rights reserved.