How it works
- A page is written with a discriminator field in its frontmatter (default
type). - KiwiFS looks up
.kiwi/schemas/{value}.json. - If the schema exists and enforcement is on, the frontmatter is validated.
- Invalid pages are rejected — or logged when
enforce_level = "warn".
Enabling enforcement
enforce = false (default), schemas are stored but not checked on writes.
Creating schemas
Schemas live in.kiwi/schemas/ as standard JSON Schema files. The filename (minus .json) matches the discriminator value — type by default, or whatever you set in [schema] discriminator.
type: runbook in its frontmatter must have title, status, and owner:
Listing schemas
Reading a schema
Validation errors
When a write fails validation, you get a400 response with details: