kronika check
Audit one exact Git change against the current documentation through Brama. The command is a fail-closed documentation consistency gate.
Invocation
kronika check --base <ref> [options]
--base <ref> is required. Model access requires BRAMA_URL and a BRAMA_API_KEY_ROLE reference in ROLE#FIELD form, resolved through the configured credential source. The repository must be a Git repository with both refs resolvable as commits. See configuration.
Inputs and options
| Option | Default | Effect |
|---|---|---|
--base <ref> | required | Base commit of the three-dot Git range. |
--head <ref> | HEAD | Head commit of the audited range. |
--repo <path> | current directory | Repository to audit. |
--output <path> | README.md | Documentation target considered by source collection. |
--source <path> | automatic discovery | Explicit audit evidence; repeatable. |
--instruction <text> | standard completeness audit | Additional documentation goal sent with the exact change. |
--model <selector> | KRONIKA_MODEL or any | Brama model selector. |
--max-input-bytes <n> | none | Total source budget; unset, every selected source is read. |
--max-file-bytes <n> | none | Per-file source limit; unset, no file is skipped for its size. |
--max-diff-bytes <n> | none | Maximum complete diff size; a larger diff is refused, never truncated. Unset, the whole diff is audited. |
--max-tokens <n> | none | Completion token budget; unset, the Brama alias's own limit applies. |
--json | off | Emits the machine-readable result. |
Output and state
Kronika resolves both refs, reads the base...head diff with rename detection and Git's own default context, collects current safe sources, and asks Brama for a strict verdict. Text output starts with Kronika documentation check: PASSED or BLOCKED, followed by the summary and findings. JSON output contains passed, summary, findings, model, resolved SHAs, changed paths, diff bytes, source count, and skipped sources.
The command writes no repository state. It exits 0 exactly when there are no blocker findings; warnings do not block. It exits 1 for a blocker or operational failure, and 2 for invalid command syntax, including a missing --base. Usage refusals print help and occur before credential resolution.
A value-taking option refuses an empty value or a following option token. For example, kronika check --base --json reports the missing --base value with usage status 2; it does not treat --json as a Git ref or attempt credential resolution.
Options belonging to another command are refused before credential resolution. For example, check --apply reports check does not accept --apply; checking never silently accepts an instruction to rewrite files.
Exact refusals
check requires --base <ref>Git commit cannot be resolved: <ref>Git diff cannot be read for <base-sha>...<head-sha>Git diff is <n> bytes, above --max-diff-bytes <limit>; narrow or split the change rather than auditing a truncated diffBRAMA_URL is required: the address of the Brama gatewayandBRAMA_API_KEY_ROLE is required: ROLE#FIELD naming the role the item holding the Brama bearer plays, and its field- Malformed model results are refused, beginning with
Kronika returned invalid documentation-check JSON; a verdict inconsistent with blocker findings isKronika documentation check contradicts its blocker findings.
Source containment, symlink, existence, UTF-8, and byte-budget rules are the same as kronika sources. Parser and runtime errors are written as kronika: <message> to stderr.