Skip to content

Changing a Config Schema

The shapes of a project’s config files are JSON Schemas in kirak/schemas/:

File Schema
models.json (all models in one file) models.schema.json
models/<name>.json (one model) model.schema.json
kirak.json, kirak.local.json manifest.schema.json
agents/<name>.json agent.schema.json
mcp/<name>.json mcp.schema.json
an integration profile (integrations/<name>.json, and the bundled ones in kirak/integrations/profiles/) integration_profile.schema.json
the tools map of a file that offers tools (MCP server files) tools.schema.json, $ref’d by that file’s schema; ref checks in kirak/core/tool_declarations.py

Startup, kirak validate, kirak schema (the copies in a project’s .kirak/), kirak modules (each module’s settings) and the generated settings tables in these docs all read these files. Change the schema and the code that reads the key; nothing else repeats the key list.

File Change
kirak/schemas/<name>.schema.json The key, its type, and a description that states the default
The code that reads it For kirak.json, the section’s dataclass in kirak/core/manifest.py too
kirak/validation/ Only for rules beyond shape (references to other files, installed extras). Each new problem code goes in kirak/core/problem_codes.py
Docs The module or concept page, when behavior changes. Settings tables are generated: run python scripts/gen_reference.py
CHANGELOG.md An entry

A schema can give a friendlier message for a keyword with x-kirak-errors on the key, for example "x-kirak-errors": {"pattern": "'name' must be lowercase letters, digits, and hyphens."}.

Unknown keys are rejected, so a project that still has the old key fails at startup with the schema’s schema_additional_properties error. Kirak is pre-release: do not keep code that recognises a removed key or explains its replacement. Remove the key from the schema and the docs, and add a Breaking entry to CHANGELOG.md that names it.

  • tests/test_core/test_schema_files.py – every key has a description, each kirak.json section matches its dataclass, the example projects validate.
  • tests/test_catalog/test_generated_docs.py – the generated tables are current.

Projects that exported the schemas into .kirak/ get a startup warning until they run kirak schema again.